[libdap] 40/48: Update to 3.12.0

Alastair McKinstry mckinstry at moszumanska.debian.org
Sun Jul 5 10:17:13 UTC 2015


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

mckinstry pushed a commit to tag unstable/3.12.0-1
in repository libdap.

commit d4513289a92f1ff5f69cf20d893ea4a7647931e7
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Oct 17 22:27:19 2013 +0100

    Update to 3.12.0
---
 AlarmHandler.h                                     |    32 +-
 Ancillary.h                                        |     2 +-
 Array.cc                                           |   259 +-
 Array.h                                            |    14 +-
 ArrayGeoConstraint.cc                              |   212 -
 ArrayGeoConstraint.h                               |   140 -
 AttrTable.cc                                       |    10 +-
 AttrTable.h                                        |     2 +-
 BaseType.cc                                        |   308 +-
 BaseType.h                                         |   124 +-
 BaseTypeFactory.cc                                 |    38 +-
 BaseTypeFactory.h                                  |     4 +-
 Byte.cc                                            |    99 +-
 Byte.h                                             |    32 +-
 ChangeLog                                          |   682 +-
 Clause.cc                                          |     2 +-
 Clause.h                                           |     2 +-
 Connect.cc                                         |   966 +-
 Connect.h                                          |     2 +-
 ConstraintEvaluator.cc                             |    70 +-
 ConstraintEvaluator.h                              |    20 +-
 Constructor.cc                                     |   669 +-
 Constructor.h                                      |    69 +-
 BaseTypeFactory.cc => D4BaseTypeFactory.cc         |    85 +-
 tests/TestTypeFactory.h => D4BaseTypeFactory.h     |    95 +-
 D4Dimensions.cc                                    |    23 +
 D4Dimensions.h                                     |    64 +
 D4EnumDef.cc                                       |    79 +
 D4EnumDef.h                                        |    85 +
 D4Group.cc                                         |   130 +
 D4Group.h                                          |    45 +
 D4Maps.cc                                          |    23 +
 D4Maps.h                                           |    43 +
 DDXExceptions.h => D4ParseError.h                  |    16 +-
 D4ParserSax2.cc                                    |  1197 ++
 DDXParserSAX2.h => D4ParserSax2.h                  |   132 +-
 DAP4StreamMarshaller.cc                            |   547 +
 DAP4StreamMarshaller.h                             |   154 +
 DAP4StreamUnMarshaller.cc                          |   412 +
 DAP4StreamUnMarshaller.h                           |   144 +
 DAPCache3.cc                                       |   988 -
 DAPCache3.h                                        |   152 -
 DAS.cc                                             |    15 +-
 DAS.h                                              |     6 +-
 DDS.cc                                             |   692 +-
 DDS.h                                              |    52 +-
 DDXExceptions.h                                    |     2 +-
 DDXParserSAX2.cc                                   |   122 +-
 DDXParserSAX2.h                                    |     6 +-
 DODSFilter.cc                                      |   215 +-
 DODSFilter.h                                       |     6 +-
 DapIndent.cc                                       |     2 +-
 DapIndent.h                                        |     2 +-
 DapObj.h                                           |     2 +-
 DataDDS.cc                                         |     7 +-
 DataDDS.h                                          |     2 +-
 EncodingType.h                                     |     2 +-
 Error.cc                                           |    10 +-
 Error.h                                            |     2 +-
 Error.lex                                          |     5 +-
 Error.tab.cc                                       |   425 +-
 Error.tab.hh                                       |    87 +-
 Error.y => Error.yy                                |    23 +-
 EventHandler.h                                     |     2 +-
 Float32.cc                                         |   105 +-
 Float32.h                                          |    21 +-
 Float64.cc                                         |   104 +-
 Float64.h                                          |    23 +-
 GNU/GNURegex.cc                                    |    20 +-
 GNU/GNURegex.h                                     |     2 +-
 GNU/GetOpt.cc                                      |     6 +-
 GSEClause.cc                                       |   351 -
 GSEClause.h                                        |   143 -
 GeoConstraint.cc                                   |   658 -
 GeoConstraint.h                                    |   376 -
 Grid.cc                                            |   479 +-
 Grid.h                                             |    33 +-
 GridGeoConstraint.cc                               |   398 -
 GridGeoConstraint.h                                |    86 -
 HTTPCache.cc                                       |     5 +-
 HTTPCache.h                                        |     2 +-
 HTTPCacheDisconnectedMode.h                        |     2 +-
 HTTPCacheInterruptHandler.h                        |     2 +-
 HTTPCacheResponse.h                                |     2 +-
 HTTPCacheTable.cc                                  |     7 +-
 HTTPCacheTable.h                                   |     2 +-
 HTTPConnect.cc                                     |    14 +-
 HTTPConnect.h                                      |     2 +-
 HTTPResponse.h                                     |     2 +-
 INSTALL                                            |     4 +-
 Int16.cc                                           |    99 +-
 Int16.h                                            |    23 +-
 Int32.cc                                           |    99 +-
 Int32.h                                            |    27 +-
 Int64.cc                                           |   257 +
 Float32.h => Int64.h                               |    73 +-
 Int8.cc                                            |   252 +
 Int16.h => Int8.h                                  |    65 +-
 InternalErr.cc                                     |     4 +-
 InternalErr.h                                      |     2 +-
 Keywords2.cc                                       |     8 +-
 Keywords2.h                                        |     2 +-
 Makefile.am                                        |   162 +-
 Makefile.in                                        |   910 +-
 Marshaller.h                                       |     2 +-
 NEWS                                               |    13 +
 OSX_Resources/Info.plist                           |    46 -
 OSX_Resources/ReadMe.txt                           |   247 -
 ObjectType.h                                       |     2 +-
 Operators.h                                        |   324 +-
 PipeResponse.h                                     |     2 +-
 RCReader.cc                                        |     2 +-
 RCReader.h                                         |     2 +-
 README                                             |    16 +-
 RValue.cc                                          |    10 +-
 RValue.h                                           |    10 +-
 Resource.h                                         |     2 +-
 Response.h                                         |     2 +-
 ResponseBuilder.cc                                 |  1507 --
 ResponseBuilder.h                                  |   184 -
 ResponseTooBigErr.cc                               |     4 +-
 ResponseTooBigErr.h                                |     2 +-
 Sequence.cc                                        |   207 +-
 Sequence.h                                         |    51 +-
 ServerFunction.cc                                  |    88 +
 ServerFunction.h                                   |   136 +
 ServerFunctionsList.cc                             |   457 +
 ServerFunctionsList.h                              |    83 +
 SignalHandler.cc                                   |     8 +-
 SignalHandler.h                                    |     2 +-
 SignalHandlerRegisteredErr.h                       |     2 +-
 StdinResponse.h                                    |     2 +-
 Str.cc                                             |    61 +-
 Str.h                                              |    11 +-
 Structure.cc                                       |   196 +-
 Structure.h                                        |    66 +-
 UInt16.cc                                          |    98 +-
 UInt16.h                                           |    23 +-
 UInt32.cc                                          |    98 +-
 UInt32.h                                           |    23 +-
 UInt64.cc                                          |   230 +
 Float32.h => UInt64.h                              |    68 +-
 UnMarshaller.h                                     |     2 +-
 Url.cc                                             |     2 +-
 Url.h                                              |     4 +-
 VCPP/sample/getdap.cc                              |     6 +-
 Vector.cc                                          |   305 +-
 Vector.h                                           |    26 +-
 XDRFileMarshaller.cc                               |     2 +-
 XDRFileMarshaller.h                                |     2 +-
 XDRFileUnMarshaller.cc                             |    12 +-
 XDRFileUnMarshaller.h                              |     3 +-
 XDRStreamMarshaller.cc                             |   515 +-
 XDRStreamMarshaller.h                              |    39 +-
 XDRStreamUnMarshaller.cc                           |   340 +-
 XDRStreamUnMarshaller.h                            |    41 +-
 XDRUtils.cc                                        |     2 +-
 XDRUtils.h                                         |     2 +-
 XMLWriter.cc                                       |    48 +
 XMLWriter.h                                        |    23 +
 aclocal.m4                                         |   330 +-
 ce_expr.lex                                        |    78 +-
 ce_expr.tab.cc                                     |  1689 +-
 ce_expr.tab.hh                                     |   186 +-
 ce_expr.y                                          |  1042 -
 ce_expr.yy                                         |  1346 ++
 ce_functions.cc                                    |  1232 --
 ce_functions.h                                     |    66 -
 ce_parser.h                                        |     5 +
 conf/._config.guess                                |   Bin 197 -> 0 bytes
 conf/._config.sub                                  |   Bin 197 -> 0 bytes
 conf/._depcomp                                     |   Bin 197 -> 0 bytes
 conf/._install-sh                                  |   Bin 197 -> 0 bytes
 conf/._libtool.m4                                  |   Bin 197 -> 0 bytes
 conf/._ltmain.sh                                   |   Bin 197 -> 0 bytes
 conf/._ltoptions.m4                                |   Bin 197 -> 0 bytes
 conf/._ltsugar.m4                                  |   Bin 197 -> 0 bytes
 conf/._ltversion.m4                                |   Bin 197 -> 0 bytes
 conf/._lt~obsolete.m4                              |   Bin 197 -> 0 bytes
 conf/._missing                                     |   Bin 197 -> 0 bytes
 conf/acinclude.m4                                  |    29 +-
 conf/config.guess                                  |   449 +-
 conf/config.sub                                    |   227 +-
 conf/depcomp                                       |   189 +-
 conf/install-sh                                    |    35 +-
 conf/libtool.m4                                    |   265 +-
 conf/ltmain.sh                                     |    95 +-
 conf/ltoptions.m4                                  |    19 +-
 conf/ltversion.m4                                  |    10 +-
 conf/missing                                       |   148 +-
 conf/snippet/_Noreturn.h                           |    10 +
 conf/{ => snippet}/arg-nonnull.h                   |     4 +-
 conf/{ => snippet}/c++defs.h                       |     4 +-
 conf/{ => snippet}/warn-on-use.h                   |     4 +-
 config.h.in                                        |   311 +-
 configure                                          |  7902 +++++---
 configure.ac                                       |   310 +-
 dap-config.in                                      |    10 +-
 das.lex                                            |     5 +-
 das.tab.cc                                         |   646 +-
 das.tab.hh                                         |    96 +-
 das.y => das.yy                                    |    25 +-
 dds.lex                                            |     5 +-
 dds.tab.cc                                         |   630 +-
 dds.tab.hh                                         |   115 +-
 dds.y => dds.yy                                    |    26 +-
 debug.h                                            |     2 +-
 dods-datatypes-config.h.in                         |    13 +-
 dods-datatypes-static.h                            |     7 +
 dods-datatypes.h                                   |     7 +
 dods-limits.h                                      |    35 +-
 doxy.conf                                          |     2 +-
 escaping.cc                                        |     2 +-
 escaping.h                                         |     2 +-
 expr.h                                             |    15 +-
 getdap.cc                                          |     6 +-
 gl/Makefile.am                                     |   650 +-
 gl/Makefile.in                                     |   882 +-
 gl/alloca.in.h                                     |    10 +-
 gl/btowc.c                                         |     2 +-
 gl/byteswap.in.h                                   |    44 +
 gl/config.charset                                  |     7 +-
 gl/gettext.h                                       |    13 +-
 gl/iswblank.c                                      |    27 -
 gl/langinfo.in.h                                   |    18 +-
 gl/localcharset.c                                  |    38 +-
 gl/localcharset.h                                  |     5 +-
 gl/locale.in.h                                     |   201 +
 gl/localeconv.c                                    |   103 +
 gl/m4/00gnulib.m4                                  |     2 +-
 gl/m4/alloca.m4                                    |    82 +-
 gl/m4/btowc.m4                                     |     9 +-
 gl/m4/byteswap.m4                                  |    19 +
 gl/m4/codeset.m4                                   |     2 +-
 gl/m4/configmake.m4                                |     2 +-
 gl/m4/extensions.m4                                |    11 +-
 gl/m4/fcntl-o.m4                                   |    17 +-
 gl/m4/glibc21.m4                                   |     2 +-
 gl/m4/gnulib-cache.m4                              |    26 +-
 gl/m4/gnulib-common.m4                             |   155 +-
 gl/m4/gnulib-comp.m4                               |   213 +-
 gl/m4/gnulib-tool.m4                               |     2 +-
 gl/m4/include_next.m4                              |    54 +-
 gl/m4/langinfo_h.m4                                |     2 +-
 gl/m4/localcharset.m4                              |     2 +-
 gl/m4/locale-fr.m4                                 |   154 +-
 gl/m4/locale-ja.m4                                 |    88 +-
 gl/m4/locale-zh.m4                                 |    71 +-
 gl/m4/locale_h.m4                                  |   122 +
 gl/m4/localeconv.m4                                |    22 +
 gl/m4/longlong.m4                                  |    87 +-
 gl/m4/malloc.m4                                    |    52 +-
 gl/m4/mbrtowc.m4                                   |    97 +-
 gl/m4/mbsinit.m4                                   |    33 +-
 gl/m4/mbstate_t.m4                                 |     2 +-
 gl/m4/mbtowc.m4                                    |    19 +
 gl/m4/multiarch.m4                                 |     6 +-
 gl/m4/nl_langinfo.m4                               |     6 +-
 gl/m4/off_t.m4                                     |    18 +
 gl/m4/regex.m4                                     |    11 +-
 gl/m4/ssize_t.m4                                   |     2 +-
 gl/m4/stdbool.m4                                   |    17 +-
 gl/m4/stddef_h.m4                                  |     8 +-
 gl/m4/stdint.m4                                    |    32 +-
 gl/m4/stdlib_h.m4                                  |    40 +-
 gl/m4/strcase.m4                                   |    45 +
 gl/m4/strings_h.m4                                 |    52 +
 gl/m4/sys_types_h.m4                               |    24 +
 gl/m4/unistd_h.m4                                  |   125 +-
 gl/m4/warn-on-use.m4                               |    14 +-
 gl/m4/wchar_h.m4                                   |    99 +-
 gl/m4/wchar_t.m4                                   |     2 +-
 gl/m4/wcrtomb.m4                                   |    25 +-
 gl/m4/wctype_h.m4                                  |   165 +-
 gl/m4/wint_t.m4                                    |     2 +-
 gl/malloc.c                                        |    10 +-
 gl/mbrtowc.c                                       |    33 +-
 gl/mbsinit.c                                       |    18 +-
 gl/{wcrtomb.c => mbtowc-impl.h}                    |    47 +-
 gl/{btowc.c => mbtowc.c}                           |    27 +-
 gl/nl_langinfo.c                                   |     5 +-
 gl/ref-add.sin                                     |     5 +-
 gl/ref-del.sin                                     |     5 +-
 gl/regcomp.c                                       |   201 +-
 gl/regex.c                                         |    18 +-
 gl/regex.h                                         |   229 +-
 gl/regex_internal.c                                |    65 +-
 gl/regex_internal.h                                |    63 +-
 gl/regexec.c                                       |   156 +-
 gl/stdbool.in.h                                    |     5 +-
 gl/stddef.in.h                                     |    19 +-
 gl/stdint.in.h                                     |   208 +-
 gl/stdlib.in.h                                     |   278 +-
 gl/strcasecmp.c                                    |    62 +
 gl/streq.h                                         |    10 +-
 gl/strings.in.h                                    |   122 +
 gl/strncasecmp.c                                   |    62 +
 gl/sys_types.in.h                                  |    51 +
 gl/unistd.in.h                                     |   401 +-
 gl/verify.h                                        |   146 +-
 gl/wchar.in.h                                      |   631 +-
 gl/wcrtomb.c                                       |     2 +-
 gl/wctype.in.h                                     |   325 +-
 gse.lex                                            |   174 -
 gse.tab.cc                                         |  1716 --
 gse.tab.hh                                         |    88 -
 gse.y                                              |   228 -
 gse_parser.h                                       |    84 -
 lex.Error.cc                                       |    64 +-
 lex.ce_expr.cc                                     |   277 +-
 lex.das.cc                                         |    86 +-
 lex.dds.cc                                         |    78 +-
 lex.gse_.cc                                        |  1898 --
 libdap.spec                                        |     4 +-
 mime_util.cc                                       |   479 +-
 mime_util.h                                        |    36 +-
 parser-util.cc                                     |     6 +-
 parser.h                                           |     2 +-
 tests/DASTest                                      |  7848 +++-----
 tests/DDSTest                                      |  6309 +++---
 tests/EXPRTest                                     | 19358 ++++++-------------
 tests/EXPRTest.at                                  |    16 +-
 tests/Makefile.am                                  |    22 +-
 tests/Makefile.in                                  |   370 +-
 tests/ResponseBuilder.cc                           |   488 +
 tests/ResponseBuilder.h                            |    74 +
 tests/TestArray.cc                                 |    13 +-
 tests/TestArray.h                                  |     2 +-
 tests/TestByte.cc                                  |    18 +-
 tests/TestByte.h                                   |     2 +-
 tests/TestCommon.h                                 |     2 +-
 tests/TestFloat32.cc                               |    16 +-
 tests/TestFloat32.h                                |     2 +-
 tests/TestFloat64.cc                               |    12 +-
 tests/TestFloat64.h                                |     2 +-
 tests/TestGrid.cc                                  |     2 +-
 tests/TestGrid.h                                   |     2 +-
 tests/TestInt16.cc                                 |    10 +-
 tests/TestInt16.h                                  |     2 +-
 tests/TestInt32.cc                                 |    16 +-
 tests/TestInt32.h                                  |     2 +-
 tests/TestSequence.cc                              |     2 +-
 tests/TestSequence.h                               |     2 +-
 tests/TestStr.cc                                   |     2 +-
 tests/TestStr.h                                    |     2 +-
 tests/TestStructure.cc                             |     2 +-
 tests/TestStructure.h                              |     2 +-
 tests/TestTypeFactory.cc                           |     2 +-
 tests/TestTypeFactory.h                            |     2 +-
 tests/TestUInt16.cc                                |    10 +-
 tests/TestUInt16.h                                 |     2 +-
 tests/TestUInt32.cc                                |    10 +-
 tests/TestUInt32.h                                 |     2 +-
 tests/TestUrl.cc                                   |     2 +-
 tests/TestUrl.h                                    |     2 +-
 tests/atconfig                                     |    10 +-
 tests/das-test.cc                                  |     5 +-
 tests/dds-test.cc                                  |    76 +-
 tests/expr-test.cc                                 |    50 +-
 tests/package.m4                                   |     4 +-
 unit-tests/ArrayGeoConstraintTest.cc               |   231 -
 unit-tests/ArrayTest.cc                            |     2 +-
 unit-tests/AttrTableTest.cc                        |    27 +-
 unit-tests/ByteTest.cc                             |     2 +-
 unit-tests/CEFunctionsTest.cc                      |   582 -
 unit-tests/D4-xml/D4Dimensions_1.xml               |     2 +
 unit-tests/D4-xml/D4Dimensions_2.xml               |     3 +
 unit-tests/D4-xml/D4Dimensions_3.xml               |     4 +
 unit-tests/D4-xml/D4Dimensions_4.xml               |     5 +
 unit-tests/D4-xml/D4Dimensions_empty.xml           |     1 +
 unit-tests/D4-xml/D4EnumDefs_1.xml                 |     5 +
 unit-tests/D4-xml/D4EnumDefs_2.xml                 |     9 +
 unit-tests/D4-xml/D4EnumDefs_3.xml                 |     9 +
 unit-tests/D4-xml/D4EnumDefs_empty.xml             |     1 +
 unit-tests/D4-xml/D4EnumDefs_values_1.xml          |     3 +
 unit-tests/D4-xml/README                           |     7 +
 unit-tests/D4DimensionsTest.cc                     |   183 +
 unit-tests/D4EnumDefsTest.cc                       |   190 +
 unit-tests/DAP4MarshallerTest.cc                   |   311 +
 unit-tests/DAP4UnMarshallerTest.cc                 |   362 +
 unit-tests/DASTest.cc                              |     2 +-
 unit-tests/DDSTest.cc                              |    84 +-
 unit-tests/DDXParserTest.cc                        |  1140 +-
 unit-tests/DODSFilterTest.cc                       |   353 -
 unit-tests/GridGeoConstraintTest.cc                |  1312 --
 unit-tests/HTTPCacheTest.cc                        |    18 +-
 unit-tests/HTTPConnectTest.cc                      |    18 +-
 unit-tests/Keywords2Test.cc                        |   217 -
 unit-tests/MIMEUtilTest.cc                         |     2 +-
 unit-tests/Makefile.am                             |    66 +-
 unit-tests/Makefile.in                             |   565 +-
 unit-tests/MarshallerTest.cc                       |    66 +-
 unit-tests/RCReaderTest.cc                         |     2 +-
 unit-tests/RegexTest.cc                            |     2 +-
 unit-tests/ResponseBuilderTest.cc                  |   428 -
 unit-tests/SequenceTest.cc                         |     2 +-
 unit-tests/ServerFunctionsListUnitTest.cc          |   213 +
 unit-tests/SignalHandlerTest.cc                    |   127 +-
 unit-tests/ancT.cc                                 |     2 +-
 unit-tests/arrayT.cc                               |     2 +-
 unit-tests/cache-testsuite/Makefile.in             |   176 +-
 unit-tests/ce-functions-testsuite/geo_grid.das     |    35 -
 unit-tests/ce-functions-testsuite/geo_grid.dds     |    38 -
 unit-tests/ce-functions-testsuite/geo_grid_3d.dds  |    11 -
 .../ce-functions-testsuite/geo_grid_coads_lon.dds  |    10 -
 unit-tests/ce-functions-testsuite/two_grid.das     |     8 -
 unit-tests/ce-functions-testsuite/two_grid.dds     |    28 -
 unit-tests/dds-testsuite/fnoc1.nc.dmr.xml          |    79 +
 unit-tests/dds-testsuite/test.19b.xml              |     2 +-
 unit-tests/dds-testsuite/test.19b6.xml             |     2 +-
 unit-tests/dds-testsuite/test.19c.xml              |     2 +-
 unit-tests/dds-testsuite/test.19d.xml              |     2 +-
 unit-tests/dds-testsuite/test.19e.xml              |     2 +-
 unit-tests/dds-testsuite/test.19f.xml              |     2 +-
 unit-tests/ddsT.cc                                 |     2 +-
 unit-tests/ddx-testsuite/test.09.ddx               |     2 +-
 unit-tests/generalUtilTest.cc                      |     2 +-
 unit-tests/parserUtilTest.cc                       |     2 +-
 unit-tests/server-testsuite/config/unix.exp        |    48 -
 unit-tests/server-testsuite/geturl.0/dodsdev.exp   |   102 -
 unit-tests/server-testsuite/geturl.0/urls.tcl      |   275 -
 ...se_builder_invoke_server_side_function_test.txt |    19 +
 unit-tests/server-testsuite/send_das_baseline.txt  |    15 +
 unit-tests/server-testsuite/send_dds_baseline.txt  |    12 +
 .../server-testsuite/simple_function_baseline.txt  |    13 +
 unit-tests/structT.cc                              |   220 +-
 unit-tests/testFile.cc                             |    41 +-
 unit-tests/testFile.h                              |    10 +-
 unit-tests/test_config.h                           |     2 +-
 util.cc                                            |   927 +-
 util.h                                             |    75 +-
 util_mit.cc                                        |    13 +-
 util_mit.h                                         |     2 +-
 xdr-datatypes.h                                    |     4 +-
 434 files changed, 42698 insertions(+), 51272 deletions(-)

diff --git a/AlarmHandler.h b/AlarmHandler.h
index bb2166e..1600e18 100644
--- a/AlarmHandler.h
+++ b/AlarmHandler.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -32,8 +32,6 @@
 
 #include "EventHandler.h"
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -47,40 +45,27 @@ namespace libdap
 class AlarmHandler : public EventHandler
 {
 private:
-#if FILE_METHODS
     FILE *d_file;  // Sink for the Error object.
-#endif
     ostream &d_stream;
     string d_version;
 
     // Ensure that d_stream gets initialized...
-    AlarmHandler() :
-#if FILE_METHODS
-        d_file( 0 ),
-#endif
-        d_stream( cout )
+    AlarmHandler() : d_file( 0 ), d_stream( cout )
     {}
 
 public:
-#if FILE_METHODS
     AlarmHandler(FILE *s) : d_file(s), d_stream( cout )
     {}
-#endif
+
     /** Store information to be used by the handler.
     @param out Write to this stream. */
-    AlarmHandler(ostream &out) :
-#if FILE_METHODS
-        d_file(0),
-#endif
-        d_stream( out )
+    AlarmHandler(ostream &out) : d_file(0), d_stream( out )
     {}
 
     virtual ~AlarmHandler()
     {
-#if FILE_METHODS
         if( d_file )
             fclose( d_file ) ;
-#endif
     }
 
     /** Handle an alarm signal. When one of our servers gets an alarm, that
@@ -89,8 +74,7 @@ public:
     has been reached.
 
     Because this is a signal handler, it should call only reentrant
-    system services, functions, et cetera. Generally that eliminates
-    stdio functions but I'm using them anyway. This handler never returns
+    system services, functions, et cetera. This handler never returns
     to the code that was running when the alarm signal was raised.
 
     @param signum We know it is SIGALRM; here as a check
@@ -98,10 +82,8 @@ public:
     virtual void handle_signal(int signum)
     {
         if (signum != SIGALRM)
-            cerr << "SIGALRM handler caught another signal!" << endl;
-#if 0
-        exit(1);
-#endif
+            throw Error("SIGALRM handler caught another signal!");
+
         throw Error("Timeout");
     }
 
diff --git a/Ancillary.h b/Ancillary.h
index b458a1e..5ed7787 100644
--- a/Ancillary.h
+++ b/Ancillary.h
@@ -21,7 +21,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Array.cc b/Array.cc
index 3e51390..212e39e 100644
--- a/Array.cc
+++ b/Array.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -162,11 +162,16 @@ Array::operator=(const Array &rhs)
     <tt>v</tt>'s name is null, then assume that the array \e is named and
     don't overwrite it with <tt>v</tt>'s null name.
 
+    @note It is possible for the BaseType pointer to be null when this
+    method is called, a behavior that differs considerably from that of
+    the other 'add_var()' methods.
+
     @note This version checks to see if \e v is an array. If so, it calls
     Vector::add_var() using the template variable of \e v and then appends
     the dimensions of \e v to this array. This somewhat obscure behavior
     simplifies 'translating' Sequences to arrays when the actual variable
     being translated is not a regular Sequence but an array of Sequences.
+    This is of very debatable usefulness, but it's here all the same.
 
     @param v The template variable for the array
     @param p The Part parameter defaults to nil and is ignored by this method.
@@ -175,6 +180,13 @@ Array::operator=(const Array &rhs)
 void
 Array::add_var(BaseType *v, Part)
 {
+#if 0
+    if (v && v->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Array.");
+#endif
+    // If 'v' is an Array, add the template instance to this object and
+    // then copy the dimension information. Odd semantics; I wonder if this
+    //is ever used. jhrg 6/13/12
     if (v && v->type() == dods_array_c) {
         Array *a = static_cast<Array*>(v);
         Vector::add_var(a->var());
@@ -194,14 +206,20 @@ Array::add_var(BaseType *v, Part)
 void
 Array::add_var_nocopy(BaseType *v, Part)
 {
+#if 0
+    if (v && v->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Array.");
+#endif
+    // If 'v' is an Array, add the template instance to this object and
+    // then copy the dimension information. Odd semantics; I wonder if this
+    //is ever used. jhrg 6/13/12
     if (v && v->type() == dods_array_c) {
-        Array *a = static_cast<Array*>(v);
-        Vector::add_var_nocopy(a->var());
-
-        Dim_iter i = a->dim_begin();
-        Dim_iter i_end = a->dim_end();
+        Array &a = dynamic_cast<Array&>(*v);
+        Vector::add_var_nocopy(a.var());
+        Dim_iter i = a.dim_begin();
+        Dim_iter i_end = a.dim_end();
         while (i != i_end) {
-            append_dim(a->dimension_size(i), a->dimension_name(i));
+            append_dim(a.dimension_size(i), a.dimension_name(i));
             ++i;
         }
     }
@@ -267,6 +285,14 @@ Array::prepend_dim(int size, const string& name/* = "" */)
   update_length(size); // the number is ignored...
 }
 
+/** Remove all the dimensions currently set for the Array. This also
+ * removes all constraint information.
+ */
+void
+Array::clear_all_dims()
+{
+	_shape.clear();
+}
 /** Resets the dimension constraint information so that the entire
     array is selected.
 
@@ -334,6 +360,11 @@ Array::add_constraint(Dim_iter i, int start, int stride, int stop)
 {
     dimension &d = *i ;
 
+    // if stop is -1, set it to the array's max element index
+    // jhrg 12/20/12
+    if (stop == -1)
+        stop = d.size - 1;
+
     // Check for bad constraints.
     // Jose Garcia
     // Usually invalid data for a constraint is the user's mistake
@@ -381,12 +412,17 @@ Array::dim_end()
 unsigned int
 Array::dimensions(bool /*constrained*/)
 {
+#if 0
+	// TODO This could be _shape.end() - _shape.begin()
     unsigned int dim = 0;
     for (Dim_citer i = _shape.begin(); i != _shape.end(); i++) {
         dim++;
     }
 
     return dim;
+#endif
+
+    return _shape.end() - _shape.begin();
 }
 
 /** Return the size of the array dimension referred to by <i>i</i>.
@@ -518,9 +554,12 @@ Array::dimension_name(Dim_iter i)
     return (*i).name;
 }
 
-/** Returns the number of bytes needed to hold the array.
-
-    @brief Returns the width of the data, in bytes. */
+/**
+ * @brief Returns the width of the data, in bytes.
+ * @param constrained if true, return the size of the array in bytes taking into
+ * account the current constraints on various dimensions. False by default.
+ * @return The number of bytes needed to store the array values.
+ */
 unsigned int Array::width(bool constrained)
 {
 
@@ -539,8 +578,6 @@ unsigned int Array::width(bool constrained)
 	}
 }
 
-
-#if FILE_METHODS
 /** Prints a declaration for the Array.  This is what appears in a
     DDS.  If the Array is constrained, the declaration will reflect
     the size of the Array once the constraint is applied.
@@ -562,30 +599,10 @@ void
 Array::print_decl(FILE *out, string space, bool print_semi,
                   bool constraint_info, bool constrained)
 {
-    if (constrained && !send_p())
-        return;
-
-    // print it, but w/o semicolon
-    var()->print_decl(out, space, false, constraint_info, constrained);
-
-    for (Dim_citer i = _shape.begin(); i != _shape.end(); i++) {
-        fprintf(out, "[") ;
-        if ((*i).name != "") {
-            fprintf(out, "%s = ", id2www((*i).name).c_str()) ;
-        }
-        if (constrained) {
-            fprintf(out, "%d]", (*i).c_size) ;
-        }
-        else {
-            fprintf(out, "%d]", (*i).size) ;
-        }
-    }
-
-    if (print_semi) {
-        fprintf(out, ";\n") ;
-    }
+    ostringstream oss;
+    print_decl(oss, space, print_semi, constraint_info, constrained);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 /** Prints a declaration for the Array.  This is what appears in a
     DDS.  If the Array is constrained, the declaration will reflect
@@ -631,16 +648,17 @@ Array::print_decl(ostream &out, string space, bool print_semi,
 	out << ";\n" ;
     }
 }
-#if FILE_METHODS
+
 /**
  * @deprecated
  */
 void
 Array::print_xml(FILE *out, string space, bool constrained)
 {
-    print_xml_core(out, space, constrained, "Array");
+    XMLWriter xml(space);
+    print_xml_writer_core(xml, constrained, "Array");
+    fwrite(xml.get_doc(), sizeof(char), xml.get_doc_size(), out);
 }
-#endif
 
 /**
  * @deprecated
@@ -648,19 +666,21 @@ Array::print_xml(FILE *out, string space, bool constrained)
 void
 Array::print_xml(ostream &out, string space, bool constrained)
 {
-    print_xml_core(out, space, constrained, "Array");
+    XMLWriter xml(space);
+    print_xml_writer_core(xml, constrained, "Array");
+    out << xml.get_doc();
 }
 
-#if FILE_METHODS
 /**
  * @deprecated
  */
 void
 Array::print_as_map_xml(FILE *out, string space, bool constrained)
 {
-    print_xml_core(out, space, constrained, "Map");
+    XMLWriter xml(space);
+    print_xml_writer_core(xml, constrained, "Map");
+    fwrite(xml.get_doc(), sizeof(char), xml.get_doc_size(), out);
 }
-#endif
 
 /**
  * @deprecated
@@ -668,81 +688,21 @@ Array::print_as_map_xml(FILE *out, string space, bool constrained)
 void
 Array::print_as_map_xml(ostream &out, string space, bool constrained)
 {
-    print_xml_core(out, space, constrained, "Map");
+    XMLWriter xml(space);
+    print_xml_writer_core(xml, constrained, "Map");
+    out << xml.get_doc();
 }
 
-#if FILE_METHODS
-class PrintArrayDim : public unary_function<Array::dimension&, void>
-{
-    FILE *d_out;
-    string d_space;
-    bool d_constrained;
-public:
-    PrintArrayDim(FILE *o, string s, bool c)
-            : d_out(o), d_space(s), d_constrained(c)
-    {}
-
-    void operator()(Array::dimension &d)
-    {
-        int size = d_constrained ? d.c_size : d.size;
-        if (d.name.empty())
-            fprintf(d_out, "%s<dimension size=\"%d\"/>\n", d_space.c_str(),
-                    size);
-        else
-            fprintf(d_out, "%s<dimension name=\"%s\" size=\"%d\"/>\n",
-                    d_space.c_str(), id2xml(d.name).c_str(), size);
-    }
-};
-
 /**
  * @deprecated
  */
 void
 Array::print_xml_core(FILE *out, string space, bool constrained, string tag)
 {
-    if (constrained && !send_p())
-        return;
-
-    fprintf(out, "%s<%s", space.c_str(), tag.c_str());
-    if (!name().empty())
-        fprintf(out, " name=\"%s\"", id2xml(name()).c_str());
-    fprintf(out , ">\n");
-
-    get_attr_table().print_xml(out, space + "    ", constrained);
-
-    BaseType *btp = var();
-    string tmp_name = btp->name();
-    btp->set_name("");
-    btp->print_xml(out, space + "    ", constrained);
-    btp->set_name(tmp_name);
-
-    for_each(dim_begin(), dim_end(),
-             PrintArrayDim(out, space + "    ", constrained));
-
-    fprintf(out, "%s</%s>\n", space.c_str(), tag.c_str());
+    XMLWriter xml(space);
+    print_xml_writer_core(xml, constrained, tag);
+    fwrite(xml.get_doc(), sizeof(char), xml.get_doc_size(), out);
 }
-#endif
-
-class PrintArrayDimStrm : public unary_function<Array::dimension&, void>
-{
-    ostream &d_out;
-    string d_space;
-    bool d_constrained;
-public:
-    PrintArrayDimStrm(ostream &o, string s, bool c)
-            : d_out(o), d_space(s), d_constrained(c)
-    {}
-
-    void operator()(Array::dimension &d)
-    {
-        int size = d_constrained ? d.c_size : d.size;
-        if (d.name.empty())
-        d_out << d_space << "<dimension size=\"" << size << "\"/>\n" ;
-        else
-        d_out << d_space << "<dimension name=\"" << id2xml(d.name)
-              << "\" size=\"" << size << "\"/>\n" ;
-    }
-};
 
 /**
  * @deprecated
@@ -750,25 +710,9 @@ public:
 void
 Array::print_xml_core(ostream &out, string space, bool constrained, string tag)
 {
-    if (constrained && !send_p())
-        return;
-
-    out << space << "<" << tag;
-    if (!name().empty())
-        out << " name=\"" << id2xml(name()) << "\"";
-    out << ">\n";
-
-    get_attr_table().print_xml(out, space + "    ", constrained);
-
-    BaseType *btp = var();
-    string tmp_name = btp->name();
-    btp->set_name("");
-    btp->print_xml(out, space + "    ", constrained);
-    btp->set_name(tmp_name);
-
-    for_each(dim_begin(), dim_end(), PrintArrayDimStrm(out, space + "    ", constrained));
-
-    out << space << "</" << tag << ">\n";
+    XMLWriter xml(space);
+    print_xml_writer_core(xml, constrained, tag);
+    out << xml.get_doc();
 }
 
 void
@@ -836,7 +780,6 @@ Array::print_xml_writer_core(XMLWriter &xml, bool constrained, string tag)
         throw InternalErr(__FILE__, __LINE__, "Could not end " + tag + " element");
 }
 
-#if FILE_METHODS
 /** Prints the values in ASCII of the entire (constrained) array. This method
     Attempts to make an aesthetically pleasing display. However, it is
     primarily intended for debugging purposes.
@@ -852,36 +795,12 @@ unsigned int
 Array::print_array(FILE *out, unsigned int index, unsigned int dims,
                    unsigned int shape[])
 {
-    if (dims == 1) {
-        fprintf(out, "{") ;
-        for (unsigned i = 0; i < shape[0] - 1; ++i) {
-            var(index++)->print_val(out, "", false);
-            fprintf(out, ", ") ;
-        }
-        var(index++)->print_val(out, "", false);
-        fprintf(out, "}") ;
+    ostringstream oss;
+    unsigned int i = print_array(oss, index, dims, shape);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 
-        return index;
-    }
-    else {
-        fprintf(out, "{") ;
-        // Fixed an off-by-one error in the following loop. Since the array
-        // length is shape[dims-1]-1 *and* since we want one less dimension
-        // than that, the correct limit on this loop is shape[dims-2]-1. From
-        // Todd Karakasian.
-        // The saga continues; the loop test should be `i < shape[0]-1'. jhrg
-        // 9/12/96.
-        for (unsigned i = 0; i < shape[0] - 1; ++i) {
-            index = print_array(out, index, dims - 1, shape + 1);
-            fprintf(out, ",") ;   // Removed the extra `}'. Also from Todd
-        }
-        index = print_array(out, index, dims - 1, shape + 1);
-        fprintf(out, "}") ;
-
-        return index;
-    }
+    return i;
 }
-#endif
 
 /** Prints the values in ASCII of the entire (constrained) array. This method
     Attempts to make an anesthetically pleasing display. However, it is
@@ -928,35 +847,13 @@ Array::print_array(ostream &out, unsigned int index, unsigned int dims,
     }
 }
 
-#if FILE_METHODS
 void
 Array::print_val(FILE *out, string space, bool print_decl_p)
 {
-    // print the declaration if print decl is true.
-    // for each dimension,
-    //   for each element,
-    //     print the array given its shape, number of dimensions.
-    // Add the `;'
-
-    if (print_decl_p) {
-        print_decl(out, space, false, false, false);
-        fprintf(out, " = ") ;
-    }
-
-    unsigned int *shape = new unsigned int[_shape.size()];
-    unsigned int index = 0;
-    for (Dim_iter i = _shape.begin(); i != _shape.end() && index < _shape.size(); i++)
-        shape[index++] = dimension_size(i, true);
-
-    print_array(out, 0, _shape.size(), shape);
-
-    delete [] shape; shape = 0;
-
-    if (print_decl_p) {
-        fprintf(out, ";\n") ;
-    }
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Array::print_val(ostream &out, string space, bool print_decl_p)
diff --git a/Array.h b/Array.h
index 4425db1..801ccb7 100644
--- a/Array.h
+++ b/Array.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -52,8 +52,6 @@
 #include "XMLWriter.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -133,10 +131,9 @@ private:
 protected:
     void _duplicate(const Array &a);
 
-#if FILE_METHODS
     unsigned int print_array(FILE *out, unsigned int index,
                              unsigned int dims, unsigned int shape[]);
-#endif
+
     unsigned int print_array(ostream &out, unsigned int index,
                              unsigned int dims, unsigned int shape[]);
 
@@ -168,6 +165,7 @@ public:
 
     void append_dim(int size, string name = "");
     void prepend_dim(int size, const string& name = "");
+    void clear_all_dims();
 
     virtual void add_constraint(Dim_iter i, int start, int stride, int stop);
     virtual void reset_constraint();
@@ -175,7 +173,7 @@ public:
     virtual void clear_constraint();
 
     virtual void update_length(int size);
-    virtual unsigned int width(bool constrained = true);
+    virtual unsigned int width(bool constrained = false);
 
     Dim_iter dim_begin() ;
     Dim_iter dim_end() ;
@@ -200,9 +198,7 @@ public:
     virtual void print_xml_writer_core(XMLWriter &out, bool constrained, string tag);
     virtual void print_as_map_xml_writer(XMLWriter &xml, bool constrained);
 
-#if FILE_METHODS
     virtual void print_xml_core(FILE *out, string space, bool constrained, string tag);
-#endif
     virtual void print_xml_core(ostream &out, string space, bool constrained, string tag);
 
     // not used (?)
@@ -212,7 +208,6 @@ public:
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
-#if FILE_METHODS
     virtual void print_xml(FILE *out, string space = "    ",
                            bool constrained = false);
     virtual void print_as_map_xml(FILE *out, string space = "    ",
@@ -223,7 +218,6 @@ public:
                             bool print_semi = true,
                             bool constraint_info = false,
                             bool constrained = false);
-#endif
 
     virtual bool check_semantics(string &msg, bool all = false);
 
diff --git a/ArrayGeoConstraint.cc b/ArrayGeoConstraint.cc
deleted file mode 100644
index ef4905d..0000000
--- a/ArrayGeoConstraint.cc
+++ /dev/null
@@ -1,212 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// The Grid Selection Expression Clause class.
-
-
-#include "config.h"
-
-static char id[] not_used =
-    { "$Id: ArrayGeoConstraint.cc 21922 2010-01-07 18:23:57Z jimg $"
-    };
-
-#include <cmath>
-#include <iostream>
-#include <sstream>
-
-//#define DODS_DEBUG
-
-#include "debug.h"
-#include "dods-datatypes.h"
-#include "ArrayGeoConstraint.h"
-#include "Float64.h"
-
-#include "Error.h"
-#include "InternalErr.h"
-#include "ce_functions.h"
-
-using namespace std;
-
-namespace libdap {
-
-/** Private initialization code. */
-void ArrayGeoConstraint::m_init()
-{
-    if (d_array->dimensions() < 2 || d_array->dimensions() > 3)
-        throw Error("The geoarray() function works only with Arrays of two or three dimensions.");
-
-    build_lat_lon_maps();
-}
-
-// In the other methods the ds_name parameter defaults to "" but that's not
-// possible here. Remove ds_name
-ArrayGeoConstraint::ArrayGeoConstraint(Array *array, double top, double left,
-        double bottom, double right)
-        : GeoConstraint(), d_array(array),
-        d_extent(top, left, bottom, right), d_projection("plat-carre", "wgs84")
-
-{
-    m_init();
-}
-
-ArrayGeoConstraint::ArrayGeoConstraint(Array *array,
-                                       double top, double left, double bottom, double right,
-                                       const string &projection, const string &datum)
-        : GeoConstraint(), d_array(array),
-        d_extent(top, left, bottom, right), d_projection(projection, datum)
-
-{
-    m_init();
-}
-
-/** Build the longitude and latitude maps for this Array. This either builds
-    the maps using the extent, projection and datum given or reads the maps
-    from the data source somehow.
-
-    The d_lon and d_lon_length (and matching lat) fields are modified.
-
-    @note Rules used to find Maps:<ul><li>None, currently the extent must
-    be given.</li>
-    </ul>
-
-    @return True if the maps are built, otherwise False */
-bool ArrayGeoConstraint::build_lat_lon_maps()
-{
-    // Find the longitude dimension: Assume it is the rightmost
-    set_longitude_rightmost(true);
-    set_lon_dim(d_array->dim_begin() + (d_array->dimensions() - 1));
-
-    int number_elements_longitude = d_array->dimension_size(get_lon_dim());
-    double *lon_map = new double[number_elements_longitude];
-    for (int i = 0; i < number_elements_longitude; ++i) {
-        lon_map[i] = ((d_extent.d_right - d_extent.d_left) / (number_elements_longitude - 1)) * i + d_extent.d_left;
-    }
-    set_lon(lon_map);
-    set_lon_length(number_elements_longitude);
-
-    // Find the latitude dimension: Assume it is the next-rightmost
-    set_lat_dim(d_array->dim_begin() + (d_array->dimensions() - 2));
-
-    int number_elements_latitude = d_array->dimension_size(get_lat_dim());
-    double *lat_map = new double[number_elements_latitude];
-    for (int i = 0; i < number_elements_latitude; ++i) {
-        lat_map[i] = ((d_extent.d_bottom - d_extent.d_top) / (number_elements_latitude - 1)) * i + d_extent.d_top;
-    }
-    set_lat(lat_map);
-    set_lat_length(number_elements_latitude);
-
-    return get_lat() && get_lon();
-}
-
-/** Are the latitude and longitude dimensions ordered so that this class can
-    properly constrain the data?
-
-    @note This version always returns true because geoarray() assumes the
-    dimensions are ordered properly.
-
-    @return Always returns True. */
-bool
-ArrayGeoConstraint::lat_lon_dimensions_ok()
-{
-    return true;
-}
-
-/** Once the bounding box is set, apply the constraint. If the data can be sent
-    using Vector::serialize(), do so. If they cannot, read and organize the
-    data so that Vector::serialize() will be able to send the data when asked
-    to.
-
-    How can it be that Vector::serialize() would not be able to read the data?
-    If the longitude extent of the bounding box for the constraint wraps around
-    the edge of the data/array, then two reads are required to get the data.
-    This method performs those reads (using the constraints and the read()
-    method so that the data server's type-specific and optimized code will be
-    used to read actual data values) and then loads the combined result
-    back into the object, marking it as having been read. Vector::serialize()
-    will then see the object is loaded with data values, skip the regular read
-    call and send all the data in the buffer. */
-void ArrayGeoConstraint::apply_constraint_to_data()
-{
-    if (!is_bounding_box_set())
-        throw InternalErr(
-            "The Latitude and Longitude constraints must be set before calling\n\
-            apply_constraint_to_data().");
-
-    if (get_latitude_sense() == inverted) {
-        int tmp = get_latitude_index_top();
-        set_latitude_index_top(get_latitude_index_bottom());
-        set_latitude_index_bottom(tmp);
-    }
-
-    // It's easy to flip the Latitude values; if the bottom index value
-    // is before/above the top index, return an error explaining that.
-    if (get_latitude_index_top() > get_latitude_index_bottom())
-        throw Error("The upper and lower latitude indexes appear to be reversed. Please provide\nthe latitude bounding box numbers giving the northern-most latitude first.");
-
-    d_array->add_constraint(get_lat_dim(),
-                            get_latitude_index_top(), 1,
-                            get_latitude_index_bottom());
-
-    // Does the longitude constraint cross the edge of the longitude vector?
-    // If so, reorder the data (array).
-    if (get_longitude_index_left() > get_longitude_index_right()) {
-        reorder_data_longitude_axis(*d_array, get_lon_dim());
-
-        // Now the data are all in local storage
-
-        // alter the indexes; the left index has now been moved to 0, and the right
-        // index is now at lon_vector_length-left+right.
-        set_longitude_index_right(get_lon_length() - get_longitude_index_left()
-                                  + get_longitude_index_right());
-        set_longitude_index_left(0);
-    }
-    // If the constraint used the -180/179 (neg_pos) notation, transform
-    // the longitude map s it uses the -180/179 notation. Note that at this
-    // point, d_longitude always uses the pos notation because of the earlier
-    // conditional transformation.
-
-    // Apply constraint; stride is always one
-    d_array->add_constraint(get_lon_dim(),
-                            get_longitude_index_left(), 1,
-                            get_longitude_index_right());
-
-    // Load the array if it has been read, which will be the case if
-    // reorder_data_longitude_axis() has been called.
-    if (get_array_data()) {
-
-        int size = d_array->val2buf(get_array_data());
-
-        if (size != get_array_data_size())
-            throw InternalErr
-            ("Expected data size not copied to the Grid's buffer.");
-        d_array->set_read_p(true);
-    }
-    else {
-        d_array->read();
-    }
-}
-
-} // namespace libdap
-
diff --git a/ArrayGeoConstraint.h b/ArrayGeoConstraint.h
deleted file mode 100644
index 6bb3e3f..0000000
--- a/ArrayGeoConstraint.h
+++ /dev/null
@@ -1,140 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2006 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-#ifndef _array_geo_constraint_h
-#define _array_geo_constraint_h 1
-
-#include <string>
-#include <sstream>
-#include <set>
-
-#ifndef _geo_constraint_h
-#include "GeoConstraint.h"
-#endif
-
-#ifndef _util_h
-#include "util.h"
-#endif
-
-namespace libdap
-{
-
-extern bool unit_or_name_match(set < string > units, set < string > names,
-			       const string & var_units,
-			       const string & var_name);
-
-/** Geographical constraint applied to an Array.
-
-    @note This class assumes that the Longitude dimension varies fastest, as
-    does the COARDS conventions.
-
-    @author James Gallagher */
-
-class ArrayGeoConstraint : public GeoConstraint
-{
-
-private:
-    struct Extent
-    {
-        double d_left;
-        double d_top;
-        double d_right;
-        double d_bottom;
-
-        Extent() : d_left(0.0), d_top(0.0), d_right(0.0), d_bottom(0.0)
-        {}
-        Extent(double t, double l, double b, double r)
-                : d_left(l), d_top(t), d_right(r), d_bottom(b)
-        {}
-    };
-
-    struct Projection
-    {
-        string d_name;
-        string d_datum;
-
-        Projection()
-        {}
-        Projection(const string &n, const string &d)
-                : d_name(n), d_datum(d)
-        {
-            downcase(d_name);
-            if (d_name != "plat-carre")
-                throw Error(
-                    "geoarray(): Only the Plat-Carre projection is supported by this version of\n\
-                    geoarray().");
-            downcase(d_datum);
-            if (d_datum != "wgs84")
-                throw Error(
-                    "geoarray(): Only the wgs84 datum is supported by this version of geoarray().");
-        }
-    };
-
-    Array *d_array;
-
-    Extent d_extent;
-    Projection d_projection;
-
-    bool build_lat_lon_maps();
-    bool lat_lon_dimensions_ok();
-
-    void m_init();
-
-    friend class ArrayGeoConstraintTest; // Unit tests
-
-public:
-    /** @name Constructors */
-    //@{
-    ArrayGeoConstraint(Array *)
-            : GeoConstraint(), d_array(0)
-    {
-        // See ce_finctions.cc:function_geoarray() to put this message in
-        // context.
-        throw Error(
-            "Bummer. The five-argument version of geoarray() is not currently implemented.");
-    }
-
-    ArrayGeoConstraint(Array *array,
-                       double left, double top, double right, double bottom);
-
-    ArrayGeoConstraint(Array *array,
-                       double left, double top, double right, double bottom,
-                       const string &projection, const string &datum);
-    //@}
-
-    virtual ~ArrayGeoConstraint()
-    {}
-
-    virtual void apply_constraint_to_data();
-
-    virtual Array *get_constrained_array() const
-    {
-        return d_array;
-    }
-};
-
-} // namespace libdap
-
-#endif // _array_geo_constraint_h
diff --git a/AttrTable.cc b/AttrTable.cc
index d66f547..4695cce 100644
--- a/AttrTable.cc
+++ b/AttrTable.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -35,7 +35,7 @@
 //#define DODS_DEBUG
 
 static char rcsid[]not_used =
-"$Id: AttrTable.cc 25066 2011-11-30 18:39:37Z jimg $";
+"$Id: AttrTable.cc 27197 2013-10-01 21:29:54Z jimg $";
 
 #include <cassert>
 #include <sstream>
@@ -1302,9 +1302,15 @@ void AttrTable::print(ostream &out, string pad, bool dereference)
  @deprecated */
 void AttrTable::print_xml(FILE *out, string pad, bool /*constrained*/)
 {
+    XMLWriter xml(pad);
+    print_xml_writer(xml);
+    fwrite(xml.get_doc(), sizeof(char), xml.get_doc_size(), out);
+
+#if OLD_XML_MOETHODS
     ostringstream oss;
     print_xml(oss, pad);
     fwrite(oss.str().data(), 1, oss.str().length(), out);
+#endif
 
 #if 0
     // Why this works: AttrTable is really a hacked class that used to
diff --git a/AttrTable.h b/AttrTable.h
index 9d63268..69b2f0d 100644
--- a/AttrTable.h
+++ b/AttrTable.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/BaseType.cc b/BaseType.cc
index 6e61436..6dcce06 100644
--- a/BaseType.cc
+++ b/BaseType.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -77,21 +77,27 @@ namespace libdap {
     @brief Perform a deep copy.
     @param bt The source object. */
 void
-BaseType::_duplicate(const BaseType &bt)
+BaseType::m_duplicate(const BaseType &bt)
 {
-    DBG2(cerr << "BaseType::_duplicate: " << bt._name << " send_p: "
-            << bt._send_p << endl);
-    _name = bt._name;
-    _type = bt._type;
-    _dataset = bt._dataset;
-    _read_p = bt._read_p; // added, reza
-    _send_p = bt._send_p; // added, reza
+    DBG2(cerr << "BaseType::_duplicate: " << bt.d_name << " send_p: "
+            << bt.d_is_send << endl);
+    d_name = bt.d_name;
+    d_type = bt.d_type;
+    d_dataset = bt.d_dataset;
+    d_is_read = bt.d_is_read; // added, reza
+    d_is_send = bt.d_is_send; // added, reza
     d_in_selection = bt.d_in_selection;
-    _synthesized_p = bt._synthesized_p; // 5/11/2001 jhrg
+    d_is_synthesized = bt.d_is_synthesized; // 5/11/2001 jhrg
 
     d_parent = bt.d_parent; // copy pointers 6/4/2001 jhrg
 
     d_attr = bt.d_attr;  // Deep copy.
+
+#if DAP4
+    // FIXME How to copy? these are pointers
+    d_dims = bt.d_dims;
+    d_maps = bt.d_maps;
+#endif
 }
 
 // Public mfuncs
@@ -103,13 +109,50 @@ BaseType::_duplicate(const BaseType &bt)
     directly.
 
     @brief The BaseType constructor.
+
+    @param n A string containing the name of the new variable.
+    @param t The type of the variable.
+    @param is_dap4 True if this is a DAP4 variable. Default is False
+    @see Type */
+BaseType::BaseType(const string &n, const Type &t, bool is_dap4)
+        : d_name(n), d_type(t), d_dataset(""), d_is_read(false), d_is_send(false),
+        d_in_selection(false), d_is_synthesized(false), d_parent(0),
+        d_is_dap4(is_dap4)
+{}
+
+/** The BaseType constructor needs a name, a dataset, and a type.
+    The BaseType class exists to provide data to
+    type classes that inherit from it.  The constructors of those
+    classes call the BaseType constructor; it is never called
+    directly.
+
+    @brief The BaseType constructor.
+    @param n A string containing the name of the new variable.
+    @param d A string containing the dataset name.
+    @param t The type of the variable. Default is False
+    @param is_dap4 True if this is a DAP4 variable.
+    @see Type */
+BaseType::BaseType(const string &n, const string &d, const Type &t, bool is_dap4)
+        : d_name(n), d_type(t), d_dataset(d), d_is_read(false), d_is_send(false),
+        d_in_selection(false), d_is_synthesized(false), d_parent(0),
+        d_is_dap4(is_dap4)
+{}
+#if 0
+/** The BaseType constructor needs a name  and a type.
+    The BaseType class exists to provide data to
+    type classes that inherit from it.  The constructors of those
+    classes call the BaseType constructor; it is never called
+    directly.
+
+    @brief The BaseType constructor.
     @param n A string containing the name of the new variable.
     @param t The type of the variable.
     data in this variable to a client DODS process.
     @see Type */
-BaseType::BaseType(const string &n, const Type &t)
-        : _name(n), _type(t), _dataset(""), _read_p(false), _send_p(false),
-        d_in_selection(false), _synthesized_p(false), d_parent(0)
+BaseType::BaseType(const string &n, const Type &t, bool is_dap4)
+        : d_name(n), d_type(t), d_dataset(""), d_is_read(false), d_is_send(false),
+        d_in_selection(false), d_is_synthesized(false), d_parent(0),
+        d_is_dap4(is_dap4)
 {}
 
 /** The BaseType constructor needs a name, a dataset, and a type.
@@ -125,15 +168,16 @@ BaseType::BaseType(const string &n, const Type &t)
     @param t The type of the variable.
     data in this variable to a client DODS process.
     @see Type */
-BaseType::BaseType(const string &n, const string &d, const Type &t)
-        : _name(n), _type(t), _dataset(d), _read_p(false), _send_p(false),
-        d_in_selection(false), _synthesized_p(false), d_parent(0)
+BaseType::BaseType(const string &n, const string &d, const Type &t, bool is_dap4)
+        : d_name(n), d_type(t), d_dataset(d), d_is_read(false), d_is_send(false),
+        d_in_selection(false), d_is_synthesized(false), d_parent(0),
+        d_is_dap4(is_dap4)
 {}
-
+#endif
 /** @brief The BaseType copy constructor. */
 BaseType::BaseType(const BaseType &copy_from) : DapObj()
 {
-    _duplicate(copy_from);
+    m_duplicate(copy_from);
 }
 
 BaseType::~BaseType()
@@ -148,7 +192,7 @@ BaseType::operator=(const BaseType &rhs)
     if (this == &rhs)
         return *this;
 
-    _duplicate(rhs);
+    m_duplicate(rhs);
 
     return *this;
 }
@@ -162,12 +206,12 @@ BaseType::toString()
 {
     ostringstream oss;
     oss << "BaseType (" << this << "):" << endl
-    << "          _name: " << _name << endl
+    << "          _name: " << d_name << endl
     << "          _type: " << type_name() << endl
-    << "          _dataset: " << _dataset << endl
-    << "          _read_p: " << _read_p << endl
-    << "          _send_p: " << _send_p << endl
-    << "          _synthesized_p: " << _synthesized_p << endl
+    << "          _dataset: " << d_dataset << endl
+    << "          _read_p: " << d_is_read << endl
+    << "          _send_p: " << d_is_send << endl
+    << "          _synthesized_p: " << d_is_synthesized << endl
     << "          d_parent: " << d_parent << endl
     << "          d_attr: " << hex << &d_attr << dec << endl;
 
@@ -189,12 +233,12 @@ BaseType::dump(ostream &strm) const
     << (void *)this << ")" << endl ;
     DapIndent::Indent() ;
 
-    strm << DapIndent::LMarg << "name: " << _name << endl ;
+    strm << DapIndent::LMarg << "name: " << d_name << endl ;
     strm << DapIndent::LMarg << "type: " << type_name() << endl ;
-    strm << DapIndent::LMarg << "dataset: " << _dataset << endl ;
-    strm << DapIndent::LMarg << "read_p: " << _read_p << endl ;
-    strm << DapIndent::LMarg << "send_p: " << _send_p << endl ;
-    strm << DapIndent::LMarg << "synthesized_p: " << _synthesized_p << endl ;
+    strm << DapIndent::LMarg << "dataset: " << d_dataset << endl ;
+    strm << DapIndent::LMarg << "read_p: " << d_is_read << endl ;
+    strm << DapIndent::LMarg << "send_p: " << d_is_send << endl ;
+    strm << DapIndent::LMarg << "synthesized_p: " << d_is_synthesized << endl ;
     strm << DapIndent::LMarg << "parent: " << (void *)d_parent << endl ;
     strm << DapIndent::LMarg << "attributes: " << endl ;
     DapIndent::Indent() ;
@@ -209,7 +253,7 @@ BaseType::dump(ostream &strm) const
 string
 BaseType::name() const
 {
-    return _name;
+    return d_name;
 }
 
 /** @brief Sets the name of the class instance. */
@@ -217,7 +261,7 @@ void
 BaseType::set_name(const string &n)
 {
     string name = n;
-    _name = www2id(name); // www2id writes into its param.
+    d_name = www2id(name); // www2id writes into its param.
 }
 
 /** @brief Returns the name of the dataset used to create this instance
@@ -230,28 +274,30 @@ BaseType::set_name(const string &n)
 string
 BaseType::dataset() const
 {
-    return _dataset;
+    return d_dataset;
 }
 
 /** @brief Returns the type of the class instance. */
 Type
 BaseType::type() const
 {
-    return _type;
+    return d_type;
 }
 
 /** @brief Sets the type of the class instance. */
 void
 BaseType::set_type(const Type &t)
 {
-    _type = t;
+    d_type = t;
 }
 
 /** @brief Returns the type of the class instance as a string. */
 string
 BaseType::type_name() const
 {
-    switch (_type) {
+    return libdap::type_name(d_type);
+#if 0
+    switch (d_type) {
     case dods_null_c:
         return string("Null");
     case dods_byte_c:
@@ -280,10 +326,27 @@ BaseType::type_name() const
         return string("Sequence");
     case dods_grid_c:
         return string("Grid");
+
+    case dods_int8_c:
+        return string("Int8");
+    case dods_uint8_c:
+        return string("UInt8");
+    case dods_int64_c:
+        return string("Int64");
+    case dods_uint64_c:
+        return string("UInt64");
+    case dods_url4_c:
+        return string("URL");
+    case dods_group_c:
+        return string("Group");
+    case dods_enum_c:
+        return string("Enum");
+
     default:
         cerr << "BaseType::type_name: Undefined type" << endl;
         return string("");
     }
+#endif
 }
 
 /** @brief Returns true if the instance is a numeric, string or URL
@@ -294,27 +357,42 @@ BaseType::type_name() const
 bool
 BaseType::is_simple_type()
 {
+    return libdap::is_simple_type(type());
+#if 0
     switch (type()) {
     case dods_null_c:
     case dods_byte_c:
+
+    case dods_int8_c:
+    case dods_uint8_c:
+
     case dods_int16_c:
     case dods_uint16_c:
     case dods_int32_c:
     case dods_uint32_c:
+
+    case dods_int64_c:
+    case dods_uint64_c:
+
     case dods_float32_c:
     case dods_float64_c:
     case dods_str_c:
     case dods_url_c:
+
+    case dods_url4_c:
+    case dods_enum_c:
         return true;
 
     case dods_array_c:
     case dods_structure_c:
     case dods_sequence_c:
     case dods_grid_c:
+    case dods_group_c:
         return false;
     }
 
     return false;
+#endif
 }
 
 /** @brief Returns true if the instance is a vector (i.e., array) type
@@ -323,17 +401,30 @@ BaseType::is_simple_type()
 bool
 BaseType::is_vector_type()
 {
+    return libdap::is_vector_type(type());
+#if 0
     switch (type()) {
     case dods_null_c:
     case dods_byte_c:
+
+    case dods_int8_c:
+    case dods_uint8_c:
+
     case dods_int16_c:
     case dods_uint16_c:
     case dods_int32_c:
     case dods_uint32_c:
+
+    case dods_int64_c:
+    case dods_uint64_c:
+
     case dods_float32_c:
     case dods_float64_c:
     case dods_str_c:
     case dods_url_c:
+
+    case dods_url4_c:
+    case dods_enum_c:
         return false;
 
     case dods_array_c:
@@ -342,10 +433,12 @@ BaseType::is_vector_type()
     case dods_structure_c:
     case dods_sequence_c:
     case dods_grid_c:
+    case dods_group_c:
         return false;
     }
 
     return false;
+#endif
 }
 
 /** @brief Returns true if the instance is a constructor (i.e., Structure,
@@ -355,28 +448,70 @@ BaseType::is_vector_type()
 bool
 BaseType::is_constructor_type()
 {
+    return libdap::is_constructor_type(type());
+#if 0
     switch (type()) {
     case dods_null_c:
     case dods_byte_c:
+
+    case dods_int8_c:
+    case dods_uint8_c:
+
     case dods_int16_c:
     case dods_uint16_c:
     case dods_int32_c:
     case dods_uint32_c:
+
+    case dods_int64_c:
+    case dods_uint64_c:
+
     case dods_float32_c:
     case dods_float64_c:
     case dods_str_c:
     case dods_url_c:
+
+    case dods_url4_c:
+    case dods_enum_c:
+
     case dods_array_c:
         return false;
 
     case dods_structure_c:
     case dods_sequence_c:
     case dods_grid_c:
+    case dods_group_c:
         return true;
     }
 
     return false;
+#endif
+}
+
+#if 0
+/**
+ * Return true if this variable's type is allowed only for DAP4.
+ *
+ * @note the default implementation returns false; the new DAP4
+ * implementations must overload this method.
+ */
+bool
+BaseType::is_dap4_only_type()
+{
+    return false;
+}
+
+/**
+ * Return true if this variable's type is allowed only for DAP2.
+ *
+ * @note the default implementation returns false; the old DAP2
+ * implementations must overload this method.
+ */
+bool
+BaseType::is_dap2_only_type()
+{
+    return false;
 }
+#endif
 
 /** Return a count of the total number of variables in this variable.
     This is used to count the number of variables held by a constructor
@@ -415,7 +550,7 @@ BaseType::element_count(bool)
 bool
 BaseType::synthesized_p()
 {
-    return _synthesized_p;
+    return d_is_synthesized;
 }
 
 /** Set the synthesized flag. Before setting this flag be sure to set the
@@ -426,10 +561,10 @@ BaseType::synthesized_p()
 void
 BaseType::set_synthesized_p(bool state)
 {
-    _synthesized_p = state;
+    d_is_synthesized = state;
 }
 
-// Return the state of _read_p (true if the value of the variable has been
+// Return the state of d_is_read (true if the value of the variable has been
 // read (and is in memory) false otherwise).
 
 /** Returns true if the value(s) for this variable have been read from the
@@ -443,7 +578,7 @@ BaseType::set_synthesized_p(bool state)
 bool
 BaseType::read_p()
 {
-    return _read_p;
+    return d_is_read;
 }
 
 /** Sets the value of the <tt>read_p</tt> property. This indicates that the
@@ -482,10 +617,10 @@ BaseType::read_p()
 void
 BaseType::set_read_p(bool state)
 {
-    if (! _synthesized_p) {
+    if (! d_is_synthesized) {
         DBG2(cerr << "Changing read_p state of " << name() << " to "
 	         << state << endl);
-        _read_p = state;
+        d_is_read = state;
     }
 }
 
@@ -502,14 +637,14 @@ BaseType::set_read_p(bool state)
 bool
 BaseType::send_p()
 {
-    return _send_p;
+    return d_is_send;
 }
 
 /** Sets the value of the <tt>send_p</tt> flag.  This
     function is meant to be called from within the constraint evaluator of
     other code which determines that this variable should be returned to the
-    client.  Data are ready to be sent when <i>both</i> the <tt>_send_p</tt>
-    and <tt>_read_p</tt> flags are set to TRUE.
+    client.  Data are ready to be sent when <i>both</i> the <tt>d_is_send</tt>
+    and <tt>d_is_read</tt> flags are set to TRUE.
 
     @param state The logical state to set the <tt>send_p</tt> flag.
 */
@@ -518,7 +653,7 @@ BaseType::set_send_p(bool state)
 {
     DBG2(cerr << "Calling BaseType::set_send_p() for: " << this->name()
         << endl);
-    _send_p = state;
+    d_is_send = state;
 }
 
 
@@ -696,7 +831,7 @@ BaseType::var(const string &, btp_stack &)
     type you must either use the var() method to get a pointer to the actual
     instance added to \c *this or you must first add all of <em>bt</em>'s
     children to it before adding it to \c *this. The implementations should use
-    _duplicate() to perform a deep copy of \e bt.
+    m_duplicate() to perform a deep copy of \e bt.
 
     @brief Add a variable.
 
@@ -787,7 +922,7 @@ BaseType::add_var(BaseType *, Part)
 bool
 BaseType::read()
 {
-    if (_read_p)
+    if (d_is_read)
         return false;
 
     throw InternalErr("Unimplemented BaseType::read() method called for the variable named: " + name());
@@ -804,7 +939,6 @@ BaseType::intern_data(ConstraintEvaluator &, DDS &dds)
     dds.timeout_off();
 }
 
-#if FILE_METHODS
 /** Write the variable's declaration in a C-style syntax. This
     function is used to create textual representation of the Data
     Descriptor Structure (DDS).  See <i>The DODS User Manual</i> for
@@ -851,25 +985,10 @@ void
 BaseType::print_decl(FILE *out, string space, bool print_semi,
                      bool constraint_info, bool constrained)
 {
-    // if printing the constrained declaration, exit if this variable was not
-    // selected.
-    if (constrained && !send_p())
-        return;
-
-    fprintf(out, "%s%s %s", space.c_str(), type_name().c_str(),
-            id2www(_name).c_str()) ;
-
-    if (constraint_info) {
-        if (send_p())
-            fprintf(out, ": Send True") ;
-        else
-            fprintf(out, ": Send False") ;
-    }
-
-    if (print_semi)
-        fprintf(out, ";\n") ;
+    ostringstream oss;
+    print_decl(oss, space, print_semi, constraint_info, constrained);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 /** Write the variable's declaration in a C-style syntax. This
     function is used to create textual representation of the Data
@@ -922,7 +1041,7 @@ BaseType::print_decl(ostream &out, string space, bool print_semi,
     if (constrained && !send_p())
         return;
 
-    out << space << type_name() << " " << id2www(_name) ;
+    out << space << type_name() << " " << id2www(d_name) ;
 
     if (constraint_info) {
         if (send_p())
@@ -935,7 +1054,6 @@ BaseType::print_decl(ostream &out, string space, bool print_semi,
 	out << ";\n" ;
 }
 
-#if FILE_METHODS
 /** Write the XML representation of this variable. This method is used to
     build the DDX XML response.
     @param out Destination.
@@ -946,24 +1064,10 @@ BaseType::print_decl(ostream &out, string space, bool print_semi,
 void
 BaseType::print_xml(FILE *out, string space, bool constrained)
 {
-    if (constrained && !send_p())
-        return;
-
-    fprintf(out, "%s<%s", space.c_str(), type_name().c_str());
-    if (!_name.empty())
-        fprintf(out, " name=\"%s\"", id2xml(_name).c_str());
-
-    if (get_attr_table().get_size() > 0) {
-        fprintf(out, ">\n"); // close the variable's tag
-        get_attr_table().print_xml(out, space + "    ", constrained);
-        // After attributes, print closing tag
-        fprintf(out, "%s</%s>\n", space.c_str(), type_name().c_str());
-    }
-    else {
-        fprintf(out, "/>\n"); // no attributes; just close tag.
-    }
+    XMLWriter xml(space);
+    print_xml_writer(xml, constrained);
+    fwrite(xml.get_doc(), sizeof(char), xml.get_doc_size(), out);
 }
-#endif
 
 /** Write the XML representation of this variable. This method is used to
     build the DDX XML response.
@@ -975,22 +1079,9 @@ BaseType::print_xml(FILE *out, string space, bool constrained)
 void
 BaseType::print_xml(ostream &out, string space, bool constrained)
 {
-    if (constrained && !send_p())
-        return;
-
-    out << space << "<" << type_name() ;
-    if (!_name.empty())
-    out << " name=\"" << id2xml(_name) << "\"" ;
-
-    if (get_attr_table().get_size() > 0) {
-    out << ">\n" ;
-        get_attr_table().print_xml(out, space + "    ", constrained);
-        // After attributes, print closing tag
-    out << space << "</" << type_name() << ">\n" ;
-    }
-    else {
-    out << "/>\n" ;
-    }
+    XMLWriter xml(space);
+    print_xml_writer(xml, constrained);
+    out << xml.get_doc();
 }
 
 /** Write the XML representation of this variable. This method is used to
@@ -1008,8 +1099,8 @@ BaseType::print_xml_writer(XMLWriter &xml, bool constrained)
     if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*)type_name().c_str()) < 0)
         throw InternalErr(__FILE__, __LINE__, "Could not write " + type_name() + " element");
 
-    if (!_name.empty())
-    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)_name.c_str()) < 0)
+    if (!d_name.empty())
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)d_name.c_str()) < 0)
         throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
 
     if (get_attr_table().get_size() > 0)
@@ -1017,7 +1108,6 @@ BaseType::print_xml_writer(XMLWriter &xml, bool constrained)
 
     if (xmlTextWriterEndElement(xml.get_writer()) < 0)
         throw InternalErr(__FILE__, __LINE__, "Could not end " + type_name() + " element");
-
 }
 
 // Compares the object's current state with the semantics of a particular
@@ -1062,7 +1152,7 @@ BaseType::print_xml_writer(XMLWriter &xml, bool constrained)
 bool
 BaseType::check_semantics(string &msg, bool)
 {
-    bool sem = (_type != dods_null_c && _name.length());
+    bool sem = (d_type != dods_null_c && d_name.length());
 
     if (!sem)
         msg = "Every variable must have both a name and a type\n";
@@ -1114,6 +1204,7 @@ BaseType::ops(BaseType *, int)
     throw InternalErr(__FILE__, __LINE__, "Unimplemented operator.");
 }
 
+// FIXME update this comment if the removal of width() works
 /** This version of width simply returns the same thing as width() for simple
     types and Arrays. For Constructors, it needs to be specialized. This is
     partly due to an inconsistency in the way Vector::width() is implemented.
@@ -1124,9 +1215,12 @@ BaseType::ops(BaseType *, int)
     @return  The number of bytes used by the variable.
  */
 unsigned int
-BaseType::width(bool /*constrained*/)
+BaseType::width(bool /* constrained */)
 {
-	return width();
+	throw InternalErr(__FILE__, __LINE__, "not implemented");
+#if 0
+	return width(constrained);
+#endif
 }
 
 } // namespace libdap
diff --git a/BaseType.h b/BaseType.h
index 1eb8f70..a400887 100644
--- a/BaseType.h
+++ b/BaseType.h
@@ -21,7 +21,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -48,30 +48,21 @@
 #include <iostream>
 #include <string>
 
-#ifndef _attrtable_h
-#include "AttrTable.h"
+// These are instantiated only for DAP4 variables
+#if DAP4
+#include "D4Dimensions.h"
+#include "D4Maps.h"
 #endif
 
-#ifndef _internalerr_h
+#include "AttrTable.h"
+
 #include "InternalErr.h"
-#endif
 
-#ifndef __DODS_DATATYPES_
 #include "dods-datatypes.h"
-#endif
 
-#ifndef A_DapObj_h
 #include "DapObj.h"
-#endif
 
-#ifndef XMLWRITER_H_
 #include "XMLWriter.h"
-#endif
-
-#include "Marshaller.h"
-#include "UnMarshaller.h"
-
-#define FILE_METHODS 1
 
 using namespace std;
 
@@ -80,6 +71,8 @@ namespace libdap
 
 class DDS;
 class ConstraintEvaluator;
+class Marshaller;
+class UnMarshaller;
 
 /** <b>Part</b> names the parts of multi-section constructor types.
     For example, the <b>Grid</b> class has an <i>array</i> and
@@ -106,7 +99,7 @@ enum Part {
 };
 
 /** <b>Type</b> identifies the data type stored in a particular type
-    class.  All the DODS Data Access Protocol (DAP) types inherit from
+    class. All the DODS Data Access Protocol (DAP) types inherit from
     the BaseType class.
 
     \code
@@ -124,7 +117,16 @@ enum Part {
     dods_array_c,
     dods_structure_c,
     dods_sequence_c,
-    dods_grid_c
+    dods_grid_c,
+
+    dods_int8_c,
+    dods_uint8_c,
+    dods_int64_c,
+    dods_uint64_c,
+    dods_url4_c
+    dods_enum_c,
+    dods_group_c
+
     };
     \endcode
 
@@ -146,7 +148,20 @@ enum Type {
     dods_array_c,
     dods_structure_c,
     dods_sequence_c,
-    dods_grid_c
+    dods_grid_c,
+
+    // Added for DAP4
+    dods_int8_c,
+    dods_uint8_c,
+
+    dods_int64_c,
+    dods_uint64_c,
+
+    dods_url4_c,
+
+    dods_enum_c,
+    dods_group_c
+
 };
 
 /** This defines the basic data type features for the DODS data access
@@ -179,29 +194,19 @@ enum Type {
     the constraints
     to be returned. These cautions are outlined where they occur.
 
-    @todo We really need a better way to get values out of these types, esp.
-    the Float32, Int16, ..., types. In \e most cases we know the type, so a
-    type specific method (one that requires a downcast to use) is OK. For
-    example, Byte might have a method <tt>dods_byte Byte::value()</tt>. Sure
-    you have to downcast from BaseType to Byte in order to use it, but you
-    have to figure out you have a Byte to use Byte::buf2val() anyway, so
-    what's the big deal? Having a method that returns the \e value would
-    simplify code that reads from data sets to extract meta data (like
-    lat/lon corner points, et c.).
-
     @brief The basic data type for the DODS DAP types.  */
 
 class BaseType : public DapObj
 {
 private:
-    string _name;  // name of the instance
-    Type _type;   // instance's type
-    string _dataset; // name of the dataset used to create this BaseType
+    string d_name;  // name of the instance
+    Type d_type;   // instance's type
+    string d_dataset; // name of the dataset used to create this BaseType
 
-    bool _read_p;  // true if the value has been read
-    bool _send_p;  // Is the variable in the projection?
+    bool d_is_read;  // true if the value has been read
+    bool d_is_send;  // Is the variable in the projection?
     bool d_in_selection; // Is the variable in the selection?
-    bool _synthesized_p; // true if the variable is synthesized
+    bool d_is_synthesized; // true if the variable is synthesized
 
     // d_parent points to the Constructor or Vector which holds a particular
     // variable. It is null for simple variables. The Vector and Constructor
@@ -211,15 +216,30 @@ private:
     // Attributes for this variable. Added 05/20/03 jhrg
     AttrTable d_attr;
 
+    bool d_is_dap4;         // True if this is a DAP4 variable, false ... DAP2
+
+    // These are non-empty only for DAP4 variables. Added 9/27/12 jhrg
+
+    // FIXME Remove this. This header cannot have compile-time variation
+#if DAP4
+    D4Dimensions d_dims;   // If non-empty, this BaseType is an DAP4 Array
+    D4Maps d_maps;         // if non-empty, this BaseType is a DAP4 'Grid'
+#endif
+
 protected:
-    void _duplicate(const BaseType &bt);
+    void m_duplicate(const BaseType &bt);
 
 public:
     typedef stack<BaseType *> btp_stack;
 
-    BaseType(const string &n, const Type &t);
-    BaseType(const string &n, const string &d, const Type &t);
-
+    // These ctors assume is_dap4 is false
+    BaseType(const string &n, const Type &t, bool is_dap4 = false);
+    BaseType(const string &n, const string &d, const Type &t, bool is_dap4 = false);
+#if 0
+    // These provide a way to set is_dap4
+    BaseType(const string &n, const Type &t, bool is_dap4);
+    BaseType(const string &n, const string &d, const Type &t, bool is_dap4);
+#endif
     BaseType(const BaseType &copy_from);
     virtual ~BaseType();
 
@@ -229,6 +249,9 @@ public:
 
     BaseType &operator=(const BaseType &rhs);
 
+    bool is_dap4() { return d_is_dap4; }
+    void set_is_dap4(const bool v) { d_is_dap4 = v;}
+
     /** Clone this instance. Allocate a new instance and copy \c *this into
 	it. This method must perform a deep copy.
 
@@ -250,6 +273,11 @@ public:
     virtual bool is_vector_type();
     virtual bool is_constructor_type();
 
+#if 0
+    // Not yet, if ever. Allow 'sloppy' changeover in the handlers
+    virtual bool is_dap4_only_type();
+    virtual bool is_dap2_only_type();
+#endif
     virtual bool synthesized_p();
     virtual void set_synthesized_p(bool state);
 
@@ -306,8 +334,7 @@ public:
         no name is given, the function returns the first (only)
         variable. For example, an Array has only one variable, while a
         Structure can have many. */
-    virtual BaseType *var(const string &name = "", bool exact_match = true,
-                          btp_stack *s = 0);
+    virtual BaseType *var(const string &name = "", bool exact_match = true, btp_stack *s = 0);
     virtual BaseType *var(const string &name, btp_stack &s);
 
     virtual void add_var(BaseType *bt, Part part = nil);
@@ -317,7 +344,7 @@ public:
     virtual bool check_semantics(string &msg, bool all = false);
 
     virtual bool ops(BaseType *b, int op);
-#if FILE_METHODS
+
     virtual void print_decl(FILE *out, string space = "    ",
                             bool print_semi = true,
                             bool constraint_info = false,
@@ -325,7 +352,7 @@ public:
 
     virtual void print_xml(FILE *out, string space = "    ",
                            bool constrained = false);
-#endif
+
     virtual void print_decl(ostream &out, string space = "    ",
                             bool print_semi = true,
                             bool constraint_info = false,
@@ -338,11 +365,11 @@ public:
 
     /** @name Abstract Methods */
     //@{
-
+#if 0
     /** Return the number of bytes that are required to hold the
 	instance's value. In the case of simple types such as Int32,
 	this is the size of one Int32 (four bytes). For a String or
-	Url type, <tt>width()</tt> returns the number of bytes needed
+	Url type, <tt>width(bool constrained = false)</tt> returns the number of bytes needed
 	for a <tt>String *</tt> variable, not the bytes needed for all
 	the characters, since that value cannot be determined from
 	type information alone. For Structure, and other constructor
@@ -350,8 +377,9 @@ public:
 	pointers to the C++ objects.
 
 	@brief Returns the size of the class instance data. */
-    virtual unsigned int width() = 0;
-    virtual unsigned int width(bool constrained);
+    virtual unsigned int width(bool constrained = false) = 0;
+#endif
+    virtual unsigned int width(bool constrained = false);
 
     /** Reads the class data into the memory referenced by <i>val</i>.
 	The caller should either allocate enough storage to <i>val</i>
@@ -476,7 +504,6 @@ public:
 	@see DDS */
     virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse = false) = 0;
 
-#if FILE_METHODS
     /** Prints the value of the variable, with its declaration. This
 	function is primarily intended for debugging DODS
 	applications. However, it can be overloaded and used to do
@@ -494,7 +521,6 @@ public:
 
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true) = 0;
-#endif
 
     /** Prints the value of the variable, with its declaration. This
 	function is primarily intended for debugging DODS
diff --git a/BaseTypeFactory.cc b/BaseTypeFactory.cc
index 6c899e7..0e2639a 100644
--- a/BaseTypeFactory.cc
+++ b/BaseTypeFactory.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -45,6 +45,42 @@
 
 namespace libdap {
 
+BaseType *
+BaseTypeFactory::NewVariable(Type type, const string &name) const
+{
+	switch (type) {
+	case dods_byte_c:
+		return NewByte(name);
+	case dods_int16_c:
+		return NewInt16(name);
+	case dods_uint16_c:
+		return NewUInt16(name);
+	case dods_int32_c:
+		return NewInt32(name);
+	case dods_uint32_c:
+		return NewUInt32(name);
+	case dods_float32_c:
+		return NewFloat32(name);
+	case dods_float64_c:
+		return NewFloat64(name);
+
+	case dods_str_c:
+		return NewStr(name);
+	case dods_url_c:
+		return NewUrl(name);
+
+	case dods_array_c:
+		return NewArray(name);
+	case dods_structure_c:
+		return NewStructure(name);
+	case dods_sequence_c:
+		return NewSequence(name);
+	case dods_grid_c:
+		return NewGrid(name);
+	default:
+		throw InternalErr(__FILE__, __LINE__, "Unknow type");
+	}
+}
 Byte *
 BaseTypeFactory::NewByte(const string &n) const
 {
diff --git a/BaseTypeFactory.h b/BaseTypeFactory.h
index 7ce925f..408e557 100644
--- a/BaseTypeFactory.h
+++ b/BaseTypeFactory.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -82,6 +82,8 @@ public:
     virtual ~BaseTypeFactory()
     {}
 
+    virtual BaseType *NewVariable(Type type, const string &name = "") const;
+
     virtual Byte *NewByte(const string &n = "") const;
     virtual Int16 *NewInt16(const string &n = "") const;
     virtual UInt16 *NewUInt16(const string &n = "") const;
diff --git a/Byte.cc b/Byte.cc
index f654b85..07090c5 100644
--- a/Byte.cc
+++ b/Byte.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,26 +36,25 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    { "$Id: Byte.cc 21699 2009-11-05 00:06:01Z jimg $"
-    };
+#include <sstream>
 
-#include "Byte.h"
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
 #include "Int16.h"
 #include "UInt16.h"
 #include "Int32.h"
 #include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
 #include "Float32.h"
 #include "Float64.h"
 #include "Str.h"
 #include "Url.h"
-#include "Array.h"
-#include "Structure.h"
-#include "Sequence.h"
-#include "Grid.h"
 
 #include "DDS.h"
 #include "Operators.h"
+#include "Marshaller.h"
+#include "UnMarshaller.h"
 
 #include "util.h"
 #include "parser.h"
@@ -94,7 +93,7 @@ Byte::Byte(const string &n, const string &d): BaseType(n, d, dods_byte_c)
 
 Byte::Byte(const Byte & copy_from): BaseType(copy_from)
 {
-    _buf = copy_from._buf;
+    d_buf = copy_from.d_buf;
 }
 
 BaseType *Byte::ptr_duplicate()
@@ -109,12 +108,12 @@ Byte & Byte::operator=(const Byte & rhs)
 
     dynamic_cast < BaseType & >(*this) = rhs;
 
-    _buf = rhs._buf;
+    d_buf = rhs.d_buf;
 
     return *this;
 }
 
-unsigned int Byte::width()
+unsigned int Byte::width(bool)
 {
     return sizeof(dods_byte);
 }
@@ -144,7 +143,7 @@ bool Byte::serialize(ConstraintEvaluator & eval, DDS & dds,
 
     dds.timeout_off();
 
-    m.put_byte( _buf ) ;
+    m.put_byte( d_buf ) ;
 
     return true;
 }
@@ -154,7 +153,7 @@ bool Byte::serialize(ConstraintEvaluator & eval, DDS & dds,
 */
 bool Byte::deserialize(UnMarshaller &um, DDS *, bool)
 {
-    um.get_byte( _buf ) ;
+    um.get_byte( d_buf ) ;
 
     return false;
 }
@@ -173,7 +172,7 @@ unsigned int Byte::val2buf(void *val, bool)
     if (!val)
         throw InternalErr("the incoming pointer does not contain any data.");
 
-    _buf = *(dods_byte *) val;
+    d_buf = *(dods_byte *) val;
 
     return width();
 }
@@ -188,7 +187,7 @@ unsigned int Byte::buf2val(void **val)
     if (!*val)
         *val = new dods_byte;
 
-    *(dods_byte *) * val = _buf;
+    *(dods_byte *) * val = d_buf;
 
     return width();
 }
@@ -199,7 +198,7 @@ unsigned int Byte::buf2val(void **val)
     with the Passive* subclasses written by HAO. */
 bool Byte::set_value(dods_byte value)
 {
-    _buf = value;
+    d_buf = value;
     set_read_p(true);
 
     return true;
@@ -209,29 +208,24 @@ bool Byte::set_value(dods_byte value)
     @return The value. */
 dods_byte Byte::value() const
 {
-    return _buf;
+    return d_buf;
 }
 
-#if FILE_METHODS
 void Byte::print_val(FILE * out, string space, bool print_decl_p)
 {
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = %d;\n", (int) _buf);
-    }
-    else
-        fprintf(out, "%d", (int) _buf);
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void Byte::print_val(ostream &out, string space, bool print_decl_p)
 {
     if (print_decl_p) {
         print_decl(out, space, false);
-	out << " = " << (int)_buf << ";\n" ;
+        out << " = " << (int) d_buf << ";\n";
     }
     else
-	out << (int)_buf ;
+        out << (int) d_buf;
 }
 
 bool Byte::ops(BaseType * b, int op)
@@ -257,31 +251,28 @@ bool Byte::ops(BaseType * b, int op)
     }
 
     switch (b->type()) {
-    case dods_byte_c:
-        return rops < dods_byte, dods_byte, Cmp < dods_byte, dods_byte > >
-               (_buf, dynamic_cast < Byte * >(b)->_buf, op);
-    case dods_int16_c:
-        return rops < dods_byte, dods_int16, USCmp < dods_byte,
-               dods_int16 > > (_buf, dynamic_cast < Int16 * >(b)->_buf, op);
-    case dods_uint16_c:
-        return rops < dods_byte, dods_uint16, Cmp < dods_byte,
-               dods_uint16 > > (_buf, dynamic_cast < UInt16 * >(b)->_buf, op);
-    case dods_int32_c:
-        return rops < dods_byte, dods_int32, USCmp < dods_byte,
-               dods_int32 > > (_buf, dynamic_cast < Int32 * >(b)->_buf, op);
-    case dods_uint32_c:
-        return rops < dods_byte, dods_uint32, Cmp < dods_byte,
-               dods_uint32 > > (_buf, dynamic_cast < UInt32 * >(b)->_buf, op);
-    case dods_float32_c:
-        return rops < dods_byte, dods_float32, Cmp < dods_byte,
-               dods_float32 > > (_buf, dynamic_cast < Float32 * >(b)->_buf,
-                                 op);
-    case dods_float64_c:
-        return rops < dods_byte, dods_float64, Cmp < dods_byte,
-               dods_float64 > > (_buf, dynamic_cast < Float64 * >(b)->_buf,
-                                 op);
-    default:
-        return false;
+        case dods_int8_c:
+            return USCmp<dods_byte, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return Cmp<dods_byte, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return USCmp<dods_byte, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return Cmp<dods_byte, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return USCmp<dods_byte, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return Cmp<dods_byte, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return USCmp<dods_byte, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return Cmp<dods_byte, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return USCmp<dods_byte, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return USCmp<dods_byte, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
     }
 }
 
@@ -299,7 +290,7 @@ void Byte::dump(ostream & strm) const
     << (void *) this << ")" << endl;
     DapIndent::Indent();
     BaseType::dump(strm);
-    strm << DapIndent::LMarg << "value: " << _buf << endl;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl;
     DapIndent::UnIndent();
 }
 
diff --git a/Byte.h b/Byte.h
index 9291674..345452e 100644
--- a/Byte.h
+++ b/Byte.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -49,8 +49,6 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -62,20 +60,8 @@ namespace libdap
     */
 class Byte: public BaseType
 {
-    /** This class allows Int16, ..., Float64 access to <tt>_buf</tt> to
-    simplify and speed up the relational operators.
-
-    NB: According to Stroustrup it does not matter where (public, private
-    or protected) friend classes are declared. */
-    friend class Int16;
-    friend class UInt16;
-    friend class Int32;
-    friend class UInt32;
-    friend class Float32;
-    friend class Float64;
-
 protected:
-    dods_byte _buf;
+    dods_byte d_buf;
 
 public:
     Byte(const string &n);
@@ -88,12 +74,11 @@ public:
 
     Byte &operator=(const Byte &rhs);
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     virtual BaseType *ptr_duplicate();
 
-    bool serialize(ConstraintEvaluator &eval, DDS &dds,
-		   Marshaller &m, bool ce_eval);
+    bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval);
     bool deserialize(UnMarshaller &um, DDS *, bool);
 
     virtual unsigned int val2buf(void *val, bool reuse = false);
@@ -101,12 +86,9 @@ public:
 
     virtual bool set_value(const dods_byte value);
     virtual dods_byte value() const;
-#if FILE_METHODS
-    virtual void print_val(FILE *out, string space = "",
-                           bool print_decl_p = true);
-#endif
-    virtual void print_val(ostream &out, string space = "",
-                           bool print_decl_p = true);
+
+    virtual void print_val(FILE *out, string space = "", bool print_decl_p = true);
+    virtual void print_val(ostream &out, string space = "", bool print_decl_p = true);
 
     virtual bool ops(BaseType *b, int op);
 
diff --git a/ChangeLog b/ChangeLog
index 79c84f2..490f755 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,684 @@
+2013-08-28  James Gallagher <jgallagher at opendap.org>
+
+	Build/Audit fixes.
+
+	M    libdap/XDRFileUnMarshaller.cc
+	M    libdap/XDRFileUnMarshaller.h
+	M    bes/dispatch/unit-tests/keysT.cc
+	M    bes/functions/Makefile.am
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Backed out an errant call to fclose()
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Removed errant call to fclose() in XDRFileUnMarshaller. This
+	caused a segfault on Linux.
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	audit fixes
+
+	M    libdap/Makefile.am
+	M    bes/dispatch/unit-tests/BESCache3Test.cc
+	M    bes/functions/tests/functionsTest.at
+	M    bes/functions/tests/bescmd/bind_name_4.dods.bescmd.baseline
+	M    bes/functions/tests/bescmd/bind_name_2.dods.bescmd.baseline
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Source release info
+
+	M    configure.ac
+	M    ChangeLog
+	M    INSTALL
+	M    README
+	M    NEWS
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Audit fixes.
+
+	M    RValue.cc
+	M    HTTPCacheTable.cc
+	M    Array.cc
+	M    DDXParserSAX2.cc
+	M    Makefile.am
+	M    HTTPCache.cc
+	M    XDRStreamUnMarshaller.cc
+	M    Structure.cc
+	M    Sequence.cc
+	M    XDRFileUnMarshaller.cc
+	M    XDRFileUnMarshaller.h
+	M    mime_util.cc
+	M    util.cc
+	M    util_mit.cc
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Changed the required bison version number to 2.4 and removed a bogus include
+	from das.yy that breaks bison 2.4.
+
+	M    das.yy
+	M    Error.yy
+	M    dds.yy
+	M    ce_expr.yy
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Removed bad character from the Makefile.am
+
+	M    Makefile.am
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Added the newly hacked grammar files - these along with updated versions
+	of DAS.cc, DDS.cc, ConstraintEvaluator.cc and Error.cc and Makefile.am
+	were copied over from the dap4 branch. A kind of cheap merge operation...
+
+	A    das.yy
+	A    Error.yy
+	A    dds.yy
+	A    ce_expr.yy
+
+;; Local Variables:
+;; coding: utf-8
+;; End:
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Audit fixes.
+
+	M    RValue.cc
+	M    HTTPCacheTable.cc
+	M    Array.cc
+	M    DDXParserSAX2.cc
+	M    Makefile.am
+	M    HTTPCache.cc
+	M    XDRStreamUnMarshaller.cc
+	M    Structure.cc
+	M    Sequence.cc
+	M    XDRFileUnMarshaller.cc
+	M    XDRFileUnMarshaller.h
+	M    mime_util.cc
+	M    util.cc
+	M    util_mit.cc
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Changed the required bison version number to 2.4 and removed a
+	bogus include from das.yy that breaks bison 2.4.
+
+	M    das.yy
+	M    Error.yy
+	M    dds.yy
+	M    ce_expr.yy
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Removed bad character from the Makefile.am
+
+	M    Makefile.am
+
+2013-08-27  James Gallagher <jgallagher at opendap.org>
+
+	Added the newly hacked grammar files - these along with updated
+	versions of DAS.cc, DDS.cc, ConstraintEvaluator.cc and Error.cc
+	and Makefile.am were copied over from the dap4 branch. A kind of
+	cheap merge operation...
+
+	A    das.yy
+	A    Error.yy
+	A    dds.yy
+	A    ce_expr.yy
+
+2013-08-26  James Gallagher <jgallagher at opendap.org>
+
+	Chnages so that a newer bison can be used.
+
+	M    Error.lex
+	M    Error.cc
+	M    ce_parser.h
+	M    ConstraintEvaluator.cc
+	M    DDS.cc
+	M    Makefile.am
+	M    dds.lex
+	M    Vector.cc
+	M    das.lex
+	M    Vector.h
+	M    DAS.cc
+	M    ce_expr.lex
+
+2013-07-23  James Gallagher <jgallagher at opendap.org>
+
+	Removed the openssl/evp.h header because it winds up including
+	des_old.h on OSX 10.5 and that has a conflict with set_key() in
+	BESKeys.h. Also, the code no longer uses the evp.h header...
+
+	M    XDRStreamMarshaller.h
+
+2013-07-23  James Gallagher <jgallagher at opendap.org>
+
+	Memory leaks fixed in the DAP4 Stream Marshaller classes - but
+	these are in code in the trunk. will check in all the same and
+	make corresponding changes to the code on the dap4 branch (which
+	uses the filename prefix 'D4' instead of 'DAP4').
+
+2013-07-23  James Gallagher <jgallagher at opendap.org>
+
+	Modified ConstraintEvaluator so that it always frees the
+	scanner/parser string buffer when an exception is thrown. I made
+	this change while working on a problem that turned out to be in
+	the scanner (state was not reset when an error was found) but even
+	though this change is not the fix for that - see ce_expr.lex - it
+	seems like a good idea.
+
+2013-07-23  James Gallagher <jgallagher at opendap.org>
+
+	Fixed the rpm build - libtest-types.a was missiing from the spec file.
+
+2013-07-10  James Gallagher <jgallagher at opendap.org>
+
+	Fixed a bug where a CE with mismatched quotes left the CE parser
+	in the <quote> state, making subsequent requests fail. The fix was
+	in the scanner to reset the parser (technically the scanner's)
+	state to INITIAL when an error was detected. I also added code to
+	catch the Error object thrown by the scanner and delete the parse
+	buffer, although that might be overkill.
+
+2013-07-10  James Gallagher <jgallagher at opendap.org>
+
+	Merged changes from the miic_6.2013 branch. These changes support the
+	new #<type>() special forms that enable big arrays to be use in CEs.
+
+	_M   .
+	M    Error.lex
+	M    ConstraintEvaluator.cc
+	M    Array.cc
+	M    tests/expr-test.cc
+	A  + tests/ResponseBuilder.cc
+	A  + tests/ResponseBuilder.h
+	M    tests/Makefile.am
+	M    DDXParserSAX2.cc
+	M    Makefile.am
+	M    ce_expr.y
+	M    Error.y
+	M    dds.lex
+	MM   mime_util.h
+	M    XDRStreamUnMarshaller.cc
+	M    RValue.h
+	M    BaseTypeFactory.h
+	M    das.lex
+	MM   mime_util.cc
+	M    das.y
+	M    BaseTypeFactory.cc
+	M    util.cc
+	D    unit-tests/server-testsuite/geturl.0
+	D    unit-tests/server-testsuite/config
+	_M   unit-tests/ancT.cc
+	M    unit-tests/DDXParserTest.cc
+	D    unit-tests/response_cache
+	M    unit-tests/Makefile.am
+	M    dds.y
+	M    Array.h
+	M    ce_expr.lex
+
+2013-07-09  James Gallagher <jgallagher at opendap.org>
+
+	Trunk fixes for the functions module in the libdap andbes spec
+	files. Also a repair to XDRStreamMarshaller.cc
+
+2013-06-06  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: new value() methods so that the correct thinmgs are
+	accessed and returned.
+
+2013-06-06  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Added new 'value' function to Vector that allows you use
+	an subset_index array to retrieve non contiguous values in a
+	single operation
+
+2013-06-05  James Gallagher <jgallagher at opendap.org>
+
+	Added libdap-* to svn-ignore
+
+2013-05-21  James Gallagher <jgallagher at opendap.org>
+
+	Fixes for linux
+
+	M    unit-tests/ResponseBuilderTest.cc
+	M    unit-tests/ResponseCacheTest.cc
+
+2013-05-21  James Gallagher <jgallagher at opendap.org>
+
+	added valgrind suppressions for stuff in libxml2
+
+2013-05-20  James Gallagher <jgallagher at opendap.org>
+
+	Moved four set_mime_*() methods from ResponseBuilder to mime_util.
+
+2013-05-20  James Gallagher <jgallagher at opendap.org>
+
+	Modified DDXParser so that it includes an intern_stream() method
+	that takes a cpp istream. Added tests. Also modified
+	ResponseBuilder so that it frees the AlarmHandler allocated when
+	establish_timeout() is called.
+
+2013-05-20  James Gallagher <jgallagher at opendap.org>
+
+	Fixed memory leaks in the DDXParserSax2 code. Other minor edits.
+
+2013-05-20  James Gallagher <jgallagher at opendap.org>
+
+	Test fixes
+
+2013-05-20  James Gallagher <jgallagher at opendap.org>
+
+	added
+
+2013-05-17  James Gallagher <jgallagher at opendap.org>
+
+	Added these baseline files for ResponseBuilderTest
+
+2013-05-17  James Gallagher <jgallagher at opendap.org>
+
+	Fixes for ResponseCache - I added tests and have tested most
+	modes. Not tested: how it works with server functions. There are
+	also fixes/modifications for ResponseBuilder that ResponseCache
+	uses. Added a note to ServerFunctionsList that it stores weak
+	pointers. I worked on the ResponseBuilderTests but never got the
+	test for server functions to work completely; the test examines
+	the response document and checks that the metadata part is correct
+	but not the (trivial) data part.
+
+2013-05-17  James Gallagher <jgallagher at opendap.org>
+
+	Added get_next_mime_header() for an istream (the existing version
+	took a FILE*) and moved some of the MIME header methods from
+	ResponseBuilder here.
+
+2013-05-15  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Moving trunk/libdap/unit-tests/ce-functions-testsuite to
+	trunk/bes/functions/unit-tests because that's where the functions
+	are that need the contents of that directory.
+
+2013-05-14  James Gallagher <jgallagher at opendap.org>
+
+	ResponseCache mostly working...
+
+2013-05-14  James Gallagher <jgallagher at opendap.org>
+
+	We now install the library and *Test headers.
+
+2013-05-14  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Repaired problems with conditional build in ServerFcuntionsList
+
+2013-05-14  James Gallagher <jgallagher at opendap.org>
+
+	Added HAVE_STDLIB_H and HAVE_ATEXIT to DAPCache3.cc.
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Instrumentation in Regex. Fixed baseline for
+	ResponseBuilderTest::invoke_server_side_function_test
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Added life cycle control to DAPCache3 singleton.
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Added life cycle control to DAPCache3 singleton.
+
+2013-05-10  James Gallagher <jgallagher at opendap.org>
+
+	(potential) fix for the ResponseBuilder cache bug
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Updated ResponseBuilderTest to run a server side function.
+
+2013-05-10  James Gallagher <jgallagher at opendap.org>
+
+	Removed (commented) #define DODS_DEBUG from ServerFunctionsList.
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Added instrumentation (enabled in this check in) to
+	ServerFunctionsList in an effort to understand the seg fault
+	problem that seems to be associated with server side function
+	calls.
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Added instrumentation (enabled in this check in) to
+	ServerFunctionsList in an effort to understand the seg fault
+	problem that seems to be associated with server side function
+	calls.
+
+2013-05-10  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Added instrumentation (enabled in this check in) to
+	ServerFunctionsList in an effort to understand the seg fault
+	problem that seems to be associated with server side function
+	calls.
+
+2013-05-09  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Checking in repaired ServerFunctionsList
+
+2013-05-06  James Gallagher <jgallagher at opendap.org>
+
+	Removed old code
+
+2013-05-06  James Gallagher <jgallagher at opendap.org>
+
+	DAPCache3 is now in the libdap namespace. The cache-specific
+	methods of ResponseBuilder have been factored out to
+	ResponseCache; RB still makes explicit calls to the cache code,
+	however. The ResponseCache class was added.
+
+2013-05-03  James Gallagher <jgallagher at opendap.org>
+
+	Added correct copyright headers for the ServerFunctions classes.
+
+2013-05-03  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Attempting to fix memory leaks in ServerFucntionsList - adding unit tests for same.
+
+2013-05-02  James Gallagher <jgallagher at opendap.org>
+
+	Removed old code in util
+
+2013-05-02  James Gallagher <jgallagher at opendap.org>
+
+	Removed old code from ResponseBuilder
+
+2013-05-01  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Change type signature for setter methods in ServerFunction
+	so that they accept const parameters
+
+2013-05-01  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Change type signature for setter methods in ServerFunction
+	so that they accept const parameters
+
+2013-04-27  James Gallagher <jgallagher at opendap.org>
+
+	Wrapped the two DAP4-only includes in #if DAP4. Those headers are not
+	installed in a regular build and the includes break clients that
+	included the file.
+
+	M    BaseType.h
+
+2013-04-03  James Gallagher <jgallagher at opendap.org>
+
+	distcheck works on linux now...
+
+	A  + D4ParserSax2.cc
+	M    Makefile.am
+	D    D4ParserSAX2.cc
+
+2013-04-03  James Gallagher <jgallagher at opendap.org>
+
+2013-04-02  James Gallagher <jgallagher at opendap.org>
+
+	Added climit include to fix 'UINT/INT_MAX missing' on Linux.
+
+	M    util.cc
+
+2013-04-01  James Gallagher <jgallagher at opendap.org>
+
+	Added unit tests for D4Dimensions and D4EnumDefs. Removed old code from the AttrTable tests.
+
+2013-04-01  James Gallagher <jgallagher at opendap.org>
+
+	Added D4EnumDefs
+
+2013-03-26  Nathan Potter <ndp at coas.oregonstate.edu>
+
+2013-03-25  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Disabling cruft code from earlier ugrid work.
+
+2013-02-25  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Comments
+
+2013-02-12  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: comments
+
+2013-02-08  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Updated ServerFunction API
+
+2013-02-07  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Added methods to ServerFunctionsList to allow inspection of the list contents.
+
+2013-02-06  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Moved AbstractFunction class to ServerFunction class
+
+2013-02-06  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Added the use of AbstractFunction class.
+
+2013-02-05  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	team sync
+
+2013-02-05  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	team sync
+
+2013-02-04  Nathan Potter <ndp at coas.oregonstate.edu>
+
+2013-02-04  Nathan Potter <ndp at coas.oregonstate.edu>
+
+2013-02-04  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Adding AbstractServerSideFunction
+
+2013-01-31  James Gallagher <jgallagher at opendap.org>
+
+	Fixes for bes distcheck
+
+	M    ServerFunctionsList.cc
+	M    ServerFunctionsList.h
+	M    ConstraintEvaluator.h
+
+2013-01-30  James Gallagher <jgallagher at opendap.org>
+
+	Distcheck now works; removed more old server function code.
+
+	_M   .
+	M    configure.ac
+	M    main_page.doxygen
+	M    ConstraintEvaluator.cc
+	_M   tests
+	M    Makefile.am
+	D    swath2grid
+	D    ugridFunctions
+	M    NEWS
+	M    ConstraintEvaluator.h
+	M    unit-tests/HTTPCacheTest.cc
+	M    doxy.conf
+
+2013-01-30  James Gallagher <jgallagher at opendap.org>
+
+	Added stuff to svn:ignore
+
+2013-01-30  Nathan Potter <ndp at coas.oregonstate.edu>
+
+	libdap: Updating configre.ac for automake-1.13
+
+2013-01-29  James Gallagher <jgallagher at opendap.org>
+
+	Changed the way functions are registered so that CE does not have to copy all the functions into every instance of the CE class. Now CE uses functions directly from a list in libdap.
+
+2013-01-29  James Gallagher <jgallagher at opendap.org>
+
+	Changed the way functions are registered so that CE does not have to copy all the functions into every instance of the CE class. Now CE uses functions directly from a list in libdap.
+
+2013-01-29  James Gallagher <jgallagher at opendap.org>
+
+	Fixed checkin - I checked in some code with debugging on
+
+2013-01-29  James Gallagher <jgallagher at opendap.org>
+
+	Removing 'basic' server functions.
+
+	_M   .
+	M    Keywords2.cc
+	M    ConstraintEvaluator.cc
+	M    tests/TestArray.cc
+	M    tests/EXPRTest.at
+	M    Makefile.am
+	M    swath2grid/reproj_functions.cc
+	M    HTTPCache.cc
+	M    util.h
+	M    expr.h
+	M    util.cc
+	M    unit-tests/HTTPCacheTest.cc
+	D    unit-tests/ArrayGeoConstraintTest.cc
+	RM + unit-tests/ancT.cc
+	M    unit-tests/ddsT.cc
+	M    unit-tests/ResponseBuilderTest.cc
+	D    unit-tests/CEFunctionsTest.cc
+	D    unit-tests/GridGeoConstraintTest.cc
+	M    unit-tests/Makefile.am
+	M    unit-tests/Keywords2Test.cc
+
+2013-01-29  James Gallagher <jgallagher at opendap.org>
+
+	Added stuff to svn:ignore
+
+2013-01-29  James Gallagher <jgallagher at opendap.org>
+
+	Added stuff to svn:ignore
+
+2013-01-29  James Gallagher <jgallagher at opendap.org>
+
+	Added stuff to svn:ignore
+
+2013-01-25  Patrick West <pwest at ucar.edu>
+
+	Removing dependency on DAP4 code for DAP3 responses
+	M    ResponseBuilder.h
+	M    ResponseBuilder.cc
+	M    Int64.h
+
+2013-01-25  Patrick West <pwest at ucar.edu>
+
+	Need autoconf 2.61, not 2.62
+	M    configure.ac
+
+2013-01-18  James Gallagher <jgallagher at opendap.org>
+
+	Merge of the code from hyrax 1.8 release (version 3.11.7)
+
+	_M   .
+	A  + gridfields_functions.h
+	M    configure.ac
+	M    Connect.h
+	M    ChangeLog
+	A  + gridfields_functions.cc
+	M    ResponseBuilder.h
+	M    main_page.doxygen
+	A  + DAPCache3.cc
+	A  + DAPCache3.h
+	_M   OSX_Resources
+	M    ConstraintEvaluator.cc
+	M    DDS.cc
+	M    HTTPCacheTable.cc
+	M    Array.cc
+	_M   tests
+	M    tests/TestGrid.cc
+	M    tests/expr-test.cc
+	M    tests/TestStructure.cc
+	M    INSTALL
+	M    DDXParserSAX2.cc
+	M    libdap.spec
+	M    ResponseBuilder.cc
+	M    README
+	M    BaseType.cc
+	M    DDS.h
+	_M   win32/gl
+	M    Makefile.am
+	AM + swath2grid
+	M    DataDDS.cc
+	M    ce_expr.y
+	M    util.h
+	AM + ugridFunctions
+	M    XDRStreamUnMarshaller.cc
+	M    NEWS
+	A  + doxy.conf.in
+	M    Vector.cc
+	A  + main_page.doxygen.in
+	_M   gl
+	M    ce_functions.cc
+	M    expr.h
+	MM   mime_util.cc
+	M    GridGeoConstraint.cc
+	M    Vector.h
+	M    util.cc
+	M    Grid.cc
+	M    Connect.cc
+	_M   unit-tests
+	MM   unit-tests/MIMEUtilTest.cc
+	M    unit-tests/ResponseBuilderTest.cc
+	M    Clause.cc
+	M    Array.h
+	M    doxy.conf
+	M    ce_expr.lex
+
+2012-11-07  James Gallagher <jgallagher at opendap.org>
+
+	Changed svn ignore properties
+
+2012-11-07  James Gallagher <jgallagher at opendap.org>
+
+	Changed svn ignore properties
+
+2012-11-07  James Gallagher <jgallagher at opendap.org>
+
+	Changes for libdap 3.11.7 so that when the CE Function cache
+	directory is not present, caching is off. Before the code was just
+	crashing when a function was used. I also refactored
+	ResponseBuilder (where the fix is) so that it's got less
+	redundancy.
+
+2012-11-02  James Gallagher <jgallagher at opendap.org>
+
+	Release 3.11.6
+
+	M    configure.ac
+	M    ChangeLog
+	M    main_page.doxygen
+	M    tests/package.m4
+	M    INSTALL
+	M    libdap.spec
+	M    README
+	M    NEWS
+	M    doxy.conf
+
 2012-11-02  James Gallagher <jgallagher at opendap.org>
 
-	Fixes for a respource leak in the server function cache code.
+	Fixes for a resource leak in the server function cache code.
 
 	M    ResponseBuilder.cc
 
@@ -8934,5 +9612,5 @@ Mon Jul  8 16:25:11 1996  James Gallagher  <jimg at dcz.cvo.oneworld.com>
 	Note that without Expect the GUI used for the transmission
 	progress indicator and error reporting is not available.
 
-$Id: ChangeLog 25988 2012-11-02 22:39:09Z jimg $
+$Id: ChangeLog 27104 2013-09-17 23:43:37Z jimg $
 
diff --git a/Clause.cc b/Clause.cc
index 786afaf..77a6b45 100644
--- a/Clause.cc
+++ b/Clause.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Clause.h b/Clause.h
index 1d985f9..56ccca9 100644
--- a/Clause.h
+++ b/Clause.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Connect.cc b/Connect.cc
index 15ca446..8ea727a 100644
--- a/Connect.cc
+++ b/Connect.cc
@@ -1,4 +1,3 @@
-
 // -*- mode: c++; c-basic-offset:4 -*-
 
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
@@ -21,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -33,15 +32,10 @@
 //      dan             Dan Holloway <dholloway at gso.uri.edu>
 //      reza            Reza Nekovei <reza at intcomm.net>
 
-
 #include "config.h"
 
 //#define DODS_DEBUG
-#define FILE_METHODS 1
-
-static char rcsid[] not_used =
-    { "$Id: Connect.cc 25920 2012-10-24 19:18:51Z jimg $"
-    };
+#define FILE_UN_MARSHALLER 1
 
 #include <cstring>
 #include <fstream>
@@ -53,7 +47,7 @@ static char rcsid[] not_used =
 #include "escaping.h"
 //#include "RCReader.h"
 #include "DDXParserSAX2.h"
-#if FILE_METHODS
+#if FILE_UN_MARSHALLER
 #include "XDRFileUnMarshaller.h"
 #else
 #include "fdiostream.h"
@@ -70,9 +64,8 @@ using std::min;
 namespace libdap {
 
 /** This private method process data from both local and remote sources. It
-    exists to eliminate duplication of code. */
-void
-Connect::process_data(DataDDS &data, Response *rs)
+ exists to eliminate duplication of code. */
+void Connect::process_data(DataDDS &data, Response *rs)
 {
     DBG(cerr << "Entering Connect::process_data" << endl);
 
@@ -81,89 +74,68 @@ Connect::process_data(DataDDS &data, Response *rs)
 
     DBG(cerr << "Entering process_data: d_stream = " << rs << endl);
     switch (rs->get_type()) {
-    case dods_error: {
+        case dods_error: {
             Error e;
             if (!e.parse(rs->get_stream()))
-                throw InternalErr(__FILE__, __LINE__,
-                                  "Could not parse the Error object returned by the server!");
+                throw InternalErr(__FILE__, __LINE__, "Could not parse the Error object returned by the server!");
             throw e;
         }
 
-    case web_error:
-        // Web errors (those reported in the return document's MIME header)
-        // are processed by the WWW library.
-        throw InternalErr(__FILE__, __LINE__, "An error was reported by the remote httpd; this should have been processed by HTTPConnect..");
+        case web_error:
+            // Web errors (those reported in the return document's MIME header)
+            // are processed by the WWW library.
+            throw InternalErr(__FILE__, __LINE__,
+                    "An error was reported by the remote httpd; this should have been processed by HTTPConnect..");
 
-    case dap4_data_ddx: {
+        case dap4_data_ddx: {
             // Parse the DDX; throw an exception on error.
-	    DDXParser ddx_parser(data.get_factory());
-
-	    // Read the MPM boundary and then read the subsequent headers
-	    string boundary = read_multipart_boundary(rs->get_stream());
-	    DBG(cerr << "MPM Boundary: " << boundary << endl);
-	    read_multipart_headers(rs->get_stream(), "text/xml", dap4_ddx);
-
-	    // Parse the DDX, reading up to and including the next boundary.
-	    // Return the CID for the matching data part
-	    string data_cid;
-	    ddx_parser.intern_stream(rs->get_stream(), &data, data_cid, boundary);
-
-	    // Munge the CID into something we can work with
-	    data_cid = cid_to_header_value(data_cid);
-	    DBG(cerr << "Data CID: " << data_cid << endl);
-
-	    // Read the data part's MPM part headers (boundary was read by
-	    // DDXParse::intern)
-	    read_multipart_headers(rs->get_stream(),
-		    "application/octet-stream", dap4_data, data_cid);
-
-	    // Now read the data
-#if FILE_METHODS
-	    XDRFileUnMarshaller um( rs->get_stream() ) ;
+            DDXParser ddx_parser(data.get_factory());
+
+            // Read the MPM boundary and then read the subsequent headers
+            string boundary = read_multipart_boundary(rs->get_stream());
+            DBG(cerr << "MPM Boundary: " << boundary << endl);
+            read_multipart_headers(rs->get_stream(), "text/xml", dap4_ddx);
+
+            // Parse the DDX, reading up to and including the next boundary.
+            // Return the CID for the matching data part
+            string data_cid;
+            ddx_parser.intern_stream(rs->get_stream(), &data, data_cid, boundary);
+
+            // Munge the CID into something we can work with
+            data_cid = cid_to_header_value(data_cid);
+            DBG(cerr << "Data CID: " << data_cid << endl);
+
+            // Read the data part's MPM part headers (boundary was read by
+            // DDXParse::intern)
+            read_multipart_headers(rs->get_stream(), "application/octet-stream", dap4_data, data_cid);
+
+            // Now read the data
+#if FILE_UN_MARSHALLER
+            XDRFileUnMarshaller um(rs->get_stream());
 #else
         fpistream in ( rs->get_stream() );
-	    XDRStreamUnMarshaller um( in ) ;
-#endif
-#if 0
-	    try {
+            XDRStreamUnMarshaller um( in );
 #endif
-        	for (DDS::Vars_iter i = data.var_begin(); i != data.var_end();
-                     i++) {
-                    (*i)->deserialize(um, &data);
-                }
-#if 0
-            }
-            catch (Error &e) {
-                throw ;
+            for (DDS::Vars_iter i = data.var_begin(); i != data.var_end(); i++) {
+                (*i)->deserialize(um, &data);
             }
-#endif
             return;
         }
 
-    case dods_data:
-    default: {
+        case dods_data:
+        default: {
             // Parse the DDS; throw an exception on error.
             data.parse(rs->get_stream());
-#if FILE_METHODS
-            XDRFileUnMarshaller um( rs->get_stream() ) ;
+#if FILE_UN_MARSHALLER
+            XDRFileUnMarshaller um(rs->get_stream());
 #else
             fpistream in ( rs->get_stream() );
-	    XDRStreamUnMarshaller um( in ) ;
+            XDRStreamUnMarshaller um( in );
 #endif
             // Load the DDS with data.
-#if 0
-            try {
-#endif
-                for (DDS::Vars_iter i = data.var_begin(); i != data.var_end();
-                     i++) {
-                    (*i)->deserialize(um, &data);
-                }
-#if 0
+            for (DDS::Vars_iter i = data.var_begin(); i != data.var_end(); i++) {
+                (*i)->deserialize(um, &data);
             }
-            catch (Error &e) {
-                throw ;
-            }
-#endif
             return;
         }
     }
@@ -222,10 +194,10 @@ Connect::process_data(DDS &data, Response *rs)
             "application/octet-stream", dap4_data, data_cid);
 
         // Now read the data
-#if FILE_METHODS
+#if FILE_UN_MARSHALLER
         XDRFileUnMarshaller um( rs->get_stream() ) ;
 #else
-            fpistream in ( rs->get_stream() );
+        fpistream in ( rs->get_stream() );
         XDRStreamUnMarshaller um( in ) ;
 #endif
 #if 0
@@ -248,10 +220,10 @@ Connect::process_data(DDS &data, Response *rs)
     default: {
             // Parse the DDS; throw an exception on error.
             data.parse(rs->get_stream());
-#if FILE_METHODS
+#if FILE_UN_MARSHALLER
             XDRFileUnMarshaller um( rs->get_stream() ) ;
 #else
-            fpistream in ( rs->get_stream() );
+           fpistream in ( rs->get_stream() );
         XDRStreamUnMarshaller um( in ) ;
 #endif
             // Load the DDS with data.
@@ -287,15 +259,14 @@ Connect::process_data(DDS &data, Response *rs)
 
 /** Use when you cannot use libcurl.
 
-    @note This method tests for MIME headers with lines terminated by CRLF
-    (\r\n) and Newlines (\n). In either case, the line terminators are removed
-    before each header is processed.
+ @note This method tests for MIME headers with lines terminated by CRLF
+ (\r\n) and Newlines (\n). In either case, the line terminators are removed
+ before each header is processed.
 
-    @param data_source Read from this stream.
-    @param rs Value/Result parameter. Dump version and type information here.
-    */
-void
-Connect::parse_mime(Response *rs)
+ @param data_source Read from this stream.
+ @param rs Value/Result parameter. Dump version and type information here.
+ */
+void Connect::parse_mime(Response *rs)
 {
     rs->set_version("dods/0.0"); // initial value; for backward compatibility.
     rs->set_protocol("2.0");
@@ -303,8 +274,8 @@ Connect::parse_mime(Response *rs)
     FILE *data_source = rs->get_stream();
     string mime = get_next_mime_header(data_source);
     while (!mime.empty()) {
-	string header, value;
-	parse_mime_header(mime, header, value);
+        string header, value;
+        parse_mime_header(mime, header, value);
 
         // Note that this is an ordered list
         if (header == "content-description:") {
@@ -312,8 +283,7 @@ Connect::parse_mime(Response *rs)
             rs->set_type(get_description_type(value));
         }
         // Use the value of xdods-server only if no other value has been read
-        else if (header == "xdods-server:"
-                 && rs->get_version() == "dods/0.0") {
+        else if (header == "xdods-server:" && rs->get_version() == "dods/0.0") {
             DBG(cout << header << ": " << value << endl);
             rs->set_version(value);
         }
@@ -339,15 +309,14 @@ Connect::parse_mime(Response *rs)
 // public mfuncs
 
 /** The Connect constructor requires a <tt>name</tt>, which is the URL to
-    which the connection is to be made.
-
-    @param n The URL for the virtual connection.
-    @param uname Use this username for authentication. Null by default.
-    @param password Password to use for authentication. Null by default.
-    @brief Create an instance of Connect. */
-Connect::Connect(const string &n, string uname, string password)
-throw(Error, InternalErr)
-        : d_http(0), d_version("unknown"), d_protocol("2.0")
+ which the connection is to be made.
+
+ @param n The URL for the virtual connection.
+ @param uname Use this username for authentication. Null by default.
+ @param password Password to use for authentication. Null by default.
+ @brief Create an instance of Connect. */
+Connect::Connect(const string &n, string uname, string password) throw (Error, InternalErr) :
+        d_http(0), d_version("unknown"), d_protocol("2.0")
 {
     string name = prune_spaces(n);
 
@@ -386,7 +355,7 @@ throw(Error, InternalErr)
 
         d_http = 0;
         _URL = "";
-        _local = true;  // local in this case means non-DAP
+        _local = true; // local in this case means non-DAP
     }
 
     set_credentials(uname, password);
@@ -397,20 +366,20 @@ Connect::~Connect()
     DBG2(cerr << "Entering the Connect dtor" << endl);
 
     if (d_http)
-        delete d_http; d_http = 0;
+        delete d_http;
+    d_http = 0;
 
     DBG2(cerr << "Leaving the Connect dtor" << endl);
 }
 
 /** Get version information from the server. This is a new method which will
-    ease the transition to DAP 4.
+ ease the transition to DAP 4.
 
-    @note Use request_protocol() to get the DAP protocol version.
+ @note Use request_protocol() to get the DAP protocol version.
 
-    @return The DAP version string.
-    @see request_protocol() */
-string
-Connect::request_version()
+ @return The DAP version string.
+ @see request_protocol() */
+string Connect::request_version()
 {
     string version_url = _URL + ".ver";
     if (_proj.length() + _sel.length())
@@ -421,31 +390,32 @@ Connect::request_version()
         rs = d_http->fetch_url(version_url);
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 
     d_version = rs->get_version();
     d_protocol = rs->get_protocol();
 
-    delete rs; rs = 0;
+    delete rs;
+    rs = 0;
 
     return d_version;
 }
 
 /** Get protocol version  information from the server. This is a new method
-    which will ease the transition to DAP 4. Note that this method returns
-    the version of the DAP protocol implemented by the server. The
-    request_version() method returns the \e server's version number, not
-    the DAP protocol version.
-
-    @note This method actually asks the server for the protocol version - use
-    get_protocol() to get the protocol information from the most recent
-    response (e.g., from the last DDX response returned by the server).
-
-    @return The DAP protocol version string. */
-string
-Connect::request_protocol()
+ which will ease the transition to DAP 4. Note that this method returns
+ the version of the DAP protocol implemented by the server. The
+ request_version() method returns the \e server's version number, not
+ the DAP protocol version.
+
+ @note This method actually asks the server for the protocol version - use
+ get_protocol() to get the protocol information from the most recent
+ response (e.g., from the last DDX response returned by the server).
+
+ @return The DAP protocol version string. */
+string Connect::request_protocol()
 {
     string version_url = _URL + ".ver";
     if (_proj.length() + _sel.length())
@@ -456,27 +426,28 @@ Connect::request_protocol()
         rs = d_http->fetch_url(version_url);
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 
     d_version = rs->get_version();
     d_protocol = rs->get_protocol();
 
-    delete rs; rs = 0;
+    delete rs;
+    rs = 0;
 
     return d_protocol;
 }
 
 /** Reads the DAS corresponding to the dataset in the Connect
-    object's URL. Although DAP does not support using CEs with DAS
-    requests, if present in the Connect object's instance, they will be
-    escaped and passed as the query string of the request.
+ object's URL. Although DAP does not support using CEs with DAS
+ requests, if present in the Connect object's instance, they will be
+ escaped and passed as the query string of the request.
 
-    @brief Get the DAS from a server.
-    @param das Result. */
-void
-Connect::request_das(DAS &das)
+ @brief Get the DAS from a server.
+ @param das Result. */
+void Connect::request_das(DAS &das)
 {
     string das_url = _URL + ".das";
     if (_proj.length() + _sel.length())
@@ -487,122 +458,128 @@ Connect::request_das(DAS &das)
         rs = d_http->fetch_url(das_url);
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 
     d_version = rs->get_version();
     d_protocol = rs->get_protocol();
 
     switch (rs->get_type()) {
-    case dods_error: {
+        case dods_error: {
             Error e;
             if (!e.parse(rs->get_stream())) {
-            	delete rs; rs = 0;
-                throw InternalErr(__FILE__, __LINE__,
-                                  "Could not parse error returned from server.");
+                delete rs;
+                rs = 0;
+                throw InternalErr(__FILE__, __LINE__, "Could not parse error returned from server.");
             }
-            delete rs; rs = 0;
+            delete rs;
+            rs = 0;
             throw e;
         }
 
-    case web_error:
-        // We should never get here; a web error should be picked up read_url
-        // (called by fetch_url) and result in a thrown Error object.
-        break;
+        case web_error:
+            // We should never get here; a web error should be picked up read_url
+            // (called by fetch_url) and result in a thrown Error object.
+            break;
 
-    case dods_das:
-    default:
-        // DAS::parse throws an exception on error.
-        try {
-            das.parse(rs->get_stream()); // read and parse the das from a file
-        }
-        catch (Error &e) {
-            delete rs; rs = 0;
-            throw ;
-        }
+        case dods_das:
+        default:
+            // DAS::parse throws an exception on error.
+            try {
+                das.parse(rs->get_stream()); // read and parse the das from a file
+            }
+            catch (Error &e) {
+                delete rs;
+                rs = 0;
+                throw;
+            }
 
-        break;
+            break;
     }
 
-    delete rs; rs = 0;
+    delete rs;
+    rs = 0;
 }
 
 /** Reads the DAS corresponding to the dataset in the Connect
-    object's URL. Although DAP does not support using CEs with DAS
-    requests, if present in the Connect object's instance, they will be
-    escaped and passed as the query string of the request.
+ object's URL. Although DAP does not support using CEs with DAS
+ requests, if present in the Connect object's instance, they will be
+ escaped and passed as the query string of the request.
 
-    Different from request_das method in that this method uses the URL as
-    given without attaching .das or projections or selections.
+ Different from request_das method in that this method uses the URL as
+ given without attaching .das or projections or selections.
 
-    @brief Get the DAS from a server.
-    @param das Result. */
-void
-Connect::request_das_url(DAS &das)
+ @brief Get the DAS from a server.
+ @param das Result. */
+void Connect::request_das_url(DAS &das)
 {
-    string use_url = _URL + "?" + _proj + _sel ;
+    string use_url = _URL + "?" + _proj + _sel;
     Response *rs = 0;
     try {
         rs = d_http->fetch_url(use_url);
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 
     d_version = rs->get_version();
     d_protocol = rs->get_protocol();
 
     switch (rs->get_type()) {
-    case dods_error: {
+        case dods_error: {
             Error e;
             if (!e.parse(rs->get_stream())) {
-            	delete rs; rs = 0;
-                throw InternalErr(__FILE__, __LINE__,
-                                  "Could not parse error returned from server.");
+                delete rs;
+                rs = 0;
+                throw InternalErr(__FILE__, __LINE__, "Could not parse error returned from server.");
             }
-            delete rs; rs = 0;
+            delete rs;
+            rs = 0;
             throw e;
         }
 
-    case web_error:
-        // We should never get here; a web error should be picked up read_url
-        // (called by fetch_url) and result in a thrown Error object.
-        break;
+        case web_error:
+            // We should never get here; a web error should be picked up read_url
+            // (called by fetch_url) and result in a thrown Error object.
+            break;
 
-    case dods_das:
-    default:
-        // DAS::parse throws an exception on error.
-        try {
-            das.parse(rs->get_stream()); // read and parse the das from a file
-        }
-        catch (Error &e) {
-            delete rs; rs = 0;
-            throw ;
-        }
+        case dods_das:
+        default:
+            // DAS::parse throws an exception on error.
+            try {
+                das.parse(rs->get_stream()); // read and parse the das from a file
+            }
+            catch (Error &e) {
+                delete rs;
+                rs = 0;
+                throw;
+            }
 
-        break;
+            break;
     }
 
-    delete rs; rs = 0;
+    delete rs;
+    rs = 0;
 }
 
 /** Reads the DDS corresponding to the dataset in the Connect object's URL.
-    If present in the Connect object's instance, a CE will be escaped,
-    combined with \c expr and passed as the query string of the request.
-
-    @note If you need the DDS to hold specializations of the type classes,
-    be sure to include the factory class which will instantiate those
-    specializations in the DDS. Either pass a pointer to the factory to
-    DDS constructor or use the DDS::set_factory() method after the
-    object is built.
-
-    @brief Get the DDS from a server.
-    @param dds Result.
-    @param expr Send this constraint expression to the server. */
-void
-Connect::request_dds(DDS &dds, string expr)
+ If present in the Connect object's instance, a CE will be escaped,
+ combined with \c expr and passed as the query string of the request.
+
+ @note If you need the DDS to hold specializations of the type classes,
+ be sure to include the factory class which will instantiate those
+ specializations in the DDS. Either pass a pointer to the factory to
+ DDS constructor or use the DDS::set_factory() method after the
+ object is built.
+
+ @brief Get the DDS from a server.
+ @param dds Result.
+ @param expr Send this constraint expression to the server. */
+void Connect::request_dds(DDS &dds, string expr)
 {
     string proj, sel;
     string::size_type dotpos = expr.find('&');
@@ -615,132 +592,137 @@ Connect::request_dds(DDS &dds, string expr)
         sel = "";
     }
 
-    string dds_url = _URL + ".dds" + "?"
-                     + id2www_ce(_proj + proj + _sel + sel);
+    string dds_url = _URL + ".dds" + "?" + id2www_ce(_proj + proj + _sel + sel);
 
     Response *rs = 0;
     try {
         rs = d_http->fetch_url(dds_url);
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 
     d_version = rs->get_version();
     d_protocol = rs->get_protocol();
 
     switch (rs->get_type()) {
-    case dods_error: {
+        case dods_error: {
             Error e;
             if (!e.parse(rs->get_stream())) {
-            	delete rs; rs = 0;
-                throw InternalErr(__FILE__, __LINE__,
-                                  "Could not parse error returned from server.");
+                delete rs;
+                rs = 0;
+                throw InternalErr(__FILE__, __LINE__, "Could not parse error returned from server.");
             }
-            delete rs; rs = 0;
+            delete rs;
+            rs = 0;
             throw e;
         }
 
-    case web_error:
-        // We should never get here; a web error should be picked up read_url
-        // (called by fetch_url) and result in a thrown Error object.
-        break;
+        case web_error:
+            // We should never get here; a web error should be picked up read_url
+            // (called by fetch_url) and result in a thrown Error object.
+            break;
 
-    case dods_dds:
-    default:
-        // DDS::prase throws an exception on error.
-        try {
-            dds.parse(rs->get_stream()); // read and parse the dds from a file
-        }
-        catch (Error &e) {
-            delete rs; rs = 0;
-            throw ;
-        }
-        break;
+        case dods_dds:
+        default:
+            // DDS::prase throws an exception on error.
+            try {
+                dds.parse(rs->get_stream()); // read and parse the dds from a file
+            }
+            catch (Error &e) {
+                delete rs;
+                rs = 0;
+                throw;
+            }
+            break;
     }
 
-    delete rs; rs = 0;
+    delete rs;
+    rs = 0;
 }
 
 /** Reads the DDS corresponding to the dataset in the Connect object's URL.
-    If present in the Connect object's instance, a CE will be escaped,
-    combined with \c expr and passed as the query string of the request.
-
-    Different from request_dds method above in that this method assumes
-    URL is complete and does not add anything to the command, such as .dds
-    or projections or selections.
-
-    @note If you need the DDS to hold specializations of the type classes,
-    be sure to include the factory class which will instantiate those
-    specializations in the DDS. Either pass a pointer to the factory to
-    DDS constructor or use the DDS::set_factory() method after the
-    object is built.
-
-    @brief Get the DDS from a server.
-    @param dds Result. */
-void
-Connect::request_dds_url(DDS &dds)
+ If present in the Connect object's instance, a CE will be escaped,
+ combined with \c expr and passed as the query string of the request.
+
+ Different from request_dds method above in that this method assumes
+ URL is complete and does not add anything to the command, such as .dds
+ or projections or selections.
+
+ @note If you need the DDS to hold specializations of the type classes,
+ be sure to include the factory class which will instantiate those
+ specializations in the DDS. Either pass a pointer to the factory to
+ DDS constructor or use the DDS::set_factory() method after the
+ object is built.
+
+ @brief Get the DDS from a server.
+ @param dds Result. */
+void Connect::request_dds_url(DDS &dds)
 {
-    string use_url = _URL + "?" + _proj + _sel ;
+    string use_url = _URL + "?" + _proj + _sel;
     Response *rs = 0;
     try {
         rs = d_http->fetch_url(use_url);
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 
     d_version = rs->get_version();
     d_protocol = rs->get_protocol();
 
     switch (rs->get_type()) {
-    case dods_error: {
+        case dods_error: {
             Error e;
             if (!e.parse(rs->get_stream())) {
-            	delete rs; rs = 0;
-                throw InternalErr(__FILE__, __LINE__,
-                                  "Could not parse error returned from server.");
+                delete rs;
+                rs = 0;
+                throw InternalErr(__FILE__, __LINE__, "Could not parse error returned from server.");
             }
-            delete rs; rs = 0;
+            delete rs;
+            rs = 0;
             throw e;
         }
 
-    case web_error:
-        // We should never get here; a web error should be picked up read_url
-        // (called by fetch_url) and result in a thrown Error object.
-        break;
+        case web_error:
+            // We should never get here; a web error should be picked up read_url
+            // (called by fetch_url) and result in a thrown Error object.
+            break;
 
-    case dods_dds:
-    default:
-        // DDS::prase throws an exception on error.
-        try {
-            dds.parse(rs->get_stream()); // read and parse the dds from a file
-        }
-        catch (Error &e) {
-            delete rs; rs = 0;
-            throw ;
-        }
-        break;
+        case dods_dds:
+        default:
+            // DDS::prase throws an exception on error.
+            try {
+                dds.parse(rs->get_stream()); // read and parse the dds from a file
+            }
+            catch (Error &e) {
+                delete rs;
+                rs = 0;
+                throw;
+            }
+            break;
     }
 
-    delete rs; rs = 0;
+    delete rs;
+    rs = 0;
 }
 
 /** Reads the DDX corresponding to the dataset in the Connect object's URL.
-    If present in the Connect object's instance, a CE will be escaped,
-    combined with \c expr and passed as the query string of the request.
+ If present in the Connect object's instance, a CE will be escaped,
+ combined with \c expr and passed as the query string of the request.
 
-    @note A DDX is represented as XML on the wire but in memory libdap uses a
-    DDS object with variables that hold their own attributes (the DDS itself holds
-    the global attributes).
+ @note A DDX is represented as XML on the wire but in memory libdap uses a
+ DDS object with variables that hold their own attributes (the DDS itself holds
+ the global attributes).
 
-    @brief Get the DDX from a server.
-    @param dds Result.
-    @param expr Send this constraint expression to the server. */
-void
-Connect::request_ddx(DDS &dds, string expr)
+ @brief Get the DDX from a server.
+ @param dds Result.
+ @param expr Send this constraint expression to the server. */
+void Connect::request_ddx(DDS &dds, string expr)
 {
     string proj, sel;
     string::size_type dotpos = expr.find('&');
@@ -753,143 +735,156 @@ Connect::request_ddx(DDS &dds, string expr)
         sel = "";
     }
 
-    string ddx_url = _URL + ".ddx" + "?"
-                     + id2www_ce(_proj + proj + _sel + sel);
+    string ddx_url = _URL + ".ddx" + "?" + id2www_ce(_proj + proj + _sel + sel);
 
     Response *rs = 0;
     try {
         rs = d_http->fetch_url(ddx_url);
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 
     d_version = rs->get_version();
     d_protocol = rs->get_protocol();
 
     switch (rs->get_type()) {
-    case dods_error: {
+        case dods_error: {
             Error e;
             if (!e.parse(rs->get_stream())) {
-            	delete rs; rs = 0;
-                throw InternalErr(__FILE__, __LINE__,
-                                  "Could not parse error returned from server.");
+                delete rs;
+                rs = 0;
+                throw InternalErr(__FILE__, __LINE__, "Could not parse error returned from server.");
             }
-            delete rs; rs = 0;
+            delete rs;
+            rs = 0;
             throw e;
         }
 
-    case web_error:
-        // We should never get here; a web error should be picked up read_url
-        // (called by fetch_url) and result in a thrown Error object.
-        break;
+        case web_error:
+            // We should never get here; a web error should be picked up read_url
+            // (called by fetch_url) and result in a thrown Error object.
+            break;
 
-    case dap4_ddx:
-    case dods_ddx:
-	try {
-            string blob;
+        case dap4_ddx:
+        case dods_ddx:
+            try {
+                string blob;
 
-            DDXParser ddxp(dds.get_factory());
-            ddxp.intern_stream(rs->get_stream(), &dds, blob);
-        }
-        catch (Error &e) {
-            delete rs; rs = 0;
-            throw ;
-        }
-        break;
+                DDXParser ddxp(dds.get_factory());
+                ddxp.intern_stream(rs->get_stream(), &dds, blob);
+            }
+            catch (Error &e) {
+                delete rs;
+                rs = 0;
+                throw;
+            }
+            break;
 
-    default:
-    	delete rs; rs = 0;
-        throw Error("The site did not return a valid response (it lacked the\n\
+        default:
+            delete rs;
+            rs = 0;
+            throw Error(
+                    "The site did not return a valid response (it lacked the\n\
 expected content description header value of 'dap4-ddx' and\n\
-instead returned '" + long_to_string(rs->get_type()) + "').\n\
+instead returned '"
+                            + long_to_string(rs->get_type())
+                            + "').\n\
 This may indicate that the server at the site is not correctly\n\
 configured, or that the URL has changed.");
     }
 
-    delete rs; rs = 0;
+    delete rs;
+    rs = 0;
 }
 
 /** @brief The 'url' version of request_ddx
-    @see Connect::request_ddx. */
-void
-Connect::request_ddx_url(DDS &dds)
+ @see Connect::request_ddx. */
+void Connect::request_ddx_url(DDS &dds)
 {
-    string use_url = _URL + "?" + _proj + _sel ;
+    string use_url = _URL + "?" + _proj + _sel;
 
     Response *rs = 0;
     try {
         rs = d_http->fetch_url(use_url);
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 
     d_version = rs->get_version();
     d_protocol = rs->get_protocol();
 
     switch (rs->get_type()) {
-    case dods_error: {
+        case dods_error: {
             Error e;
             if (!e.parse(rs->get_stream())) {
-            	delete rs; rs = 0;
-                throw InternalErr(__FILE__, __LINE__,
-                                  "Could not parse error returned from server.");
+                delete rs;
+                rs = 0;
+                throw InternalErr(__FILE__, __LINE__, "Could not parse error returned from server.");
             }
-            delete rs; rs = 0;
+            delete rs;
+            rs = 0;
             throw e;
         }
 
-    case web_error:
-        // We should never get here; a web error should be picked up read_url
-        // (called by fetch_url) and result in a thrown Error object.
-        break;
+        case web_error:
+            // We should never get here; a web error should be picked up read_url
+            // (called by fetch_url) and result in a thrown Error object.
+            break;
 
-    case dap4_ddx:
-    case dods_ddx:
-	try {
-            string blob;
+        case dap4_ddx:
+        case dods_ddx:
+            try {
+                string blob;
 
-            DDXParser ddxp(dds.get_factory());
-            ddxp.intern_stream(rs->get_stream(), &dds, blob);
-        }
-        catch (Error &e) {
-            delete rs; rs = 0;
-            throw ;
-        }
-        break;
+                DDXParser ddxp(dds.get_factory());
+                ddxp.intern_stream(rs->get_stream(), &dds, blob);
+            }
+            catch (Error &e) {
+                delete rs;
+                rs = 0;
+                throw;
+            }
+            break;
 
-    default:
-    	delete rs; rs = 0;
-        throw Error("The site did not return a valid response (it lacked the\n\
+        default:
+            delete rs;
+            rs = 0;
+            throw Error(
+                    "The site did not return a valid response (it lacked the\n\
 expected content description header value of 'dap4-ddx' and\n\
-instead returned '" + long_to_string(rs->get_type()) + "').\n\
+instead returned '"
+                            + long_to_string(rs->get_type())
+                            + "').\n\
 This may indicate that the server at the site is not correctly\n\
 configured, or that the URL has changed.");
     }
 
-    delete rs; rs = 0;
+    delete rs;
+    rs = 0;
 }
 
 /** Reads the DataDDS object corresponding to the dataset in the Connect
-    object's URL. If present in the Connect object's instance, a CE will be
-    escaped, combined with \c expr and passed as the query string of the
-    request. The result is a DataDDS which contains the data values bound to
-    variables.
-
-    @note If you need the DataDDS to hold specializations of the type classes,
-    be sure to include the factory class which will instantiate those
-    specializations in the DataDDS. Either pass a pointer to the factory to
-    DataDDS constructor or use the DDS::set_factory() method after the
-    object is built.
-
-    @brief Get the DAS from a server.
-    @param data Result.
-    @param expr Send this constraint expression to the server. */
-void
-Connect::request_data(DataDDS &data, string expr)
+ object's URL. If present in the Connect object's instance, a CE will be
+ escaped, combined with \c expr and passed as the query string of the
+ request. The result is a DataDDS which contains the data values bound to
+ variables.
+
+ @note If you need the DataDDS to hold specializations of the type classes,
+ be sure to include the factory class which will instantiate those
+ specializations in the DataDDS. Either pass a pointer to the factory to
+ DataDDS constructor or use the DDS::set_factory() method after the
+ object is built.
+
+ @brief Get the DAS from a server.
+ @param data Result.
+ @param expr Send this constraint expression to the server. */
+void Connect::request_data(DataDDS &data, string expr)
 {
     string proj, sel;
     string::size_type dotpos = expr.find('&');
@@ -902,8 +897,7 @@ Connect::request_data(DataDDS &data, string expr)
         sel = "";
     }
 
-    string data_url = _URL + ".dods?"
-                      + id2www_ce(_proj + proj + _sel + sel);
+    string data_url = _URL + ".dods?" + id2www_ce(_proj + proj + _sel + sel);
 
     Response *rs = 0;
     // We need to catch Error exceptions to ensure calling close_output.
@@ -914,35 +908,36 @@ Connect::request_data(DataDDS &data, string expr)
         d_protocol = rs->get_protocol();
 
         process_data(data, rs);
-        delete rs; rs = 0;
+        delete rs;
+        rs = 0;
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 }
 
 /** Reads the DataDDS object corresponding to the dataset in the Connect
-    object's URL. If present in the Connect object's instance, a CE will be
-    escaped, combined with \c expr and passed as the query string of the
-    request. The result is a DataDDS which contains the data values bound to
-    variables.
-
-    Different from request_data in that this method uses the syntax of the
-    new OPeNDAP server commands using dispatch
-
-    @note If you need the DataDDS to hold specializations of the type classes,
-    be sure to include the factory class which will instantiate those
-    specializations in the DataDDS. Either pass a pointer to the factory to
-    DataDDS constructor or use the DDS::set_factory() method after the
-    object is built.
-
-    @brief Get the DAS from a server.
-    @param data Result. */
-void
-Connect::request_data_url(DataDDS &data)
+ object's URL. If present in the Connect object's instance, a CE will be
+ escaped, combined with \c expr and passed as the query string of the
+ request. The result is a DataDDS which contains the data values bound to
+ variables.
+
+ Different from request_data in that this method uses the syntax of the
+ new OPeNDAP server commands using dispatch
+
+ @note If you need the DataDDS to hold specializations of the type classes,
+ be sure to include the factory class which will instantiate those
+ specializations in the DataDDS. Either pass a pointer to the factory to
+ DataDDS constructor or use the DDS::set_factory() method after the
+ object is built.
+
+ @brief Get the DAS from a server.
+ @param data Result. */
+void Connect::request_data_url(DataDDS &data)
 {
-    string use_url = _URL + "?" + _proj + _sel ;
+    string use_url = _URL + "?" + _proj + _sel;
     Response *rs = 0;
     // We need to catch Error exceptions to ensure calling close_output.
     try {
@@ -952,16 +947,17 @@ Connect::request_data_url(DataDDS &data)
         d_protocol = rs->get_protocol();
 
         process_data(data, rs);
-        delete rs; rs = 0;
+        delete rs;
+        rs = 0;
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 }
 
-void
-Connect::request_data_ddx(DataDDS &data, string expr)
+void Connect::request_data_ddx(DataDDS &data, string expr)
 {
     string proj, sel;
     string::size_type dotpos = expr.find('&');
@@ -974,8 +970,7 @@ Connect::request_data_ddx(DataDDS &data, string expr)
         sel = "";
     }
 
-    string data_url = _URL + ".dap?"
-                      + id2www_ce(_proj + proj + _sel + sel);
+    string data_url = _URL + ".dap?" + id2www_ce(_proj + proj + _sel + sel);
 
     Response *rs = 0;
     // We need to catch Error exceptions to ensure calling close_output.
@@ -986,18 +981,19 @@ Connect::request_data_ddx(DataDDS &data, string expr)
         d_protocol = rs->get_protocol();
 
         process_data(data, rs);
-        delete rs; rs = 0;
+        delete rs;
+        rs = 0;
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 }
 
-void
-Connect::request_data_ddx_url(DataDDS &data)
+void Connect::request_data_ddx_url(DataDDS &data)
 {
-    string use_url = _URL + "?" + _proj + _sel ;
+    string use_url = _URL + "?" + _proj + _sel;
     Response *rs = 0;
     // We need to catch Error exceptions to ensure calling close_output.
     try {
@@ -1007,29 +1003,30 @@ Connect::request_data_ddx_url(DataDDS &data)
         d_protocol = rs->get_protocol();
 
         process_data(data, rs);
-        delete rs; rs = 0;
+        delete rs;
+        rs = 0;
     }
     catch (Error &e) {
-        delete rs; rs = 0;
-        throw ;
+        delete rs;
+        rs = 0;
+        throw;
     }
 }
 
 /** @brief Read data which is preceded by MIME headers.
-    This method works for both data dds and data ddx responses.
+ This method works for both data dds and data ddx responses.
 
-    @note If you need the DataDDS to hold specializations of the type classes,
-    be sure to include the factory class which will instantiate those
-    specializations in the DataDDS. Either pass a pointer to the factory to
-    DataDDS constructor or use the DDS::set_factory() method after the
-    object is built.
+ @note If you need the DataDDS to hold specializations of the type classes,
+ be sure to include the factory class which will instantiate those
+ specializations in the DataDDS. Either pass a pointer to the factory to
+ DataDDS constructor or use the DDS::set_factory() method after the
+ object is built.
 
-    @see read_data_no_mime()
-    @param data Result.
-    @param rs Read from this Response object. */
+ @see read_data_no_mime()
+ @param data Result.
+ @param rs Read from this Response object. */
 
-void
-Connect::read_data(DataDDS &data, Response *rs)
+void Connect::read_data(DataDDS &data, Response *rs)
 {
     if (!rs)
         throw InternalErr(__FILE__, __LINE__, "Response object is null.");
@@ -1070,50 +1067,50 @@ static void divine_type_information(Response *rs)
     // with a DDS (;Dataset {' ...). I take into account that our parsers have
     // accepted both 'Dataset' and 'dataset' for a long time.
     switch (c) {
-    case '-':
-        rs->set_type(dap4_data_ddx);
-        break;
-    case 'D':
-    case 'd':
-        rs->set_type(dods_data);
-        break;
-    default:
-        throw InternalErr(__FILE__, __LINE__, "Could not determine type of response object in stream.");
+        case '-':
+            rs->set_type(dap4_data_ddx);
+            break;
+        case 'D':
+        case 'd':
+            rs->set_type(dods_data);
+            break;
+        default:
+            throw InternalErr(__FILE__, __LINE__, "Could not determine type of response object in stream.");
     }
 
     ungetc(c, rs->get_stream());
 }
 
 /** @brief Read data from a file which does not have response MIME headers.
-    This method is a companion to read_data(). While read_data() assumes that
-    the response has MIME headers, this method does not. If you call this
-    with a Response that does contain headers, it will throw an Error (and
-    the message is likely to be inscrutable).
+ This method is a companion to read_data(). While read_data() assumes that
+ the response has MIME headers, this method does not. If you call this
+ with a Response that does contain headers, it will throw an Error (and
+ the message is likely to be inscrutable).
 
-    @note This method will use the 'type' information in the Response object
-    to choose between processing the response as a data dds or data ddx. If
-    there is no type information, it will attempt to figure it out.
+ @note This method will use the 'type' information in the Response object
+ to choose between processing the response as a data dds or data ddx. If
+ there is no type information, it will attempt to figure it out.
 
-    @param data Result.
-    @param rs Read from this Response object. */
+ @param data Result.
+ @param rs Read from this Response object. */
 void Connect::read_data_no_mime(DataDDS &data, Response *rs)
 {
     if (rs->get_type() == unknown_type)
         divine_type_information(rs);
 
     switch (rs->get_type()) {
-    case dods_data:
-        d_version = rs->get_version();
-        d_protocol = rs->get_protocol();
-        process_data(data, rs);
-        break;
-    case dap4_data_ddx:
-        process_data(data, rs);
-        d_version = rs->get_version();
-        d_protocol = data.get_protocol();
-        break;
-    default:
-        throw InternalErr(__FILE__, __LINE__, "Should have been a DataDDS or DataDDX.");
+        case dods_data:
+            d_version = rs->get_version();
+            d_protocol = rs->get_protocol();
+            process_data(data, rs);
+            break;
+        case dap4_data_ddx:
+            process_data(data, rs);
+            d_version = rs->get_version();
+            d_protocol = data.get_protocol();
+            break;
+        default:
+            throw InternalErr(__FILE__, __LINE__, "Should have been a DataDDS or DataDDX.");
     }
 }
 void Connect::read_data_no_mime(DDS &data, Response *rs)
@@ -1146,27 +1143,25 @@ Connect::is_local()
 }
 
 /** Return the Connect object's URL in a string.  The URL was set by
-    the class constructor, and may not be reset.  If you want to
-    open another URL, you must create another Connect object.  There
-    is a Connections class created to handle the management of
-    multiple Connect objects.
-
-    @brief Get the object's URL.
-    @see Connections
-    @return A string containing the URL of the data to which the
-    Connect object refers.  If the object refers to local data,
-    the function returns the null string.
-    @param ce If TRUE, the returned URL will include any constraint
-    expression enclosed with the Connect object's URL (including the
-    <tt>?</tt>).  If FALSE, any constraint expression will be removed from
-    the URL.  The default is TRUE.
-*/
-string
-Connect::URL(bool ce)
+ the class constructor, and may not be reset.  If you want to
+ open another URL, you must create another Connect object.  There
+ is a Connections class created to handle the management of
+ multiple Connect objects.
+
+ @brief Get the object's URL.
+ @see Connections
+ @return A string containing the URL of the data to which the
+ Connect object refers.  If the object refers to local data,
+ the function returns the null string.
+ @param ce If TRUE, the returned URL will include any constraint
+ expression enclosed with the Connect object's URL (including the
+ <tt>?</tt>).  If FALSE, any constraint expression will be removed from
+ the URL.  The default is TRUE.
+ */
+string Connect::URL(bool ce)
 {
     if (_local)
-        throw InternalErr(__FILE__, __LINE__,
-                          "URL(): This call is only valid for a DAP data source.");
+        throw InternalErr(__FILE__, __LINE__, "URL(): This call is only valid for a DAP data source.");
 
     if (ce)
         return _URL + "?" + _proj + _sel;
@@ -1175,73 +1170,66 @@ Connect::URL(bool ce)
 }
 
 /** Return the constraint expression (CE) part of the Connect URL. Note
-    that this CE is supplied as part of the URL passed to the
-    Connect's constructor.  It is not the CE passed to the
-    <tt>request_data()</tt> function.
-
-    @brief Get the Connect's constraint expression.
-    @return A string containing the constraint expression (if any)
-    submitted to the Connect object's constructor.  */
-string
-Connect::CE()
+ that this CE is supplied as part of the URL passed to the
+ Connect's constructor.  It is not the CE passed to the
+ <tt>request_data()</tt> function.
+
+ @brief Get the Connect's constraint expression.
+ @return A string containing the constraint expression (if any)
+ submitted to the Connect object's constructor.  */
+string Connect::CE()
 {
     if (_local)
-        throw InternalErr(__FILE__, __LINE__,
-                          "CE(): This call is only valid for a DAP data source.");
+        throw InternalErr(__FILE__, __LINE__, "CE(): This call is only valid for a DAP data source.");
 
     return _proj + _sel;
 }
 
 /** @brief Set the credentials for responding to challenges while dereferencing
-    URLs.
-    @param u The username.
-    @param p The password.
-    @see extract_auth_info() */
-void
-Connect::set_credentials(string u, string p)
+ URLs.
+ @param u The username.
+ @param p The password.
+ @see extract_auth_info() */
+void Connect::set_credentials(string u, string p)
 {
     if (d_http)
         d_http->set_credentials(u, p);
 }
 
 /** Set the \e accept deflate property.
-    @param deflate True if the client can accept compressed responses, False
-    otherwise. */
-void
-Connect::set_accept_deflate(bool deflate)
+ @param deflate True if the client can accept compressed responses, False
+ otherwise. */
+void Connect::set_accept_deflate(bool deflate)
 {
     if (d_http)
         d_http->set_accept_deflate(deflate);
 }
 
 /** Set the \e XDAP-Accept property/header. This is used to send to a server
-    the (highest) DAP protocol version number that this client understands.
+ the (highest) DAP protocol version number that this client understands.
 
-    @param major The client dap protocol major version
-    @param minor The client dap protocol minor version */
-void
-Connect::set_xdap_protocol(int major, int minor)
+ @param major The client dap protocol major version
+ @param minor The client dap protocol minor version */
+void Connect::set_xdap_protocol(int major, int minor)
 {
     if (d_http)
         d_http->set_xdap_protocol(major, minor);
 }
 
 /** Disable any further use of the client-side cache. In a future version
-    of this software, this should be handled so that the www library is
-    not initialized with the cache running by default. */
-void
-Connect::set_cache_enabled(bool cache)
+ of this software, this should be handled so that the www library is
+ not initialized with the cache running by default. */
+void Connect::set_cache_enabled(bool cache)
 {
     if (d_http)
         d_http->set_cache_enabled(cache);
 }
 
-bool
-Connect::is_cache_enabled()
+bool Connect::is_cache_enabled()
 {
     bool status;
     DBG(cerr << "Entering is_cache_enabled (" << hex << d_http << dec
-        << ")... ");
+            << ")... ");
     if (d_http)
         status = d_http->is_cache_enabled();
     else
diff --git a/Connect.h b/Connect.h
index 2d0458a..58bbf7b 100644
--- a/Connect.h
+++ b/Connect.h
@@ -21,7 +21,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/ConstraintEvaluator.cc b/ConstraintEvaluator.cc
index e77e2c2..d66ff03 100644
--- a/ConstraintEvaluator.cc
+++ b/ConstraintEvaluator.cc
@@ -18,43 +18,46 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
 #include "config.h"
 
-static char rcsid[] not_used = { "$Id: ConstraintEvaluator.cc 25915 2012-10-24 00:14:58Z jimg $" };
-
 //#define DODS_DEBUG
 
+#include "ServerFunctionsList.h"
 #include "ConstraintEvaluator.h"
 
-//FIXME
-#include "BaseType.h"
-#include "Array.h"
-#include "Grid.h"
-
-
-#include "ce_functions.h"
-#include "parser.h"
 #include "ce_parser.h"
 #include "debug.h"
+#include "parser.h"
+#include "expr.h"
+//#include "ce_expr.tab.hh"
 
 struct yy_buffer_state;
-yy_buffer_state *ce_expr_scan_string(const char *str);
-int ce_exprparse(void *arg);
+
+int ce_exprparse(libdap::ce_parser_arg *arg);
 
 // Glue routines declared in expr.lex
 void ce_expr_switch_to_buffer(void *new_buffer);
 void ce_expr_delete_buffer(void * buffer);
 void *ce_expr_string(const char *yy_str);
 
+extern int ce_exprdebug;
+
 namespace libdap {
 
 ConstraintEvaluator::ConstraintEvaluator()
 {
-    register_functions(*this);
+    // Functions are now held in BES modules. jhrg 1/30/13
+
+    // modules load functions to this list; this class searches the list
+    // instead of having it's own copy. This is very similar to the BES'
+    // various List classes, but this one is part of libdap and not the
+    // BES. The List class is a singleton, so each function module can
+    // register it's functions to the list object.
+    d_functions_list = ServerFunctionsList::TheList();
 }
 
 ConstraintEvaluator::~ConstraintEvaluator()
@@ -159,6 +162,9 @@ void ConstraintEvaluator::append_constant(BaseType *btp)
     constants.push_back(btp);
 }
 
+// This code was removed when I switched from CE having it's own internal
+// list of functions to using an external list.
+#if 0
 class func_name_is {
 private:
     const string d_name;
@@ -216,10 +222,13 @@ void ConstraintEvaluator::add_function(const string &name, proj_func f)
     function func(name, f);
     functions.push_back(func);
 }
+#endif
 
 /** @brief Find a Boolean function with a given name in the function list. */
 bool ConstraintEvaluator::find_function(const string &name, bool_func *f) const
 {
+    return d_functions_list->find_function(name, f);
+#if 0
     if (functions.empty())
         return false;
 
@@ -230,11 +239,14 @@ bool ConstraintEvaluator::find_function(const string &name, bool_func *f) const
     }
 
     return false;
+#endif
 }
 
 /** @brief Find a BaseType function with a given name in the function list. */
 bool ConstraintEvaluator::find_function(const string &name, btp_func *f) const
 {
+    return d_functions_list->find_function(name, f);
+#if 0
     if (functions.empty())
         return false;
 
@@ -245,11 +257,14 @@ bool ConstraintEvaluator::find_function(const string &name, btp_func *f) const
     }
 
     return false;
+#endif
 }
 
 /** @brief Find a projection function with a given name in the function list. */
 bool ConstraintEvaluator::find_function(const string &name, proj_func *f) const
 {
+    return d_functions_list->find_function(name, f);
+#if 0
     if (functions.empty())
         return false;
 
@@ -259,6 +274,7 @@ bool ConstraintEvaluator::find_function(const string &name, proj_func *f) const
         }
 
     return false;
+#endif
 }
 //@}
 
@@ -345,10 +361,8 @@ ConstraintEvaluator::eval_function_clauses(DDS &dds)
         Clause *cp = expr[i];
         BaseType *result;
         if (cp->value(dds, &result)) {
-            // FIXME result->set_send_p(true);
-            // FIXME Check on using nocopy here
-            DBG(cerr << "In CE 1 Grid send_p: " << result->send_p() << endl);
-            DBG(cerr << "In CE 1 Grid Array send_p: " << static_cast<Grid*>(result)->get_array()->send_p() << endl);
+            // This is correct: The function must allocate the memory for the result
+            // variable. 11/30/12 jhrg
             fdds->add_var_nocopy(result);
         }
         else {
@@ -387,10 +401,6 @@ ConstraintEvaluator::eval_function_clauses(DataDDS &dds)
         Clause *cp = expr[i];
         BaseType *result;
         if (cp->value(dds, &result)) {
-            //result->set_send_p(true);
-            DBG(cerr << "In CE 2 Grid send_p: " << result->send_p() << endl);
-            DBG(cerr << "In CE 2 Grid Array send_p: " << static_cast<Grid*>(result)->get_array()->send_p() << endl);
-
             fdds->add_var_nocopy(result);
         }
         else {
@@ -460,14 +470,24 @@ bool ConstraintEvaluator::eval_selection(DDS &dds, const string &)
 void ConstraintEvaluator::parse_constraint(const string &constraint, DDS &dds)
 {
     void *buffer = ce_expr_string(constraint.c_str());
+
+    // Toggle this to debug the parser. A last resort...
+    ce_exprdebug = false;
+
     ce_expr_switch_to_buffer(buffer);
 
     ce_parser_arg arg(this, &dds);
 
     // For all errors, exprparse will throw Error.
-    ce_exprparse((void *) &arg);
-
-    ce_expr_delete_buffer(buffer);
+    try {
+    	ce_exprparse(&arg);
+    	ce_expr_delete_buffer(buffer);
+    }
+    catch (...) {
+    	// Make sure to remove the buffer when there's an error
+    	ce_expr_delete_buffer(buffer);
+    	throw;
+    }
 }
 
 } // namespace libdap
diff --git a/ConstraintEvaluator.h b/ConstraintEvaluator.h
index 35020b1..1f37945 100644
--- a/ConstraintEvaluator.h
+++ b/ConstraintEvaluator.h
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -42,10 +42,13 @@
 namespace libdap
 {
 
+class ServerFunctionsList;
+
 /** @brief Evaluate a constraint expression */
 class ConstraintEvaluator
 {
 private:
+#if 0
     // This struct is used to hold all the known `user defined' functions
     // (including those that are `built-in').
     struct function
@@ -67,12 +70,15 @@ private:
         function(): name(""), bt_func(0), p_func(0)
         {}
     };
-
+#endif
     vector<Clause *> expr;      // List of CE Clauses
 
     vector<BaseType *> constants;// List of temporary objects
-
+#if 0
     list<function> functions; // Known external functions
+#endif
+    ServerFunctionsList *d_functions_list;  // Know external functions from
+                                            // modules
 
     // The default versions of these methods will break this class. Because
     // Clause does not support deep copies, that class will need to be modified
@@ -92,17 +98,19 @@ public:
 
     typedef std::vector<BaseType *>::const_iterator Constants_citer ;
     typedef std::vector<BaseType *>::iterator Constants_iter ;
-
+#if 0
     typedef std::list<function>::const_iterator Functions_citer ;
     typedef std::list<function>::iterator Functions_iter ;
+#endif
 
     ConstraintEvaluator();
-    virtual ~ConstraintEvaluator();
 
+    virtual ~ConstraintEvaluator();
+#if 0
     void add_function(const string &name, bool_func f);
     void add_function(const string &name, btp_func f);
     void add_function(const string &name, proj_func f);
-
+#endif
     bool find_function(const string &name, bool_func *f) const;
     bool find_function(const string &name, btp_func *f) const;
     bool find_function(const string &name, proj_func *f) const;
diff --git a/Constructor.cc b/Constructor.cc
index 88c1d8f..571d1da 100644
--- a/Constructor.cc
+++ b/Constructor.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -33,6 +33,7 @@
 #include "config.h"
 
 #include <string>
+#include <sstream>
 #include <algorithm>
 #include <functional>
 
@@ -43,6 +44,7 @@
 
 #include "debug.h"
 #include "escaping.h"
+#include "util.h"
 #include "Error.h"
 #include "InternalErr.h"
 
@@ -54,13 +56,21 @@ namespace libdap {
 // Private member functions
 
 void
-Constructor::_duplicate(const Constructor &)
-{}
+Constructor::m_duplicate(const Constructor &c)
+{
+    Constructor &cs = const_cast<Constructor &>(c);
+
+    for (Vars_iter i = cs.d_vars.begin(); i != cs.d_vars.end(); i++) {
+        BaseType *btp = (*i)->ptr_duplicate();
+        btp->set_parent(this);
+        d_vars.push_back(btp);
+    }
+}
 
 // Public member functions
 
-Constructor::Constructor(const string &n, const Type &t)
-        : BaseType(n, t)
+Constructor::Constructor(const string &n, const Type &t, bool is_dap4)
+        : BaseType(n, t, is_dap4)
 {}
 
 /** Server-side constructor that takes the name of the variable to be
@@ -73,11 +83,11 @@ Constructor::Constructor(const string &n, const Type &t)
  * variable is being created
  * @param t type of data being stored
  */
-Constructor::Constructor(const string &n, const string &d, const Type &t)
-        : BaseType(n, d, t)
+Constructor::Constructor(const string &n, const string &d, const Type &t, bool is_dap4)
+        : BaseType(n, d, t, is_dap4)
 {}
 
-Constructor::Constructor(const Constructor &rhs) : BaseType(rhs), _vars(0)
+Constructor::Constructor(const Constructor &rhs) : BaseType(rhs), d_vars(0)
 {}
 
 Constructor::~Constructor()
@@ -91,210 +101,175 @@ Constructor::operator=(const Constructor &rhs)
 
     dynamic_cast<BaseType &>(*this) = rhs; // run BaseType=
 
-    _duplicate(rhs);
+    m_duplicate(rhs);
 
     return *this;
 }
 
-/** Returns an iterator referencing the first structure element. */
-Constructor::Vars_iter
-Constructor::var_begin()
+int
+Constructor::element_count(bool leaves)
 {
-    return _vars.begin() ;
+    if (!leaves)
+        return d_vars.size();
+    else {
+        int i = 0;
+        for (Vars_iter j = d_vars.begin(); j != d_vars.end(); j++) {
+            i += (*j)->element_count(leaves);
+        }
+        return i;
+    }
 }
 
-#if 0
-/** @brief Look for the parent of an HDF4 dimension attribute
+void
+Constructor::set_send_p(bool state)
+{
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        (*i)->set_send_p(state);
+    }
 
-    If this attribute container's name ends in the '_dim_?' suffix, look
-    for the variable to which it's attributes should be bound: For an array,
-    they should be held in a sub-table of the array; for a Structure or
-    Sequence, I don't think the HDF4 handler ever makes these (since those
-    types don't have 'dimension' in hdf-land);  and for a Grid, the attributes
-    belong with the map variables.
+    BaseType::set_send_p(state);
+}
 
-    @note This method does check that the \e source really is an hdf4 dimension
-    attribute.
+void
+Constructor::set_read_p(bool state)
+{
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        (*i)->set_read_p(state);
+    }
 
-    @note I think the comment that Structures in HDF4 files cannot have
-    dimension attributes is wrong. 8/17/11 jhrg
+    BaseType::set_read_p(state);
+}
 
-    @param source The attribute container, an AttrTable::entry instance.
-    @return the BaseType to which these attributes belong or null if none
-    was found. */
-BaseType *
-Constructor::find_hdf4_dimension_attribute_home(AttrTable::entry *source)
+#if 0
+// TODO Recode to use width(bool). Bur see comments in BaseType.h
+unsigned int
+Constructor::width()
 {
-    BaseType *btp;
-    string::size_type i = source->name.find("_dim_");
-    if (i != string::npos && (btp = var(source->name.substr(0, i)))) {
-        if (btp->is_vector_type()) {
-            return btp;
-        }
-        else if (btp->type() == dods_grid_c) {
-            // For a Grid, the hdf4 handler uses _dim_n for the n-th Map
-            // i+5 points to the character holding 'n'
-            int n = atoi(source->name.substr(i + 5).c_str());
-            DBG(cerr << "Found a Grid (" << btp->name() << ") and "
-                << source->name.substr(i) << ", extracted n: " << n << endl);
-            return *(dynamic_cast<Grid&>(*btp).map_begin() + n);
-        }
+    unsigned int sz = 0;
+
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        sz += (*i)->width();
     }
 
-    return 0;
+    return sz;
 }
 #endif
-#if 0
-/** Given an attribute container from a table, find or make a destination
-    for its contents in the current constructor variable. */
-AttrTable *
-Constructor::find_matching_container(AttrTable::entry *source,
-                                     BaseType **dest_variable)
-{
-    // The attribute entry 'source' must be a container
-    if (source->type != Attr_container)
-        throw InternalErr(__FILE__, __LINE__, "Constructor::find_matching_container");
-
-    // Use the name of the attribute container 'source' to figure out where
-    // to put its contents.
-    BaseType *btp;
-    if ((btp = var(source->name))) {
-        // ... matches a variable name? Use var's table
-        *dest_variable = btp;
-        return &btp->get_attr_table();
-    }
-    // As more special-case attribute containers come to light, add clauses
-    // here.
-    else if ((btp = find_hdf4_dimension_attribute_home(source))) {
-        // ... hdf4 dimension attribute? Make a sub table and use that.
-        // btp can only be an Array or a Grid Map (which is an array)
-        if (btp->get_parent()->type() == dods_grid_c) {
-            DBG(cerr << "Found a Grid" << endl);
-            *dest_variable = btp;
-            return &btp->get_attr_table();
+/** This version of width simply returns the same thing as width() for simple
+    types and Arrays. For Structure it returns the total size if constrained
+    is false, or the size of the elements in the current projection if true.
+
+    @param constrained If true, return the size after applying a constraint.
+    @return  The number of bytes used by the variable.
+ */
+unsigned int
+Constructor::width(bool constrained)
+{
+    unsigned int sz = 0;
+
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        if (constrained) {
+            if ((*i)->send_p())
+                sz += (*i)->width(constrained);
         }
-        else { // must be a plain Array
-            string::size_type i = source->name.find("_dim_");
-            string ext = source->name.substr(i + 1);
-            *dest_variable = btp;
-            return btp->get_attr_table().append_container(ext);
+        else {
+            sz += (*i)->width(constrained);
         }
     }
-    else {
-        // ... otherwise assume it's a global attribute.
-        AttrTable *at = get_attr_table().find_container(source->name);
-        if (!at) {
-            at = new AttrTable();       // Make a new global table if needed
-            get_attr_table().append_container(at, source->name);
-        }
 
-        *dest_variable = 0;
-        return at;
-    }
+    return sz;
 }
-#endif
-#if 0
-/** Given an Attribute entry, scavenge attributes from it and load them into
-    this object and the variables it contains. Assume that the caller has
-    determined the table holds attributes pertinent to only this variable.
-
-    @note This method is technically \e unnecessary because a server (or
-    client) can easily add attributes directly using the DDS::get_attr_table
-    or BaseType::get_attr_table methods and then poke values in using any
-    of the methods AttrTable provides. This method exists to ease the
-    transition to DDS objects which contain attribute information for the
-    existing servers (Since they all make DAS objects separately from the
-    DDS). They could be modified to use the same AttrTable methods but
-    operate on the AttrTable instances in a DDS/BaseType instead of those in
-    a DAS.
-
-    @param entry Get attribute information from this Attribute table. Note
-    that even though the type of the argument is an AttrTable::entry, the
-    entry \e must be an attribute container.*/
-void
-Constructor::transfer_attributes(AttrTable::entry * entry)
-{
-    DBG(cerr << "Constructor::transfer_attributes, variable: " << name() <<
-        endl);
-    DBG(cerr << "Working on the '" << entry->
-        name << "' container." << endl);
-    if (entry->type != Attr_container)
-        throw InternalErr(__FILE__, __LINE__,
-                          "Constructor::transfer_attributes");
-
-    AttrTable *source = entry->attributes;
-    BaseType *dest_variable = 0;
-    AttrTable *dest = find_matching_container(entry, &dest_variable);
-
-    // foreach source attribute in the das_i container
-    AttrTable::Attr_iter source_p = source->attr_begin();
-    while (source_p != source->attr_end()) {
-        DBG(cerr << "Working on the '" << (*source_p)->
-            name << "' attribute" << endl);
-
-        if ((*source_p)->type == Attr_container) {
-            if (dest_variable && dest_variable->is_constructor_type()) {
-                dynamic_cast <Constructor & >(*dest_variable).transfer_attributes(*source_p);
+
+BaseType *
+Constructor::var(const string &name, bool exact_match, btp_stack *s)
+{
+    string n = www2id(name);
+
+    if (exact_match)
+        return m_exact_match(n, s);
+    else
+        return m_leaf_match(n, s);
+}
+
+/** @deprecated See comment in BaseType */
+BaseType *
+Constructor::var(const string &n, btp_stack &s)
+{
+    string name = www2id(n);
+
+    BaseType *btp = m_exact_match(name, &s);
+    if (btp)
+        return btp;
+
+    return m_leaf_match(name, &s);
+}
+
+// Protected method
+BaseType *
+Constructor::m_leaf_match(const string &name, btp_stack *s)
+{
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        if ((*i)->name() == name) {
+            if (s) {
+                DBG(cerr << "Pushing " << this->name() << endl);
+                s->push(static_cast<BaseType *>(this));
             }
-            else {
-                dest->append_container(new AttrTable(*(*source_p)->attributes),
-                                       (*source_p)->name);
+            return *i;
+        }
+        if ((*i)->is_constructor_type()) {
+            BaseType *btp = (*i)->var(name, false, s);
+            if (btp) {
+                if (s) {
+                    DBG(cerr << "Pushing " << this->name() << endl);
+                    s->push(static_cast<BaseType *>(this));
+                }
+                return btp;
             }
         }
-        else {
-            dest->append_attr(source->get_name(source_p),
-                              source->get_type(source_p),
-                              source->get_attr_vector(source_p));
+    }
+
+    return 0;
+}
+
+// Protected method
+BaseType *
+Constructor::m_exact_match(const string &name, btp_stack *s)
+{
+    // Look for name at the top level first.
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        if ((*i)->name() == name) {
+            if (s)
+                s->push(static_cast<BaseType *>(this));
+
+            return *i;
         }
+    }
+
+    // If it was not found using the simple search, look for a dot and
+    // search the hierarchy.
+    string::size_type dot_pos = name.find("."); // zero-based index of `.'
+    if (dot_pos != string::npos) {
+        string aggregate = name.substr(0, dot_pos);
+        string field = name.substr(dot_pos + 1);
 
-        ++source_p;
+        BaseType *agg_ptr = var(aggregate);
+        if (agg_ptr) {
+            if (s)
+                s->push(static_cast<BaseType *>(this));
+
+            return agg_ptr->var(field, true, s); // recurse
+        }
+        else
+            return 0;  // qualified names must be *fully* qualified
     }
+
+    return 0;
 }
-#endif
 
-/** Given an Attribute table, scavenge attributes from it and load them into
-    this object and the variables it contains.
-
-    This implementation differs from the version in BaseType in that each of
-    the children of the Constructor are passed an attribute container if one
-    is found that matches the name of this Constructor variable.
-
-    @param at_container Search for attributes in this container.
-    */
-void Constructor::transfer_attributes(AttrTable *at_container) {
-	AttrTable *at = at_container->get_attr_table(name());
-
-	if (at) {
-		at->set_is_global_attribute(false);
-
-		Vars_iter var = var_begin();
-		while (var != var_end()) {
-			try {
-				DBG(cerr << "Processing the attributes for: " << (*var)->name() << " a " << (*var)->type_name() << endl);
-				(*var)->transfer_attributes(at);
-				var++;
-			} catch (Error &e) {
-				DBG(cerr << "Got this exception: " << e.get_error_message() << endl);
-				var++;
-				throw e;
-			}
-		}
-
-		// Trick: If an attribute that's within the container 'at' still has its
-		// is_global_attribute property set, then it's not really a global attr
-		// but instead an attribute that belongs to this Constructor.
-		AttrTable::Attr_iter at_p = at->attr_begin();
-		while (at_p != at->attr_end()) {
-			if (at->is_global_attribute(at_p)) {
-				if (at->get_attr_type(at_p) == Attr_container)
-					get_attr_table().append_container(new AttrTable(*at->get_attr_table(at_p)), at->get_name(at_p));
-				else
-					get_attr_table().append_attr(at->get_name(at_p), at->get_type(at_p), at->get_attr_vector(at_p));
-			}
-			at_p++;
-		}
-
-	}
+/** Returns an iterator referencing the first structure element. */
+Constructor::Vars_iter
+Constructor::var_begin()
+{
+    return d_vars.begin() ;
 }
 
 /** Returns an iterator referencing the end of the list of structure
@@ -302,14 +277,14 @@ void Constructor::transfer_attributes(AttrTable *at_container) {
 Constructor::Vars_iter
 Constructor::var_end()
 {
-    return _vars.end() ;
+    return d_vars.end() ;
 }
 
 /** Return a reverse iterator that references the last element. */
 Constructor::Vars_riter
 Constructor::var_rbegin()
 {
-    return _vars.rbegin();
+    return d_vars.rbegin();
 }
 
 /** Return a reverse iterator that references a point 'before' the first
@@ -317,7 +292,7 @@ Constructor::var_rbegin()
 Constructor::Vars_riter
 Constructor::var_rend()
 {
-    return _vars.rend();
+    return d_vars.rend();
 }
 
 /** Return the iterator for the \e ith variable.
@@ -326,7 +301,7 @@ Constructor::var_rend()
 Constructor::Vars_iter
 Constructor::get_vars_iter(int i)
 {
-    return _vars.begin() + i;
+    return d_vars.begin() + i;
 }
 
 /** Return the BaseType pointer for the \e ith variable.
@@ -335,36 +310,162 @@ Constructor::get_vars_iter(int i)
 BaseType *
 Constructor::get_var_index(int i)
 {
-    return *(_vars.begin() + i);
+    return *(d_vars.begin() + i);
 }
 
-#if FILE_METHODS
+/** Adds an element to a Constructor.
+
+    @param bt A pointer to the variable to add to this Constructor.
+    @param part Not used by this class, defaults to nil */
 void
-Constructor::print_decl(FILE *out, string space, bool print_semi,
-                        bool constraint_info, bool constrained)
+Constructor::add_var(BaseType *bt, Part)
 {
-    if (constrained && !send_p())
-        return;
+    // Jose Garcia
+    // Passing and invalid pointer to an object is a developer's error.
+    if (!bt)
+        throw InternalErr(__FILE__, __LINE__, "The BaseType parameter cannot be null.");
+#if 0
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Structure.");
+#endif
+    // Jose Garcia
+    // Now we add a copy of bt so the external user is able to destroy bt as
+    // he/she wishes. The policy is: "If it is allocated outside, it is
+    // deallocated outside, if it is allocated inside, it is deallocated
+    // inside"
+    BaseType *btp = bt->ptr_duplicate();
+    btp->set_parent(this);
+    d_vars.push_back(btp);
+}
 
-    fprintf(out, "%s%s {\n", space.c_str(), type_name().c_str()) ;
-    for (Vars_citer i = _vars.begin(); i != _vars.end(); i++) {
-        (*i)->print_decl(out, space + "    ", true,
-                         constraint_info, constrained);
+/** Adds an element to a Constructor.
+
+    @param bt A pointer to thee variable to add to this Constructor.
+    @param part Not used by this class, defaults to nil */
+void
+Constructor::add_var_nocopy(BaseType *bt, Part)
+{
+    if (!bt)
+        throw InternalErr(__FILE__, __LINE__, "The BaseType parameter cannot be null.");
+#if 0
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Structure.");
+#endif
+    bt->set_parent(this);
+    d_vars.push_back(bt);
+}
+
+/** Remove an element from a Constructor.
+
+    @param n name of the variable to remove */
+void
+Constructor::del_var(const string &n)
+{
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        if ((*i)->name() == n) {
+            BaseType *bt = *i ;
+            d_vars.erase(i) ;
+            delete bt ; bt = 0;
+            return;
+        }
     }
-    fprintf(out, "%s} %s", space.c_str(), id2www(name()).c_str()) ;
+}
 
-    if (constraint_info) { // Used by test drivers only.
-        if (send_p())
-            cout << ": Send True";
-        else
-            cout << ": Send False";
+void
+Constructor::del_var(Vars_iter i)
+{
+    if (*i != 0) {
+        BaseType *bt = *i;
+        d_vars.erase(i);
+        delete bt;
     }
+}
 
-    if (print_semi)
-        fprintf(out, ";\n") ;
+/** @brief simple implementation of read that iterates through vars
+ *  and calls read on them
+ *
+ * @return returns false to signify all has been read
+ */
+bool Constructor::read()
+{
+    if (!read_p()) {
+        for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+            (*i)->read();
+        }
+        set_read_p(true);
+    }
+
+    return false;
+}
+
+void
+Constructor::intern_data(ConstraintEvaluator & eval, DDS & dds)
+{
+    DBG(cerr << "Structure::intern_data: " << name() << endl);
+    if (!read_p())
+        read();          // read() throws Error and InternalErr
+
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        if ((*i)->send_p()) {
+            (*i)->intern_data(eval, dds);
+        }
+    }
 }
+
+bool
+Constructor::serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval)
+{
+    dds.timeout_on();
+
+    if (!read_p())
+        read();  // read() throws Error and InternalErr
+
+#if EVAL
+    if (ce_eval && !eval.eval_selection(dds, dataset()))
+        return true;
 #endif
 
+    dds.timeout_off();
+
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        if ((*i)->send_p()) {
+#ifdef CHECKSUMS
+            XDRStreamMarshaller *sm = dynamic_cast<XDRStreamMarshaller*>(&m);
+            if (sm && sm->checksums() && (*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
+                sm->reset_checksum();
+
+            (*i)->serialize(eval, dds, m, false);
+
+            if (sm && sm->checksums() && (*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
+                sm->get_checksum();
+#else
+            (*i)->serialize(eval, dds, m, false);
+#endif
+        }
+    }
+
+    return true;
+}
+
+bool
+Constructor::deserialize(UnMarshaller &um, DDS *dds, bool reuse)
+{
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        (*i)->deserialize(um, dds, reuse);
+    }
+
+    return false;
+}
+
+void
+Constructor::print_decl(FILE *out, string space, bool print_semi,
+                        bool constraint_info, bool constrained)
+{
+    ostringstream oss;
+    print_decl(oss, space, print_semi, constraint_info, constrained);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
+}
+
 void
 Constructor::print_decl(ostream &out, string space, bool print_semi,
                         bool constraint_info, bool constrained)
@@ -373,9 +474,8 @@ Constructor::print_decl(ostream &out, string space, bool print_semi,
         return;
 
     out << space << type_name() << " {\n" ;
-    for (Vars_citer i = _vars.begin(); i != _vars.end(); i++) {
-        (*i)->print_decl(out, space + "    ", true,
-                         constraint_info, constrained);
+    for (Vars_citer i = d_vars.begin(); i != d_vars.end(); i++) {
+        (*i)->print_decl(out, space + "    ", true, constraint_info, constrained);
     }
     out << space << "} " << id2www(name()) ;
 
@@ -387,25 +487,36 @@ Constructor::print_decl(ostream &out, string space, bool print_semi,
     }
 
     if (print_semi)
-	out << ";\n" ;
+        out << ";\n" ;
 }
 
-#if FILE_METHODS
-class PrintField : public unary_function<BaseType *, void>
+void
+Constructor::print_val(FILE *out, string space, bool print_decl_p)
 {
-    FILE *d_out;
-    string d_space;
-    bool d_constrained;
-public:
-    PrintField(FILE *o, string s, bool c)
-            : d_out(o), d_space(s), d_constrained(c)
-    {}
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
+}
 
-    void operator()(BaseType *btp)
-    {
-        btp->print_xml(d_out, d_space, d_constrained);
+void
+Constructor::print_val(ostream &out, string space, bool print_decl_p)
+{
+    if (print_decl_p) {
+        print_decl(out, space, false);
+        out << " = " ;
     }
-};
+
+    out << "{ " ;
+    for (Vars_citer i = d_vars.begin(); i != d_vars.end();
+         i++, (void)(i != d_vars.end() && out << ", ")) {
+        (*i)->print_val(out, "", false);
+    }
+
+    out << " }" ;
+
+    if (print_decl_p)
+        out << ";\n" ;
+}
 
 /**
  * @deprecated
@@ -413,47 +524,10 @@ public:
 void
 Constructor::print_xml(FILE *out, string space, bool constrained)
 {
-    if (constrained && !send_p())
-        return;
-
-    bool has_attributes = false; // *** fix me
-    bool has_variables = (var_begin() != var_end());
-
-    fprintf(out, "%s<%s", space.c_str(), type_name().c_str());
-    if (!name().empty())
-        fprintf(out, " name=\"%s\"", id2xml(name()).c_str());
-
-    if (has_attributes || has_variables) {
-        fprintf(out, ">\n");
-
-        get_attr_table().print_xml(out, space + "    ", constrained);
-
-        for_each(var_begin(), var_end(),
-                 PrintField(out, space + "    ", constrained));
-
-        fprintf(out, "%s</%s>\n", space.c_str(), type_name().c_str());
-    }
-    else {
-        fprintf(out, "/>\n");
-    }
+    XMLWriter xml(space);
+    print_xml_writer(xml, constrained);
+    fwrite(xml.get_doc(), sizeof(char), xml.get_doc_size(), out);
 }
-#endif
-
-class PrintFieldStrm : public unary_function<BaseType *, void>
-{
-    ostream &d_out;
-    string d_space;
-    bool d_constrained;
-public:
-    PrintFieldStrm(ostream &o, string s, bool c)
-            : d_out(o), d_space(s), d_constrained(c)
-    {}
-
-    void operator()(BaseType *btp)
-    {
-        btp->print_xml(d_out, d_space, d_constrained);
-    }
-};
 
 /**
  * @deprecated
@@ -461,29 +535,9 @@ public:
 void
 Constructor::print_xml(ostream &out, string space, bool constrained)
 {
-    if (constrained && !send_p())
-        return;
-
-    bool has_attributes = false; // *** fix me
-    bool has_variables = (var_begin() != var_end());
-
-    out << space << "<" << type_name() ;
-    if (!name().empty())
-    out << " name=\"" << id2xml(name()) << "\"" ;
-
-    if (has_attributes || has_variables) {
-    out << ">\n" ;
-
-        get_attr_table().print_xml(out, space + "    ", constrained);
-
-        for_each(var_begin(), var_end(),
-                 PrintFieldStrm(out, space + "    ", constrained));
-
-    out << space << "</" << type_name() << ">\n" ;
-    }
-    else {
-    out << "/>\n" ;
-    }
+    XMLWriter xml(space);
+    print_xml_writer(xml, constrained);
+    out << xml.get_doc();
 }
 
 class PrintFieldXMLWriter : public unary_function<BaseType *, void>
@@ -514,18 +568,36 @@ Constructor::print_xml_writer(XMLWriter &xml, bool constrained)
         if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)name().c_str()) < 0)
             throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
 
-    bool has_attributes = false; // FIXME
+    bool has_attributes = get_attr_table().get_size() > 0;
     bool has_variables = (var_begin() != var_end());
-    if (has_attributes || has_variables) {
+    if (has_attributes)
         get_attr_table().print_xml_writer(xml);
-
+    if (has_variables)
         for_each(var_begin(), var_end(), PrintFieldXMLWriter(xml, constrained));
-    }
 
     if (xmlTextWriterEndElement(xml.get_writer()) < 0)
         throw InternalErr(__FILE__, __LINE__, "Could not end " + type_name() + " element");
 }
 
+bool
+Constructor::check_semantics(string &msg, bool all)
+{
+    if (!BaseType::check_semantics(msg))
+        return false;
+
+    if (!unique_names(d_vars, name(), type_name(), msg))
+        return false;
+
+    if (all)
+        for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+            if (!(*i)->check_semantics(msg, true)) {
+                return false;
+            }
+        }
+
+    return true;
+}
+
 /** True if the instance can be flattened and printed as a single table
     of values. For Arrays and Grids this is always false. For Structures
     and Sequences the conditions are more complex. The implementation
@@ -544,6 +616,21 @@ Constructor::is_linear()
     return false;
 }
 
+/** Set the \e in_selection property for this variable and all of its
+    children.
+
+    @brief Set the \e in_selection property.
+    @param state Set the property value to \e state. */
+void
+Constructor::set_in_selection(bool state)
+{
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+        (*i)->set_in_selection(state);
+    }
+
+    BaseType::set_in_selection(state);
+}
+
 /** @brief dumps information about this object
  *
  * Displays the pointer value of this instance and information about this
@@ -561,8 +648,8 @@ Constructor::dump(ostream &strm) const
     BaseType::dump(strm) ;
     strm << DapIndent::LMarg << "vars: " << endl ;
     DapIndent::Indent() ;
-    Vars_citer i = _vars.begin() ;
-    Vars_citer ie = _vars.end() ;
+    Vars_citer i = d_vars.begin() ;
+    Vars_citer ie = d_vars.end() ;
     for (; i != ie; i++) {
         (*i)->dump(strm) ;
     }
diff --git a/Constructor.h b/Constructor.h
index d8ce5dd..39479ac 100644
--- a/Constructor.h
+++ b/Constructor.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -28,11 +28,7 @@
 
 #include <vector>
 
-#ifndef _basetype_h
 #include "BaseType.h"
-#endif
-
-#define FILE_METHODS 1
 
 namespace libdap
 {
@@ -42,20 +38,19 @@ class Constructor: public BaseType
 {
 private:
     Constructor();  // No default ctor.
-    // BaseType *find_hdf4_dimension_attribute_home(AttrTable::entry *source);
 
 protected:
-    std::vector<BaseType *> _vars;
+    std::vector<BaseType *> d_vars;
 
-    void _duplicate(const Constructor &s);
-#if 0
-    virtual AttrTable *find_matching_container(AttrTable::entry *source,
-            BaseType **dest_variable);
-#endif
-    Constructor(const string &n, const Type &t);
-    Constructor(const string &n, const string &d, const Type &t);
+    void m_duplicate(const Constructor &s);
+    BaseType *m_leaf_match(const string &name, btp_stack *s = 0);
+    BaseType *m_exact_match(const string &name, btp_stack *s = 0);
+
+    Constructor(const string &n, const Type &t, bool is_dap4 = false);
+    Constructor(const string &n, const string &d, const Type &t, bool is_dap4 = false);
 
     Constructor(const Constructor &copy_from);
+
 public:
     typedef std::vector<BaseType *>::const_iterator Vars_citer ;
     typedef std::vector<BaseType *>::iterator Vars_iter ;
@@ -64,10 +59,23 @@ public:
     virtual ~Constructor();
 
     Constructor &operator=(const Constructor &rhs);
+
+    //virtual void transfer_attributes(AttrTable *at_container);
+
+    virtual int element_count(bool leaves = false);
+
+    virtual void set_send_p(bool state);
+    virtual void set_read_p(bool state);
+
+    /// @deprecated
+    virtual unsigned int width(bool constrained = false);
 #if 0
-    virtual void transfer_attributes(AttrTable::entry *entry);
+    virtual unsigned int width(bool constrained);
 #endif
-    virtual void transfer_attributes(AttrTable *at_container);
+    /// btp_stack no longer needed; use back pointers (BaseType::get_parent())
+    virtual BaseType *var(const string &name, bool exact_match = true, btp_stack *s = 0);
+    /// @deprecated
+    virtual BaseType *var(const string &n, btp_stack &s);
 
     Vars_iter var_begin();
     Vars_iter var_end();
@@ -76,7 +84,27 @@ public:
     Vars_iter get_vars_iter(int i);
     BaseType *get_var_index(int i);
 
+    virtual void add_var(BaseType *bt, Part part = nil);
+    virtual void add_var_nocopy(BaseType *bt, Part part = nil);
+
+    virtual void del_var(const string &name);
+    virtual void del_var(Vars_iter i);
+
+    virtual bool read();
+    virtual void intern_data(ConstraintEvaluator &eval, DDS &dds);
+    virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval = true);
+    virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse = false);
+
+    // Do not store values in memory as for C; users work with the C++ objects
+    virtual unsigned int val2buf(void *, bool) {
+        throw InternalErr(__FILE__, __LINE__, "Never use this method; see the programmer's guide documentation.");
+    }
+    virtual unsigned int buf2val(void **) {
+        throw InternalErr(__FILE__, __LINE__, "Never use this method; see the programmer's guide documentation.");
+    }
+
     virtual bool is_linear();
+    virtual void set_in_selection(bool state);
 
     virtual void print_decl(ostream &out, string space = "    ",
                             bool print_semi = true,
@@ -88,14 +116,19 @@ public:
 
     virtual void print_xml_writer(XMLWriter &xml, bool constrained = false);
 
-#if FILE_METHODS
     virtual void print_decl(FILE *out, string space = "    ",
                             bool print_semi = true,
                             bool constraint_info = false,
                             bool constrained = false);
     virtual void print_xml(FILE *out, string space = "    ",
                            bool constrained = false);
-#endif
+
+    virtual void print_val(FILE *out, string space = "",
+                           bool print_decl_p = true);
+    virtual void print_val(ostream &out, string space = "",
+                           bool print_decl_p = true);
+
+    virtual bool check_semantics(string &msg, bool all = false);
 
     virtual void dump(ostream &strm) const ;
 };
diff --git a/BaseTypeFactory.cc b/D4BaseTypeFactory.cc
similarity index 51%
copy from BaseTypeFactory.cc
copy to D4BaseTypeFactory.cc
index 6c899e7..b54c67f 100644
--- a/BaseTypeFactory.cc
+++ b/D4BaseTypeFactory.cc
@@ -19,108 +19,159 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
 
 #include <string>
 
+#include "BaseType.h"
+
 #include "Byte.h"
+#include "Int8.h"
 #include "Int16.h"
 #include "UInt16.h"
 #include "Int32.h"
 #include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
+
 #include "Float32.h"
 #include "Float64.h"
+
 #include "Str.h"
 #include "Url.h"
+
 #include "Array.h"
 #include "Structure.h"
 #include "Sequence.h"
 #include "Grid.h"
 
-#include "BaseTypeFactory.h"
+#include "D4Group.h"
+
+#include "D4BaseTypeFactory.h"
 #include "debug.h"
 
 namespace libdap {
 
 Byte *
-BaseTypeFactory::NewByte(const string &n) const
+D4BaseTypeFactory::NewByte(const string &n) const
 {
     return new Byte(n);
 }
 
+Byte *
+D4BaseTypeFactory::NewUInt8(const string &n) const
+{
+    Byte *b = new Byte(n);
+    b->set_type(dods_uint8_c);
+    return b;
+}
+
+Int8 *
+D4BaseTypeFactory::NewInt8(const string &n) const
+{
+    return new Int8(n);
+}
+
 Int16 *
-BaseTypeFactory::NewInt16(const string &n) const
+D4BaseTypeFactory::NewInt16(const string &n) const
 {
     return new Int16(n);
 }
 
 UInt16 *
-BaseTypeFactory::NewUInt16(const string &n) const
+D4BaseTypeFactory::NewUInt16(const string &n) const
 {
     return new UInt16(n);
 }
 
 Int32 *
-BaseTypeFactory::NewInt32(const string &n) const
+D4BaseTypeFactory::NewInt32(const string &n) const
 {
-    DBG(cerr << "Inside BaseTypeFactory::NewInt32" << endl);
+    DBG(cerr << "Inside DAP4BaseTypeFactory::NewInt32" << endl);
     return new Int32(n);
 }
 
 UInt32 *
-BaseTypeFactory::NewUInt32(const string &n) const
+D4BaseTypeFactory::NewUInt32(const string &n) const
 {
     return new UInt32(n);
 }
 
+Int64 *
+D4BaseTypeFactory::NewInt64(const string &n) const
+{
+    DBG(cerr << "Inside DAP4BaseTypeFactory::NewInt64" << endl);
+    return new Int64(n);
+}
+
+UInt64 *
+D4BaseTypeFactory::NewUInt64(const string &n) const
+{
+    return new UInt64(n);
+}
+
 Float32 *
-BaseTypeFactory::NewFloat32(const string &n) const
+D4BaseTypeFactory::NewFloat32(const string &n) const
 {
     return new Float32(n);
 }
 
 Float64 *
-BaseTypeFactory::NewFloat64(const string &n) const
+D4BaseTypeFactory::NewFloat64(const string &n) const
 {
     return new Float64(n);
 }
 
 Str *
-BaseTypeFactory::NewStr(const string &n) const
+D4BaseTypeFactory::NewStr(const string &n) const
 {
     return new Str(n);
 }
 
 Url *
-BaseTypeFactory::NewUrl(const string &n) const
+D4BaseTypeFactory::NewUrl(const string &n) const
 {
     return new Url(n);
 }
 
+Url *
+D4BaseTypeFactory::NewURL(const string &n) const
+{
+    Url *u = new Url(n);
+    u->set_type(dods_url4_c);
+    return u;
+}
+
 Array *
-BaseTypeFactory::NewArray(const string &n , BaseType *v) const
+D4BaseTypeFactory::NewArray(const string &n , BaseType *v) const
 {
     return new Array(n, v);
 }
 
 Structure *
-BaseTypeFactory::NewStructure(const string &n) const
+D4BaseTypeFactory::NewStructure(const string &n) const
 {
     return new Structure(n);
 }
 
+D4Group *
+D4BaseTypeFactory::NewGroup(const string &n) const
+{
+    return new D4Group(n);
+}
+
 Sequence *
-BaseTypeFactory::NewSequence(const string &n) const
+D4BaseTypeFactory::NewSequence(const string &n) const
 {
-    DBG(cerr << "Inside BaseTypeFactory::NewSequence" << endl);
+    DBG(cerr << "Inside DAP4BaseTypeFactory::NewSequence" << endl);
     return new Sequence(n);
 }
 
 Grid *
-BaseTypeFactory::NewGrid(const string &n) const
+D4BaseTypeFactory::NewGrid(const string &n) const
 {
     return new Grid(n);
 }
diff --git a/tests/TestTypeFactory.h b/D4BaseTypeFactory.h
similarity index 56%
copy from tests/TestTypeFactory.h
copy to D4BaseTypeFactory.h
index c40a923..b420f5a 100644
--- a/tests/TestTypeFactory.h
+++ b/D4BaseTypeFactory.h
@@ -4,70 +4,107 @@
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
 // Access Protocol.
 
-// Copyright (c) 2005 OPeNDAP, Inc.
+// Copyright (c) 2012 OPeNDAP, Inc.
 // Author: James Gallagher <jgallagher at opendap.org>
 //
 // This 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.
-// 
+//
 // This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
-#ifndef test_type_factory_h
-#define test_type_factory_h
+#ifndef dap4_base_type_factory_h
+#define dap4_base_type_factory_h
 
 #include <string>
 
 #include "BaseTypeFactory.h"
 
-class TestByte;
-class TestInt16;
-class TestUInt16;
-class TestInt32;
-class TestUInt32;
-class TestFloat32;
-class TestFloat64;
-class TestStr;
-class TestUrl;
-class TestArray;
-class TestStructure;
-class TestSequence;
-class TestGrid;
-
-using namespace libdap ;
-
-/** A factory for the TestByte, ..., TestGrid types.
-    @author James Gallagher */
-class TestTypeFactory : public BaseTypeFactory {
+// Class declarations; Make sure to include the corresponding headers in the
+// implementation file.
+
+namespace libdap
+{
+
+class Byte;
+class Int8;
+class Int16;
+class UInt16;
+class Int32;
+class UInt32;
+class Int64;
+class UInt64;
+
+class Float32;
+class Float64;
+
+class Str;
+class Url;
+
+class Array;
+class Structure;
+class Sequence;
+class Grid;
+
+class D4Group;
+
+class BaseType;
+
+/**
+ *  Return instances of objects that are to be stored in a DDS for a
+ *  DAP4 dataset.
+ *
+ */
+class D4BaseTypeFactory: public BaseTypeFactory
+{
 public:
-    TestTypeFactory() {} 
-    virtual ~TestTypeFactory() {}
+    D4BaseTypeFactory()
+    {}
+    virtual ~D4BaseTypeFactory()
+    {}
 
     virtual Byte *NewByte(const string &n = "") const;
+    virtual Int8 *NewInt8(const string &n = "") const;
+    virtual Byte *NewUInt8(const string &n = "") const;
     virtual Int16 *NewInt16(const string &n = "") const;
     virtual UInt16 *NewUInt16(const string &n = "") const;
     virtual Int32 *NewInt32(const string &n = "") const;
     virtual UInt32 *NewUInt32(const string &n = "") const;
+
+    virtual Int64 *NewInt64(const string &n = "") const;
+    virtual UInt64 *NewUInt64(const string &n = "") const;
+
     virtual Float32 *NewFloat32(const string &n = "") const;
     virtual Float64 *NewFloat64(const string &n = "") const;
 
     virtual Str *NewStr(const string &n = "") const;
     virtual Url *NewUrl(const string &n = "") const;
+    virtual Url *NewURL(const string &n = "") const;
 
-    virtual Array *NewArray(const string &n = "", BaseType *v = 0) const;
+    // FIXME Define these
+#if 0
+    virtual Opaque *NewOpaque(const string &n = "") const;
+    virtual Enumeration *NewEnumeration(const string &n = "") const;
+#endif
     virtual Structure *NewStructure(const string &n = "") const;
     virtual Sequence *NewSequence(const string &n = "") const;
+#if 1
+    virtual D4Group *NewGroup(const string &n = "") const;
+#endif
+    virtual Array *NewArray(const string &n = "", BaseType *v = 0) const;
     virtual Grid *NewGrid(const string &n = "") const;
 };
 
-#endif // test_type_factory_h
+} // namespace libdap
+
+#endif // dap4_base_type_factory_h
diff --git a/D4Dimensions.cc b/D4Dimensions.cc
new file mode 100644
index 0000000..7f51723
--- /dev/null
+++ b/D4Dimensions.cc
@@ -0,0 +1,23 @@
+/*
+ * D4Dimensions.cc
+ *
+ *  Created on: Sep 26, 2012
+ *      Author: jimg
+ */
+
+#include "D4Dimensions.h"
+
+namespace libdap {
+
+D4Dimensions::D4Dimensions()
+{
+    // TODO Auto-generated constructor stub
+
+}
+
+D4Dimensions::~D4Dimensions()
+{
+    // TODO Auto-generated destructor stub
+}
+
+} /* namespace libdap */
diff --git a/D4Dimensions.h b/D4Dimensions.h
new file mode 100644
index 0000000..c1446e1
--- /dev/null
+++ b/D4Dimensions.h
@@ -0,0 +1,64 @@
+/*
+ * D4Dimensions.h
+ *
+ *  Created on: Sep 26, 2012
+ *      Author: jimg
+ */
+
+#ifndef D4DIMENSIONS_H_
+#define D4DIMENSIONS_H_
+
+#include <string>
+#include <vector>
+
+using namespace std;
+
+namespace libdap {
+
+/**
+ * This class holds information about dimensions. This can be used to store
+ * actual dimension information in an instance of BaseType and it can be
+ * used to store the definition of a dimension in an instance of Group.
+ *
+ *
+ * @todo What about storing constraint information too? Maybe we do need
+ * two classes - one for defs and one for 'refs'
+ */
+class D4Dimensions {
+    struct dimension {
+        string name;
+        unsigned long size;
+
+        dimension(const string &n, const unsigned long s) :
+            name(n), size(s) {}
+    };
+
+    vector<dimension> d_dims;
+
+public:
+    D4Dimensions();
+    virtual ~D4Dimensions();
+
+    typedef vector<dimension>::iterator D4DimensionsIter;
+
+    void add_dim(const string &name, const unsigned long size) {
+        d_dims.push_back(dimension(name, size));
+    }
+    void add_dim(const string &name) {
+        d_dims.push_back(dimension(name, 0));
+    }
+    void add_dim(const unsigned long size) {
+        d_dims.push_back(dimension("", size));
+    }
+
+    string get_dim_name(int i) { return d_dims.at(i).name; }
+    unsigned long get_dim_size(int i) { return d_dims.at(i).size; }
+
+    D4DimensionsIter maps_begin() { return d_dims.begin(); }
+    D4DimensionsIter maps_end() { return d_dims.end(); }
+    string get_dim_name(D4DimensionsIter i) { return (*i).name; }
+    unsigned long get_dim_size(D4DimensionsIter i) { return (*i).size; }
+};
+
+} /* namespace libdap */
+#endif /* D4DIMENSIONS_H_ */
diff --git a/D4EnumDef.cc b/D4EnumDef.cc
new file mode 100644
index 0000000..216af82
--- /dev/null
+++ b/D4EnumDef.cc
@@ -0,0 +1,79 @@
+/*
+ * D4EnumDef.cc
+ *
+ *  Created on: Oct 9, 2012
+ *      Author: jimg
+ */
+
+#include "D4EnumDef.h"
+
+#include <sstream>
+
+#include "util.h"
+
+namespace libdap {
+
+#if 0
+string D4EnumDef::type_name() {
+    switch (d_type) {
+    case dods_int8_c:
+        return string("Int8");
+    case dods_uint8_c:
+        return string("UInt8");
+    case dods_byte_c:
+        return string("Byte");
+    case dods_int16_c:
+        return string("Int16");
+    case dods_uint16_c:
+        return string("UInt16");
+    case dods_int32_c:
+        return string("Int32");
+    case dods_uint32_c:
+        return string("UInt32");
+    case dods_int64_c:
+        return string("Int64");
+    case dods_uint64_c:
+        return string("UInt64");
+
+    default:
+        throw InternalErr(__FILE__, __LINE__, "Invalid enumeration basetype.");
+    }
+}
+#endif
+
+void D4EnumDef::print_enum_const(XMLWriter *xml, const enum_val ev)
+{
+    if (xmlTextWriterStartElement(xml->get_writer(), (const xmlChar*)"EnumConst") < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write EnumConst element");
+
+    if (xmlTextWriterWriteAttribute(xml->get_writer(), (const xmlChar*) "name", (const xmlChar*)ev.d_item.c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
+
+    ostringstream oss;
+    oss << ev.d_val;
+    if (xmlTextWriterWriteAttribute(xml->get_writer(), (const xmlChar*) "value", (const xmlChar*)oss.str().c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for value");
+
+    if (xmlTextWriterEndElement(xml->get_writer()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not end EnumConst element");
+
+}
+
+void D4EnumDef::print_xml_writer(XMLWriter &xml)
+{
+    if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*)"Enumeration") < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write Enumeration element");
+
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)d_name.c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
+
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "basetype", (const xmlChar*)type_name(d_type).c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
+
+    for_each(d_values.begin(), d_values.end(), bind1st(ptr_fun(print_enum_const), &xml));
+
+    if (xmlTextWriterEndElement(xml.get_writer()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not end Enumeration element");
+}
+
+} /* namespace libdap */
diff --git a/D4EnumDef.h b/D4EnumDef.h
new file mode 100644
index 0000000..fd04eb5
--- /dev/null
+++ b/D4EnumDef.h
@@ -0,0 +1,85 @@
+/*
+ * D4EnumDef.h
+ *
+ *  Created on: Oct 9, 2012
+ *      Author: jimg
+ */
+
+#ifndef D4ENUMDEF_H_
+#define D4ENUMDEF_H_
+
+#include <string>
+#include <vector>
+#include <algorithm>
+#include <functional>
+
+#include "BaseType.h"
+
+using namespace std;
+
+namespace libdap {
+
+class D4EnumDef {
+    string d_name; /// The name of the enum definition
+    Type d_type; /// Enums are always integer types
+
+    struct enum_val {
+        string d_item;
+        // cast to unsigned based on d_type.
+        long long d_val;
+
+        enum_val(const string &item, unsigned long val) :
+                d_item(item), d_val(val)
+        {
+        }
+    };
+
+    vector<enum_val> d_values;
+    typedef vector<enum_val>::iterator enumValIter;
+
+public:
+    D4EnumDef() {}
+    D4EnumDef(const string &name, Type type) : d_name(name), d_type(type) {}
+
+    virtual ~D4EnumDef() {}
+
+    string get_name() const { return d_name; }
+    void set_name(const string &name) { d_name = name; }
+
+    Type get_type() const { return d_type; }
+    void set_type(Type t) { d_type = t; }
+
+    void add_value(const string &item, unsigned long val) {
+        d_values.push_back(enum_val(item, val));
+    }
+
+    enumValIter begin_vals() { return d_values.begin(); }
+    enumValIter end_vals() { return d_values.end(); }
+    long long get_value(enumValIter i) { return i->d_val; }
+    string get_item(enumValIter i ) { return i->d_item; }
+
+    static bool is_item(const enum_val e, const string item) {
+        return e.d_item == item;
+    }
+
+    // Written to use for_each() as an exercise... Cannot use reference
+    // types in is_item(...)
+    long long get_value(const string &item) {
+        // lookup name and return d_val;
+        enumValIter i = find_if(d_values.begin(), d_values.end(),
+                bind2nd(ptr_fun(libdap::D4EnumDef::is_item), item));
+        return i->d_val;
+    }
+
+private:
+#if 0
+    string type_name();
+#endif
+    static void print_enum_const(XMLWriter *xml, const enum_val ev);
+
+public:
+    void print_xml_writer(XMLWriter &xml);
+};
+
+} /* namespace libdap */
+#endif /* D4ENUMDEF_H_ */
diff --git a/D4Group.cc b/D4Group.cc
new file mode 100644
index 0000000..d96eb93
--- /dev/null
+++ b/D4Group.cc
@@ -0,0 +1,130 @@
+/*
+ * D4Group.cc
+ *
+ *  Created on: Sep 27, 2012
+ *      Author: jimg
+ */
+
+#include "D4Group.h"
+
+#include "BaseType.h"
+
+namespace libdap {
+
+/** The D4Group constructor requires only the name of the variable
+    to be created. The name may be omitted, which will create a
+    nameless variable. This may be adequate for some applications.
+
+    @param n A string containing the name of the variable.
+*/
+D4Group::D4Group(const string &n) : Constructor(n, dods_group_c, /*is_dap4*/true)
+{}
+
+/** The D4Group server-side constructor requires the name of the variable
+    to be created and the dataset name from which this variable is being
+    created. Used on server-side handlers.
+
+    @param n A string containing the name of the variable.
+    @param d A string containing the name of the dataset.
+*/
+D4Group::D4Group(const string &n, const string &d)
+    : Constructor(n, d, dods_group_c, /*is_dap4*/true)
+{}
+
+/** The D4Group copy constructor. */
+D4Group::D4Group(const D4Group &rhs) : Constructor(rhs)
+{
+    m_duplicate(rhs);
+}
+
+static void enum_del(D4EnumDef *ed)
+{
+    delete ed;
+}
+
+D4Group::~D4Group()
+{
+    for_each(d_enums.begin(), d_enums.end(), enum_del);
+}
+
+BaseType *
+D4Group::ptr_duplicate()
+{
+    return new D4Group(*this);
+}
+
+D4Group &
+D4Group::operator=(const D4Group &rhs)
+{
+    if (this == &rhs)
+        return *this;
+
+    dynamic_cast<Constructor &>(*this) = rhs; // run Constructor=
+
+    m_duplicate(rhs);
+
+    return *this;
+}
+
+void
+D4Group::add_enumeration_nocopy(D4EnumDef *enum_def)
+{
+    d_enums.push_back(enum_def);
+}
+
+class PrintVariable : public unary_function<BaseType *, void>
+{
+    XMLWriter &d_xml;
+    bool d_constrained;
+public:
+    PrintVariable(XMLWriter &x, bool c) : d_xml(x), d_constrained(c) {}
+
+    void operator()(BaseType *btp)
+    {
+        btp->print_xml_writer(d_xml, d_constrained);
+    }
+};
+
+class PrintEnum : public unary_function<D4EnumDef *, void>
+{
+    XMLWriter &d_xml;
+
+public:
+    PrintEnum(XMLWriter &x) : d_xml(x){}
+
+    void operator()(D4EnumDef *e)
+    {
+        e->print_xml_writer(d_xml);
+    }
+};
+
+void
+D4Group::print_xml_writer(XMLWriter &xml, bool constrained)
+{
+    if (constrained && !send_p())
+        return;
+
+    if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*)type_name().c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write " + type_name() + " element");
+
+    if (!name().empty())
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)name().c_str()) < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
+
+    // If the Group has Enumeration definitions
+    if (d_enums.size() > 0)
+        for_each(d_enums.begin(), d_enums.end(), PrintEnum(xml));
+
+    // If it has attributes
+    if (get_attr_table().get_size() > 0)
+        get_attr_table().print_xml_writer(xml);
+
+    // If it has variables
+    if (var_begin() != var_end())
+        for_each(var_begin(), var_end(), PrintVariable(xml, constrained));
+
+    if (xmlTextWriterEndElement(xml.get_writer()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not end " + type_name() + " element");
+}
+
+} /* namespace libdap */
diff --git a/D4Group.h b/D4Group.h
new file mode 100644
index 0000000..91c1a17
--- /dev/null
+++ b/D4Group.h
@@ -0,0 +1,45 @@
+/*
+ * D4Group.h
+ *
+ *  Created on: Sep 27, 2012
+ *      Author: jimg
+ */
+
+#ifndef D4GROUP_H_
+#define D4GROUP_H_
+
+#include "Constructor.h"
+#include "D4Dimensions.h"
+#include "D4EnumDef.h"
+
+namespace libdap {
+
+class D4Group :public Constructor {
+private:
+    // I use the same object to define the dimensions (here) and to
+    // include them in the individual variables (in BaseType.h)
+    D4Dimensions d_dims;
+
+    // The Group object is a container for both variables and enumeration
+    // definitions.
+    vector<D4EnumDef*> d_enums;
+
+    // TODO Must define m_duplicate so that d_enums are copied.
+    // Must be a deep copy
+public:
+    D4Group(const string &n);
+    D4Group(const string &n, const string &d);
+
+    D4Group(const D4Group &rhs);
+    virtual ~D4Group();
+
+    D4Group &operator=(const D4Group &rhs);
+    virtual BaseType *ptr_duplicate();
+
+    void print_xml_writer(XMLWriter &xml, bool constrained);
+
+    void add_enumeration_nocopy(D4EnumDef *enum_def);
+};
+
+} /* namespace libdap */
+#endif /* D4GROUP_H_ */
diff --git a/D4Maps.cc b/D4Maps.cc
new file mode 100644
index 0000000..56e33c1
--- /dev/null
+++ b/D4Maps.cc
@@ -0,0 +1,23 @@
+/*
+ * D4Maps.cc
+ *
+ *  Created on: Sep 26, 2012
+ *      Author: jimg
+ */
+
+#include "D4Maps.h"
+
+namespace libdap {
+
+D4Maps::D4Maps()
+{
+    // TODO Auto-generated constructor stub
+
+}
+
+D4Maps::~D4Maps()
+{
+    // TODO Auto-generated destructor stub
+}
+
+} /* namespace libdap */
diff --git a/D4Maps.h b/D4Maps.h
new file mode 100644
index 0000000..fd79af4
--- /dev/null
+++ b/D4Maps.h
@@ -0,0 +1,43 @@
+/*
+ * D4Maps.h
+ *
+ *  Created on: Sep 26, 2012
+ *      Author: jimg
+ */
+
+#ifndef D4MAPS_H_
+#define D4MAPS_H_
+
+#include <string>
+#include <vector>
+
+using namespace std;
+
+namespace libdap {
+
+/**
+ * Maps in DAP4 are simply the names of Dimensions. When a dimensioned
+ * variable (i.e., an array) also has 'maps' that array is a 'grid' in the
+ * sense that the 'maps' define the domain of a sampled function.
+ *
+ * @todo Is this class needed?
+ */
+class D4Maps {
+private:
+    vector<string> d_names;
+
+public:
+    D4Maps();
+    virtual ~D4Maps();
+
+    typedef vector<string>::iterator D4MapsIter;
+
+    void add_map(const string &map) { d_names.push_back(map); }
+    string get_map(int i) { return d_names.at(i); }
+
+    D4MapsIter maps_begin() { return d_names.begin(); }
+    D4MapsIter maps_end() { return d_names.end(); }
+};
+
+} /* namespace libdap */
+#endif /* D4MAPS_H_ */
diff --git a/DDXExceptions.h b/D4ParseError.h
similarity index 77%
copy from DDXExceptions.h
copy to D4ParseError.h
index 89dbf77..ede678f 100644
--- a/DDXExceptions.h
+++ b/D4ParseError.h
@@ -4,7 +4,7 @@
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
 // Access Protocol.
 
-// Copyright (c) 2003 OPeNDAP, Inc.
+// Copyright (c) 2012 OPeNDAP, Inc.
 // Author: James Gallagher <jgallagher at opendap.org>
 //
 // This library is free software; you can redistribute it and/or
@@ -19,12 +19,12 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
-#ifndef ddx_exceptions_h
-#define ddx_exceptions_h
+#ifndef d4_parse_error_h
+#define d4_parse_error_h
 
 #ifndef _error_h
 #include "Error.h"
@@ -34,16 +34,16 @@ namespace libdap
 {
 
 /** Thrown when the DDX response cannot be parsed.. */
-class DDXParseFailed : public Error
+class D4ParseError : public Error
 {
 public:
-    DDXParseFailed() : Error("The DDX response document parse failed.")
+    D4ParseError() : Error("The DDX response document parse failed.")
     {}
-    DDXParseFailed(const string &msg) :
+    D4ParseError(const string &msg) :
             Error(string("The DDX response document parse failed: ") + msg)
     {}
 };
 
 } // namespace libdap
 
-#endif // ddx_exceptions_h
+#endif // d4_parse_error_h
diff --git a/D4ParserSax2.cc b/D4ParserSax2.cc
new file mode 100644
index 0000000..be6f17f
--- /dev/null
+++ b/D4ParserSax2.cc
@@ -0,0 +1,1197 @@
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2012 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#include "config.h"
+
+#define DODS_DEBUG 1
+#define DODS_DEBUG2 1
+
+#include <iostream>
+#include <sstream>
+
+#include <cstring>
+#include <cstdarg>
+
+#include "BaseType.h"
+#include "Byte.h"
+#include "Int8.h"
+#include "Int16.h"
+#include "UInt16.h"
+#include "Int32.h"
+#include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
+
+#include "Float32.h"
+#include "Float64.h"
+
+#include "Str.h"
+#include "Url.h"
+
+#include "Constructor.h"
+
+#include "D4Group.h"
+
+#include "Array.h"
+#include "Structure.h"
+#include "Sequence.h"
+#include "Grid.h"
+
+#include "D4ParserSax2.h"
+
+#include "util.h"
+// #include "mime_util.h"
+#include "debug.h"
+
+namespace libdap {
+
+static const not_used char *states[] = {
+        "parser_start",
+
+        // inside_group is the state just after parsing the start of a Group
+        // element.
+        "inside_group",
+
+        "inside_attribute_container",
+        "inside_attribute",
+        "inside_attribute_value",
+        "inside_other_xml_attribute",
+
+        "inside_enum_def",
+        "inside_enum_const",
+
+        // This covers Byte, ..., Url, Opaque
+        "inside_simple_type",
+
+        "inside_array",
+        "inside_dimension",
+
+        "inside_grid",
+        "inside_map",
+
+        "inside_structure",
+        "inside_sequence",
+
+        "parser_unknown",
+        "parser_error" };
+
+// Glue the BaseTypeFactory to the enum-based factory defined statically
+// here.
+
+BaseType *D4ParserSax2::factory(Type t, const string & name)
+{
+    switch (t) {
+        case dods_byte_c:
+            return d_factory->NewByte(name);
+        case dods_uint8_c:
+            return d_factory->NewUInt8(name);
+        case dods_int8_c:
+            return d_factory->NewInt8(name);
+        case dods_int16_c:
+            return d_factory->NewInt16(name);
+        case dods_uint16_c:
+            return d_factory->NewUInt16(name);
+        case dods_int32_c:
+            return d_factory->NewInt32(name);
+        case dods_uint32_c:
+            return d_factory->NewUInt32(name);
+        case dods_int64_c:
+            return d_factory->NewInt64(name);
+        case dods_uint64_c:
+            return d_factory->NewUInt64(name);
+        case dods_float32_c:
+            return d_factory->NewFloat32(name);
+        case dods_float64_c:
+            return d_factory->NewFloat64(name);
+        case dods_str_c:
+            return d_factory->NewStr(name);
+        case dods_url_c:
+            return d_factory->NewUrl(name);
+        case dods_url4_c:
+            return d_factory->NewURL(name);
+        case dods_array_c:
+            return d_factory->NewArray(name);
+        case dods_structure_c:
+            return d_factory->NewStructure(name);
+        case dods_sequence_c:
+            return d_factory->NewSequence(name);
+        case dods_grid_c:
+            return d_factory->NewGrid(name);
+        case dods_group_c:
+            return d_factory->NewGroup(name);
+        default:
+            return 0;
+    }
+}
+
+static bool is_valid_enum_value(const Type &t, long long value)
+{
+    switch (t) {
+        case dods_int8_c:
+            return (value >= DODS_SCHAR_MIN && value <= DODS_SCHAR_MAX);
+        case dods_byte_c:
+        case dods_uint8_c:
+            return (value >= 0 && static_cast<unsigned long long>(value) <= DODS_UCHAR_MAX);
+        case dods_int16_c:
+            return (value >= DODS_SHRT_MIN && value <= DODS_SHRT_MAX);
+        case dods_uint16_c:
+            return (value >= 0 && static_cast<unsigned long long>(value) <= DODS_USHRT_MAX);
+        case dods_int32_c:
+            return (value >= DODS_INT_MIN && value <= DODS_INT_MAX);
+        case dods_uint32_c:
+            return (value >= 0 && static_cast<unsigned long long>(value) <= DODS_UINT_MAX);
+        case dods_int64_c:
+            return (value >= DODS_LLONG_MIN && value <= DODS_LLONG_MAX);
+        case dods_uint64_c:
+            return (value >= 0 && static_cast<unsigned long long>(value) <= DODS_ULLONG_MAX);
+        default:
+            return false;
+    }
+}
+
+static bool is_not(const char *name, const char *tag)
+{
+    return strcmp(name, tag) != 0;
+}
+
+void D4ParserSax2::set_state(D4ParserSax2::ParseState state)
+{
+    s.push(state);
+}
+
+D4ParserSax2::ParseState D4ParserSax2::get_state() const
+{
+    return s.top();
+}
+
+void D4ParserSax2::pop_state()
+{
+    s.pop();
+}
+
+/** Dump XML attributes to local store so they can be easily manipulated.
+ Attribute names are always folded to lower case.
+ @param attributes The XML attribute array
+ @param nb_attributes Teh number of attributes */
+void D4ParserSax2::transfer_xml_attrs(const xmlChar **attributes, int nb_attributes)
+{
+    if (!xml_attrs.empty())
+        xml_attrs.clear(); // erase old attributes
+
+    unsigned int index = 0;
+    for (int i = 0; i < nb_attributes; ++i, index += 5) {
+        // Make a value using the attribute name and the prefix, namespace URI
+        // and the value. The prefix might be null.
+        xml_attrs.insert(map<string, XMLAttribute>::value_type(string((const char *) attributes[index]),
+                        XMLAttribute(attributes + index + 1)));
+
+        DBG(cerr << "Attribute '" << (const char *)attributes[index] << "': "
+                << xml_attrs[(const char *)attributes[index]].value << endl);
+    }
+}
+
+void D4ParserSax2::transfer_xml_ns(const xmlChar **namespaces, int nb_namespaces)
+{
+    for (int i = 0; i < nb_namespaces; ++i) {
+        // make a value with the prefix and namespace URI. The prefix might be
+        // null.
+        namespace_table.insert(
+                map<string, string>::value_type(namespaces[i * 2] != 0 ? (const char *) namespaces[i * 2] : "",
+                        (const char *) namespaces[i * 2 + 1]));
+    }
+}
+
+/** Is an attribute present? Attribute names are always lower case.
+ @note To use this method, first call transfer_xml_attrs.
+ @param attr The XML attribute
+ @return True if the XML attribute was present in the last tag */
+bool D4ParserSax2::check_required_attribute(const string & attr)
+{
+    map<string, XMLAttribute>::iterator i = xml_attrs.find(attr);
+    if (i == xml_attrs.end())
+        ddx_fatal_error(this, "Required attribute '%s' not found.", attr.c_str());
+    return true;
+}
+
+/** Is an attribute present? Attribute names are always lower case.
+ @note To use this method, first call transfer_xml_attrs.
+ @param attr The XML attribute
+ @return True if the XML attribute was present in the last/current tag,
+ false otherwise. */
+bool D4ParserSax2::check_attribute(const string & attr)
+{
+    return (xml_attrs.find(attr) != xml_attrs.end());
+}
+
+/** Given that an \c Attribute tag has just been read, determine whether the
+ element is a container or a simple type, set the state and, for a simple
+ type record the type and name for use when \c value elements are found.
+
+ @note Modified to discriminate between OtherXML and the older DAP2.0
+ attribute types (container, Byte, ...).
+
+ @param attrs The array of XML attribute values */
+void D4ParserSax2::process_attribute_helper(const xmlChar **attrs, int nb_attributes)
+{
+    // These methods set the state to parser_error if a problem is found.
+    transfer_xml_attrs(attrs, nb_attributes);
+
+    bool error = !(check_required_attribute(string("name")) && check_required_attribute(string("type")));
+    if (error)
+        return;
+
+    if (xml_attrs["type"].value == "Container") {
+        set_state(inside_attribute_container);
+
+        AttrTable *child;
+        AttrTable *parent = at_stack.top();
+
+        child = parent->append_container(xml_attrs["name"].value);
+        at_stack.push(child); // save.
+        DBG2(cerr << "Pushing at" << endl);
+    }
+    else if (xml_attrs["type"].value == "OtherXML") {
+        set_state(inside_other_xml_attribute);
+
+        dods_attr_name = xml_attrs["name"].value;
+        dods_attr_type = xml_attrs["type"].value;
+    }
+    else {
+        set_state(inside_attribute);
+
+        dods_attr_name = xml_attrs["name"].value;
+        dods_attr_type = xml_attrs["type"].value;
+    }
+}
+
+/** Given that an \c Enumeration tag has just been read...
+
+
+ @param attrs The array of XML attribute values */
+void D4ParserSax2::process_enum_def_helper(const xmlChar **attrs, int nb_attributes)
+{
+    // These methods set the state to parser_error if a problem is found.
+    transfer_xml_attrs(attrs, nb_attributes);
+
+    bool error = !(check_required_attribute(string("name"))
+                   && check_required_attribute(string("basetype")));
+    if (error)
+        return;
+
+    Type t = get_type(xml_attrs["basetype"].value.c_str());
+    if (!is_integer_type(t)) {
+        ddx_fatal_error(this, "Error: The Enumeration '%s' must have an integer type, instead the type '%s' was used.",
+                xml_attrs["name"].value.c_str(), xml_attrs["basetype"].value.c_str());
+        // So that the parse can continue, make the type UInt64
+        t = dods_uint64_c;
+    }
+
+    d_enum_def = new D4EnumDef(xml_attrs["name"].value, t);
+
+    set_state(inside_enum_def);
+}
+
+/** Given that an \c Enumeration tag has just been read...
+
+
+ @param attrs The array of XML attribute values */
+void D4ParserSax2::process_enum_const_helper(const xmlChar **attrs, int nb_attributes)
+{
+    // These methods set the state to parser_error if a problem is found.
+    transfer_xml_attrs(attrs, nb_attributes);
+
+    bool error = !(check_required_attribute(string("name"))
+                   && check_required_attribute(string("value")));
+    if (error)
+        return;
+
+    istringstream iss(xml_attrs["value"].value);
+    long long value = 0;
+    iss >> skipws >> value;
+    if (iss.fail() || iss.bad()) {
+        ddx_fatal_error(this, "Error: Expected an integer value for an Enumeration constant, got '%s' instead.",
+                xml_attrs["value"].value.c_str());
+    }
+    else if (!is_valid_enum_value(d_enum_def->get_type(), value))
+        ddx_fatal_error(this, "Error: In an Enumeration constant, the value '%s' cannot fit in a variable of type '%s'.",
+                xml_attrs["value"].value.c_str(), type_name(d_enum_def->get_type()).c_str());
+
+    else {
+        d_enum_def->add_value(xml_attrs["name"].value, value);
+    }
+
+    set_state(inside_enum_const);
+}
+
+/** Given that a \c dimension tag has just been read, add that information to
+ the array on the top of the BaseType stack.
+ @param attrs The XML attributes included in the \c dimension tag */
+void D4ParserSax2::process_dimension(const xmlChar **attrs, int nb_attributes)
+{
+    transfer_xml_attrs(attrs, nb_attributes);
+    if (check_required_attribute(string("size"))) {
+        set_state(inside_dimension);
+        Array *ap = dynamic_cast<Array *>(bt_stack.top());
+        if (!ap) {
+            ddx_fatal_error(this, "Parse error: Expected an array variable.");
+            return;
+        }
+
+        ap->append_dim(atoi(xml_attrs["size"].value.c_str()), xml_attrs["name"].value);
+    }
+}
+
+/** Check to see if the current tag is either an \c Attribute or an \c Alias
+ start tag. This method is a glorified macro...
+
+ @param name The start tag name
+ @param attrs The tag's XML attributes
+ @return True if the tag was an \c Attribute or \c Alias tag */
+inline bool D4ParserSax2::process_attribute(const char *name, const xmlChar **attrs, int nb_attributes)
+{
+    if (strcmp(name, "Attribute") == 0) {
+        process_attribute_helper(attrs, nb_attributes);
+        // next state: inside_attribtue or inside_attribute_container
+        return true;
+    }
+
+    return false;
+}
+
+/** Check to see if the current tag is an \c Enumeration start tag.
+
+ @param name The start tag name
+ @param attrs The tag's XML attributes
+ @return True if the tag was an \c Enumeration */
+inline bool D4ParserSax2::process_enum_def(const char *name, const xmlChar **attrs, int nb_attributes)
+{
+    if (strcmp(name, "Enumeration") == 0) {
+        process_enum_def_helper(attrs, nb_attributes);
+        // next state: inside_enum_def
+        return true;
+    }
+
+    return false;
+}
+
+inline bool D4ParserSax2::process_enum_const(const char *name, const xmlChar **attrs, int nb_attributes)
+{
+    if (strcmp(name, "EnumConst") == 0) {
+        process_enum_const_helper(attrs, nb_attributes);
+        // next state: inside_enum_const
+        return true;
+    }
+
+    return false;
+}
+
+/** Check to see if the current element is the start of a variable declaration.
+ If so, process it. A glorified macro...
+ @param name The start element name
+ @param attrs The element's XML attributes
+ @return True if the element was a variable */
+inline bool D4ParserSax2::process_variable(const char *name, const xmlChar **attrs, int nb_attributes)
+{
+    Type t = get_type(name);
+    if (is_simple_type(t)) {
+        process_variable_helper(t, inside_simple_type, attrs, nb_attributes);
+        return true;
+    }
+    else if (strcmp(name, "Structure") == 0) {
+        process_variable_helper(dods_structure_c, inside_structure, attrs, nb_attributes);
+        return true;
+    }
+    else if (strcmp(name, "Sequence") == 0) {
+        process_variable_helper(dods_sequence_c, inside_sequence, attrs, nb_attributes);
+        return true;
+    }
+
+    return false;
+}
+
+/** Given that a tag which opens a variable declaration has just been read,
+ create the variable. Once created, push the variable onto the stack of
+ variables, push that variable's attribute table onto the attribute table
+ stack and update the state of the parser.
+ @param t The type of variable to create.
+ @param s The next state of the parser (e.g., inside_simple_type, ...)
+ @param attrs the attributes read with the tag */
+void D4ParserSax2::process_variable_helper(Type t, ParseState s, const xmlChar **attrs, int nb_attributes)
+{
+    transfer_xml_attrs(attrs, nb_attributes);
+
+    set_state(s);
+
+    // TODO Arrays in DAP2 were not required to have names. DAP4 is going to
+    // need a different parsing logic, but we'll come to that...
+    if (check_required_attribute("name")) { // throws on error/false
+        BaseType *btp = factory(t, xml_attrs["name"].value);
+        if (!btp)
+            ddx_fatal_error(this, "Internal parser error; could not instantiate the variable '%s'.",
+                    xml_attrs["name"].value.c_str());
+
+        // Once we make the new variable, we not only load it on to the
+        // BaseType stack, we also load its AttrTable on the AttrTable stack.
+        // The attribute processing software always operates on the AttrTable
+        // at the top of the AttrTable stack (at_stack).
+        bt_stack.push(btp);
+        at_stack.push(&btp->get_attr_table());
+    }
+}
+
+void D4ParserSax2::finish_variable(const char *tag, Type t, const char *expected)
+{
+    if (strcmp(tag, expected) != 0) {
+        D4ParserSax2::ddx_fatal_error(this, "Expected an end tag for a %s; found '%s' instead.", expected, tag);
+        return;
+    }
+
+    pop_state();
+
+    BaseType *btp = bt_stack.top();
+
+    bt_stack.pop();
+    at_stack.pop();
+
+    if (btp->type() != t) {
+        D4ParserSax2::ddx_fatal_error(this, "Internal error: Expected a %s variable.", expected);
+        return;
+    }
+    // Once libxml2 validates, this can go away. 05/30/03 jhrg
+    if (t == dods_array_c && dynamic_cast<Array *>(btp)->dimensions() == 0) {
+        D4ParserSax2::ddx_fatal_error(this, "No dimension element included in the Array '%s'.", btp->name().c_str());
+        return;
+    }
+
+    BaseType *parent = bt_stack.top();
+
+    if (!(parent->is_vector_type() || parent->is_constructor_type())) {
+        D4ParserSax2::ddx_fatal_error(this, "Tried to add the array variable '%s' to a non-constructor type (%s %s).",
+                tag, bt_stack.top()->type_name().c_str(), bt_stack.top()->name().c_str());
+        return;
+    }
+
+    parent->add_var(btp);
+}
+
+/** @name SAX Parser Callbacks
+
+ These methods are declared static in the class header. This gives them C
+ linkage which allows them to be used as callbacks by the SAX parser
+ engine. */
+//@{
+/** Initialize the SAX parser state object. This object is passed to each
+ callback as a void pointer. The initial state is parser_start.
+
+ @param p The SAX parser  */
+void D4ParserSax2::ddx_start_document(void * p)
+{
+    D4ParserSax2 *parser = static_cast<D4ParserSax2*>(p);
+    parser->error_msg = "";
+    parser->char_data = "";
+
+    parser->set_state(parser_start);
+
+    DBG2(cerr << "Parser state: " << states[parser->get_state()] << endl);
+}
+
+/** Clean up after finishing a parse.
+ @param p The SAX parser  */
+void D4ParserSax2::ddx_end_document(void * p)
+{
+    D4ParserSax2 *parser = static_cast<D4ParserSax2*>(p);
+
+    DBG2(cerr << "Ending state == " << states[parser->get_state()] << endl);
+
+    if (parser->get_state() != parser_start)
+        D4ParserSax2::ddx_fatal_error(parser, "The document contained unbalanced tags.");
+
+    // If we've found any sort of error, don't make the DMR; intern() will
+    // take care of the error.
+    if (parser->get_state() == parser_error)
+        return;
+
+    // TODO Decide to remove the outer Group or leave it in place and
+    // modify print_xml_writer() so that the DMR is correct.
+
+    parser->dds->add_var_nocopy(parser->bt_stack.top());
+    parser->bt_stack.pop();
+}
+
+void D4ParserSax2::ddx_start_element(void *p, const xmlChar *l, const xmlChar *prefix, const xmlChar *URI,
+        int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int /*nb_defaulted*/,
+        const xmlChar **attributes)
+{
+    D4ParserSax2 *parser = static_cast<D4ParserSax2*>(p);
+    const char *localname = (const char *) l;
+
+    DBG2(cerr << "start element: " << localname << ", state: " << states[parser->get_state()] << endl);
+
+    switch (parser->get_state()) {
+        case parser_start:
+            if (strcmp(localname, "Group") == 0) {
+
+                parser->set_state(inside_group);
+
+                parser->root_ns = URI ? (const char *) URI : "";
+                parser->transfer_xml_attrs(attributes, nb_attributes);
+
+                // Set values in/for the DDS
+                if (parser->check_required_attribute(string("name")))
+                    parser->dds->set_dataset_name(parser->xml_attrs["name"].value);
+
+                if (parser->check_attribute("dapVersion"))
+                    parser->dds->set_dap_version(parser->xml_attrs["dapVersion"].value);
+
+                // FIXME no way to record DMR version information
+#if 0
+                if (parser->check_attribute("dmrVersion"))
+                    parser->dds->set_dap_version(parser->xml_attrs["dmrVersion"].value);
+#endif
+                if (parser->check_attribute("base"))
+                    parser->dds->set_request_xml_base(parser->xml_attrs["base"].value);
+
+                if (!parser->root_ns.empty())
+                    parser->dds->set_namespace(parser->root_ns);
+
+                // Set name of the Group; push on stack
+                BaseType *btp = parser->factory(dods_group_c, "root");
+                parser->bt_stack.push(btp);
+                parser->at_stack.push(&btp->get_attr_table());
+            }
+            else
+                D4ParserSax2::ddx_fatal_error(parser,
+                        "Expected DMR to start with a Group element; found '%s' instead.", localname);
+            break;
+
+            // The state 'inside_group' means we have just parsed the start
+            // of a Group element, but none of the child elements
+        case inside_group:
+            // TODO Add Dimension and Group
+            if (parser->process_attribute(localname, attributes, nb_attributes))
+                break;
+            else if (parser->process_variable(localname, attributes, nb_attributes))
+                break;
+            else if (parser->process_enum_def(localname, attributes, nb_attributes))
+                break;
+            else
+                D4ParserSax2::ddx_fatal_error(parser,
+                        "Expected an Attribute,  or variable element; found '%s' instead.", localname);
+            break;
+
+        case inside_attribute_container:
+            if (parser->process_attribute(localname, attributes, nb_attributes))
+                break;
+            else
+                D4ParserSax2::ddx_fatal_error(parser, "Expected an Attribute or Alias element; found '%s' instead.",
+                        localname);
+            break;
+
+        case inside_attribute:
+            if (parser->process_attribute(localname, attributes, nb_attributes))
+                break;
+            else if (strcmp(localname, "value") == 0)
+                parser->set_state(inside_attribute_value);
+            else
+                ddx_fatal_error(parser, "Expected an 'Attribute', 'Alias' or 'value' element; found '%s' instead.",
+                        localname);
+            break;
+
+        case inside_attribute_value:
+            // FIXME
+            break;
+
+        case inside_other_xml_attribute:
+            DBGN(cerr << endl << "\t inside_other_xml_attribute: " << localname << endl);
+
+            parser->other_xml_depth++;
+
+            // Accumulate the elements here
+
+            parser->other_xml.append("<");
+            if (prefix) {
+                parser->other_xml.append((const char *) prefix);
+                parser->other_xml.append(":");
+            }
+            parser->other_xml.append(localname);
+
+            if (nb_namespaces != 0) {
+                parser->transfer_xml_ns(namespaces, nb_namespaces);
+
+                for (map<string, string>::iterator i = parser->namespace_table.begin();
+                        i != parser->namespace_table.end(); ++i) {
+                    parser->other_xml.append(" xmlns");
+                    if (!i->first.empty()) {
+                        parser->other_xml.append(":");
+                        parser->other_xml.append(i->first);
+                    }
+                    parser->other_xml.append("=\"");
+                    parser->other_xml.append(i->second);
+                    parser->other_xml.append("\"");
+                }
+            }
+
+            if (nb_attributes != 0) {
+                parser->transfer_xml_attrs(attributes, nb_attributes);
+                for (XMLAttrMap::iterator i = parser->xml_attr_begin(); i != parser->xml_attr_end(); ++i) {
+                    parser->other_xml.append(" ");
+                    if (!i->second.prefix.empty()) {
+                        parser->other_xml.append(i->second.prefix);
+                        parser->other_xml.append(":");
+                    }
+                    parser->other_xml.append(i->first);
+                    parser->other_xml.append("=\"");
+                    parser->other_xml.append(i->second.value);
+                    parser->other_xml.append("\"");
+                }
+            }
+
+            parser->other_xml.append(">");
+            break;
+
+        case inside_enum_def:
+            // process an EnumConst element
+            if (parser->process_enum_const(localname, attributes, nb_attributes))
+                break;
+            else
+                ddx_fatal_error(parser, "Expected an 'EnumConst' element; found '%s' instead.", localname);
+            break;
+
+        case inside_enum_const:
+            // Nothing to do; this element has no content
+            break;
+
+        case inside_simple_type:
+            if (parser->process_attribute(localname, attributes, nb_attributes))
+                break;
+            else
+                ddx_fatal_error(parser, "Expected an 'Attribute' or 'Alias' element; found '%s' instead.", localname);
+            break;
+
+        case inside_array:
+            if (parser->process_attribute(localname, attributes, nb_attributes))
+                break;
+            else if (is_not(localname, "Array") && parser->process_variable(localname, attributes, nb_attributes))
+                break;
+            else if (strcmp(localname, "dimension") == 0) {
+                parser->process_dimension(attributes, nb_attributes);
+                // next state: inside_dimension
+            }
+            else
+                ddx_fatal_error(parser, "Expected an 'Attribute' or 'Alias' element; found '%s' instead.", localname);
+            break;
+
+        case inside_dimension:
+            ddx_fatal_error(parser,
+                    "Internal parser error; unexpected state, inside dimension while processing element '%s'.",
+                    localname);
+            break;
+
+        case inside_structure:
+            if (parser->process_attribute(localname, attributes, nb_attributes))
+                break;
+            else if (parser->process_variable(localname, attributes, nb_attributes))
+                break;
+            else
+                D4ParserSax2::ddx_fatal_error(parser,
+                        "Expected an Attribute, Alias or variable element; found '%s' instead.", localname);
+            break;
+
+        case inside_sequence:
+            if (parser->process_attribute(localname, attributes, nb_attributes))
+                break;
+            else if (parser->process_variable(localname, attributes, nb_attributes))
+                break;
+            else
+                D4ParserSax2::ddx_fatal_error(parser,
+                        "Expected an Attribute, Alias or variable element; found '%s' instead.", localname);
+            break;
+
+        case inside_grid:
+            if (parser->process_attribute(localname, attributes, nb_attributes))
+                break;
+            else if (strcmp(localname, "Array") == 0)
+                parser->process_variable_helper(dods_array_c, inside_array, attributes, nb_attributes);
+            else if (strcmp(localname, "Map") == 0)
+                parser->process_variable_helper(dods_array_c, inside_map, attributes, nb_attributes);
+            else
+                D4ParserSax2::ddx_fatal_error(parser,
+                        "Expected an Attribute, Alias or variable element; found '%s' instead.", localname);
+            break;
+
+        case inside_map:
+            if (parser->process_attribute(localname, attributes, nb_attributes))
+                break;
+            else if (is_not(localname, "Array") && is_not(localname, "Sequence") && is_not(localname, "Grid")
+                    && parser->process_variable(localname, attributes, nb_attributes))
+                break;
+            else if (strcmp(localname, "dimension") == 0) {
+                parser->process_dimension(attributes, nb_attributes);
+                // next state: inside_dimension
+            }
+            else
+                ddx_fatal_error(parser,
+                        "Expected an 'Attribute', 'Alias', variable or 'dimension' element; found '%s' instead.",
+                        localname);
+            break;
+
+        case parser_unknown:
+            // *** Never used? If so remove/error
+            parser->set_state(parser_unknown);
+            break;
+
+        case parser_error:
+            break;
+    }
+
+    DBGN(cerr << " ... " << states[parser->get_state()] << endl);
+}
+
+void D4ParserSax2::ddx_end_element(void *p, const xmlChar *l, const xmlChar *prefix, const xmlChar *URI)
+{
+    D4ParserSax2 *parser = static_cast<D4ParserSax2*>(p);
+    const char *localname = (const char *) l;
+
+    DBG2(cerr << "End element " << localname << " (state "
+            << states[parser->get_state()] << ")" << endl);
+
+    switch (parser->get_state()) {
+        case parser_start:
+            ddx_fatal_error(parser,
+                    "Internal parser error; unexpected state, inside start state while processing element '%s'.",
+                    localname);
+            break;
+
+        case inside_group:
+            if (strcmp(localname, "Group") == 0)
+                parser->pop_state();
+            else
+                D4ParserSax2::ddx_fatal_error(parser, "Expected an end Group tag; found '%s' instead.", localname);
+            break;
+
+        case inside_attribute_container:
+            if (strcmp(localname, "Attribute") == 0) {
+                parser->pop_state();
+                parser->at_stack.pop(); // pop when leaving a container.
+            }
+            else
+                D4ParserSax2::ddx_fatal_error(parser, "Expected an end Attribute tag; found '%s' instead.", localname);
+            break;
+
+        case inside_attribute:
+            if (strcmp(localname, "Attribute") == 0)
+                parser->pop_state();
+            else
+                D4ParserSax2::ddx_fatal_error(parser, "Expected an end Attribute tag; found '%s' instead.", localname);
+            break;
+
+        case inside_attribute_value:
+            if (strcmp(localname, "value") == 0) {
+                parser->pop_state();
+                AttrTable *atp = parser->at_stack.top();
+                atp->append_attr(parser->dods_attr_name, parser->dods_attr_type, parser->char_data);
+                parser->char_data = ""; // Null this after use.
+            }
+            else
+                D4ParserSax2::ddx_fatal_error(parser, "Expected an end value tag; found '%s' instead.", localname);
+
+            break;
+
+        case inside_other_xml_attribute: {
+            if (strcmp(localname, "Attribute") == 0 && parser->root_ns == (const char *) URI) {
+
+                DBGN(cerr << endl << "\t Popping the 'inside_other_xml_attribute' state"
+                        << endl);
+
+                parser->pop_state();
+
+                AttrTable *atp = parser->at_stack.top();
+                atp->append_attr(parser->dods_attr_name, parser->dods_attr_type, parser->other_xml);
+
+                parser->other_xml = ""; // Null this after use.
+            }
+            else {
+                DBGN(cerr << endl << "\t inside_other_xml_attribute: " << localname
+                        << ", depth: " << parser->other_xml_depth << endl);
+                if (parser->other_xml_depth == 0)
+                    D4ParserSax2::ddx_fatal_error(parser,
+                            "Expected an OtherXML attribute to end! Instead I found '%s'", localname);
+                parser->other_xml_depth--;
+
+                parser->other_xml.append("</");
+                if (prefix) {
+                    parser->other_xml.append((const char *) prefix);
+                    parser->other_xml.append(":");
+                }
+                parser->other_xml.append(localname);
+                parser->other_xml.append(">");
+            }
+            break;
+        }
+
+        case inside_enum_def:
+            if (strcmp(localname, "Enumeration") == 0) {
+                BaseType *btp = parser->bt_stack.top();
+                if (!btp || btp->type() != dods_group_c)
+                    D4ParserSax2::ddx_fatal_error(parser, "Expected a Group to be the current item, while finishing up an %s.", localname);
+                else {
+                    D4Group *g = static_cast<D4Group*>(btp);
+                    g->add_enumeration_nocopy(parser->d_enum_def);
+                    parser->pop_state();
+                }
+            }
+            else {
+                D4ParserSax2::ddx_fatal_error(parser, "Expected an end Enumeration tag; found '%s' instead.", localname);
+            }
+            break;
+
+        case inside_enum_const:
+            if (strcmp(localname, "EnumConst") == 0)
+                parser->pop_state();
+            else
+                D4ParserSax2::ddx_fatal_error(parser, "Expected an end EnumConst tag; found '%s' instead.", localname);
+            break;
+
+        case inside_simple_type:
+            if (is_simple_type(get_type(localname))) {
+                parser->pop_state();
+                BaseType *btp = parser->bt_stack.top();
+                parser->bt_stack.pop();
+                parser->at_stack.pop();
+
+                BaseType *parent = parser->bt_stack.top();
+
+                // NB: This works because we seed the stack with a dummy
+                // structure instance at the start of the parse. When the
+                // parse is complete the variables in that structure will
+                // be transferred to the DDS. Or maybe someday we will really
+                // use a Structure instance in DDS...
+                if (parent->is_vector_type() || parent->is_constructor_type())
+                    parent->add_var(btp);
+                else
+                    D4ParserSax2::ddx_fatal_error(parser,
+                            "Tried to add the simple-type variable '%s' to a non-constructor type (%s %s).", localname,
+                            parser->bt_stack.top()->type_name().c_str(), parser->bt_stack.top()->name().c_str());
+            }
+            else
+                D4ParserSax2::ddx_fatal_error(parser, "Expected an end tag for a simple type; found '%s' instead.",
+                        localname);
+            break;
+
+        case inside_array:
+            parser->finish_variable(localname, dods_array_c, "Array");
+            break;
+
+        case inside_dimension:
+            if (strcmp(localname, "dimension") == 0)
+                parser->pop_state();
+            else
+                D4ParserSax2::ddx_fatal_error(parser, "Expected an end dimension tag; found '%s' instead.", localname);
+            break;
+
+        case inside_structure:
+            parser->finish_variable(localname, dods_structure_c, "Structure");
+            break;
+
+        case inside_sequence:
+            parser->finish_variable(localname, dods_sequence_c, "Sequence");
+            break;
+
+        case inside_grid:
+            parser->finish_variable(localname, dods_grid_c, "Grid");
+            break;
+
+        case inside_map:
+            parser->finish_variable(localname, dods_array_c, "Map");
+            break;
+
+        case parser_unknown:
+            parser->pop_state();
+            break;
+
+        case parser_error:
+            break;
+    }
+
+    DBGN(cerr << " ... " << states[parser->get_state()] << endl);
+}
+
+/** Process/accumulate character data. This may be called more than once for
+ one logical clump of data. Only save character data when processing
+ 'value' elements; throw away all other characters. */
+void D4ParserSax2::ddx_get_characters(void * p, const xmlChar * ch, int len)
+{
+    D4ParserSax2 *parser = static_cast<D4ParserSax2*>(p);
+
+    switch (parser->get_state()) {
+        case inside_attribute_value:
+            parser->char_data.append((const char *) (ch), len);
+            DBG2(cerr << "Characters: '" << parser->char_data << "'" << endl);
+            break;
+
+        case inside_other_xml_attribute:
+            parser->other_xml.append((const char *) (ch), len);
+            DBG2(cerr << "Other XML Characters: '" << parser->other_xml << "'" << endl);
+            break;
+
+        default:
+            break;
+    }
+}
+
+/** Read whitespace that's not really important for content. This is used
+ only for the OtherXML attribute type to preserve formating of the XML.
+ Doing so makes the attribute value far easier to read.
+ */
+void D4ParserSax2::ddx_ignoreable_whitespace(void *p, const xmlChar *ch, int len)
+{
+    D4ParserSax2 *parser = static_cast<D4ParserSax2*>(p);
+
+    switch (parser->get_state()) {
+        case inside_other_xml_attribute:
+            parser->other_xml.append((const char *) (ch), len);
+            break;
+
+        default:
+            break;
+    }
+}
+
+/** Get characters in a cdata block. DAP does not use CData, but XML in an
+ OtherXML attribute (the value of that DAP attribute) might use it. This
+ callback also allows CData when the parser is in the 'parser_unknown'
+ state since some future DAP element might use it.
+ */
+void D4ParserSax2::ddx_get_cdata(void *p, const xmlChar *value, int len)
+{
+    D4ParserSax2 *parser = static_cast<D4ParserSax2*>(p);
+
+    switch (parser->get_state()) {
+        case inside_other_xml_attribute:
+            parser->other_xml.append((const char *) (value), len);
+            break;
+
+        case parser_unknown:
+            break;
+
+        default:
+            D4ParserSax2::ddx_fatal_error(parser, "Found a CData block but none are allowed by DAP.");
+
+            break;
+    }
+}
+
+/** Handle the standard XML entities.
+
+ @param parser The SAX parser
+ @param name The XML entity. */
+xmlEntityPtr D4ParserSax2::ddx_get_entity(void *, const xmlChar * name)
+{
+    return xmlGetPredefinedEntity(name);
+}
+
+/** Process an XML fatal error. Note that SAX provides for warnings, errors
+ and fatal errors. This code treats them all as fatal errors since there's
+ typically no way to tell a user about the error since there's often no
+ user interface for this software.
+
+ @note This static function does not throw an exception or otherwise
+ alter flow of control except for altering the parser state.
+
+ @param p The SAX parser
+ @param msg A printf-style format string. */
+void D4ParserSax2::ddx_fatal_error(void * p, const char *msg, ...)
+{
+    va_list args;
+    D4ParserSax2 *parser = static_cast<D4ParserSax2*>(p);
+
+    parser->set_state(parser_error);
+
+    va_start(args, msg);
+    char str[1024];
+    vsnprintf(str, 1024, msg, args);
+    va_end(args);
+
+    int line = xmlSAX2GetLineNumber(parser->ctxt);
+
+    parser->error_msg += "At line " + long_to_string(line) + ": ";
+    parser->error_msg += string(str) + string("\n");
+}
+
+//@}
+
+void D4ParserSax2::cleanup_parse(xmlParserCtxtPtr & context) const
+{
+    if (!context->wellFormed) {
+        context->sax = NULL;
+        xmlFreeParserCtxt(context);
+        throw D4ParseError(string("\nThe DDX is not a well formed XML document.\n") + error_msg);
+    }
+
+    if (!context->valid) {
+        context->sax = NULL;
+        xmlFreeParserCtxt(context);
+        throw D4ParseError(string("\nThe DDX is not a valid document.\n") + error_msg);
+    }
+
+    if (get_state() == parser_error) {
+        context->sax = NULL;
+        xmlFreeParserCtxt(context);
+        throw D4ParseError(string("\nError parsing DMR response.\n") + error_msg);
+    }
+
+    context->sax = NULL;
+    xmlFreeParserCtxt(context);
+}
+
+/**
+ * @brief Read the DDX from a stream instead of a file.
+ *
+ * This method reads and parses the DDX from a stream. When/if it encounters
+ * the <blob> element is records the value of the  CID attribute and returns
+ * it using the cid value-result parameter. When the boundary marker is
+ * found, the parser will read that and return (if it is found before the
+ * DDX is completely parsed).
+ *
+ * @param f The input stream
+ * @param dest_dds Value-result parameter. Pass a DDS in and the inforamtion
+ * in the DDX will be added to it.
+ * @param cid Value-result parameter. When/if read, the value of the <blob>
+ * element's @cid attribute will be returned here.
+ * @param boundary Value of the M-MIME boundary separator; default is ""
+ * @see DDXParserDAP4::intern(). */
+void D4ParserSax2::intern(istream &f, DDS *dest_dds)
+{
+    // Code example from libxml2 docs re: read from a stream.
+
+    if (!f.good())
+        throw InternalErr(__FILE__, __LINE__, "Input stream not open or read error");
+
+    const int size = 1024;
+    char chars[size];
+
+    f.getline(chars, size);
+    int res = f.gcount();
+    if (res > 0) {
+
+        DBG(cerr << "line: (" << res << "): " << chars << endl);
+        xmlParserCtxtPtr context = xmlCreatePushParserCtxt(NULL, NULL, chars, res - 1, "stream");
+
+        ctxt = context; // need ctxt for error messages
+        dds = dest_dds; // dump values here
+        d_factory = dynamic_cast<D4BaseTypeFactory*>(dds->get_factory());
+        if (!d_factory)
+            throw InternalErr(__FILE__, __LINE__, "Invalid factory class");
+
+        xmlSAXHandler ddx_sax_parser;
+        memset(&ddx_sax_parser, 0, sizeof(xmlSAXHandler));
+
+        ddx_sax_parser.getEntity = &D4ParserSax2::ddx_get_entity;
+        ddx_sax_parser.startDocument = &D4ParserSax2::ddx_start_document;
+        ddx_sax_parser.endDocument = &D4ParserSax2::ddx_end_document;
+        ddx_sax_parser.characters = &D4ParserSax2::ddx_get_characters;
+        ddx_sax_parser.ignorableWhitespace = &D4ParserSax2::ddx_ignoreable_whitespace;
+        ddx_sax_parser.cdataBlock = &D4ParserSax2::ddx_get_cdata;
+        ddx_sax_parser.warning = &D4ParserSax2::ddx_fatal_error;
+        ddx_sax_parser.error = &D4ParserSax2::ddx_fatal_error;
+        ddx_sax_parser.fatalError = &D4ParserSax2::ddx_fatal_error;
+        ddx_sax_parser.initialized = XML_SAX2_MAGIC;
+        ddx_sax_parser.startElementNs = &D4ParserSax2::ddx_start_element;
+        ddx_sax_parser.endElementNs = &D4ParserSax2::ddx_end_element;
+
+        context->sax = &ddx_sax_parser;
+        context->userData = this;
+        context->validate = true;
+
+        f.getline(chars, size);
+        while ((f.gcount() > 0)) {
+            DBG(cerr << "line: (" << f.gcount() << "): " << chars << endl);
+            xmlParseChunk(ctxt, chars, f.gcount() - 1, 0);
+            f.getline(chars, size);
+        }
+        // This call ends the parse: The fourth argument of xmlParseChunk is
+        // the bool 'terminate.'
+        xmlParseChunk(ctxt, chars, 0, 1);
+
+        cleanup_parse(context);
+    }
+}
+
+/** Parse a DDX document stored in a file. The XML in the document is parsed
+ and a binary DDX is built. This implementation stores the result in a DDS
+ object where each instance of BaseType can hold an AttrTable object.
+
+ @param document Read the DDX from this file.
+ @param dest_dds Value/result parameter; dumps the information to this DDS
+ instance.
+ @param cid Value/result parameter; puts the href which references the \c
+ CID.
+ @exception D4ParseError Thrown if the XML document could not be
+ read or parsed. */
+void D4ParserSax2::intern(const string &document, DDS *dest_dds)
+{
+    istringstream iss(document);
+    intern(iss, dest_dds);
+#if 0
+    // Create the context pointer explicitly so that we can store a pointer
+    // to it in the DDXParserDAP4 instance. This provides a way to generate our
+    // own error messages *with* line numbers. The messages are pretty
+    // meaningless otherwise. This means that we use an interface from the
+    // 'parser internals' header, and not the 'parser' header. However, this
+    // interface is also used in one of the documented examples, so it's
+    // probably pretty stable. 06/02/03 jhrg
+    xmlParserCtxtPtr context = xmlCreateFileParserCtxt(document.c_str());
+    if (!context)
+        throw D4ParseError(string("Could not initialize the parser with the file: '") + document + string("'."));
+
+    dds = dest_dds; // dump values here
+    ctxt = context; // need ctxt for error messages
+
+    xmlSAXHandler ddx_sax_parser;
+    memset(&ddx_sax_parser, 0, sizeof(xmlSAXHandler));
+
+    ddx_sax_parser.getEntity = &D4ParserSax2::ddx_get_entity;
+    ddx_sax_parser.startDocument = &D4ParserSax2::ddx_start_document;
+    ddx_sax_parser.endDocument = &D4ParserSax2::ddx_end_document;
+    ddx_sax_parser.characters = &D4ParserSax2::ddx_get_characters;
+    ddx_sax_parser.ignorableWhitespace = &D4ParserSax2::ddx_ignoreable_whitespace;
+    ddx_sax_parser.cdataBlock = &D4ParserSax2::ddx_get_cdata;
+    ddx_sax_parser.warning = &D4ParserSax2::ddx_fatal_error;
+    ddx_sax_parser.error = &D4ParserSax2::ddx_fatal_error;
+    ddx_sax_parser.fatalError = &D4ParserSax2::ddx_fatal_error;
+    ddx_sax_parser.initialized = XML_SAX2_MAGIC;
+    ddx_sax_parser.startElementNs = &D4ParserSax2::ddx_start_element;
+    ddx_sax_parser.endElementNs = &D4ParserSax2::ddx_end_element;
+
+    context->sax = &ddx_sax_parser;
+    context->userData = this;
+    context->validate = false;
+
+    xmlParseDocument(context);
+
+    cleanup_parse(context);
+#endif
+}
+
+} // namespace libdap
diff --git a/DDXParserSAX2.h b/D4ParserSax2.h
similarity index 67%
copy from DDXParserSAX2.h
copy to D4ParserSax2.h
index 51b009f..716911d 100644
--- a/DDXParserSAX2.h
+++ b/D4ParserSax2.h
@@ -4,7 +4,7 @@
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
 // Access Protocol.
 
-// Copyright (c) 2003 OPeNDAP, Inc.
+// Copyright (c) 2012 OPeNDAP, Inc.
 // Author: James Gallagher <jgallagher at opendap.org>
 //
 // This library is free software; you can redistribute it and/or
@@ -19,56 +19,46 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
-#ifndef ddx_parser_h
-#define ddx_parser_h
+#ifndef d4_parser_sax2_h
+#define d4_parser_sax2_h
 
 #include <string>
+#include <iostream>
 #include <map>
 #include <stack>
 
 #include <libxml/parserInternals.h>
 
-#ifndef ddx_exceptions_h
-#include "DDXExceptions.h"
-#endif
-
-#ifndef _dds_h
 #include "DDS.h"
-#endif
-
-#ifndef _basetype_h
 #include "BaseType.h"
-#endif
+//#include "D4EnumDef.h"
+#include "D4BaseTypeFactory.h"
 
-#ifndef base_type_factory_h
-#include "BaseTypeFactory.h"
-#endif
+#include "D4ParseError.h"
 
 namespace libdap
 {
 
 /** Parse the XML text which encodes the network/persistent representation of
-    the DDX object. In the current implementation, the DDX is held by an
+    the DMR object. In the current implementation, the DMR is held by an
     instance of the class DDS which in turn holds variables which include
-    attributes. That is, the binary \e implementation of a DDX uses the old
-    DDS, BaseType and AttrTable classes, albeit arranged in a slightly new
-    way.
+    attributes.
 
-    This parser for the DDX \e document uses the SAX interface of \c libxml2.
+    This parser for the DMR document uses the SAX interface of libxml2.
     Static methods are used as callbacks for the SAX parser. These static
     methods are public because making them private complicates compilation.
-    They should not be called by anything other than the \e intern method.
+    They should not be called by anything other than the intern method.
     They do not throw exceptions because exceptions from within callbacks are
     not reliable or portable. To signal errors, the methods record
-    information in the DDXParser object. Once the error handler is called,
-    construction of an DDX/DDS object ends even though the SAX parser still
-    calls the various callback functions. The parser treats \e warnings, \e
-    errors and \e fatal_errors the same way; when any are found parsing
-    stops. The \e intern method throws an DDXParseFailed exception if an
+    information in the D4ParserSax2 object. Once the error handler is called,
+    construction of an DMR object ends even though the SAX parser still
+    calls the various callback functions. The parser treats warnings,
+    errors and fatal_errors the same way; when any are found parsing
+    stops. The intern method throws an D4ParseError exception if an
     error was found.
 
     Note that this class uses the C++-supplied default definitions for the
@@ -76,24 +66,28 @@ namespace libdap
     operator.
 
     @see DDS */
-class DDXParser
+class D4ParserSax2
 {
 private:
-    /** States used by DDXParserState. These are the states of the SAX parser
+    /** States used by DDXParserDAP4State. These are the states of the SAX parser
     state-machine. */
     enum ParseState {
         parser_start,
 
-        inside_dataset,
+        // inside_group is the state just after parsing the start of a Group
+        // element.
+        inside_group,
 
+        // @TODO Parse attributes once the variables are working.
         inside_attribute_container,
         inside_attribute,
         inside_attribute_value,
         inside_other_xml_attribute,
 
-        inside_alias,
+        inside_enum_def,
+        inside_enum_const,
 
-        // This covers Byte, ..., Url.
+        // This covers Byte, ..., Url, Opaque
         inside_simple_type,
 
         inside_array,
@@ -105,19 +99,22 @@ private:
         inside_structure,
         inside_sequence,
 
-        inside_blob_href,
-
         parser_unknown,
         parser_error
     };
 
-    BaseTypeFactory *d_factory;
+    D4BaseTypeFactory *d_factory;
 
     // These stacks hold the state of the parse as it progresses.
     stack<ParseState> s; // Current parse state
-    stack<BaseType*> bt_stack; // current variable(s)
+    stack<BaseType*> bt_stack; // current variable(s)/groups(s)
     stack<AttrTable*> at_stack; // current attribute table
 
+#if 0
+    // If an enumeration being defined, hold it here until its complete
+    D4EnumDef *d_enum_def;
+#endif
+
     // Accumulate stuff inside an 'OtherXML' DAP attribute here
     string other_xml;
 
@@ -131,14 +128,13 @@ private:
     xmlParserCtxtPtr ctxt; // used for error message line numbers
 
     // The results of the parse operation are stored in these fields.
-    DDS *dds;   // dump DDX here
-    string *blob_href;  // put href to blob here
+    DDS *dds;   // dump DMR here
 
     // These hold temporary values read during the parse.
-    string dods_attr_name; // DAP2 attributes, not XML attributes
+    string dods_attr_name; // DAP4 attributes, not XML attributes
     string dods_attr_type; // ... not XML ...
     string char_data;  // char data in value elements; null after use
-    string root_ns;     // What is the namespace of the root node (Dataset)
+    string root_ns;     // What is the namespace of the root node (Group)
 
     class XMLAttribute {
         public:
@@ -174,21 +170,21 @@ private:
     };
 
     typedef map<string, XMLAttribute> XMLAttrMap;
-    XMLAttrMap attribute_table; // dump XML attributes here
+    XMLAttrMap xml_attrs; // dump XML attributes here
 
-    XMLAttrMap::iterator attr_table_begin() {
-        return attribute_table.begin();
+    XMLAttrMap::iterator xml_attr_begin() {
+        return xml_attrs.begin();
     }
 
-    XMLAttrMap::iterator attr_table_end() {
-        return attribute_table.end();
+    XMLAttrMap::iterator xml_attr_end() {
+        return xml_attrs.end();
     }
 
     map<string, string> namespace_table;
 
     // These are kind of silly...
-    void set_state(DDXParser::ParseState state);
-    DDXParser::ParseState get_state() const;
+    void set_state(D4ParserSax2::ParseState state);
+    D4ParserSax2::ParseState get_state() const;
     void pop_state();
 
     // Glue for the BaseTypeFactory class.
@@ -208,49 +204,47 @@ private:
     bool check_required_attribute(const string &attr);
     bool check_attribute(const string & attr);
 
-    void process_attribute_element(const xmlChar **attrs, int nb_attrs);
-    void process_attribute_alias(const xmlChar **attrs, int nb_attrs);
+    void process_attribute_helper(const xmlChar **attrs, int nb_attrs);
 
-    void process_variable(Type t, ParseState s, const xmlChar **attrs,
-            int nb_attributes);
+    void process_variable_helper(Type t, ParseState s, const xmlChar **attrs, int nb_attributes);
+
+    void process_enum_const_helper(const xmlChar **attrs, int nb_attributes);
+    void process_enum_def_helper(const xmlChar **attrs, int nb_attributes);
 
     void process_dimension(const xmlChar **attrs, int nb_attrs);
-    void process_blob(const xmlChar **attrs, int nb_attrs);
 
-    bool is_attribute_or_alias(const char *name, const xmlChar **attrs,
-            int nb_attributes);
-    bool is_variable(const char *name, const xmlChar **attrs, int nb_attributes);
+    bool process_attribute(const char *name, const xmlChar **attrs, int nb_attributes);
+    bool process_variable(const char *name, const xmlChar **attrs, int nb_attributes);
+
+    bool process_enum_def(const char *name, const xmlChar **attrs, int nb_attributes);
+    bool process_enum_const(const char *name, const xmlChar **attrs, int nb_attributes);
 
     void finish_variable(const char *tag, Type t, const char *expected);
     //@}
 
-    /// Define the default ctor here to prevent its use.
-    DDXParser() {}
-    //{throw InternalErr(__FILE__, __LINE__, "DDXParser internal ctor called!");}
-
-    friend class DDXParserTest;
+    friend class D4ParserSax2Test;
 
 public:
-    DDXParser(BaseTypeFactory *factory)
-        : d_factory(factory),
+    // Read the factory class used to build BaseTypes from the DDS passed
+    // into the intern() method.
+    D4ParserSax2() : d_factory(0),
         other_xml(""), other_xml_depth(0), unknown_depth(0),
-        error_msg(""), ctxt(0), dds(0), blob_href(0),
+        error_msg(""), ctxt(0), dds(0),
         dods_attr_name(""), dods_attr_type(""),
         char_data(""), root_ns("")
     {}
 
-    void intern(const string &document, DDS *dest_dds, string &cid);
-    void intern_stream(FILE *in, DDS *dds, string &cid,
-		const string &boundary = "");
+    void intern(const string &document, DDS *dest_dds);
+    void intern(istream &in, DDS *dest_dds);
 
     static void ddx_start_document(void *parser);
     static void ddx_end_document(void *parser);
 
-    static void ddx_sax2_start_element(void *parser,
+    static void ddx_start_element(void *parser,
             const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI,
             int nb_namespaces, const xmlChar **namespaces, int nb_attributes,
             int nb_defaulted, const xmlChar **attributes);
-    static void ddx_sax2_end_element(void *parser, const xmlChar *localname,
+    static void ddx_end_element(void *parser, const xmlChar *localname,
             const xmlChar *prefix, const xmlChar *URI);
 
     static void ddx_get_characters(void *parser, const xmlChar *ch, int len);
@@ -264,4 +258,4 @@ public:
 
 } // namespace libdap
 
-#endif // ddx_parser_h
+#endif // d4_parser_sax2_h
diff --git a/DAP4StreamMarshaller.cc b/DAP4StreamMarshaller.cc
new file mode 100644
index 0000000..b4907bd
--- /dev/null
+++ b/DAP4StreamMarshaller.cc
@@ -0,0 +1,547 @@
+// DAP4StreamMarshaller.cc
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2012 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+//
+// Portions of this code are from Google's great protocol buffers library and
+// are copyrighted as follows:
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// http://code.google.com/p/protobuf/
+
+
+#include "DAP4StreamMarshaller.h"
+
+#include <stdint.h>     // for the Google protobuf code
+#include <byteswap.h>
+
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+
+using namespace std;
+
+//#define DODS_DEBUG 1
+
+#include "dods-datatypes.h"
+#include "util.h"
+#include "debug.h"
+
+namespace libdap {
+
+static inline bool is_host_big_endian()
+{
+#ifdef COMPUTE_ENDIAN_AT_RUNTIME
+
+    dods_int16 i = 0x0100;
+    char *c = reinterpret_cast<char*>(&i);
+    return *c;
+
+#else
+
+#ifdef WORDS_BIGENDIAN
+    return true;
+#else
+    return false;
+#endif
+
+#endif
+}
+
+
+// From the Google protobuf library
+inline uint8_t* WriteVarint64ToArrayInline(uint64_t value, uint8_t* target) {
+  // Splitting into 32-bit pieces gives better performance on 32-bit
+  // processors.
+  uint32_t part0 = static_cast<uint32_t>(value      );
+  uint32_t part1 = static_cast<uint32_t>(value >> 28);
+  uint32_t part2 = static_cast<uint32_t>(value >> 56);
+
+  int size;
+
+  // Here we can't really optimize for small numbers, since the value is
+  // split into three parts.  Checking for numbers < 128, for instance,
+  // would require three comparisons, since you'd have to make sure part1
+  // and part2 are zero.  However, if the caller is using 64-bit integers,
+  // it is likely that they expect the numbers to often be very large, so
+  // we probably don't want to optimize for small numbers anyway.  Thus,
+  // we end up with a hard coded binary search tree...
+  if (part2 == 0) {
+    if (part1 == 0) {
+      if (part0 < (1 << 14)) {
+        if (part0 < (1 << 7)) {
+          size = 1; goto size1;
+        } else {
+          size = 2; goto size2;
+        }
+      } else {
+        if (part0 < (1 << 21)) {
+          size = 3; goto size3;
+        } else {
+          size = 4; goto size4;
+        }
+      }
+    } else {
+      if (part1 < (1 << 14)) {
+        if (part1 < (1 << 7)) {
+          size = 5; goto size5;
+        } else {
+          size = 6; goto size6;
+        }
+      } else {
+        if (part1 < (1 << 21)) {
+          size = 7; goto size7;
+        } else {
+          size = 8; goto size8;
+        }
+      }
+    }
+  } else {
+    if (part2 < (1 << 7)) {
+      size = 9; goto size9;
+    } else {
+      size = 10; goto size10;
+    }
+  }
+
+  // GOOGLE_LOG(FATAL) << "Can't get here.";
+
+  size10: target[9] = static_cast<uint8_t>((part2 >>  7) | 0x80);
+  size9 : target[8] = static_cast<uint8_t>((part2      ) | 0x80);
+  size8 : target[7] = static_cast<uint8_t>((part1 >> 21) | 0x80);
+  size7 : target[6] = static_cast<uint8_t>((part1 >> 14) | 0x80);
+  size6 : target[5] = static_cast<uint8_t>((part1 >>  7) | 0x80);
+  size5 : target[4] = static_cast<uint8_t>((part1      ) | 0x80);
+  size4 : target[3] = static_cast<uint8_t>((part0 >> 21) | 0x80);
+  size3 : target[2] = static_cast<uint8_t>((part0 >> 14) | 0x80);
+  size2 : target[1] = static_cast<uint8_t>((part0 >>  7) | 0x80);
+  size1 : target[0] = static_cast<uint8_t>((part0      ) | 0x80);
+
+  target[size-1] &= 0x7F;
+  return target + size;
+}
+
+/** Build an instance of DAP4StreamMarshaller. Bind the C++ stream out to this
+ * instance. If the checksum parameter is true, initialize a checksum buffer
+ * and enable the use of the reset_checksum() and get_checksum() methods.
+ *
+ * @param out Write to this stream object.
+ * @param write_data If true, write data values. True by default
+ */
+DAP4StreamMarshaller::DAP4StreamMarshaller(ostream &out, bool write_data) :
+        d_out(out), d_ctx(0), d_write_data(write_data), d_checksum_ctx_valid(false)
+{
+    // XDR is used if the call std::numeric_limits<double>::is_iec559()
+    // returns false indicating that the compiler is not using IEEE 754.
+    // If it is, we just write out the bytes. Why malloc()? Because
+    // xdr_destroy is going to call free() for us.
+    d_ieee754_buf = (char*)malloc(sizeof(dods_float64));
+    if (!d_ieee754_buf)
+        throw InternalErr(__FILE__, __LINE__, "Could not create DAP4StreamMarshaller");
+    xdrmem_create(&d_scalar_sink, d_ieee754_buf, sizeof(dods_float64), XDR_ENCODE);
+
+    // This will cause exceptions to be thrown on i/o errors. The exception
+    // will be ostream::failure
+    out.exceptions(ostream::failbit | ostream::badbit);
+
+    d_ctx = EVP_MD_CTX_create();
+}
+
+DAP4StreamMarshaller::~DAP4StreamMarshaller()
+{
+    // Free the buffer this contains. The xdr_destroy() macro does not
+    // free the XDR struct (which is fine since we did not dynamically
+    // allocate it).
+    xdr_destroy (&d_scalar_sink);
+
+    EVP_MD_CTX_destroy(d_ctx);
+}
+
+/**
+ * Return the is the host big- or little-endian?
+ *
+ * @return 'big' or ' little'.
+ */
+
+string
+DAP4StreamMarshaller::get_endian() const
+{
+    return (is_host_big_endian()) ? "big": "little";
+}
+
+/** Initialize the checksum buffer. This resets the checksum calculation.
+ * @exception InternalErr if called when the object was created without
+ * checksum support.
+ */
+void DAP4StreamMarshaller::reset_checksum()
+{
+    if (EVP_DigestInit_ex(d_ctx, EVP_md5(), 0) == 0)
+        throw Error("Failed to initialize checksum object.");
+
+    d_checksum_ctx_valid = true;
+}
+
+/**
+ * Private method to compute the checksum.
+ */
+void DAP4StreamMarshaller::m_compute_checksum()
+{
+    if (d_checksum_ctx_valid) {
+        // '...Final()' 'erases' the context so the next call without a reset
+        // returns a bogus value.
+        d_checksum_ctx_valid = false;
+
+        // For MD5, the array md holds the 16 digits of the hash as values.
+        // The loop below turns that into a nice 32-digit hex number; see
+        // put_checksum() for a version that writes the 128-bit value without
+        // that conversion.
+        unsigned int md_len;
+        int status = EVP_DigestFinal_ex(d_ctx, &d_md[0], &md_len);
+        if (status == 0 || md_len != c_md5_length)
+            throw Error("Error computing the checksum (checksum computation).");
+    }
+}
+
+/** Get the current checksum. It is not possible to continue computing the
+ * checksum once this has been called.
+ * @exception InternalErr if called when the object was created without
+ * checksum support or if called when the checksum has already been returned.
+ */
+string DAP4StreamMarshaller::get_checksum()
+{
+    if (d_checksum_ctx_valid) {
+        m_compute_checksum();
+    }
+
+    ostringstream oss;
+    oss.setf(ios::hex, ios::basefield);
+    for (unsigned int i = 0; i < c_md5_length; ++i) {
+        oss << setfill('0') << setw(2) << (unsigned int) d_md[i];
+    }
+
+    return oss.str();
+}
+
+void DAP4StreamMarshaller::put_checksum()
+{
+    if (d_checksum_ctx_valid) {
+        m_compute_checksum();
+    }
+
+    d_out.write(reinterpret_cast<char*>(&d_md[0]), c_md5_length);
+}
+
+void DAP4StreamMarshaller::checksum_update(const void *data, unsigned long len)
+{
+    if (!d_checksum_ctx_valid)
+        throw InternalErr(__FILE__, __LINE__, "Invalid checksum context (checksum update).");
+
+    if (EVP_DigestUpdate(d_ctx, data, len) == 0) {
+        d_checksum_ctx_valid = false;
+        throw Error("Error computing the checksum (checksum update).");
+    }
+}
+
+void DAP4StreamMarshaller::put_byte(dods_byte val)
+{
+    checksum_update(&val, sizeof(dods_byte));
+
+    if (d_write_data) {
+        DBG( std::cerr << "put_byte: " << val << std::endl );
+
+        d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_byte));
+    }
+}
+
+void DAP4StreamMarshaller::put_int8(dods_int8 val)
+{
+    checksum_update(&val, sizeof(dods_int8));
+
+    if (d_write_data) {
+        DBG( std::cerr << "put_int8: " << val << std::endl );
+
+        d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_int8));
+    }
+}
+
+void DAP4StreamMarshaller::put_int16(dods_int16 val)
+{
+    checksum_update(&val, sizeof(dods_int16));
+
+    if (d_write_data)
+        d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_int16));
+}
+
+void DAP4StreamMarshaller::put_int32(dods_int32 val)
+{
+    checksum_update(&val, sizeof(dods_int32));
+
+    if (d_write_data)
+        d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_int32));
+}
+
+void DAP4StreamMarshaller::put_int64(dods_int64 val)
+{
+    checksum_update(&val, sizeof(dods_int64));
+
+    if (d_write_data)
+        d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_int64));
+}
+
+void DAP4StreamMarshaller::put_float32(dods_float32 val)
+{
+    checksum_update(&val, sizeof(dods_float32));
+
+    if (d_write_data) {
+        if (std::numeric_limits<float>::is_iec559 ) {
+            DBG2(cerr << "Native rep is ieee754." << endl);
+            d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_float32));
+        }
+        else {
+            if (!xdr_setpos(&d_scalar_sink, 0))
+                throw InternalErr(__FILE__, __LINE__, "Error serializing a Float32 variable");
+
+            if (!xdr_float(&d_scalar_sink, &val))
+                throw InternalErr(__FILE__, __LINE__, "Error serializing a Float32 variable");
+
+            if (xdr_getpos(&d_scalar_sink) != sizeof(dods_float32))
+                throw InternalErr(__FILE__, __LINE__, "Error serializing a Float32 variable");
+
+            // If this is a little-endian host, twiddle the bytes
+            static bool twiddle_bytes = !is_host_big_endian();
+            if (twiddle_bytes) {
+                dods_int32 *i = reinterpret_cast<dods_int32*>(&d_ieee754_buf);
+                *i = bswap_32(*i);
+            }
+
+            d_out.write(d_ieee754_buf, sizeof(dods_float32));
+        }
+    }
+}
+
+void DAP4StreamMarshaller::put_float64(dods_float64 val)
+{
+    checksum_update(&val, sizeof(dods_float64));
+
+    if (d_write_data) {
+        if (std::numeric_limits<double>::is_iec559)
+            d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_float64));
+        else {
+            if (!xdr_setpos(&d_scalar_sink, 0))
+                throw InternalErr(__FILE__, __LINE__, "Error serializing a Float64 variable");
+
+            if (!xdr_double(&d_scalar_sink, &val))
+                throw InternalErr(__FILE__, __LINE__, "Error serializing a Float64 variable");
+
+            if (xdr_getpos(&d_scalar_sink) != sizeof(dods_float64))
+                throw InternalErr(__FILE__, __LINE__, "Error serializing a Float64 variable");
+
+            // If this is a little-endian host, twiddle the bytes
+            static bool twiddle_bytes = !is_host_big_endian();
+            if (twiddle_bytes) {
+                dods_int64 *i = reinterpret_cast<dods_int64*>(&d_ieee754_buf);
+                *i = bswap_64(*i);
+            }
+
+            d_out.write(d_ieee754_buf, sizeof(dods_float64));
+        }
+    }
+}
+
+void DAP4StreamMarshaller::put_uint16(dods_uint16 val)
+{
+    checksum_update(&val, sizeof(dods_uint16));
+
+    if (d_write_data)
+        d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_uint16));
+}
+
+void DAP4StreamMarshaller::put_uint32(dods_uint32 val)
+{
+    checksum_update(&val, sizeof(dods_uint32));
+
+    if (d_write_data)
+        d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_uint32));
+}
+
+void DAP4StreamMarshaller::put_uint64(dods_uint64 val)
+{
+    checksum_update(&val, sizeof(dods_uint64));
+
+    if (d_write_data)
+        d_out.write(reinterpret_cast<char*>(&val), sizeof(dods_uint64));
+}
+
+
+void DAP4StreamMarshaller::put_str(const string &val)
+{
+    checksum_update(val.c_str(), val.length());
+
+    if (d_write_data) {
+        put_length_prefix(val.length());
+        d_out.write(val.data(), val.length());
+    }
+}
+
+void DAP4StreamMarshaller::put_url(const string &val)
+{
+    put_str(val);
+}
+
+void DAP4StreamMarshaller::put_opaque(char *val, unsigned int len)
+{
+    checksum_update(val, len);
+
+    if (d_write_data) {
+        put_length_prefix(len);
+        d_out.write(val, len);
+    }
+}
+
+void DAP4StreamMarshaller::put_length_prefix(dods_uint64 val)
+{
+    if (d_write_data) {
+        DBG2(cerr << "val: " << val << endl);
+
+        vector<uint8_t> target(sizeof(dods_uint64) + 1, 0);
+        uint8_t* to_send = WriteVarint64ToArrayInline(val, &target[0]);
+        d_out.write(reinterpret_cast<char*>(&target[0]), to_send - &target[0]);
+
+        DBG2(cerr << "varint: " << hex << *(uint64_t*)&target[0] << dec << endl);
+    }
+}
+
+void DAP4StreamMarshaller::put_vector(char *val, unsigned int num)
+{
+    checksum_update(val, num);
+
+    d_out.write(val, num);
+}
+
+/**
+ * Write a vector of values prefixed by the number of elements. This is a
+ * special version for vectors of bytes and it calls put_opaque()
+ *
+ * @note This function writes the number of elements in the vector which,
+ * in this case, is equal to the number of bytes
+ *
+ * @param val Pointer to the data to write
+ * @param num The number of elements to write
+ */
+void DAP4StreamMarshaller::put_varying_vector(char *val, unsigned int num)
+{
+    put_opaque(val, num);
+}
+
+/**
+ * @todo recode this so that it does not copy data to a new buffer but
+ * serializes directly to the stream (element by element) and compare the
+ * run times.
+ */
+void DAP4StreamMarshaller::m_serialize_reals(char *val, unsigned int num, int width, Type type)
+{
+    dods_uint64 size = num * width;
+    // This is a leak!!! xdr_destroy does not free 'buf'.
+    //char *buf = (char*)malloc(size);
+    vector<char> buf(size);
+    XDR xdr;
+    xdrmem_create(&xdr, &buf[0], size, XDR_ENCODE);
+    try {
+        if(!xdr_array(&xdr, &val, (unsigned int *)&num, size, width, XDRUtils::xdr_coder(type)))
+            throw InternalErr(__FILE__, __LINE__, "Error serializing a Float64 array");
+
+        if (xdr_getpos(&xdr) != size)
+            throw InternalErr(__FILE__, __LINE__, "Error serializing a Float64 array");
+
+        // If this is a little-endian host, twiddle the bytes
+        static bool twiddle_bytes = !is_host_big_endian();
+        if (twiddle_bytes) {
+            if (width == 4) {
+                dods_float32 *lbuf = reinterpret_cast<dods_float32*>(&buf[0]);
+                while (num--) {
+                    dods_int32 *i = reinterpret_cast<dods_int32*>(lbuf++);
+                    *i = bswap_32(*i);
+                }
+            }
+            else { // width == 8
+                dods_float64 *lbuf = reinterpret_cast<dods_float64*>(&buf[0]);
+                while (num--) {
+                    dods_int64 *i = reinterpret_cast<dods_int64*>(lbuf++);
+                    *i = bswap_64(*i);
+                }
+            }
+        }
+
+        d_out.write(&buf[0], size);
+    }
+    catch (...) {
+        xdr_destroy(&xdr);
+        throw;
+    }
+    xdr_destroy(&xdr);
+}
+
+void DAP4StreamMarshaller::put_vector(char *val, unsigned int num, int width, Type type)
+{
+    checksum_update(val, num * width);
+
+    if (d_write_data) {
+        if (type == dods_float32_c && !std::numeric_limits<float>::is_iec559) {
+            // If not using IEEE 754, use XDR to get it that way.
+            m_serialize_reals(val, num, 4, type);
+        }
+        else if (type == dods_float64_c && !std::numeric_limits<double>::is_iec559) {
+            m_serialize_reals(val, num, 8, type);
+        }
+        else {
+            d_out.write(val, num * width);
+        }
+    }
+}
+
+/**
+ * Write a vector of values prefixed by the number of elements.
+ *
+ * @note This function writes the number of elements in the vector, not the
+ * number of bytes.
+ *
+ * @param val Pointer to the data to write
+ * @param num The number of elements to write
+ * @param width The number of bytes in each element
+ * @param type The DAP type code (used only for float32 and float64 values).
+ */
+void DAP4StreamMarshaller::put_varying_vector(char *val, unsigned int num, int width, Type type)
+{
+    put_length_prefix(num);
+    put_vector(val, num, width, type);
+}
+
+void DAP4StreamMarshaller::dump(ostream &strm) const
+{
+    strm << DapIndent::LMarg << "DAP4StreamMarshaller::dump - (" << (void *) this << ")" << endl;
+}
+
+} // namespace libdap
+
diff --git a/DAP4StreamMarshaller.h b/DAP4StreamMarshaller.h
new file mode 100644
index 0000000..22d750a
--- /dev/null
+++ b/DAP4StreamMarshaller.h
@@ -0,0 +1,154 @@
+// DAP4StreamMarshaller.h
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2002,2003,2012 OPeNDAP, Inc.
+// Author: Patrick West <pwest at ucar.edu>,
+//         James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#ifndef I_DAP4StreamMarshaller_h
+#define I_DAP4StreamMarshaller_h 1
+
+#include <iostream>
+
+#include <openssl/evp.h>
+
+using std::ostream;
+using std::cout;
+
+#include "Marshaller.h"
+#include "XDRUtils.h"
+
+namespace libdap {
+
+class Vector;
+
+/** @brief Marshaller that knows how to marshal/serialize dap data objects
+ * to a C++ iostream using DAP4's receiver-makes-right scheme. This code
+ * adds checksums to the stream and uses the xdr library to encode real
+ * values if the underlying representation is not IEEE 754. It also supports
+ * computing the checksum only.
+ *
+ * @note This class uses the Marshaller interface; it could be rewritten
+ * to use far fewer methods since all of the put_*() methods take different
+ * types.
+ *
+ * @todo Add to configure a test for Apple's Common Crypto (man CC_MD5_Init)
+ * and use that if present. ...drop in replacement for SSL MD5 functions. Why
+ * Apple did this is a mystery.
+ */
+class DAP4StreamMarshaller: public Marshaller {
+public:
+    const static unsigned int c_md5_length = 16;
+
+private:
+    XDR d_scalar_sink;
+    char * d_ieee754_buf; // used to serialize a float or double
+
+    ostream & d_out;
+
+    EVP_MD_CTX * d_ctx; // jhrg 4/24/12
+    bool d_write_data; // jhrg 1/27/12
+    bool d_checksum_ctx_valid;
+    unsigned char d_md[c_md5_length];
+
+    // These are private so they won't ever get used.
+
+    DAP4StreamMarshaller() : d_out(cout) {
+        throw InternalErr( __FILE__, __LINE__, "not implemented." ) ;
+    }
+    DAP4StreamMarshaller(const DAP4StreamMarshaller &) : Marshaller(), d_out(cout) {
+        throw InternalErr( __FILE__, __LINE__, "not implemented." ) ;
+    }
+    DAP4StreamMarshaller & operator=(const DAP4StreamMarshaller &) {
+        throw InternalErr( __FILE__, __LINE__, "not implemented." ) ;
+    }
+
+    void m_serialize_reals(char *val, unsigned int num, int width, Type type);
+    void m_compute_checksum();
+
+public:
+    DAP4StreamMarshaller(ostream &out, bool write_data = true);
+    virtual ~DAP4StreamMarshaller();
+
+    // Added here
+    virtual bool checksums() const {
+        return d_ctx != 0;
+    }
+    virtual string get_endian() const;
+    virtual void reset_checksum();
+    virtual string get_checksum();
+    virtual void checksum_update(const void *data, unsigned long len);
+    void put_checksum();
+
+    virtual void put_byte(dods_byte val);
+    virtual void put_int8(dods_int8 val);
+
+    virtual void put_int16(dods_int16 val);
+    virtual void put_int32(dods_int32 val);
+    // Added
+    virtual void put_int64(dods_int64 val);
+
+    virtual void put_float32(dods_float32 val);
+    virtual void put_float64(dods_float64 val);
+
+    virtual void put_uint16(dods_uint16 val);
+    virtual void put_uint32(dods_uint32 val);
+    // Added
+    virtual void put_uint64(dods_uint64 val);
+
+    virtual void put_str(const string &val);
+    virtual void put_url(const string &val);
+
+    virtual void put_opaque(char *val, unsigned int len);
+
+    // Never use put_int() to send length information in DAP4, use
+    // put_length_prefix() instead.
+    virtual void put_int(int) {
+        throw InternalErr(__FILE__, __LINE__, "Not Implemented; use put_length_prefix.");
+    }
+
+    // Added; This method does not add its argument to the checksum;
+    // put_uint64() does.
+    //virtual void    put_length_prefix( dods_uint32 val ) ;
+    virtual void put_length_prefix(dods_uint64 val);
+
+    virtual void put_vector(char *val, unsigned int num);
+    virtual void put_vector(char *val, unsigned int num, int width, Type type);
+
+    virtual void put_varying_vector(char *val, unsigned int num);
+    virtual void put_varying_vector(char *val, unsigned int num, int width, Type type);
+
+    virtual void put_vector(char *, int , Vector &) {
+        throw InternalErr(__FILE__, __LINE__, "Not Implemented; use put_length_prefix.");
+    }
+    virtual void put_vector(char *, int , int , Vector &) {
+        throw InternalErr(__FILE__, __LINE__, "Not Implemented; use put_length_prefix.");
+    }
+
+
+    virtual void dump(ostream &strm) const;
+};
+
+} // namespace libdap
+
+#endif // I_DAP4StreamMarshaller_h
diff --git a/DAP4StreamUnMarshaller.cc b/DAP4StreamUnMarshaller.cc
new file mode 100644
index 0000000..684c39d
--- /dev/null
+++ b/DAP4StreamUnMarshaller.cc
@@ -0,0 +1,412 @@
+// DAP4StreamUnMarshaller.cc
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2012 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#include "config.h"
+#include "DAP4StreamUnMarshaller.h"
+
+#include <byteswap.h>
+
+#include <iostream>
+#include <iomanip>
+
+#include <string>
+#include <sstream>
+
+//#define DODS_DEBUG2 1
+//#define DODS_DEBUG 1
+
+#include "util.h"
+#include "XDRUtils.h"
+#include "InternalErr.h"
+#include "debug.h"
+
+namespace libdap {
+
+static inline bool is_host_big_endian()
+{
+#ifdef COMPUTE_ENDIAN_AT_RUNTIME
+
+    dods_int16 i = 0x0100;
+    char *c = reinterpret_cast<char*>(&i);
+    return *c;
+
+#else
+
+#ifdef WORDS_BIGENDIAN
+    return true;
+#else
+    return false;
+#endif
+
+#endif
+}
+
+DAP4StreamUnMarshaller::DAP4StreamUnMarshaller(istream &in, bool is_stream_big_endian)
+    : d_in( in ), d_buf(0)
+{
+#if 0
+	// XDR is used to handle transforming non-ieee754 reals, nothing else.
+    if (!d_buf)
+    	// Leaked??? See the XDRStream code
+        d_buf = (char *) malloc(sizeof(dods_float64));
+    if (!d_buf)
+        throw Error("Failed to allocate memory for data serialization.");
+#endif
+
+    xdrmem_create(&d_source, &d_buf, sizeof(dods_float64), XDR_DECODE);
+
+    // This will cause exceptions to be thrown on i/o errors. The exception
+    // will be ostream::failure
+    d_in.exceptions(istream::failbit | istream::badbit);
+
+    DBG(cerr << "Host is big endian: " << is_host_big_endian() << endl);
+
+    if ((is_host_big_endian() && is_stream_big_endian)
+        || (!is_host_big_endian() && !is_stream_big_endian))
+        d_twiddle_bytes = false;
+    else
+        d_twiddle_bytes = true;
+}
+
+DAP4StreamUnMarshaller::~DAP4StreamUnMarshaller( )
+{
+}
+
+DAP4StreamUnMarshaller::checksum DAP4StreamUnMarshaller::get_checksum()
+{
+    checksum c;
+    d_in.read(reinterpret_cast<char*>(&c), c_md5_length);
+
+    return c;
+}
+
+string DAP4StreamUnMarshaller::get_checksum(DAP4StreamUnMarshaller::checksum c)
+{
+    unsigned char *md = reinterpret_cast<unsigned char*>(&c);
+
+    ostringstream oss;
+    oss.setf(ios::hex, ios::basefield);
+    for (unsigned int i = 0; i < c_md5_length; ++i) {
+        oss << setfill('0') << setw(2) << (unsigned int)md[i];
+    }
+
+    return oss.str();
+}
+
+void
+DAP4StreamUnMarshaller::get_byte( dods_byte &val )
+{
+    d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_byte));
+}
+
+void
+DAP4StreamUnMarshaller::get_int8( dods_int8 &val )
+{
+    d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_int8));
+}
+
+void
+DAP4StreamUnMarshaller::get_int16( dods_int16 &val )
+{
+    d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_int16));
+    if (d_twiddle_bytes)
+        val = bswap_16(val);
+}
+
+void
+DAP4StreamUnMarshaller::get_int32( dods_int32 &val )
+{
+    d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_int32));
+    if (d_twiddle_bytes)
+        val = bswap_32(val);
+}
+
+void
+DAP4StreamUnMarshaller::get_int64( dods_int64 &val )
+{
+    d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_int64));
+    if (d_twiddle_bytes)
+        val = bswap_64(val);
+}
+
+void
+DAP4StreamUnMarshaller::get_float32( dods_float32 &val )
+{
+    if (std::numeric_limits<float>::is_iec559) {
+        d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_float32));
+        if (d_twiddle_bytes) {
+            dods_int32 *i = reinterpret_cast<dods_int32*>(&val);
+            *i = bswap_32(*i);
+        }
+
+    }
+    else {
+        xdr_setpos( &d_source, 0);
+        d_in.read(d_buf, sizeof(dods_float32));
+
+        if (!xdr_float(&d_source, &val))
+            throw Error("Network I/O Error. Could not read float 64 data.");
+    }
+}
+
+void
+DAP4StreamUnMarshaller::get_float64( dods_float64 &val )
+{
+    if (std::numeric_limits<float>::is_iec559) {
+        d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_float64));
+        if (d_twiddle_bytes) {
+            dods_int64 *i = reinterpret_cast<dods_int64*>(&val);
+            *i = bswap_32(*i);
+        }
+    }
+    else {
+        xdr_setpos( &d_source, 0);
+        d_in.read(d_buf, sizeof(dods_float64));
+
+        if (!xdr_double(&d_source, &val))
+            throw Error("Network I/O Error. Could not read float 64 data.");
+    }
+}
+
+void
+DAP4StreamUnMarshaller::get_uint16( dods_uint16 &val )
+{
+    d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_uint16));
+    if (d_twiddle_bytes)
+        val = bswap_16(val);
+}
+
+void
+DAP4StreamUnMarshaller::get_uint32( dods_uint32 &val )
+{
+    d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_uint32));
+    if (d_twiddle_bytes)
+        val = bswap_32(val);
+}
+
+void
+DAP4StreamUnMarshaller::get_uint64( dods_uint64 &val )
+{
+    d_in.read(reinterpret_cast<char*>(&val), sizeof(dods_uint64));
+    if (d_twiddle_bytes)
+        val = bswap_64(val);
+}
+
+/**
+ * Read a varint (128-bit varying integer). Not the most optimized version
+ * possible. It would be better if the values were in memory and we could
+ * operate on them without a separate read for each byte.
+ */
+dods_uint64 DAP4StreamUnMarshaller::get_length_prefix()
+{
+    uint8_t b;
+    int count = 0;
+    dods_uint64 result = 0;
+    do {
+        d_in.read(reinterpret_cast<char*>(&b), 1);
+
+        uint64_t v = (b & 0x7f) << 7 * count;
+        result += v; // is v needed? Does it matter?
+        count++;
+
+    } while (b & 0x80);
+
+    return result;
+}
+
+
+void
+DAP4StreamUnMarshaller::get_str( string &val )
+{
+    dods_int64 len = get_length_prefix();
+    vector<char> raw(len+1);
+    d_in.read(&raw[0], len);
+
+    val.reserve(len);
+    val.assign(&raw[0], len);
+}
+
+void
+DAP4StreamUnMarshaller::get_url( string &val )
+{
+    get_str( val ) ;
+}
+
+/**
+ * Get opaque data when the size of the data to read is known.
+ *
+ * @param val Pointer to 'len' bytes; store the data here.
+ * @param len Number of bytes referenced adn expected
+ * @exception Error if the number of bytes indicated in the stream does not
+ * match 'len'
+ */
+void
+DAP4StreamUnMarshaller::get_opaque( char *val, unsigned int len )
+{
+    dods_int64 rlen = get_length_prefix();
+    if (len != rlen)
+        throw Error("Expected opaque data of " + long_to_string(len)
+                + " bytes, but got " + long_to_string(rlen) + " instead.");
+
+    d_in.read(val, len);
+}
+
+/**
+ * Get opaque data when the size of the data to be read is not known in
+ * advance.
+ *
+ * @param val Value-result parameter for the data; caller must delete.
+ * @param len value-result parameter for the length of the data
+ */
+void
+DAP4StreamUnMarshaller::get_opaque( char **val, unsigned int &len )
+{
+    len = get_length_prefix();
+
+    *val = new char[len];
+    d_in.read(*val, len);
+}
+
+void
+DAP4StreamUnMarshaller::get_vector( char *val, unsigned int num )
+{
+    d_in.read(val, num);
+}
+
+/**
+ * @todo recode this so that it does not copy data to a new buffer but
+ * serializes directly to the stream (element by element) and compare the
+ * run times.
+ */
+void DAP4StreamUnMarshaller::m_deserialize_reals(char *val, unsigned int num, int width, Type type)
+{
+    dods_uint64 size = num * width;
+    //char *buf = (char*)malloc(size); This was leaked; xdr_destroy() does not free it.
+    vector<char> buf(size);
+    XDR xdr;
+    xdrmem_create(&xdr, &buf[0], size, XDR_DECODE);
+    try {
+        xdr_setpos(&d_source, 0);
+        d_in.read(&buf[0], size);
+
+        if(!xdr_array(&xdr, &val, (unsigned int *)&num, size, width, XDRUtils::xdr_coder(type)))
+            throw InternalErr(__FILE__, __LINE__, "Error deserializing a Float64 array");
+
+        if (xdr_getpos(&xdr) != size)
+            throw InternalErr(__FILE__, __LINE__, "Error deserializing a Float64 array");
+    }
+    catch (...) {
+        xdr_destroy(&xdr);
+        throw;
+    }
+    xdr_destroy(&xdr);
+}
+
+void DAP4StreamUnMarshaller::m_twidle_vector_elements(char *vals, unsigned int num, int width)
+{
+    switch (width) {
+        case 2: {
+            dods_int16 *local = reinterpret_cast<dods_int16*>(vals);
+            while (num--) {
+                *local = bswap_16(*local);
+                local++;
+            }
+            break;
+        }
+        case 4: {
+            dods_int32 *local = reinterpret_cast<dods_int32*>(vals);;
+            while (num--) {
+                *local = bswap_32(*local);
+                local++;
+            }
+            break;
+        }
+        case 8: {
+            dods_int64 *local = reinterpret_cast<dods_int64*>(vals);;
+            while (num--) {
+                *local = bswap_64(*local);
+                local++;
+            }
+            break;
+        }
+        default:
+            throw InternalErr(__FILE__, __LINE__, "Unrecognized word size.");
+    }
+}
+
+void
+DAP4StreamUnMarshaller::get_vector( char *val, unsigned int num, int width, Type type )
+{
+    if (type == dods_float32_c && !std::numeric_limits<float>::is_iec559) {
+        // If not using IEEE 754, use XDR to get it that way.
+        m_deserialize_reals(val, num, 4, type);
+    }
+    else if (type == dods_float64_c && !std::numeric_limits<double>::is_iec559) {
+        m_deserialize_reals(val, num, 8, type);
+    }
+    else {
+        d_in.read(val, num * width);
+        if (d_twiddle_bytes)
+            m_twidle_vector_elements(val, num, width);
+    }
+}
+
+void
+DAP4StreamUnMarshaller::get_varying_vector( char **val, unsigned int &num )
+{
+    get_opaque(val, num);
+}
+
+void
+DAP4StreamUnMarshaller::get_varying_vector( char **val, unsigned int &num, int width, Type type )
+{
+    num = get_length_prefix();
+
+    int size = num * width;
+    *val = new char[size];
+
+    if (type == dods_float32_c && !std::numeric_limits<float>::is_iec559) {
+        m_deserialize_reals(*val, num, 4, type);
+    }
+    else if (type == dods_float64_c && !std::numeric_limits<double>::is_iec559) {
+        m_deserialize_reals(*val, num, 8, type);
+    }
+    else {
+        d_in.read(*val, size);
+        if (d_twiddle_bytes)
+            m_twidle_vector_elements(*val, num, width);
+    }
+}
+
+void
+DAP4StreamUnMarshaller::dump(ostream &strm) const
+{
+    strm << DapIndent::LMarg << "DAP4StreamUnMarshaller::dump - ("
+         << (void *)this << ")" << endl ;
+}
+
+} // namespace libdap
+
diff --git a/DAP4StreamUnMarshaller.h b/DAP4StreamUnMarshaller.h
new file mode 100644
index 0000000..f535069
--- /dev/null
+++ b/DAP4StreamUnMarshaller.h
@@ -0,0 +1,144 @@
+// DAP4StreamUnMarshaller.h
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2012 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#ifndef I_DAP4StreamUnMarshaller_h
+#define I_DAP4StreamUnMarshaller_h 1
+
+#include <iostream>
+
+using std::istream ;
+using std::cin ;
+
+#include "UnMarshaller.h"
+#include "BaseType.h"
+#include "XDRUtils.h"
+
+namespace libdap
+{
+
+class Vector;
+
+/** @brief Read data from the stream made by DAP4StreamMarshaller.
+ */
+class DAP4StreamUnMarshaller: public UnMarshaller {
+public:
+    const static unsigned int c_md5_length = 16;
+
+private:
+    istream &d_in;
+    bool d_twiddle_bytes;
+
+    // These are used for reals that need to be converted from IEEE 754
+    XDR d_source;
+    dods_float64 d_buf;
+
+    DAP4StreamUnMarshaller();
+#if 0
+    : d_in(cin) {
+        throw InternalErr( __FILE__, __LINE__, "not implemented." ) ;
+    }
+#endif
+    DAP4StreamUnMarshaller(const DAP4StreamUnMarshaller &);
+#if 0
+    : UnMarshaller(), d_in(cin) {
+        throw InternalErr( __FILE__, __LINE__, "not implemented." ) ;
+    }
+#endif
+
+    DAP4StreamUnMarshaller & operator=(const DAP4StreamUnMarshaller &);
+#if 0
+    {
+        throw InternalErr( __FILE__, __LINE__, "not implemented." ) ;
+    }
+#endif
+
+    void m_deserialize_reals(char *val, unsigned int num, int width, Type type);
+    void m_twidle_vector_elements(char *vals, unsigned int num, int width);
+
+public:
+    struct checksum {
+        unsigned char md[c_md5_length];
+    };
+
+    DAP4StreamUnMarshaller(istream &in, bool is_stream_bigendian);
+    virtual ~DAP4StreamUnMarshaller();
+
+    checksum get_checksum();
+    string get_checksum(checksum c);
+
+    virtual void get_byte(dods_byte &val);
+    virtual void get_int8(dods_int8 &val);
+
+    virtual void get_int16(dods_int16 &val);
+    virtual void get_int32(dods_int32 &val);
+
+    virtual void get_int64(dods_int64 &val);
+
+    virtual void get_float32(dods_float32 &val);
+    virtual void get_float64(dods_float64 &val);
+
+    virtual void get_uint16(dods_uint16 &val);
+    virtual void get_uint32(dods_uint32 &val);
+
+    virtual void get_uint64(dods_uint64 &val);
+
+    virtual void get_str(string &val);
+    virtual void get_url(string &val);
+
+    virtual void get_opaque(char *val, unsigned int len);
+    virtual void get_opaque(char **val, unsigned int &len);
+
+    virtual void get_int(int &) {
+        throw InternalErr(__FILE__, __LINE__, "Not implemented for DAP4");
+    }
+
+    virtual dods_uint64 get_length_prefix();
+
+    // Note that DAP4 assumes clients know the size of arrays when they
+    // read the data; it's the 'varying' get methods that read & return the
+    // number of elements. These methods are here to appease the UnMarshaller
+    // 'interface' code
+    virtual void get_vector(char **, unsigned int &, Vector &) {
+        throw InternalErr(__FILE__, __LINE__, "Not implemented for DAP4");
+    }
+
+    virtual void get_vector(char **, unsigned int &, int, Vector & ) {
+        throw InternalErr(__FILE__, __LINE__, "Not implemented for DAP4");
+    }
+
+    virtual void get_vector(char *val, unsigned int num);
+    virtual void get_vector(char *val, unsigned int num, int width, Type type);
+
+    virtual void get_varying_vector(char **val, unsigned int &num);
+    virtual void get_varying_vector(char **val, unsigned int &num, int width, Type type);
+
+    virtual void dump(ostream &strm) const;
+};
+
+} // namespace libdap
+
+#endif // I_DAP4StreamUnMarshaller_h
+
diff --git a/DAPCache3.cc b/DAPCache3.cc
deleted file mode 100644
index a01ab4c..0000000
--- a/DAPCache3.cc
+++ /dev/null
@@ -1,988 +0,0 @@
-// DAPCache3.cc
-
-// This file was originally part of bes, A C++ back-end server
-// implementation framework for the OPeNDAP Data Access Protocol.
-// Copied to libdap. This is used to cache responses built from
-// functional CE expressions.
-
-// Copyright (c) 2012 OPeNDAP, Inc
-// Author: James Gallagher <jgallagher at opendap.org>
-// Patrick West <pwest at ucar.edu> and Jose Garcia <jgarcia at ucar.edu>
-//
-// This 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.
-// 
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact University Corporation for Atmospheric Research at
-// 3080 Center Green Drive, Boulder, CO 80301
-
-#include "config.h"
-
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <fcntl.h>
-
-#include <string>
-#include <sstream>
-#include <vector>
-#include <cstring>
-#include <cerrno>
-
-#include "DAPCache3.h"
-
-//#define DODS_DEBUG
-
-#include "InternalErr.h"
-#include "DapIndent.h"
-#include "debug.h"
-
-#if 0
-#include "BESSyntaxUserError.h"
-#include "BESInternalError.h"
-
-#include "TheBESKeys.h"
-#include "BESDebug.h"
-#include "BESLog.h"
-#endif
-using namespace std;
-using namespace libdap;
-
-// conversion factor
-static const unsigned long long BYTES_PER_MEG = 1048576ULL;
-
-// Max cache size in megs, so we can check the user input and warn.
-// 2^64 / 2^20 == 2^44
-static const unsigned long long MAX_CACHE_SIZE_IN_MEGABYTES = (1ULL << 44);
-
-DAPCache3 *DAPCache3::d_instance = 0;
-#if 0
-// The BESCache3 code is a singleton that assumes it's running in the absence of threads but that
-// the cache is shared by several processes, each of which have their own instance of BESCache3.
-/** Get an instance of the BESCache3 object. This class is a singleton, so the
- * first call to any of three 'get_instance()' methods makes an instance and subsequent call
- * return a pointer to that instance.
- *
- * @param keys The DAPKeys object (hold various configuration parameters)
- * @param cache_dir_key Key to use to get the value of the cache directory
- * @param prefix_key Key for the item/file prefix. Each file added to the cache uses this
- * as a prefix so cached items can be easily identified when /tmp is used for the cache.
- * @param size_key How big should the cache be, in megabytes
- * @return A pointer to a BESCache3 object
- */
-BESCache3 *
-BESCache3::get_instance(BESKeys *keys, const string &cache_dir_key, const string &prefix_key, const string &size_key)
-{
-    if (d_instance == 0)
-        d_instance = new BESCache3(keys, cache_dir_key, prefix_key, size_key);
-
-    return d_instance;
-}
-#endif
-/** Get an instance of the DAPCache3 object. This class is a singleton, so the
- * first call to any of three 'get_instance()' methods makes an instance and subsequent calls
- * return a pointer to that instance.
- *
- *
- * @param cache_dir_key Key to use to get the value of the cache directory
- * @param prefix_key Key for the item/file prefix. Each file added to the cache uses this
- * as a prefix so cached items can be easily identified when /tmp is used for the cache.
- * @param size_key How big should the cache be, in megabytes
- * @return A pointer to a DAPCache3 object
- */
-DAPCache3 *
-DAPCache3::get_instance(const string &cache_dir, const string &prefix, unsigned long long size)
-{
-    if (d_instance == 0)
-        d_instance = new DAPCache3(cache_dir, prefix, size);
-
-    return d_instance;
-}
-
-/** Get an instance of the DAPCache3 object. This version is used when there's no
- * question that the cache has been instantiated.
- */
-DAPCache3 *
-DAPCache3::get_instance()
-{
-    if (d_instance == 0)
-        throw InternalErr(__FILE__, __LINE__, "Tried to get the DAPCache3 instance, but it hasn't been created yet");
-
-    return d_instance;
-}
-
-static inline string get_errno() {
-	char *s_err = strerror(errno);
-	if (s_err)
-		return s_err;
-	else
-		return "Unknown error.";
-}
-
-// Build a lock of a certain type.
-static inline struct flock *lock(int type) {
-    static struct flock lock;
-    lock.l_type = type;
-    lock.l_whence = SEEK_SET;
-    lock.l_start = 0;
-    lock.l_len = 0;
-    lock.l_pid = getpid();
-
-    return &lock;
-}
-
-inline void DAPCache3::m_record_descriptor(const string &file, int fd) {
-    DBG(cerr << "DAP Cache: recording descriptor: " << file << ", " << fd << endl);
-    d_locks.insert(std::pair<string, int>(file, fd));
-}
-
-inline int DAPCache3::m_get_descriptor(const string &file) {
-    FilesAndLockDescriptors::iterator i = d_locks.find(file);
-    int fd = i->second;
-    DBG(cerr << "DAP Cache: getting descriptor: " << file << ", " << fd << endl);
-    d_locks.erase(i);
-    return fd;
-}
-
-/** Unlock and close the file descriptor.
- *
- * @param fd The file descriptor to close.
- * @throws BESInternalError if either fnctl(2) or open(2) return an error.
- */
-static void unlock(int fd)
-{
-    if (fcntl(fd, F_SETLK, lock(F_UNLCK)) == -1) {
-        throw InternalErr(__FILE__, __LINE__, "An error occurred trying to unlock the file" + get_errno());
-    }
-
-    if (close(fd) == -1)
-        throw InternalErr(__FILE__, __LINE__, "Could not close the (just) unlocked file.");
-}
-
-/** Get a shared read lock on an existing file.
-
- @param file_name The name of the file.
- @param ref_fp if successful, the file descriptor of the file on which we
- have a shared read lock. This is used to release the lock.
-
- @return If the file does not exist, return immediately indicating
- failure (false), otherwise block until a shared read-lock can be
- obtained and then return true.
-
- @exception Error is thrown to indicate a number of untoward
- events. */
-static bool getSharedLock(const string &file_name, int &ref_fd)
-{
-	DBG(cerr << "getSharedLock: " << file_name <<endl);
-
-    int fd;
-    if ((fd = open(file_name.c_str(), O_RDONLY)) < 0) {
-        switch (errno) {
-        case ENOENT:
-            return false;
-
-        default:
-            throw InternalErr(__FILE__, __LINE__, get_errno());
-        }
-    }
-
-    struct flock *l = lock(F_RDLCK);
-    if (fcntl(fd, F_SETLKW, l) == -1) {
-        close(fd);
-    	ostringstream oss;
-    	oss << "cache process: " << l->l_pid << " triggered a locking error: " << get_errno();
-        throw InternalErr(__FILE__, __LINE__, oss.str());
-    }
-
-    DBG(cerr << "getSharedLock exit: " << file_name <<endl);
-
-    // Success
-    ref_fd = fd;
-    return true;
-}
-
-/** Get an exclusive read/write lock on an existing file.
-
- @param file_name The name of the file.
- @param ref_fp if successful, the file descriptor of the file on which we
- have an exclusive read/write lock.
-
- @return If the file does not exist, return immediately indicating
- failure (false), otherwise block until an exclusive read/write
- lock can be obtained and then return true.
-
- @exception Error is thrown to indicate a number of untoward
- events. */
-static bool getExclusiveLock(string file_name, int &ref_fd)
-{
-	DBG(cerr << "getExclusiveLock: " << file_name <<endl);
-
-    int fd;
-    if ((fd = open(file_name.c_str(), O_RDWR)) < 0) {
-        switch (errno) {
-        case ENOENT:
-            return false;
-
-        default:
-            throw InternalErr(__FILE__, __LINE__, get_errno());
-        }
-    }
-
-    struct flock *l = lock(F_WRLCK);
-    if (fcntl(fd, F_SETLKW, l) == -1) {
-        close(fd);
-    	ostringstream oss;
-    	oss << "cache process: " << l->l_pid << " triggered a locking error: " << get_errno();
-        throw InternalErr(__FILE__, __LINE__, oss.str());
-    }
-
-    DBG(cerr << "getExclusiveLock exit: " << file_name <<endl);
-
-    // Success
-    ref_fd = fd;
-    return true;
-}
-
-/** Get an exclusive read/write lock on an existing file without blocking.
-
- @param file_name The name of the file.
- @param ref_fp if successful, the file descriptor of the file on which we
- have an exclusive read/write lock.
-
- @return If the file does not exist or if the file is locked,
- return immediately indicating failure (false), otherwise return true.
-
- @exception Error is thrown to indicate a number of untoward
- events. */
-static bool getExclusiveLockNB(string file_name, int &ref_fd)
-{
-	DBG(cerr << "getExclusiveLock_nonblocking: " << file_name <<endl);
-
-    int fd;
-    if ((fd = open(file_name.c_str(), O_RDWR)) < 0) {
-        switch (errno) {
-        case ENOENT:
-            return false;
-
-        default:
-            throw InternalErr(__FILE__, __LINE__, get_errno());
-        }
-    }
-
-    struct flock *l = lock(F_WRLCK);
-    if (fcntl(fd, F_SETLK, l) == -1) {
-        switch (errno) {
-        case EAGAIN:
-            DBG(cerr << "getExclusiveLock_nonblocking exit (false): " << file_name << " by: " << l->l_pid << endl);
-            close(fd);
-            return false;
-
-        default: {
-            close(fd);
-        	ostringstream oss;
-        	oss << "cache process: " << l->l_pid << " triggered a locking error: " << get_errno();
-        	throw InternalErr(__FILE__, __LINE__, oss.str());
-        }
-        }
-    }
-
-    DBG(cerr << "getExclusiveLock_nonblocking exit (true): " << file_name <<endl);
-
-    // Success
-    ref_fd = fd;
-    return true;
-}
-
-/** Create a new file and get an exclusive read/write lock on it. If
- the file already exists, this call fails.
-
- @param file_name The name of the file.
- @param ref_fp if successful, the file descriptor of the file on which we
- have an exclusive read/write lock.
-
- @return If the file exists, return immediately indicating failure
- (false), otherwise block until the file is created and an
- exclusive read/write lock can be obtained, then return true.
-
- @exception Error is thrown to indicate a number of untoward
- events. */
-static bool createLockedFile(string file_name, int &ref_fd)
-{
-	DBG(cerr << "createLockedFile: " << file_name <<endl);
-
-    int fd;
-    if ((fd = open(file_name.c_str(), O_CREAT | O_EXCL | O_RDWR, 0666)) < 0) {
-        switch (errno) {
-        case EEXIST:
-            return false;
-
-        default:
-            throw InternalErr(__FILE__, __LINE__, get_errno());
-        }
-    }
-
-    struct flock *l = lock(F_WRLCK);
-    if (fcntl(fd, F_SETLKW, l) == -1) {
-        close(fd);
-    	ostringstream oss;
-    	oss << "cache process: " << l->l_pid << " triggered a locking error: " << get_errno();
-        throw InternalErr(__FILE__, __LINE__, oss.str());
-    }
-
-    DBG(cerr << "createLockedFile exit: " << file_name <<endl);
-
-    // Success
-    ref_fd = fd;
-    return true;
-}
-
-/** Private method */
-void DAPCache3::m_check_ctor_params()
-{
-    if (d_cache_dir.empty()) {
-        string err = "The cache directory was not specified, must be non-empty";
-        throw InternalErr(__FILE__, __LINE__, err);
-    }
-
-    // TODO New feature: Makes the directory f it does not exist
-    struct stat buf;
-    int statret = stat(d_cache_dir.c_str(), &buf);
-    if (statret != 0 || !S_ISDIR(buf.st_mode)) {
-        // Try to make the directory
-        int status = mkdir(d_cache_dir.c_str(), 0775);
-        if (status != 0) {
-            string err = "The cache directory " + d_cache_dir + " does not exist or could not be created.";
-            throw InternalErr(__FILE__, __LINE__, err);
-        }
-    }
-
-    if (d_prefix.empty()) {
-        string err = "The cache file prefix was not specified, must not be empty";
-        throw InternalErr(__FILE__, __LINE__, err);
-    }
-
-    if (d_max_cache_size_in_bytes <= 0) {
-        string err = "The cache size was not specified, must be greater than zero";
-        throw InternalErr(__FILE__, __LINE__, err);
-    }
-#if 0
-    // redundant check
-
-    // If the user specifies a cache that is too large,
-    // it is a user exception and we should tell them.
-    if (d_max_cache_size_in_bytes > MAX_CACHE_SIZE_IN_MEGABYTES) {
-        std::ostringstream msg;
-        msg << "The specified cache size was larger than the max cache size of: " << MAX_CACHE_SIZE_IN_MEGABYTES
-                << " (was " << d_max_cache_size_in_bytes << ").";
-        throw InternalErr(__FILE__, __LINE__, msg.str());
-    }
-#endif
-    DBG(cerr << "DAP Cache: directory " << d_cache_dir << ", prefix " << d_prefix
-            << ", max size " << d_max_cache_size_in_bytes << endl );
-}
-
-/** Private method. */
-void DAPCache3::m_initialize_cache_info()
-{
-#if 0
-    // In the libdap version of this caching code, there is not a way to read key-value
-    // pairs from the bes.conf file (yet) so punt on this message. And there is no BES
-    // Log
-
-    // TODO Fix this so that some sort of configuration file is used. jhrg 10/22/12
-    if (d_max_cache_size_in_bytes > MAX_CACHE_SIZE_IN_MEGABYTES)
-        *(BESLog::TheLog()) << "Cache size too big in configuration file, set to max limit." << endl ;
-#endif
-    // The value set in configuration files, etc., is the size in megabytes. The private
-    // variable holds the size in bytes (converted below).
-    d_max_cache_size_in_bytes = min(d_max_cache_size_in_bytes, MAX_CACHE_SIZE_IN_MEGABYTES);
-    d_max_cache_size_in_bytes *= BYTES_PER_MEG;
-    d_target_size = d_max_cache_size_in_bytes * 0.8;
-
-    m_check_ctor_params(); // Throws InternalErr on error.
-
-    d_cache_info = d_cache_dir + "/dap.cache.info";
-
-    // See if we can create it. If so, that means it doesn't exist. So make it and
-    // set the cache initial size to zero.
-    if (createLockedFile(d_cache_info, d_cache_info_fd)) {
-		// initialize the cache size to zero
-		unsigned long long size = 0;
-		if (write(d_cache_info_fd, &size, sizeof(unsigned long long)) != sizeof(unsigned long long))
-			throw InternalErr(__FILE__, __LINE__, "Could not write size info to the cache info file in startup!");
-
-		// This leaves the d_cache_info_fd file descriptor open
-		unlock_cache();
-	}
-	else {
-		if ((d_cache_info_fd = open(d_cache_info.c_str(), O_RDWR)) == -1) {
-			throw InternalErr(__FILE__, __LINE__, get_errno());
-		}
-	}
-
-    DBG(cerr << "d_cache_info_fd: " << d_cache_info_fd << endl);
-}
-#if 0
-/** @brief Private constructor that takes as arguments keys to the cache directory,
- * file prefix, and size of the cache to be looked up a configuration file
- *
- * The keys specified are looked up in the specified keys object. If not
- * found or not set correctly then an exception is thrown. I.E., if the
- * cache directory is empty, the size is zero, or the prefix is empty.
- *
- * @param keys BESKeys object used to look up the keys
- * @param cache_dir_key key to look up in the keys file to find cache dir
- * @param prefix_key key to look up in the keys file to find the cache prefix
- * @param size_key key to look up in the keys file to find the cache size (in MBytes)
- * @throws BESSyntaxUserError if keys not set, cache dir or prefix empty,
- * size is 0, or if cache dir does not exist.
- */
-BESCache3::BESCache3(BESKeys *keys, const string &cache_dir_key, const string &prefix_key, const string &size_key) :
-        d_max_cache_size_in_bytes(0)
-{
-    bool found = false;
-    keys->get_value(cache_dir_key, d_cache_dir, found);
-    if (!found)
-        throw BESSyntaxUserError("The cache directory key " + cache_dir_key + " was not found in the BES configuration file", __FILE__, __LINE__);
-
-    found = false;
-    keys->get_value(prefix_key, d_prefix, found);
-    if (!found)
-        throw BESSyntaxUserError("The prefix key " + prefix_key + " was not found in the BES configuration file", __FILE__, __LINE__);
-
-    found = false;
-    string cache_size_str;
-    keys->get_value(size_key, cache_size_str, found);
-    if (!found)
-        throw BESSyntaxUserError("The size key " + size_key + " was not found in the BES configuration file", __FILE__, __LINE__);
-
-    std::istringstream is(cache_size_str);
-    is >> d_max_cache_size_in_bytes;
-
-    m_initialize_cache_info();
-}
-#endif
-/** @brief Private constructor that takes as arguments keys to the cache directory,
- * file prefix, and size of the cache to be looked up a configuration file
- *
- * The keys specified are looked up in the specified keys object. If not
- * found or not set correctly then an exception is thrown. I.E., if the
- * cache directory is empty, the size is zero, or the prefix is empty.
- *
- * @param cache_dir_key key to look up in the keys file to find cache dir
- * @param prefix_key key to look up in the keys file to find the cache prefix
- * @param size_key key to look up in the keys file to find the cache size (in MBytes)
- * @throws BESSyntaxUserError if keys not set, cache dir or prefix empty,
- * size is 0, or if cache dir does not exist.
- */
-DAPCache3::DAPCache3(const string &cache_dir, const string &prefix, unsigned long long size) :
-        d_cache_dir(cache_dir), d_prefix(prefix), d_max_cache_size_in_bytes(size)
-{
-    m_initialize_cache_info();
-}
-
-/** Build the name of file that will holds the uncompressed data from
- * 'src' in the cache.
- *
- * @note How names are mangled: 'src' is the full name of the file to be
- * cached.Tthe file name passed has an extension on the end that will be
- * stripped once the file is cached. For example, if the full path to the
- * file name is /usr/lib/data/fnoc1.nc.gz then the resulting file name
- * will be \#<prefix>\#usr\#lib\#data\#fnoc1.nc.
- *
- * @param src The source name to cache
- * @param mangle if True, assume the name is a file pathname and mangle it.
- * If false, do not mangle the name (assume the caller has sent a suitable
- * string) but do turn the string into a pathname located in the cache directory
- * with the cache prefix. the 'mangle' param is true by default.
- */
-string DAPCache3::get_cache_file_name(const string &src, bool mangle)
-{
-    string target = src;
-
-    if (mangle) {
-        if (target.at(0) == '/') {
-            target = src.substr(1, target.length() - 1);
-        }
-        string::size_type slash = 0;
-        while ((slash = target.find('/')) != string::npos) {
-            target.replace(slash, 1, 1, DAPCache3::DAP_CACHE_CHAR);
-        }
-        string::size_type last_dot = target.rfind('.');
-        if (last_dot != string::npos) {
-            target = target.substr(0, last_dot);
-        }
-    }
-
-    return d_cache_dir + "/" + d_prefix + DAPCache3::DAP_CACHE_CHAR + target;
-}
-
-/** @brief Get a read-only lock on the file if it exists.
- *
- * Try to get a read-only lock on the file, blocking until we can get it.
- * If the file does not exist, return false.
- *
- * @note If this code returns false, that means the file did not exist
- * in the cache at the time of the test. by the time the caller gets
- * the result, the file may have been added to the cache by another
- * process.
- *
- * @param src src file that will be cached eventually
- * @param target a value-result parameter set to the resulting cached file
- * @return true if the file is in the cache and has been locked, false if
- * the file is/was not in the cache.
- * @throws Error if the attempt to get the (shared) lock failed for any
- * reason other than that the file does/did not exist.
- */
-bool DAPCache3::get_read_lock(const string &target, int &fd)
-{
-	lock_cache_read();
-
-    bool status = getSharedLock(target, fd);
-
-    DBG(cerr << "DAP Cache: read_lock: " << target << "(" << status << ")" << endl);
-
-    if (status)
-    	m_record_descriptor(target, fd);
-
-    unlock_cache();
-
-    return status;
-}
-
-/** @brief Create a file in the cache and lock it for write access.
- * If the file does not exist, make it, open it for read-write access and
- * get an exclusive lock on it. The locking operation blocks, although that
- * should never happen.
- * @param target The name of the file to make/open/lock
- * @param fd Value-result param that holds the file descriptor of the opened
- * file
- * @return True if the operation was successful, false otherwise. This method will
- * return false if the file already existed (the file won't be locked and the
- * descriptor reference is undefined - but likely -1).
- * @throws BESInternalError if any error except EEXIST is returned by open(2) or
- * if fcntl(2) returns an error. */
-bool DAPCache3::create_and_lock(const string &target, int &fd)
-{
-	lock_cache_write();
-
-    bool status = createLockedFile(target, fd);
-
-    DBG(cerr << "DAP Cache: create_and_lock: " << target << "(" << status << ")" << endl);
-
-    if (status)
-    	m_record_descriptor(target, fd);
-
-    unlock_cache();
-
-    return status;
-
-}
-
-/** @brief Transfer from an exclusive lock to a shared lock.
- * If the file has an exclusive write lock on it, change that to a shared
- * read lock. This is an atomic operation. If the call to fcntl(2) is
- * protected by locking the cache, a dead lock will result given typical use
- * of this class. This method exists to help with the situation where one
- * process has the cache locked and is blocking on a shared read lock for
- * a file that a second process has locked exclusively (for writing). By
- * changing the exclusive lock to a shared lock, the first process can get
- * its shared lock and then release the cache.
- *
- * @param fd The file descriptor that is exclusively locked and which, on
- * exit, will have a shared lock.
- */
-void DAPCache3::exclusive_to_shared_lock(int fd)
-{
-    struct flock lock;
-    lock.l_type = F_RDLCK;
-    lock.l_whence = SEEK_SET;
-    lock.l_start = 0;
-    lock.l_len = 0;
-    lock.l_pid = getpid();
-
-    if (fcntl(fd, F_SETLKW, &lock) == -1) {
-        throw InternalErr(__FILE__, __LINE__, get_errno());
-    }
-}
-
-/** Get an exclusive lock on the 'cache info' file. The 'cache info' file
- * is used to control certain cache actions, ensuring that they are atomic.
- * These include making sure that the create_and_lock() and read_and_lock()
- * operations are atomic as well as the purge and related operations.
- *
- * @note This is intended to be used internally only but might be useful in
- * some settings.
- */
-void DAPCache3::lock_cache_write()
-{
-    DBG(cerr << "lock_cache - d_cache_info_fd: " << d_cache_info_fd << endl);
-
-    if (fcntl(d_cache_info_fd, F_SETLKW, lock(F_WRLCK)) == -1) {
-        throw InternalErr(__FILE__, __LINE__, "An error occurred trying to lock the cache-control file" + get_errno());
-    }
-}
-
-/** Get a shared lock on the 'cache info' file.
- *
- */
-void DAPCache3::lock_cache_read()
-{
-    DBG(cerr << "lock_cache - d_cache_info_fd: " << d_cache_info_fd << endl);
-
-    if (fcntl(d_cache_info_fd, F_SETLKW, lock(F_RDLCK)) == -1) {
-        throw InternalErr(__FILE__, __LINE__, "An error occurred trying to lock the cache-control file" + get_errno());
-    }
-}
-
-/** Unlock the cache info file.
- *
- * @note This is intended to be used internally only bt might be useful in
- * some settings.
- */
-void DAPCache3::unlock_cache()
-{
-    DBG(cerr << "DAP Cache: unlock: cache_info (fd: " << d_cache_info_fd << ")" << endl);
-
-    if (fcntl(d_cache_info_fd, F_SETLK, lock(F_UNLCK)) == -1) {
-        throw InternalErr(__FILE__, __LINE__, "An error occurred trying to unlock the cache-control file" + get_errno());
-    }
-}
-
-/** Unlock the named file. This does not do any name mangling; it
- * just unlocks whatever is named (or throws BESInternalError if the file
- * cannot be closed).
- *
- * @note This method assumes that the file was opend/locked using one of
- * read_and_lock() or create_and_lock(). Those methods record the name/file-
- * descriptor pairs so that the files can be properly closed and locks
- * released.
- *
- * @param file_name The name of the file to unlock.
- * @throws BESInternalError */
-void DAPCache3::unlock_and_close(const string &file_name)
-{
-    DBG(cerr << "DAP Cache: unlock file: " << file_name << endl);
-
-    unlock(m_get_descriptor(file_name));
-}
-
-/** Unlock the file. This does not do any name mangling; it
- * just unlocks whatever is named (or throws BESInternalError if the file
- * cannot be closed).
- * @param fd The descriptor of the file to unlock.
- * @throws BESInternalError */
-void DAPCache3::unlock_and_close(int fd)
-{
-    DBG(cerr << "DAP Cache: unlock fd: " << fd << endl);
-
-    unlock(fd);
-
-    DBG(cerr << "DAP Cache: unlock " << fd << " Success" << endl);
-}
-
-/** @brief Update the cache info file to include 'target'
- *
- * Add the size of the named file to the total cache size recorded in the
- * cache info file. The cache info file is exclusively locked by this
- * method for its duration. This updates the cache info file and returns
- * the new size.
- *
- * @param target The name of the file
- * @return The new size of the cache
- */
-unsigned long long DAPCache3::update_cache_info(const string &target)
-{
-	try {
-		lock_cache_write();
-
-		if (lseek(d_cache_info_fd, 0, SEEK_SET) == -1)
-			throw InternalErr(__FILE__, __LINE__, "Could not rewind to front of cache info file.");
-
-		// read the size from the cache info file
-		unsigned long long current_size;
-		if (read(d_cache_info_fd, &current_size, sizeof(unsigned long long)) != sizeof(unsigned long long))
-			throw InternalErr(__FILE__, __LINE__, "Could not get read size info from the cache info file!");
-
-		struct stat buf;
-		int statret = stat(target.c_str(), &buf);
-		if (statret == 0)
-			current_size += buf.st_size;
-		else
-			throw InternalErr(__FILE__, __LINE__, "Could not read the size of the new file: " + target + " : " + get_errno());
-
-		DBG(cerr << "DAP Cache: cache size updated to: " << current_size << endl);
-
-		if (lseek(d_cache_info_fd, 0, SEEK_SET) == -1)
-			throw InternalErr(__FILE__, __LINE__, "Could not rewind to front of cache info file.");
-
-		if(write(d_cache_info_fd, &current_size, sizeof(unsigned long long)) != sizeof(unsigned long long))
-			throw InternalErr(__FILE__, __LINE__, "Could not write size info from the cache info file!");
-
-		unlock_cache();
-		return current_size;
-	}
-	catch (...) {
-		unlock_cache();
-		throw;
-	}
-}
-
-/** @brief look at the cache size; is it too large?
- * Look at the cache size and see if it is too big.
- *
- * @return True if the size is too big, false otherwise. */
-bool DAPCache3::cache_too_big(unsigned long long current_size) const
-{
-    return current_size > d_max_cache_size_in_bytes;
-}
-
-/** @brief Get the cache size.
- * Read the size information from the cache info file and return it.
- * This methods locks the cache.
- *
- *
- * @return The size of the cache.
- */
-unsigned long long DAPCache3::get_cache_size()
-{
-	try {
-		lock_cache_read();
-
-		if (lseek(d_cache_info_fd, 0, SEEK_SET) == -1)
-	        throw InternalErr(__FILE__, __LINE__, "Could not rewind to front of cache info file.");
-		// read the size from the cache info file
-		unsigned long long current_size;
-		if(read(d_cache_info_fd, &current_size, sizeof(unsigned long long)) != sizeof(unsigned long long))
-		    throw InternalErr(__FILE__, __LINE__, "Could not get read size info from the cache info file!");
-
-		unlock_cache();
-	    return current_size;
-	}
-	catch(...) {
-		unlock_cache();
-		throw;
-	}
-}
-
-
-static bool entry_op(cache_entry &e1, cache_entry &e2)
-{
-    return e1.time < e2.time;
-}
-
-/** Private. Get info about all of the files (size and last use time). */
-unsigned long long DAPCache3::m_collect_cache_dir_info(CacheFiles &contents)
-{
-    DIR *dip = opendir(d_cache_dir.c_str());
-    if (!dip)
-        throw InternalErr(__FILE__, __LINE__, "Unable to open cache directory " + d_cache_dir);
-
-    struct dirent *dit;
-    vector<string> files;
-    // go through the cache directory and collect all of the files that
-    // start with the matching prefix
-    while ((dit = readdir(dip)) != NULL) {
-        string dirEntry = dit->d_name;
-        if (dirEntry.compare(0, d_prefix.length(), d_prefix) == 0) {
-            files.push_back(d_cache_dir + "/" + dirEntry);
-        }
-    }
-
-    closedir(dip);
-
-    unsigned long long current_size = 0;
-    struct stat buf;
-    for (vector<string>::iterator file = files.begin(); file != files.end(); ++file) {
-        if (stat(file->c_str(), &buf) == 0) {
-            current_size += buf.st_size;
-            cache_entry entry;
-            entry.name = *file;
-            entry.size = buf.st_size;
-            entry.time = buf.st_atime;
-            // Sanity check; Removed after initial testing since some files might be zero bytes
-#if 0
-            if (entry.size == 0)
-                throw InternalErr(__FILE__, __LINE__, "Zero-byte file found in cache. " + *file);
-#endif
-            contents.push_back(entry);
-        }
-    }
-
-    // Sort so smaller (older) times are first.
-    contents.sort(entry_op);
-
-    return current_size;
-}
-
-/** @brief Purge files from the cache
- *
- * Purge files, oldest to newest, if the current size of the cache exceeds the
- * size of the cache specified in the constructor. This method uses an exclusive
- * lock on the cache for the duration of the purge process.
- *
- * @param new_file The name of a file this process just added to the cache. Using
- * fcntl(2) locking there is no way this process can detect its own lock, so the
- * shared read lock on the new file won't keep this process from deleting it (but
- * will keep other processes from deleting it).
- */
-void DAPCache3::update_and_purge(const string &new_file)
-{
-    DBG(cerr << "purge - starting the purge" << endl);
-
-    try {
-        lock_cache_write();
-
-        CacheFiles contents;
-        unsigned long long computed_size = m_collect_cache_dir_info(contents);
-#if 0
-        if (BESISDEBUG( "cache_contents" )) {
-            DBG(endl << "BEFORE Purge " << computed_size/BYTES_PER_MEG << endl );
-            CacheFiles::iterator ti = contents.begin();
-            CacheFiles::iterator te = contents.end();
-            for (; ti != te; ti++) {
-                DBG((*ti).time << ": " << (*ti).name << ": size " << (*ti).size/BYTES_PER_MEG << endl );
-            }
-        }
-#endif
-        DBG(cerr << "purge - current and target size (in MB) " << computed_size/BYTES_PER_MEG  << ", " << d_target_size/BYTES_PER_MEG << endl );
-
-        // This deletes files and updates computed_size
-        if (cache_too_big(computed_size)) {
-
-            // d_target_size is 80% of the maximum cache size.
-            // Grab the first which is the oldest in terms of access time.
-            CacheFiles::iterator i = contents.begin();
-            while (i != contents.end() && computed_size > d_target_size) {
-                // Grab an exclusive lock but do not block - if another process has the file locked
-                // just move on to the next file. Also test to see if the current file is the file
-                // this process just added to the cache - don't purge that!
-                int cfile_fd;
-                if (i->name != new_file && getExclusiveLockNB(i->name, cfile_fd)) {
-                    DBG(cerr << "purge: " << i->name << " removed." << endl );
-
-                    if (unlink(i->name.c_str()) != 0)
-                        throw InternalErr(__FILE__, __LINE__, "Unable to purge the file " + i->name + " from the cache: " + get_errno());
-
-                    unlock(cfile_fd);
-                    computed_size -= i->size;
-                }
-#if 0
-                else {
-                    // This information is useful when debugging... Might comment out for production
-                    DBG(cerr << "purge: " << i->name << " is in use." << endl );
-                }
-#endif
-                ++i;
-
-                DBG(cerr << "purge - current and target size (in MB) " << computed_size/BYTES_PER_MEG << ", " << d_target_size/BYTES_PER_MEG << endl );
-            }
-
-        }
-
-        if (lseek(d_cache_info_fd, 0, SEEK_SET) == -1)
-            throw InternalErr(__FILE__, __LINE__, "Could not rewind to front of cache info file.");
-
-        if(write(d_cache_info_fd, &computed_size, sizeof(unsigned long long)) != sizeof(unsigned long long))
-            throw InternalErr(__FILE__, __LINE__, "Could not write size info to the cache info file!");
-#if 0
-        if (BESISDEBUG( "cache_contents" )) {
-            contents.clear();
-            computed_size = m_collect_cache_dir_info(contents);
-            DBG(endl << "AFTER Purge " << computed_size/BYTES_PER_MEG << endl );
-            CacheFiles::iterator ti = contents.begin();
-            CacheFiles::iterator te = contents.end();
-            for (; ti != te; ti++) {
-                DBG((*ti).time << ": " << (*ti).name << ": size " << (*ti).size/BYTES_PER_MEG << endl );
-            }
-        }
-#endif
-        unlock_cache();
-    }
-    catch(...) {
-        unlock_cache();
-        throw;
-    }
-}
-
-/** @brief Purge a single file from the cache
- *
- * Purge a single file from the cache. The file might be old, etc., and need to
- * be removed. Don't use this to shrink the cache when it gets too big, use
- * update_and_purge() instead since that file optimizes accesses to the cache
- * control file for several changes in a row.
- *
- * @todo This is a new feature; add to BESCache3
- *
- * @param file The name of the file to purge.
- */
-void DAPCache3::purge_file(const string &file)
-{
-    DBG(cerr << "purge_file - starting the purge" << endl);
-
-    try {
-        lock_cache_write();
-
-        // Grab an exclusive lock on the file
-        int cfile_fd;
-        if (getExclusiveLock(file, cfile_fd)) {
-            // Get the file's size
-            unsigned long long size = 0;
-            struct stat buf;
-            if (stat(file.c_str(), &buf) == 0) {
-                size = buf.st_size;
-            }
-
-            DBG(cerr << "purge_file: " << file << " removed." << endl );
-
-            if (unlink(file.c_str()) != 0)
-                throw InternalErr(__FILE__, __LINE__,
-                        "Unable to purge the file " + file + " from the cache: " + get_errno());
-
-            unlock(cfile_fd);
-
-            unsigned long long cache_size = get_cache_size() - size;
-
-            if (lseek(d_cache_info_fd, 0, SEEK_SET) == -1)
-                throw InternalErr(__FILE__, __LINE__, "Could not rewind to front of cache info file.");
-
-            if (write(d_cache_info_fd, &cache_size, sizeof(unsigned long long)) != sizeof(unsigned long long))
-                throw InternalErr(__FILE__, __LINE__, "Could not write size info to the cache info file!");
-        }
-
-        unlock_cache();
-    }
-    catch (...) {
-        unlock_cache();
-        throw;
-    }
-}
-
-/** @brief dumps information about this object
- *
- * Displays the pointer value of this instance along with information about
- * this cache.
- *
- * @param strm C++ i/o stream to dump the information to
- */
-void DAPCache3::dump(ostream &strm) const
-{
-    strm << DapIndent::LMarg << "DAPCache3::dump - (" << (void *) this << ")" << endl;
-    DapIndent::Indent();
-    strm << DapIndent::LMarg << "cache dir: " << d_cache_dir << endl;
-    strm << DapIndent::LMarg << "prefix: " << d_prefix << endl;
-    strm << DapIndent::LMarg << "size (bytes): " << d_max_cache_size_in_bytes << endl;
-    DapIndent::UnIndent();
-}
-
diff --git a/DAPCache3.h b/DAPCache3.h
deleted file mode 100644
index a2e103f..0000000
--- a/DAPCache3.h
+++ /dev/null
@@ -1,152 +0,0 @@
-// DAPCache3.h
-
-// This file was originally part of bes, A C++ back-end server
-// implementation framework for the OPeNDAP Data Access Protocol.
-// Copied to libdap. This is used to cache responses built from
-// functional CE expressions.
-
-// Copyright (c) 2012 OPeNDAP, Inc
-// Author: James Gallagher <jgallagher at opendap.org>,
-// Patrick West <pwest at ucar.edu> and Jose Garcia <jgarcia at ucar.edu>
-//
-// This 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.
-// 
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact University Corporation for Atmospheric Research at
-// 3080 Center Green Drive, Boulder, CO 80301
-
-#ifndef DAPCache3_h_
-#define DAPCache3_h_ 1
-
-// #include <algorithm>
-#include <map>
-#include <string>
-#include <list>
-// #include <sstream>
-
-#include "DapObj.h"
-
-#if 0
-#include "BESObj.h"
-#include "BESDebug.h"
-
-class BESKeys;
-#endif
-
-// These typedefs are used to record information about the files in the cache.
-// See DAPCache3.cc and look at the purge() method.
-typedef struct {
-    string name;
-    unsigned long long size;
-    time_t time;
-} cache_entry;
-
-typedef std::list<cache_entry> CacheFiles;
-
-/** @brief Implementation of a caching mechanism for compressed data.
- * This cache uses simple advisory locking found on most modern unix file systems.
- * Compressed files are decompressed and stored in a cache where they can be
- * used over and over until removed from the cache. Several processes can
- * share the cache with each reading from files. At the same time, new files
- * can be added and the cache can be purged, without disrupting the existing
- * read operations.
- *
- * How it works. When a file is added to the cache, the cache is locked - no
- * other processes can add, read or remove files. Once a file has been added,
- * the cache size is examined and, if needed, the cache is purged so that its
- * size is 80% of the maximum size. Then the cache is unlocked. When a process
- * looks to see if a file is already in the cache, the entire cache is locked.
- * If the file is present, a shared read lock is obtained and the cache is unlocked.
- *
- * Methods: create_and_lock() and get_read_lock() open and lock files; the former
- * creates the file and locks it exclusively iff it does not exist, while the
- * latter obtains a shared lock iff the file already exists. The unlock()
- * methods unlock a file. The lock_cache_info() and unlock_cache_info() are
- * used to control access to the whole cache - with the open + lock and
- * close + unlock operations performed atomically. Other methods that operate
- * on the cache info file must only be called when the lock has been obtained.
- */
-class DAPCache3: public libdap::DapObj {
-
-private:
-    static DAPCache3 * d_instance;
-
-    static const char DAP_CACHE_CHAR = '#';
-
-    string d_cache_dir;  /// pathname of the cache directory
-    string d_prefix;     /// tack this on the front of cache file name
-
-    /// How many megabytes can the cache hold before we have to purge
-    unsigned long long d_max_cache_size_in_bytes;
-    // When we purge, how much should we throw away. Set in the ctor to 80% of the max size.
-    unsigned long long d_target_size;
-#if 0
-    // This class implements a singleton, so the constructor is hidden.
-    BESCache3(BESKeys *keys, const string &cache_dir_key, const string &prefix_key, const string &size_key);
-#endif
-    // Testing
-    DAPCache3(const string &cache_dir, const string &prefix, unsigned long long size);
-
-    // Suppress the assignment operator and default copy ctor, ...
-    DAPCache3();
-    DAPCache3(const DAPCache3 &);
-    DAPCache3 &operator=(const DAPCache3 &rhs);
-
-    void m_check_ctor_params();
-    void m_initialize_cache_info();
-
-    unsigned long long m_collect_cache_dir_info(CacheFiles &contents);
-
-    /// Name of the file that tracks the size of the cache
-    string d_cache_info;
-    int d_cache_info_fd;
-
-    void m_record_descriptor(const string &file, int fd);
-    int m_get_descriptor(const string &file);
-
-    // map that relates files to the descriptor used to obtain a lock
-    typedef std::map<string, int> FilesAndLockDescriptors;
-    FilesAndLockDescriptors d_locks;
-
-public:
-    virtual ~DAPCache3() { }
-
-    string get_cache_file_name(const string &src, bool mangle = true);
-
-    virtual bool create_and_lock(const string &target, int &fd);
-    virtual bool get_read_lock(const string &target, int &fd);
-    virtual void exclusive_to_shared_lock(int fd);
-    virtual void unlock_and_close(const string &target);
-    virtual void unlock_and_close(int fd);
-
-    virtual void lock_cache_write();
-    virtual void lock_cache_read();
-    virtual void unlock_cache();
-
-    virtual unsigned long long update_cache_info(const string &target);
-    virtual bool cache_too_big(unsigned long long current_size) const;
-    virtual unsigned long long get_cache_size();
-    virtual void update_and_purge(const string &new_file);
-    virtual void purge_file(const string &file);
-
-#if 0
-    static BESCache3 *get_instance(BESKeys *keys, const string &cache_dir_key, const string &prefix_key, const string &size_key);
-#endif
-    static DAPCache3 *get_instance(const string &cache_dir, const string &prefix, unsigned long long size);
-    static DAPCache3 *get_instance();
-
-    virtual void dump(ostream &strm) const ;
-};
-
-#endif // DAPCache3_h_
diff --git a/DAS.cc b/DAS.cc
index 10a06ed..aa76948 100644
--- a/DAS.cc
+++ b/DAS.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,11 +36,6 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: DAS.cc 24886 2011-09-13 22:58:35Z jimg $"
-    };
-
-
 #include <cstdio>
 
 #ifdef HAVE_UNISTD_H
@@ -70,8 +65,9 @@ extern void das_switch_to_buffer(void *new_buffer);
 extern void das_delete_buffer(void * buffer);
 extern void *das_buffer(FILE *fp);
 
-extern void dasrestart(FILE *yyin);
-extern int dasparse(void *arg); // defined in das.tab.c
+//extern void dasrestart(FILE *yyin);
+//extern int dasparse(void *arg); // defined in das.tab.c
+extern int dasparse(libdap::parser_arg *arg); // defined in das.tab.c
 
 namespace libdap {
 
@@ -317,7 +313,8 @@ DAS::parse(FILE *in)
 
     parser_arg arg(this);
 
-    bool status = dasparse((void *) & arg) == 0;
+    //bool status = dasparse((void *) & arg) == 0;
+    bool status = dasparse(&arg) == 0;
 
     das_delete_buffer(buffer);
 
diff --git a/DAS.h b/DAS.h
index eb13adf..7bb386c 100644
--- a/DAS.h
+++ b/DAS.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -125,12 +125,8 @@ private:
     string _container_name ;
     AttrTable d_attrs ;
 
-protected:
-    //AttrTable *das_find(string name);
-
 public:
     DAS();
-    //DAS(AttrTable *attr_table, string name);
 
     virtual ~DAS();
 
diff --git a/DDS.cc b/DDS.cc
index 7470a52..7284f9e 100644
--- a/DDS.cc
+++ b/DDS.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -33,11 +33,8 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: DDS.cc 25915 2012-10-24 00:14:58Z jimg $"
-    };
-
 #include <cstdio>
+#include <cmath>
 #include <sys/types.h>
 
 #ifdef WIN32
@@ -85,23 +82,26 @@ static char rcsid[] not_used =
 
 #include "escaping.h"
 
+const string c_xml_xsi = "http://www.w3.org/2001/XMLSchema-instance";
+const string c_xml_namespace = "http://www.w3.org/XML/1998/namespace";
+
+const string grddl_transformation_dap32 = "http://xml.opendap.org/transforms/ddxToRdfTriples.xsl";
+
 const string c_default_dap20_schema_location = "http://xml.opendap.org/dap/dap2.xsd";
 const string c_default_dap32_schema_location = "http://xml.opendap.org/dap/dap3.2.xsd";
+const string c_default_dap40_schema_location = "http://xml.opendap.org/dap/dap4.0.xsd";
 
 const string c_dap20_namespace = "http://xml.opendap.org/ns/DAP2";
 const string c_dap32_namespace = "http://xml.opendap.org/ns/DAP/3.2#";
+const string c_dap40_namespace = "http://xml.opendap.org/ns/DAP/4.0#";
 
 const string c_dap_20_n_sl = c_dap20_namespace + " " + c_default_dap20_schema_location;
 const string c_dap_32_n_sl = c_dap32_namespace + " " + c_default_dap32_schema_location;
-
-const string grddl_transformation_dap32 = "http://xml.opendap.org/transforms/ddxToRdfTriples.xsl";
-
-const string c_xml_namespace = "http://www.w3.org/XML/1998/namespace";
+const string c_dap_40_n_sl = c_dap40_namespace + " " + c_default_dap40_schema_location;
 
 using namespace std;
 
-void ddsrestart(FILE *yyin); // Defined in dds.tab.c
-int ddsparse(void *arg);
+int ddsparse(libdap::parser_arg *arg);
 
 // Glue for the DDS parser defined in dds.lex
 void dds_switch_to_buffer(void *new_buffer);
@@ -114,18 +114,48 @@ void
 DDS::duplicate(const DDS &dds)
 {
     DBG(cerr << "Entering DDS::duplicate... " <<endl);
-    name = dds.name;
-    d_filename = dds.d_filename;
-    d_container_name = dds.d_container_name;
-    d_timeout = dds.d_timeout;
-    d_attr = dds.d_attr;
+#if 0
+    BaseTypeFactory *d_factory;
+
+    string d_name;                // The dataset d_name
+    string d_filename;          // File d_name (or other OS identifier) for
+    string d_container_name;    // d_name of container structure
+    Structure *d_container;     // current container for container d_name
+                                // dataset or part of dataset.
+
+    int d_dap_major;            // The protocol major version number
+    int d_dap_minor;            // ... and minor version number
+    string d_dap_version;       // String version of the protocol
+    string d_request_xml_base;
+    string d_namespace;
+
+    AttrTable d_attr;           // Global attributes.
+
+    vector<BaseType *> vars;    // Variables at the top level
+
+    int d_timeout;              // alarm time in seconds. If greater than
+                                // zero, raise the alarm signal if more than
+                                // d_timeout seconds are spent reading data.
+    Keywords d_keywords;        // Holds keywords parsed from the CE
+
+    long d_max_response_size;   // In bytes
+#endif
 
     d_factory = dds.d_factory;
+
+    d_name = dds.d_name;
+    d_filename = dds.d_filename;
+    d_container_name = dds.d_container_name;
     d_container = dds.d_container;
+
     d_dap_major = dds.d_dap_major;
     d_dap_minor = dds.d_dap_minor;
 
-    d_keywords = dds.d_keywords; // value copy; Keywords contains no pointers
+    d_dap_version = dds.d_dap_version;       // String version of the protocol
+    d_request_xml_base = dds.d_request_xml_base;
+    d_namespace = dds.d_namespace;
+
+    d_attr = dds.d_attr;
 
     DDS &dds_tmp = const_cast<DDS &>(dds);
 
@@ -133,26 +163,64 @@ DDS::duplicate(const DDS &dds)
     for (Vars_iter i = dds_tmp.var_begin(); i != dds_tmp.var_end(); i++) {
         add_var(*i); // add_var() dups the BaseType.
     }
+
+    d_timeout = dds.d_timeout;
+
+    d_keywords = dds.d_keywords; // value copy; Keywords contains no pointers
+
+    d_max_response_size = dds.d_max_response_size;
 }
 
-/** Make a DDS which uses the given BaseTypeFactory to create variables.
-    @param n The name of the dataset. Can also be set using the
-    set_dataset_name() method.
-    @param factory BaseTypeFactory which instantiates Byte, ..., Grid. The
-    caller is responsible for freeing the object \e after deleting this DDS.
-    Can also be set using set_factory(). Never delete until just before
-    deleting the DDS itself unless you intend to replace the factory with a
-    new instance.
-    @param n The name of the data set. Can also be set using
-    set_dataset_name(). */
-DDS::DDS(BaseTypeFactory *factory, const string &n)
-        : d_factory(factory), name(n), d_container(0),
-          d_dap_major(2), d_dap_minor(0),
-          d_request_xml_base(""), d_timeout(0), d_keywords(),
-          d_max_response_size(0)
+//FIXME says 3.2 when it's 2.0
+/**
+ * Make a DDS which uses the given BaseTypeFactory to create variables.
+ *
+ * @note The default DAP version is 3.2 - this is really DAP2 with a handful
+ * of enhancements that our WCS software relies on.
+ *
+ * @param factory The BaseTypeFactory to use when creating instances of
+ * DAP variables. The caller must ensure the factory's lifetime is at least
+ * that of the DDS instance.
+ * @param name The name of the DDS - usually derived from the name of the
+ * pathname or table name of the dataset.
+ */
+DDS::DDS(BaseTypeFactory *factory, const string &name)
+        : d_factory(factory), d_name(name), d_container_name(""), d_container(0),
+          d_request_xml_base(""),
+          d_timeout(0), d_keywords(), d_max_response_size(0)
 {
-    DBG(cerr << "Building a DDS with client major/minor: "
-            << d_dap_major << "." << d_dap_minor << endl);
+    DBG(cerr << "Building a DDS for the default version (3.2)" << endl);
+
+    // This method sets a number of values, including those returned by
+    // get_protocol_major(), ..., get_namespace().
+    set_dap_version("2.0");
+}
+
+/**
+ * Make a DDS with the DAP protocol set to a specific value. This method
+ * provides an easy way to build DDS objects for use in a server or client
+ * that will process DAP4, for example. It's roughly equivalent to calling
+ * set_dap_version() after making an instance using
+ * DDS::DDS(BaseTypeFactory *, const string &).
+ *
+ * @param factory The BaseTypeFactory to use when creating instances of
+ * DAP variables. The caller must ensure the factory's lifetime is at least
+ * that of the DDS instance.
+ * @param name The name of the DDS - usually derived from the name of the
+ * pathname or table name of the dataset.
+ * @param version The DAP version to support. This sets the DAP version, as
+ * well as a number of other dependent constants.
+ */
+DDS::DDS(BaseTypeFactory *factory, const string &name, const string &version)
+        : d_factory(factory), d_name(name), d_container_name(""), d_container(0),
+          d_request_xml_base(""),
+          d_timeout(0), d_keywords(), d_max_response_size(0)
+{
+    DBG(cerr << "Building a DDS for version: " << version << endl);
+
+    // This method sets a number of values, including those returned by
+    // get_protocol_major(), ..., get_namespace().
+    set_dap_version(version);
 }
 
 /** The DDS copy constructor. */
@@ -215,7 +283,7 @@ void DDS::transfer_attributes(DAS *das) {
 	Vars_iter var = var_begin();
 	while (var != var_end()) {
 		try {
-			DBG(cerr << "Processing the attributes for: " << (*var)->name() << " a " << (*var)->type_name() << endl);
+			DBG(cerr << "Processing the attributes for: " << (*var)->d_name() << " a " << (*var)->type_name() << endl);
 			(*var)->transfer_attributes(top_level);
 			var++;
 		} catch (Error &e) {
@@ -234,7 +302,7 @@ void DDS::transfer_attributes(DAS *das) {
 		// this test handles the abnormal case where somehow someone makes a
 		// top level attribute that is not a container by silently dropping it.
 		if ((*at_cont_p)->type == Attr_container && (*at_cont_p)->attributes->is_global_attribute()) {
-			DBG(cerr << (*at_cont_p)->name << " is a global attribute." << endl);
+			DBG(cerr << (*at_cont_p)->d_name << " is a global attribute." << endl);
 			// copy the source container so that the DAS passed in can be
 			// deleted after calling this method.
 			AttrTable *at = new AttrTable(*(*at_cont_p)->attributes);
@@ -245,26 +313,26 @@ void DDS::transfer_attributes(DAS *das) {
 	}
 }
 
-/** Get and set the dataset's name.  This is the name of the dataset
-    itself, and is not to be confused with the name of the file or
+/** Get and set the dataset's d_name.  This is the d_name of the dataset
+    itself, and is not to be confused with the d_name of the file or
     disk on which it is stored.
 
-    @name Dataset Name Accessors */
+    @d_name Dataset Name Accessors */
 
 //@{
 
-/** Returns the dataset's name. */
+/** Returns the dataset's d_name. */
 string
 DDS::get_dataset_name() const
 {
-    return name;
+    return d_name;
 }
 
-/** Sets the dataset name. */
+/** Sets the dataset d_name. */
 void
 DDS::set_dataset_name(const string &n)
 {
-    name = n;
+    d_name = n;
 }
 
 //@}
@@ -277,14 +345,14 @@ DDS::get_attr_table()
 }
 
 /** Get and set the dataset's filename. This is the physical
-    location on a disk where the dataset exists.  The dataset name
+    location on a disk where the dataset exists.  The dataset d_name
     is simply a title.
 
-    @name File Name Accessor
+    @d_name File Name Accessor
     @see Dataset Name Accessors */
 
 //@{
-/** Gets the dataset file name. */
+/** Gets the dataset file d_name. */
 string
 DDS::filename()
 {
@@ -299,6 +367,9 @@ DDS::filename(const string &fn)
 }
 //@}
 
+/**
+ * @deprecated
+ */
 void
 DDS::set_dap_major(int p)
 {
@@ -315,6 +386,9 @@ DDS::set_dap_major(int p)
     }
 }
 
+/**
+ * @deprecated
+ */
 void
 DDS::set_dap_minor(int p)
 {
@@ -327,83 +401,95 @@ DDS::set_dap_minor(int p)
     }
 }
 
-/** Given the dap protocol version either from a MIME header or from within
-    the DDX Dataset element, parse that string and set the DDS fields.
-
-    @param version_string The version string from the MIME (request) or XML
-    document.
+/**
+ * Given the DAP protocol version, parse that string and set the DDS fields.
+ *
+ * @param v The version string.
  */
 void
-DDS::set_dap_version(const string &version_string)
+DDS::set_dap_version(const string &v /* = "2.0" */)
 {
-    istringstream iss(version_string);
+    istringstream iss(v);
 
     int major = -1, minor = -1;
     char dot;
     if (!iss.eof() && !iss.fail())
-	iss >> major;
+        iss >> major;
     if (!iss.eof() && !iss.fail())
-	iss >> dot;
+        iss >> dot;
     if (!iss.eof() && !iss.fail())
-	iss >> minor;
-
-    DBG(cerr << "Major: " << major << ", dot: " << dot <<", Minor: " << minor << endl);
-#if 0
-    if (major == -1 || minor == -1)
-        throw Error("Could not parse the client dap (XDAP-Accept header) value");
-#endif
-
-    d_dap_version = version_string;
-
-    set_dap_major(major == -1 ? 2 : major);
-    set_dap_minor(minor == -1 ? 0 : minor);
+        iss >> minor;
+
+    if (major == -1 || minor == -1 or dot != '.')
+        throw InternalErr(__FILE__, __LINE__, "Could not parse dap version. Value given: " + v);
+
+    d_dap_version = v;
+
+    d_dap_major = major;
+    d_dap_minor = minor;
+
+    // Now set the related XML constants. These might be overwritten if
+    // the DDS instance is being built from a document parse, but if it's
+    // being constructed by a server the code to generate the XML document
+    // needs these values to match the DAP version information.
+    switch (d_dap_major) {
+        case 2:
+            d_namespace = c_dap20_namespace;
+            break;
+        case 3:
+            d_namespace = c_dap32_namespace;
+            break;
+        case 4:
+            d_namespace = c_dap40_namespace;
+            break;
+        default:
+            throw InternalErr(__FILE__, __LINE__, "Unknown DAP version.");
+    }
 }
 
-/** Given the dap protocol version, parse that string and set the DDS fields.
-    This version of th method takes a double - a value that would be passed
-    to a server-side function. This provides a way to set the protocol using
-    stuff in the URL.
-
-    @param d The protocol version requested by the client, as a double.
+/** Old way to set the DAP version.
+ *
+ * @note Don't use this - two interfaces to set the version number is overkill
+ *
+ * @param d The protocol version requested by the client, as a double.
+ * @deprecated
  */
 void
 DDS::set_dap_version(double d)
 {
-    int major = d;
+    int major = floor(d);
     int minor = (d-major)*10;
 
     DBG(cerr << "Major: " << major << ", Minor: " << minor << endl);
 
     ostringstream oss;
     oss << major << "." << minor;
-    d_dap_version = oss.str();
 
-    set_dap_major(major);
-    set_dap_minor(minor);
+    set_dap_version(oss.str());
 }
 
 /** Get and set the current container. If there are multiple files being
     used to build this DDS, using a container will set a virtual structure
     for the current container.
 
-    @name Container Name Accessor
+    @d_name Container Name Accessor
     @see Dataset Name Accessors */
 
 //@{
-/** Gets the dataset file name. */
+/** Gets the dataset file d_name. */
 string
 DDS::container_name()
 {
     return d_container_name;
 }
 
-/** Set the current container name and get or create a structure for that
- * name. */
+/** Set the current container d_name and get or create a structure for that
+ * d_name. */
 void
 DDS::container_name(const string &cn)
 {
     // we want to search the DDS for the top level structure with the given
-    // name. Set the container to null so that we don't search some previous
+    // d_name. Set the container to null so that we don't search some previous
     // container.
     d_container = 0 ;
     if( !cn.empty() )
@@ -470,7 +556,10 @@ DDS::get_request_size(bool constrained)
 void DDS::add_var(BaseType *bt) {
     if (!bt)
         throw InternalErr(__FILE__, __LINE__, "Trying to add a BaseType object with a NULL pointer.");
-
+#if 0
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 DDS.");
+#endif
     DBG2(cerr << "In DDS::add_var(), bt's address is: " << bt << endl);
 
     BaseType *btp = bt->ptr_duplicate();
@@ -490,9 +579,16 @@ void DDS::add_var(BaseType *bt) {
 
 /** @brief Adds the variable to the DDS.
     @param bt Source variable. */
-void DDS::add_var_nocopy(BaseType *bt) {
+void
+DDS::add_var_nocopy(BaseType *bt)
+{
     if (!bt)
         throw InternalErr(__FILE__, __LINE__, "Trying to add a BaseType object with a NULL pointer.");
+#if 0
+    //FIXME There's no longer a DAP2 and DAP4 DDS
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 DDS.");
+#endif
 
     DBG2(cerr << "In DDS::add_var(), bt's address is: " << bt << endl);
 
@@ -507,10 +603,10 @@ void DDS::add_var_nocopy(BaseType *bt) {
 
 /** Remove the named variable from the DDS. This method is not smart about
     looking up names. The variable must exist at the top level of the DDS and
-    must match \e exactly the name given.
+    must match \e exactly the d_name given.
 
     @note Invalidates any iterators that reference the contents of the DDS.
-    @param n The name of the variable to remove. */
+    @param n The d_name of the variable to remove. */
 void
 DDS::del_var(const string &n)
 {
@@ -572,11 +668,11 @@ DDS::var(const string &n, BaseType::btp_stack &s)
 {
     return var(n, &s);
 }
-/** @brief Find the variable with the given name.
+/** @brief Find the variable with the given d_name.
 
-    Returns a pointer to the named variable. If the name contains one or
+    Returns a pointer to the named variable. If the d_name contains one or
     more field separators then the function looks for a variable whose
-    name matches exactly. If the name contains no field separators then
+    name matches exactly. If the d_name contains no field separators then
     the function looks first in the top level and then in all subsequent
     levels and returns the first occurrence found. In general, this
     function searches constructor types in the order in which they appear
@@ -612,17 +708,17 @@ DDS::leaf_match(const string &n, BaseType::btp_stack *s)
 
     for (Vars_iter i = vars.begin(); i != vars.end(); i++) {
         BaseType *btp = *i;
-        DBG(cerr << "DDS::leaf_match: Looking for " << n << " in: " << btp->name() << endl);
-        // Look for the name in the dataset's top-level
+        DBG(cerr << "DDS::leaf_match: Looking for " << n << " in: " << btp->d_name() << endl);
+        // Look for the d_name in the dataset's top-level
         if (btp->name() == n) {
-            DBG(cerr << "Found " << n << " in: " << btp->name() << endl);
+            DBG(cerr << "Found " << n << " in: " << btp->d_name() << endl);
             return btp;
         }
 
         if (btp->is_constructor_type()) {
             BaseType *found = btp->var(n, false, s);
             if (found) {
-                DBG(cerr << "Found " << n << " in: " << btp->name() << endl);
+                DBG(cerr << "Found " << n << " in: " << btp->d_name() << endl);
                 return found;
             }
         }
@@ -631,7 +727,7 @@ DDS::leaf_match(const string &n, BaseType::btp_stack *s)
             s->push(btp);
             BaseType *found = btp->var()->var(n, false, s);
             if (found) {
-                DBG(cerr << "Found " << n << " in: " << btp->var()->name() << endl);
+                DBG(cerr << "Found " << n << " in: " << btp->var()->d_name() << endl);
                 return found;
             }
         }
@@ -646,10 +742,10 @@ DDS::exact_match(const string &name, BaseType::btp_stack *s)
 {
     for (Vars_iter i = vars.begin(); i != vars.end(); i++) {
         BaseType *btp = *i;
-        DBG2(cerr << "Looking for " << name << " in: " << btp << endl);
-        // Look for the name in the current ctor type or the top level
+        DBG2(cerr << "Looking for " << d_name << " in: " << btp << endl);
+        // Look for the d_name in the current ctor type or the top level
         if (btp->name() == name) {
-            DBG2(cerr << "Found " << name << " in: " << btp << endl);
+            DBG2(cerr << "Found " << d_name << " in: " << btp << endl);
             return btp;
         }
     }
@@ -723,6 +819,10 @@ DDS::get_var_index(int i)
 void
 DDS::insert_var(Vars_iter i, BaseType *ptr)
 {
+#if 0
+    if (ptr->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 DDS.");
+#endif
     vars.insert(i, ptr->ptr_duplicate());
 }
 
@@ -736,6 +836,10 @@ DDS::insert_var(Vars_iter i, BaseType *ptr)
 void
 DDS::insert_var_nocopy(Vars_iter i, BaseType *ptr)
 {
+#if 0
+    if (ptr->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 DDS.");
+#endif
     vars.insert(i, ptr);
 }
 
@@ -788,7 +892,7 @@ DDS::tag_nested_sequences()
     }
 }
 
-/** @brief Parse a DDS from a file with the given name. */
+/** @brief Parse a DDS from a file with the given d_name. */
 void
 DDS::parse(string fname)
 {
@@ -851,7 +955,7 @@ DDS::parse(FILE *in)
 
     parser_arg arg(this);
 
-    bool status = ddsparse((void *) & arg) == 0;
+    bool status = ddsparse(&arg) == 0;
 
     dds_delete_buffer(buffer);
 
@@ -865,29 +969,14 @@ DDS::parse(FILE *in)
     }
 }
 
-#if FILE_METHODS
 /** @brief Print the entire DDS to the specified file. */
 void
 DDS::print(FILE *out)
 {
-#if 0
     ostringstream oss;
     print(oss);
-
-    fwrite(oss.str().c_str(), oss.str().length(), 1, out);
-#else
-    fprintf(out, "Dataset {\n") ;
-
-    for (Vars_citer i = vars.begin(); i != vars.end(); i++) {
-        (*i)->print_decl(out) ;
-    }
-
-    fprintf(out, "} %s;\n", id2www(name).c_str()) ;
-
-    return ;
-#endif
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 /** @brief Print the entire DDS to the specified ostream. */
 void
@@ -899,7 +988,7 @@ DDS::print(ostream &out)
         (*i)->print_decl(out) ;
     }
 
-    out << "} " << id2www(name) << ";\n" ;
+    out << "} " << id2www(d_name) << ";\n" ;
 
     return ;
 }
@@ -926,7 +1015,6 @@ DDS::print_das(ostream &out)
     out << "}\n" ;
 }
 
-#if FILE_METHODS
 /** @brief Print a constrained DDS to the specified file.
 
     Print those parts (variables) of the DDS structure to OS that
@@ -940,20 +1028,10 @@ DDS::print_das(ostream &out)
 void
 DDS::print_constrained(FILE *out)
 {
-    fprintf(out, "Dataset {\n") ;
-
-    for (Vars_citer i = vars.begin(); i != vars.end(); i++) {
-        // for each variable, indent with four spaces, print a trailing
-        // semicolon, do not print debugging information, print only
-        // variables in the current projection.
-        (*i)->print_decl(out, "    ", true, false, true) ;
-    }
-
-    fprintf(out, "} %s;\n", id2www(name).c_str()) ;
-
-    return;
+    ostringstream oss;
+    print_constrained(oss);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 /** @brief Print a constrained DDS to the specified ostream.
 
@@ -977,26 +1055,11 @@ DDS::print_constrained(ostream &out)
         (*i)->print_decl(out, "    ", true, false, true) ;
     }
 
-    out << "} " << id2www(name) << ";\n" ;
+    out << "} " << id2www(d_name) << ";\n" ;
 
     return;
 }
 
-#if FILE_METHODS
-class VariablePrintXML : public unary_function<BaseType *, void>
-{
-    FILE *d_out;
-    bool d_constrained;
-public:
-    VariablePrintXML(FILE *out, bool constrained)
-            : d_out(out), d_constrained(constrained)
-    {}
-    void operator()(BaseType *bt)
-    {
-        bt->print_xml(d_out, "    ", d_constrained);
-    }
-};
-
 /** Print an XML representation of this DDS. This method is used to generate
     the part of the DDX response. The \c Dataset tag is \e not written by
     this code. The caller of this method must handle writing that and
@@ -1013,74 +1076,8 @@ DDS::print_xml(FILE *out, bool constrained, const string &blob)
 {
     ostringstream oss;
     print_xml_writer(oss, constrained, blob);
-
-    string doc = oss.str();
-    fwrite(doc.data(), 1, doc.length(), out);
-
-#if 0
-    fprintf(out, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
-
-    fprintf(out, "<Dataset name=\"%s\"\n", id2xml(name).c_str());
-
-    fprintf(out, "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");
-
-    fprintf(out,"method=\"FILE*\"\n");
-    fprintf(out, "dap_major=\"%d\"\n", get_dap_major());
-    fprintf(out, "dap_minor=\"%d\"\n", get_dap_minor());
-
-    // Are we responding to a 3.2 or 2.0 client? We will have to improve on
-    // this at some point... jhrg
-    if (get_dap_major() == 3 && get_dap_minor() == 2) {
-    fprintf(out, "xmlns=\"%s\"\n", c_dap32_namespace.c_str());
-
-    fprintf(out, "xsi:schemaLocation=\"%s  %s\">\n\n",
-            c_dap32_namespace.c_str(), c_default_dap32_schema_location.c_str());
-    }
-    else {
-        fprintf(out, "xmlns=\"%s\"\n", c_dap20_namespace.c_str());
-        fprintf(out, "xsi:schemaLocation=\"%s  %s\">\n\n",
-                c_dap20_namespace.c_str(), c_default_dap20_schema_location.c_str());
-    }
-
-
-    d_attr.print_xml(out, "    ", constrained);
-
-    fprintf(out, "\n");
-
-    for_each(var_begin(), var_end(), VariablePrintXML(out, constrained));
-
-    fprintf(out, "\n");
-
-    // Only print this for the 2.0, 3.0 and 3.1 versions - which are essentially
-    // the same. jhrg
-    if (get_dap_major() == 2 && get_dap_minor() == 0) {
-        fprintf(out, "    <dataBLOB href=\"\"/>\n");
-    }
-    else if (!blob.empty()
-	     && (get_dap_major() == 3 && get_dap_minor() >= 2)
-	     || get_dap_major() >= 4) {
-	fprintf(out, "    <blob href=\"cid:%s\"/>\n", blob.c_str());
-    }
-
-
-    fprintf(out, "</Dataset>\n");
-#endif
+    fwrite(oss.str().data(), 1, oss.str().length(), out);
 }
-#endif
-
-class VariablePrintXMLStrm : public unary_function<BaseType *, void>
-{
-    ostream &d_out;
-    bool d_constrained;
-public:
-    VariablePrintXMLStrm(ostream &out, bool constrained)
-            : d_out(out), d_constrained(constrained)
-    {}
-    void operator()(BaseType *bt)
-    {
-        bt->print_xml(d_out, "    ", d_constrained);
-    }
-};
 
 /** Print an XML representation of this DDS. This method is used to generate
     the part of the DDX response. The \c Dataset tag is \e not written by
@@ -1097,67 +1094,6 @@ void
 DDS::print_xml(ostream &out, bool constrained, const string &blob)
 {
     print_xml_writer(out, constrained, blob);
-
-#if 0
-    out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ;
-
-    out << "<Dataset name=\"" << id2xml(name) << "\"\n" ;
-
-    out << "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" ;
-
-    // Are we responding to a 3.2 or 2.0 client? We will have to improve on
-    // this at some point... jhrg
-    if (get_dap_major() == 3 && get_dap_minor() == 2) {
-        out << "xsi:schemaLocation=\"" << c_dap32_namespace
-            << "  " << c_default_dap32_schema_location << "\"\n" ;
-
-        out << "xmlns:grddl=\"http://www.w3.org/2003/g/data-view#\"\n";
-        out << "grddl:transformation=\"" << grddl_transformation_dap32 <<"\"\n";
-
-        out << "xmlns=\"" << c_dap32_namespace << "\"\n" ;
-        out << "xmlns:dap=\"" << c_dap32_namespace << "\"\n" ;
-
-        out << "dapVersion=\"" << get_dap_major() << "."
-            << get_dap_minor() << "\"";
-
-        if (!get_request_xml_base().empty()) {
-            out << "\n";
-            out << "xmlns:xml=\"" << c_xml_namespace << "\"\n";
-            out << "xml:base=\"" << get_request_xml_base() << "\"";
-        }
-
-        // Close the Dataset element
-        out << ">\n";
-    }
-    else {
-        out << "xmlns=\"" << c_dap20_namespace << "\"\n" ;
-        out << "xsi:schemaLocation=\"" << c_dap20_namespace
-            << "  " << c_default_dap20_schema_location << "\">\n\n" ;
-    }
-
-    d_attr.print_xml(out, "    ", constrained);
-
-    out << "\n" ;
-
-    for_each(var_begin(), var_end(), VariablePrintXMLStrm(out, constrained));
-
-    out << "\n" ;
-
-    // Only print this for the 2.0, 3.0 and 3.1 versions - which are essentially
-    // the same.
-    // For DAP 3.2 and greater, use the new syntax and value. The 'blob' is
-    // actually the CID of the MIME part that holds the data.
-    if (get_dap_major() == 2 && get_dap_minor() == 0) {
-        out << "    <dataBLOB href=\"\"/>\n" ;
-    }
-    else if (!blob.empty()
-         && (get_dap_major() == 3 && get_dap_minor() >= 2)
-         || get_dap_major() >= 4) {
-    out << "    <blob href=\"cid:" << blob << "\"/>\n";
-    }
-
-    out << "</Dataset>\n" ;
-#endif
 }
 
 class VariablePrintXMLWriter : public unary_function<BaseType *, void>
@@ -1174,22 +1110,58 @@ public:
     }
 };
 
-
+/**
+ * Print the DDX. This code uses the libxml2 'TextWriter' interface; something
+ * that seems to be a good compromise between doing it by hand (although more
+ * verbose it is also more reliable) and DOM.
+ *
+ * @note This code handles several different versions of DAP in a fairly
+ * crude way. I've broken it up into three different responses: DAP2, DAP3.2
+ * and DAP4.
+ *
+ * @param out Write the XML to this output sink
+ * @param constrained True if the only variables to print are those in the
+ * current projection. If true, this will also suppress printing attributes.
+ * @param blob This is an href (DAP2) or a cid (DAP3.4 and 4). The href
+ * points to the binary data; the cid is the M-MIME separator for the binary
+ * data.
+ */
 void
 DDS::print_xml_writer(ostream &out, bool constrained, const string &blob)
 {
     XMLWriter xml("    ");
 
-    if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "Dataset") < 0)
-        throw InternalErr(__FILE__, __LINE__, "Could not write Dataset element");
-    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)name.c_str()) < 0)
-        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
-    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xmlns:xsi", (const xmlChar*)"http://www.w3.org/2001/XMLSchema-instance") < 0)
-        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns:xsi");
+    // Stamp and repeat for these sections; trying to economize is makes it
+    // even more confusing
+    if (get_dap_major() >= 4) {
+        if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "Group") < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write Group element");
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)d_name.c_str()) < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
+
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "dapVersion", (const xmlChar*)get_dap_version().c_str()) < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for dapVersion");
+
+        if (!get_request_xml_base().empty()) {
+            if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xmlns:xml", (const xmlChar*)c_xml_namespace.c_str()) < 0)
+                throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns:xml");
+
+            if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xml:base", (const xmlChar*)get_request_xml_base().c_str()) < 0)
+                throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xml:base");
+        }
+        if (!get_namespace().empty()) {
+            if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xmlns", (const xmlChar*)get_namespace().c_str()) < 0)
+                throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns");
+        }
+    }
+    else if (get_dap_major() == 3 && get_dap_minor() >= 2) {
+        if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "Dataset") < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write Dataset element");
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)d_name.c_str()) < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xmlns:xsi", (const xmlChar*)"http://www.w3.org/2001/XMLSchema-instance") < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns:xsi");
 
-    // Are we responding to a 3.2 or 2.0 client? We will have to improve on
-    // this at some point... jhrg
-    if (get_dap_major() == 3 && get_dap_minor() == 2) {
         if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xsi:schemaLocation", (const xmlChar*)c_dap_32_n_sl.c_str()) < 0)
             throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns:schemaLocation");
 
@@ -1215,7 +1187,14 @@ DDS::print_xml_writer(ostream &out, bool constrained, const string &blob)
                 throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xml:base");
         }
     }
-    else {
+    else { // dap2
+        if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "Dataset") < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write Dataset element");
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)d_name.c_str()) < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for d_name");
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xmlns:xsi", (const xmlChar*)"http://www.w3.org/2001/XMLSchema-instance") < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns:xsi");
+
         if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xmlns", (const xmlChar*)c_dap20_namespace.c_str()) < 0)
             throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns");
 
@@ -1229,30 +1208,38 @@ DDS::print_xml_writer(ostream &out, bool constrained, const string &blob)
     // Print each variable
     for_each(var_begin(), var_end(), VariablePrintXMLWriter(xml, constrained));
 
-    // Only print this for the 2.0, 3.0 and 3.1 versions - which are essentially
-    // the same.
     // For DAP 3.2 and greater, use the new syntax and value. The 'blob' is
-    // actually the CID of the MIME part that holds the data.
-    // FIXME cerr
-    cerr << "blob: " << blob << ", " << "dap major, minor: " << get_dap_major() << ", " << get_dap_minor() << endl;
-
-    if (get_dap_major() == 2 && get_dap_minor() == 0) {
-        if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "dataBLOB") < 0)
-            throw InternalErr(__FILE__, __LINE__, "Could not write dataBLOB element");
-        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "href", (const xmlChar*)"") < 0)
-            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
-        if (xmlTextWriterEndElement(xml.get_writer()) < 0)
-            throw InternalErr(__FILE__, __LINE__, "Could not end dataBLOB element");
+    // the CID of the MIME part that holds the data. For DAP2 (which includes
+    // 3.0 and 3.1), the blob is an href. For DAP4, only write the CID if it's
+    // given.
+    if (get_dap_major() >= 4) {
+        if (!blob.empty()) {
+            if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "blob") < 0)
+                throw InternalErr(__FILE__, __LINE__, "Could not write blob element");
+            string cid = "cid:" + blob;
+            if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "href", (const xmlChar*) cid.c_str()) < 0)
+                throw InternalErr(__FILE__, __LINE__, "Could not write attribute for d_name");
+            if (xmlTextWriterEndElement(xml.get_writer()) < 0)
+                throw InternalErr(__FILE__, __LINE__, "Could not end blob element");
+        }
     }
-    else if (!blob.empty() && (get_dap_major() == 3 && get_dap_minor() >= 2)  || get_dap_major() >= 4) {
+    else if (get_dap_major() == 3 && get_dap_minor() >= 2) {
         if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "blob") < 0)
             throw InternalErr(__FILE__, __LINE__, "Could not write blob element");
-        string cid="cid:" + blob;
-        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "href", (const xmlChar*)cid.c_str()) < 0)
-            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
+        string cid = "cid:" + blob;
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "href", (const xmlChar*) cid.c_str()) < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for d_name");
         if (xmlTextWriterEndElement(xml.get_writer()) < 0)
             throw InternalErr(__FILE__, __LINE__, "Could not end blob element");
     }
+    else { // dap2
+        if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "dataBLOB") < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write dataBLOB element");
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "href", (const xmlChar*) "") < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for d_name");
+        if (xmlTextWriterEndElement(xml.get_writer()) < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not end dataBLOB element");
+    }
 
     if (xmlTextWriterEndElement(xml.get_writer()) < 0)
         throw InternalErr(__FILE__, __LINE__, "Could not end Dataset element");
@@ -1260,6 +1247,92 @@ DDS::print_xml_writer(ostream &out, bool constrained, const string &blob)
     out << xml.get_doc();// << ends;// << endl;
 }
 
+/**
+ * Print the DAP4 DMR object.
+ * This method prints the DMR. If the dap version is not >= 4.0, it's an
+ * error to call this method.
+ *
+ * @note Calling methods that print the DDS or DDX when get_dap_major()
+ * returns a value >= 4 is undefined. Use this method to get the DAP4
+ * metadata response.
+ *
+ * @param out Write the XML to this stream
+ * @param constrained Should the DMR be subject to a constraint?
+ */
+void
+DDS::print_dmr(ostream &out, bool constrained)
+{
+    if (get_dap_major() < 4)
+        throw InternalErr(__FILE__, __LINE__, "Tried to print a DMR with DAP major version less than 4");
+
+    XMLWriter xml("    ");
+
+    // DAP4 wraps a dataset in a top-level Group element.
+    if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "Group") < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write Group element");
+
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xmlns:xml",
+            (const xmlChar*) c_xml_namespace.c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns:xml");
+
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xmlns:xsi", (const xmlChar*) c_xml_xsi.c_str())
+            < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns:xsi");
+
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xsi:schemaLocation",
+            (const xmlChar*) c_dap_40_n_sl.c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns:schemaLocation");
+
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xmlns",
+            (const xmlChar*) get_namespace().c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xmlns");
+
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "dapVersion",
+            (const xmlChar*) get_dap_version().c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for dapVersion");
+
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "dmrVersion", (const xmlChar*) get_dmr_version().c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for dapVersion");
+
+    if (!get_request_xml_base().empty()) {
+        if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "xml:base",
+                (const xmlChar*) get_request_xml_base().c_str()) < 0)
+            throw InternalErr(__FILE__, __LINE__, "Could not write attribute for xml:base");
+    }
+
+    if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*) d_name.c_str()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
+
+    // Print the global attributes
+    d_attr.print_xml_writer(xml);
+
+    // Print each variable
+    for_each(var_begin(), var_end(), VariablePrintXMLWriter(xml, constrained));
+
+#if 0
+    // For DAP 3.2 and greater, use the new syntax and value. The 'blob' is
+    // the CID of the MIME part that holds the data. For DAP2 (which includes
+    // 3.0 and 3.1), the blob is an href. For DAP4, only write the CID if it's
+    // given.
+    if (get_dap_major() >= 4) {
+        if (!blob.empty()) {
+            if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "blob") < 0)
+                throw InternalErr(__FILE__, __LINE__, "Could not write blob element");
+            string cid = "cid:" + blob;
+            if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "href", (const xmlChar*) cid.c_str()) < 0)
+                throw InternalErr(__FILE__, __LINE__, "Could not write attribute for d_name");
+            if (xmlTextWriterEndElement(xml.get_writer()) < 0)
+                throw InternalErr(__FILE__, __LINE__, "Could not end blob element");
+        }
+    }
+#endif
+
+    if (xmlTextWriterEndElement(xml.get_writer()) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Could not end the top-level Group element");
+
+    out << xml.get_doc();
+}
+
 // Used by DDS::send() when returning data from a function call.
 /** @brief Check the semantics of each of the variables represented in the
     DDS.
@@ -1278,14 +1351,14 @@ DDS::print_xml_writer(ostream &out, bool constrained, const string &blob)
 bool
 DDS::check_semantics(bool all)
 {
-    // The dataset must have a name
-    if (name == "") {
-        cerr << "A dataset must have a name" << endl;
+    // The dataset must have a d_name
+    if (d_name == "") {
+        cerr << "A dataset must have a d_name" << endl;
         return false;
     }
 
     string msg;
-    if (!unique_names(vars, name, "Dataset", msg))
+    if (!unique_names(vars, d_name, "Dataset", msg))
         return false;
 
     if (all)
@@ -1324,6 +1397,7 @@ DDS::check_semantics(bool all)
 bool
 DDS::mark(const string &n, bool state)
 {
+    // TODO use auto_ptr
     BaseType::btp_stack *s = new BaseType::btp_stack;
 
     DBG2(cerr << "DDS::mark: Looking for " << n << endl);
@@ -1336,7 +1410,7 @@ DDS::mark(const string &n, bool state)
     }
     variable->set_send_p(state);
 
-    DBG2(cerr << "DDS::mark: Set variable " << variable->name()
+    DBG2(cerr << "DDS::mark: Set variable " << variable->d_name()
             << " (a " << variable->type_name() << ")" << endl);
 
     // Now check the btp_stack and run BaseType::set_send_p for every
@@ -1346,7 +1420,7 @@ DDS::mark(const string &n, bool state)
     while (!s->empty()) {
         s->top()->BaseType::set_send_p(state);
 
-        DBG2(cerr << "DDS::mark: Set variable " << s->top()->name()
+        DBG2(cerr << "DDS::mark: Set variable " << s->top()->d_name()
                 << " (a " << s->top()->type_name() << ")" << endl);
         // FIXME get_parent() hosed?
 #if 1
@@ -1387,7 +1461,7 @@ DDS::dump(ostream &strm) const
     strm << DapIndent::LMarg << "DDS::dump - ("
     << (void *)this << ")" << endl ;
     DapIndent::Indent() ;
-    strm << DapIndent::LMarg << "name: " << name << endl ;
+    strm << DapIndent::LMarg << "d_name: " << d_name << endl ;
     strm << DapIndent::LMarg << "filename: " << d_filename << endl ;
     strm << DapIndent::LMarg << "protocol major: " << d_dap_major << endl;
     strm << DapIndent::LMarg << "protocol minor: " << d_dap_minor << endl;
diff --git a/DDS.h b/DDS.h
index a2219c5..d9d45ca 100644
--- a/DDS.h
+++ b/DDS.h
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -72,8 +72,6 @@
 
 using std::cout;
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -184,29 +182,30 @@ class DDS : public DapObj
 private:
     BaseTypeFactory *d_factory;
 
-    string name;                // The dataset name
-    string d_filename;		    // File name (or other OS identifier) for
-    string d_container_name;	// name of container structure
-    Structure *d_container; 	// current container for container name
+    string d_name;                // The dataset d_name
+    string d_filename;		    // File d_name (or other OS identifier) for
+    string d_container_name;	// d_name of container structure
+    Structure *d_container; 	// current container for container d_name
 				                // dataset or part of dataset.
 
     int d_dap_major;       	    // The protocol major version number
     int d_dap_minor;       	    // ... and minor version number
     string d_dap_version; 	    // String version of the protocol
     string d_request_xml_base;
+    string d_namespace;
 
     AttrTable d_attr;           // Global attributes.
 
     vector<BaseType *> vars;    // Variables at the top level
 
-    // BaseType *find_hdf4_dimension_attribute_home(AttrTable::entry *source);
-
     int d_timeout;              // alarm time in seconds. If greater than
                                 // zero, raise the alarm signal if more than
                                 // d_timeout seconds are spent reading data.
     Keywords d_keywords;	    // Holds keywords parsed from the CE
 
-    long d_max_response_size;   // In bytes
+    long d_max_response_size;   // In bytes...
+
+
 
     friend class DDSTest;
 
@@ -220,7 +219,8 @@ public:
     typedef std::vector<BaseType *>::iterator Vars_iter ;
     typedef std::vector<BaseType *>::reverse_iterator Vars_riter ;
 
-    DDS(BaseTypeFactory *factory, const string &n = "");
+    DDS(BaseTypeFactory *factory, const string &name = "");
+    DDS(BaseTypeFactory *factory, const string &name, const string &version);
     DDS(const DDS &dds);
 
     virtual ~DDS();
@@ -264,16 +264,17 @@ public:
     /// Get the DAP minor version as sent by the client
     int get_dap_minor() const { return d_dap_minor; }
 
-    /// Set the DAP major version (typically using info from the client)
+    void set_dap_version(const string &version_string = "2.0");
+    string get_dap_version() const { return d_dap_version; }
+    string get_dmr_version() const { return "1.0"; }
+
+    /// @deprecated
     void set_dap_major(int p);
-    /// Set the DAP minor version (typically using info from the client)
+    /// @deprecated
     void set_dap_minor(int p);
-
-    void set_dap_version(const string &version_string);
+    /// @deprecated
     void set_dap_version(double d);
 
-    string get_dap_version() const { return d_dap_version; }
-
     Keywords &get_keywords() { return d_keywords; }
 
     /// Get the URL that will return this DDS/DDX/DataThing
@@ -282,6 +283,12 @@ public:
     /// @see get_request_xml_base
     void set_request_xml_base(const string &xb) { d_request_xml_base = xb; }
 
+    /// Get the namespace associated with the DDS - likely set only by DDX responses
+    string get_namespace() const { return d_namespace; }
+
+    /// Set the namespace for this DDS/DDX object/response
+    void set_namespace(const string &ns) { d_namespace = ns; }
+
     /// Get the maximum response size, in KB. Zero indicates no limit.
     long get_response_limit() { return d_max_response_size; }
 
@@ -332,20 +339,27 @@ public:
     void set_timeout(int t);
     int get_timeout();
 
+    // These parse the DAP2 curly-brace document and make a C++ object.
     void parse(string fname);
     void parse(int fd);
     void parse(FILE *in = stdin);
-#if FILE_METHODS
+
+    // These print the Binary object in either the curly-brace or XML reps
     void print(FILE *out);
     void print_constrained(FILE *out);
     void print_xml(FILE *out, bool constrained, const string &blob = "");
-#endif
+
+    // Same as above, but using C++ i/o streams
     void print(ostream &out);
     void print_constrained(ostream &out);
     void print_xml(ostream &out, bool constrained, const string &blob = "");
 
+    // Print the XML using libxml2; the other print_xml methods use this impl.
     void print_xml_writer(ostream &out, bool constrained, const string &blob = "");
 
+    // Print the DAP4 DMR 'object'
+    void print_dmr(ostream &out, bool constrained);
+
     void print_das(ostream &out);
 
     void mark_all(bool state);
diff --git a/DDXExceptions.h b/DDXExceptions.h
index 89dbf77..0a63ac0 100644
--- a/DDXExceptions.h
+++ b/DDXExceptions.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/DDXParserSAX2.cc b/DDXParserSAX2.cc
index f99d328..96b8902 100644
--- a/DDXParserSAX2.cc
+++ b/DDXParserSAX2.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -54,7 +54,8 @@
 
 namespace libdap {
 
-static const not_used char *states[] =
+#if defined(DODS_DEBUG) || defined(DODS_DEUG2)
+static const char *states[] =
     {
         "start",
 
@@ -83,7 +84,7 @@ static const not_used char *states[] =
         "unknown",
         "error"
     };
-
+#endif
 // Glue the BaseTypeFactory to the enum-based factory defined statically
 // here.
 
@@ -147,6 +148,7 @@ BaseType *DDXParser::factory(Type t, const string & name)
     }
 }
 
+#if 0
 /** Get the Type enumeration value which matches the given name. */
 static Type get_type(const char *name)
 {
@@ -191,7 +193,10 @@ static Type get_type(const char *name)
 
     return dods_null_c;
 }
+#endif
 
+#if 0
+// Not used. jhrg 1/17/13
 static Type is_simple_type(const char *name)
 {
     Type t = get_type(name);
@@ -210,6 +215,7 @@ static Type is_simple_type(const char *name)
         return dods_null_c;
     }
 }
+#endif
 
 static bool is_not(const char *name, const char *tag)
 {
@@ -437,8 +443,9 @@ DDXParser::is_attribute_or_alias(const char *name, const xmlChar **attrs,
 inline bool DDXParser::is_variable(const char *name, const xmlChar **attrs,
         int nb_attributes)
 {
-    Type t;
-    if ((t = is_simple_type(name)) != dods_null_c) {
+    Type t = get_type(name);
+    //if ((t = is_simple_type(name)) != dods_null_c) {
+    if (is_simple_type(t)) {
         process_variable(t, inside_simple_type, attrs, nb_attributes);
         return true;
     }
@@ -486,10 +493,11 @@ void DDXParser::finish_variable(const char *tag, Type t, const char *expected)
     }
     // Once libxml2 validates, this can go away. 05/30/03 jhrg
     if (t == dods_array_c
-        && dynamic_cast < Array * >(btp)->dimensions() == 0) {
+        && static_cast<Array*>(btp)->dimensions() == 0) {
         DDXParser::ddx_fatal_error(this,
                                    "No dimension element included in the Array '%s'.",
                                    btp->name().c_str());
+        delete btp;
         return;
     }
 
@@ -501,10 +509,12 @@ void DDXParser::finish_variable(const char *tag, Type t, const char *expected)
                                    tag,
                                    bt_stack.top()->type_name().c_str(),
                                    bt_stack.top()->name().c_str());
+        delete btp;
         return;
     }
 
     parent->add_var(btp);
+    delete btp;
 }
 
 /** @name SAX Parser Callbacks
@@ -546,22 +556,24 @@ void DDXParser::ddx_end_document(void * p)
          endl);
 
     if (parser->get_state() != parser_start)
-        DDXParser::ddx_fatal_error(parser,
-                                   "The document contained unbalanced tags.");
+        DDXParser::ddx_fatal_error(parser, "The document contained unbalanced tags.");
 
     // If we've found any sort of error, don't make the DDX; intern() will
     // take care of the error.
-    if (parser->get_state() == parser_error)
+    if (parser->get_state() == parser_error) {
+    	delete parser->bt_stack.top();
         return;
+    }
 
     // Pop the temporary Structure off the stack and transfer its variables
     // to the DDS.
     Constructor *cp = dynamic_cast < Constructor * >(parser->bt_stack.top());
     if (!cp) {
     	ddx_fatal_error(parser, "Parse error: Expected a Structure, Sequence or Grid variable.");
+    	delete cp;
 		return;
     }
-    
+
     for (Constructor::Vars_iter i = cp->var_begin(); i != cp->var_end(); ++i) {
         (*i)->set_parent(0);        // top-level vars have no parents
         parser->dds->add_var(*i);
@@ -899,8 +911,9 @@ void DDXParser::ddx_sax2_end_element(void *p, const xmlChar *l,
         parser->pop_state();
         break;
 
-    case inside_simple_type:
-        if (is_simple_type(localname) != dods_null_c) {
+    case inside_simple_type: {
+        Type t = get_type(localname);
+        if (is_simple_type(t)) {
             parser->pop_state();
             BaseType *btp = parser->bt_stack.top();
             parser->bt_stack.pop();
@@ -908,8 +921,10 @@ void DDXParser::ddx_sax2_end_element(void *p, const xmlChar *l,
 
             BaseType *parent = parser->bt_stack.top();
 
-            if (parent->is_vector_type() || parent->is_constructor_type())
+            if (parent->is_vector_type() || parent->is_constructor_type()) {
                 parent->add_var(btp);
+                delete btp;
+            }
             else
                 DDXParser::ddx_fatal_error(parser,
                                            "Tried to add the simple-type variable '%s' to a non-constructor type (%s %s).",
@@ -924,6 +939,7 @@ void DDXParser::ddx_sax2_end_element(void *p, const xmlChar *l,
                                        "Expected an end tag for a simple type; found '%s' instead.",
                                        localname);
         break;
+    }
 
     case inside_array:
         parser->finish_variable(localname, dods_array_c, "Array");
@@ -1107,13 +1123,82 @@ void DDXParser::cleanup_parse(xmlParserCtxtPtr & context) const
     xmlFreeParserCtxt(context);
 }
 
+/** Read a DDX from a C++ input stream and populate a DDS object.
+ *
+ * @param in
+ * @param dds
+ * @param cid
+ * @param boundary
+ */
+void DDXParser::intern_stream(istream &in, DDS *dest_dds, string &cid, const string &boundary)
+{
+    // Code example from libxml2 docs re: read from a stream.
+    if (!in || in.eof())
+        throw InternalErr(__FILE__, __LINE__, "Input stream not open or read error");
+
+    const int size = 1024;
+    char chars[size + 1];
+
+    // int res = fread(chars, 1, 4, in);
+    in.readsome(chars, 4);
+    int res = in.gcount();
+    if (res > 0) {
+        chars[4]='\0';
+        xmlParserCtxtPtr context = xmlCreatePushParserCtxt(NULL, NULL, chars, res, "stream");
+
+        ctxt = context;         // need ctxt for error messages
+        dds = dest_dds;         // dump values here
+        blob_href = &cid; 	// cid goes here
+
+        xmlSAXHandler ddx_sax_parser;
+        memset( &ddx_sax_parser, 0, sizeof(xmlSAXHandler) );
+
+        ddx_sax_parser.getEntity = &DDXParser::ddx_get_entity;
+        ddx_sax_parser.startDocument = &DDXParser::ddx_start_document;
+        ddx_sax_parser.endDocument = &DDXParser::ddx_end_document;
+        ddx_sax_parser.characters = &DDXParser::ddx_get_characters;
+        ddx_sax_parser.ignorableWhitespace = &DDXParser::ddx_ignoreable_whitespace;
+        ddx_sax_parser.cdataBlock = &DDXParser::ddx_get_cdata;
+        ddx_sax_parser.warning = &DDXParser::ddx_fatal_error;
+        ddx_sax_parser.error = &DDXParser::ddx_fatal_error;
+        ddx_sax_parser.fatalError = &DDXParser::ddx_fatal_error;
+        ddx_sax_parser.initialized = XML_SAX2_MAGIC;
+        ddx_sax_parser.startElementNs = &DDXParser::ddx_sax2_start_element;
+        ddx_sax_parser.endElementNs = &DDXParser::ddx_sax2_end_element;
+
+        context->sax = &ddx_sax_parser;
+        context->userData = this;
+        context->validate = true;
+
+        in.getline(chars, size);	// chars has size+1 elements
+        res = in.gcount();
+        chars[res-1] = '\n';		// libxml needs the newline; w/o it the parse will fail
+        chars[res] = '\0';
+        while (res > 0 && !is_boundary(chars, boundary)) {
+        	DBG(cerr << "line (" << res << "): " << chars << endl);
+        	xmlParseChunk(ctxt, chars, res, 0);
+
+        	in.getline(chars, size);	// chars has size+1 elements
+        	res = in.gcount();
+        	if (res > 0) {
+        		chars[res-1] = '\n';
+        		chars[res] = '\0';
+        	}
+        }
+
+        // This call ends the parse: The fourth argument of xmlParseChunk is
+        // the bool 'terminate.'
+        xmlParseChunk(ctxt, chars, 0, 1);
+
+        cleanup_parse(context);
+    }
+}
+
 /** @brief Read the DDX from a stream instead of a file.
     @see DDXParser::intern(). */
-void DDXParser::intern_stream(FILE *in, DDS *dest_dds, string &cid,
-	const string &boundary)
+void DDXParser::intern_stream(FILE *in, DDS *dest_dds, string &cid, const string &boundary)
 {
     // Code example from libxml2 docs re: read from a stream.
-
     if (!in || feof(in) || ferror(in))
         throw InternalErr(__FILE__, __LINE__,
                           "Input stream not open or read error");
@@ -1153,8 +1238,9 @@ void DDXParser::intern_stream(FILE *in, DDS *dest_dds, string &cid,
 
 
         while ((fgets(chars, size, in) > 0) && !is_boundary(chars, boundary)) {
-            chars[size-1] = '\0';
-            DBG(cerr << "line: " << chars << endl);
+            //chars[size-1] = '\0';
+            DBG(cerr << "line (" << strlen(chars) << "): " << chars << endl);
+
             xmlParseChunk(ctxt, chars, strlen(chars), 0);
         }
         // This call ends the parse: The fourth argument of xmlParseChunk is
diff --git a/DDXParserSAX2.h b/DDXParserSAX2.h
index 51b009f..5a6d9b4 100644
--- a/DDXParserSAX2.h
+++ b/DDXParserSAX2.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -240,8 +240,8 @@ public:
     {}
 
     void intern(const string &document, DDS *dest_dds, string &cid);
-    void intern_stream(FILE *in, DDS *dds, string &cid,
-		const string &boundary = "");
+    void intern_stream(FILE *in, DDS *dds, string &cid, const string &boundary = "");
+    void intern_stream(istream &in, DDS *dds, string &cid, const string &boundary = "");
 
     static void ddx_start_document(void *parser);
     static void ddx_end_document(void *parser);
diff --git a/DODSFilter.cc b/DODSFilter.cc
index c7f4ae9..6779e65 100644
--- a/DODSFilter.cc
+++ b/DODSFilter.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,10 +36,6 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: DODSFilter.cc 25112 2011-12-29 21:44:54Z jimg $"
-    };
-
 #include <signal.h>
 
 #ifndef WIN32
@@ -52,6 +48,7 @@ static char rcsid[] not_used =
 #endif
 
 #include <iostream>
+#include <sstream>
 #include <string>
 #include <algorithm>
 #include <cstdlib>
@@ -69,9 +66,6 @@ static char rcsid[] not_used =
 #include "util.h"
 #include "escaping.h"
 #include "DODSFilter.h"
-#if FILE_METHODS
-#include "XDRFileMarshaller.h"
-#endif
 #include "XDRStreamMarshaller.h"
 #include "InternalErr.h"
 
@@ -83,8 +77,6 @@ static char rcsid[] not_used =
 
 #define CRLF "\r\n"             // Change here, expr-test.cc and DODSFilter.cc
 
-//#undef FILE_METHODS
-
 using namespace std;
 
 namespace libdap {
@@ -286,11 +278,14 @@ DODSFilter::process_options(int argc, char *argv[])
             d_if_modified_since
             = static_cast<time_t>(strtol(getopt.optarg, NULL, 10));
             break;
-        case 'h': print_usage(); // exit(1);
+        case 'h': print_usage();
+            break;
+                                 // exit(1);
                                  // Removed 12/29/2011; exit should
                                  // not be called by a library. NB:
                                  // print_usage() throws Error.
         default: print_usage();  // Throws Error
+            break;
         }
     }
 
@@ -612,7 +607,6 @@ DODSFilter::get_timeout() const
     return d_timeout;
 }
 
-#if FILE_METHODS
 /** Use values of this instance to establish a timeout alarm for the server.
     If the timeout value is zero, do nothing.
 
@@ -636,9 +630,7 @@ DODSFilter::establish_timeout(FILE *stream) const
     }
 #endif
 }
-#endif
 
-// FIXME
 void
 DODSFilter::establish_timeout(ostream &stream) const
 {
@@ -683,7 +675,6 @@ DODSFilter::send_version_info() const
     do_version(d_cgi_ver, get_dataset_version());
 }
 
-#if FILE_METHODS
 /** This function formats and prints an ASCII representation of a
     DAS on stdout.  This has the effect of sending the DAS object
     back to the client program.
@@ -699,20 +690,10 @@ void
 DODSFilter::send_das(FILE *out, DAS &das, const string &anc_location,
                      bool with_mime_headers) const
 {
-    time_t das_lmt = get_das_last_modified_time(anc_location);
-    if (is_conditional()
-        && das_lmt <= get_request_if_modified_since()
-        && with_mime_headers) {
-        set_mime_not_modified(out);
-    }
-    else {
-        if (with_mime_headers)
-            set_mime_text(out, dods_das, d_cgi_ver, x_plain, das_lmt);
-        das.print(out);
-    }
-    fflush(out) ;
+    ostringstream oss;
+    send_das(oss, das, anc_location, with_mime_headers);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 /** This function formats and prints an ASCII representation of a
     DAS on stdout.  This has the effect of sending the DAS object
@@ -750,7 +731,6 @@ DODSFilter::send_das(DAS &das, const string &anc_location,
     send_das(cout, das, anc_location, with_mime_headers);
 }
 
-#if FILE_METHODS
 /** This function formats and prints an ASCII representation of a
     DDS on stdout.  When called by a CGI program, this has the
     effect of sending a DDS object back to the client
@@ -773,31 +753,10 @@ DODSFilter::send_dds(FILE *out, DDS &dds, ConstraintEvaluator &eval,
                      const string &anc_location,
                      bool with_mime_headers) const
 {
-    // If constrained, parse the constraint. Throws Error or InternalErr.
-    if (constrained)
-        eval.parse_constraint(d_ce, dds);
-
-    if (eval.functional_expression())
-        throw Error("Function calls can only be used with data requests. To see the structure of the underlying data source, reissue the URL without the function.");
-
-    time_t dds_lmt = get_dds_last_modified_time(anc_location);
-    if (is_conditional()
-        && dds_lmt <= get_request_if_modified_since()
-        && with_mime_headers) {
-        set_mime_not_modified(out);
-    }
-    else {
-        if (with_mime_headers)
-            set_mime_text(out, dods_dds, d_cgi_ver, x_plain, dds_lmt);
-        if (constrained)
-            dds.print_constrained(out);
-        else
-            dds.print(out);
-    }
-
-    fflush(out) ;
+    ostringstream oss;
+    send_dds(oss, dds, eval, constrained, anc_location, with_mime_headers);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 /** This function formats and prints an ASCII representation of a
     DDS on stdout.  When called by a CGI program, this has the
@@ -854,31 +813,16 @@ DODSFilter::send_dds(DDS &dds, ConstraintEvaluator &eval,
     send_dds(cout, dds, eval, constrained, anc_location, with_mime_headers);
 }
 
-#if FILE_METHODS
 // 'lmt' unused. Should it be used to supply a LMT or removed from the
 // method? jhrg 8/9/05
 void
 DODSFilter::functional_constraint(BaseType &var, DDS &dds,
                                   ConstraintEvaluator &eval, FILE *out) const
 {
-    fprintf(out, "Dataset {\n");
-    var.print_decl(out, "    ", true, false, true);
-    fprintf(out, "} function_value;\n");
-    fprintf(out, "Data:\n");
-
-    fflush(out);
-
-    XDRFileMarshaller m( out ) ;
-
-    try {
-        // In the following call to serialize, suppress CE evaluation.
-        var.serialize(eval, dds, m, false);
-    }
-    catch (Error &e) {
-        throw;
-    }
+    ostringstream oss;
+    functional_constraint(var, dds, eval, oss);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 // 'lmt' unused. Should it be used to supply a LMT or removed from the
 // method? jhrg 8/9/05
@@ -905,32 +849,14 @@ DODSFilter::functional_constraint(BaseType &var, DDS &dds,
     }
 }
 
-#if FILE_METHODS
 void
 DODSFilter::dataset_constraint(DDS & dds, ConstraintEvaluator & eval,
                                FILE * out, bool ce_eval) const
 {
-    // send constrained DDS
-    dds.print_constrained(out);
-    fprintf(out, "Data:\n");
-    fflush(out);
-
-    // Grab a stream that encodes using XDR.
-    XDRFileMarshaller m( out ) ;
-
-    try {
-        // Send all variables in the current projection (send_p())
-        for (DDS::Vars_iter i = dds.var_begin(); i != dds.var_end(); i++)
-            if ((*i)->send_p()) {
-                DBG(cerr << "Sending " << (*i)->name() << endl);
-                (*i)->serialize(eval, dds, m, ce_eval);
-            }
-    }
-    catch (Error & e) {
-        throw;
-    }
+    ostringstream oss;
+    dataset_constraint(dds, eval, oss, ce_eval);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 DODSFilter::dataset_constraint(DDS & dds, ConstraintEvaluator & eval,
@@ -977,7 +903,7 @@ DODSFilter::dataset_constraint_ddx(DDS & dds, ConstraintEvaluator & eval,
     string cid = string(&uuid[0]) + "@" + string(&domain[0]);
 
     // Send constrained DDX with a data blob reference
-    dds.print_xml(out, true, cid);
+    dds.print_xml_writer(out, true, cid);
 
     // Write the MPM headers for the data part of the response.
     set_mime_data_boundary(out, boundary, cid, dap4_data, binary);
@@ -998,7 +924,6 @@ DODSFilter::dataset_constraint_ddx(DDS & dds, ConstraintEvaluator & eval,
     }
 }
 
-#if FILE_METHODS
 /** Send the data in the DDS object back to the client program. The data is
     encoded using a Marshaller, and enclosed in a MIME document which is all sent
     to \c data_stream. If this is being called from a CGI, \c data_stream is
@@ -1020,77 +945,10 @@ DODSFilter::send_data(DDS & dds, ConstraintEvaluator & eval,
                       FILE * data_stream, const string & anc_location,
                       bool with_mime_headers) const
 {
-    // If this is a conditional request and the server should send a 304
-    // response, do that and exit. Otherwise, continue on and send the full
-    // response.
-    time_t data_lmt = get_data_last_modified_time(anc_location);
-    if (is_conditional()
-        && data_lmt <= get_request_if_modified_since()
-        && with_mime_headers) {
-        set_mime_not_modified(data_stream);
-        return;
-    }
-    // Set up the alarm.
-    establish_timeout(data_stream);
-    dds.set_timeout(d_timeout);
-
-    eval.parse_constraint(d_ce, dds);   // Throws Error if the ce doesn't
-					// parse.
-
-    dds.tag_nested_sequences(); // Tag Sequences as Parent or Leaf node.
-
-    // Start sending the response...
-
-    // Handle *functional* constraint expressions specially
-#if 0
-    if (eval.functional_expression()) {
-        // Get the result and then start sending the headers. This provides a
-        // way to send errors back to the client w/o colliding with the
-        // normal response headers. There's some duplication of code with this
-        // and the else-clause.
-        BaseType *var = eval.eval_function(dds, d_dataset);
-        if (!var)
-            throw Error(unknown_error, "Error calling the CE function.");
-
-#if COMPRESSION_FOR_SERVER3
-        if (with_mime_headers)
-            set_mime_binary(data_stream, dods_data, d_cgi_ver,
-                            (compress) ? deflate : x_plain, data_lmt);
-        fflush(data_stream);
-
-        int childpid;
-        if (compress)
-            data_stream = compressor(data_stream, childpid);
-#endif
-        if (with_mime_headers)
-            set_mime_binary(data_stream, dods_data, d_cgi_ver, x_plain, data_lmt);
-
-        fflush(data_stream);
-
-        functional_constraint(*var, dds, eval, data_stream);
-        delete var;
-        var = 0;
-    }
-#endif
-    if (eval.function_clauses()) {
-	DDS *fdds = eval.eval_function_clauses(dds);
-
-        if (with_mime_headers)
-            set_mime_binary(data_stream, dods_data, d_cgi_ver, x_plain, data_lmt);
-
-        dataset_constraint(*fdds, eval, data_stream, false);
-	delete fdds;
-    }
-    else {
-        if (with_mime_headers)
-            set_mime_binary(data_stream, dods_data, d_cgi_ver, x_plain, data_lmt);
-
-        dataset_constraint(dds, eval, data_stream);
-    }
-
-    fflush(data_stream);
+    ostringstream oss;
+    send_data(dds, eval, oss, anc_location, with_mime_headers);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), data_stream);
 }
-#endif
 
 /** Send the data in the DDS object back to the client program. The data is
     encoded using a Marshaller, and enclosed in a MIME document which is all sent
@@ -1173,7 +1031,6 @@ DODSFilter::send_data(DDS & dds, ConstraintEvaluator & eval,
     data_stream << flush ;
 }
 
-#if FILE_METHODS
 /** Send the DDX response. The DDX never contains data, instead it holds a
     reference to a Blob response which is used to get the data values. The
     DDS and DAS objects are built using code that already exists in the
@@ -1188,30 +1045,10 @@ void
 DODSFilter::send_ddx(DDS &dds, ConstraintEvaluator &eval, FILE *out,
                      bool with_mime_headers) const
 {
-    // If constrained, parse the constraint. Throws Error or InternalErr.
-    if (!d_ce.empty())
-        eval.parse_constraint(d_ce, dds);
-
-    if (eval.functional_expression())
-        throw Error("Function calls can only be used with data requests. To see the structure of the underlying data source, reissue the URL without the function.");
-
-    time_t dds_lmt = get_dds_last_modified_time(d_anc_dir);
-
-    // If this is a conditional request and the server should send a 304
-    // response, do that and exit. Otherwise, continue on and send the full
-    // response.
-    if (is_conditional() && dds_lmt <= get_request_if_modified_since()
-        && with_mime_headers) {
-        set_mime_not_modified(out);
-        return;
-    }
-    else {
-        if (with_mime_headers)
-            set_mime_text(out, dap4_ddx, d_cgi_ver, x_plain, dds_lmt);
-        dds.print_xml(out, !d_ce.empty(), "");
-    }
+    ostringstream oss;
+    send_ddx(dds, eval, oss, with_mime_headers);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 /** Send the DDX response. The DDX never contains data, instead it holds a
     reference to a Blob response which is used to get the data values. The
@@ -1247,7 +1084,7 @@ DODSFilter::send_ddx(DDS &dds, ConstraintEvaluator &eval, ostream &out,
     else {
         if (with_mime_headers)
             set_mime_text(out, dap4_ddx, d_cgi_ver, x_plain, dds_lmt);
-        dds.print_xml(out, !d_ce.empty(), "");
+        dds.print_xml_writer(out, !d_ce.empty(), "");
     }
 }
 
diff --git a/DODSFilter.h b/DODSFilter.h
index 294828c..4b6b2bc 100644
--- a/DODSFilter.h
+++ b/DODSFilter.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -46,8 +46,6 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -214,7 +212,6 @@ public:
                            const string &anc_location = "",
                            bool with_mime_headers = true) const;
 
-#if FILE_METHODS
     virtual void establish_timeout(FILE *stream) const;
     virtual void send_das(FILE *out, DAS &das, const string &anc_location = "",
                           bool with_mime_headers = true) const;
@@ -234,7 +231,6 @@ public:
                            bool with_mime_headers = true) const;
     virtual void send_ddx(DDS &dds, ConstraintEvaluator &eval, FILE *out,
                           bool with_mime_headers = true) const;
-#endif
 };
 
 } // namespace libdap
diff --git a/DapIndent.cc b/DapIndent.cc
index 6055888..9befc4b 100644
--- a/DapIndent.cc
+++ b/DapIndent.cc
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/DapIndent.h b/DapIndent.h
index b19c7e8..001a74b 100644
--- a/DapIndent.h
+++ b/DapIndent.h
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/DapObj.h b/DapObj.h
index 91178a7..b7192dd 100644
--- a/DapObj.h
+++ b/DapObj.h
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/DataDDS.cc b/DataDDS.cc
index c2ff183..9d98bf7 100644
--- a/DataDDS.cc
+++ b/DataDDS.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -34,11 +34,6 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: DataDDS.cc 25878 2012-09-28 22:25:42Z jimg $"
-    };
-
-
 #include <iostream>
 #include <iomanip>
 #include <sstream>
diff --git a/DataDDS.h b/DataDDS.h
index 01062ad..ce4d886 100644
--- a/DataDDS.h
+++ b/DataDDS.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/EncodingType.h b/EncodingType.h
index 362a3f6..e02f3ae 100644
--- a/EncodingType.h
+++ b/EncodingType.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Error.cc b/Error.cc
index 6179ee0..c3397b6 100644
--- a/Error.cc
+++ b/Error.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -35,7 +35,7 @@
 #include "config.h"
 
 static char rcsid[] not_used =
-    {"$Id: Error.cc 18940 2008-06-25 19:22:37Z jimg $"
+    {"$Id: Error.cc 27197 2013-10-01 21:29:54Z jimg $"
     };
 
 #include <cstdio>
@@ -53,8 +53,8 @@ extern void Error_switch_to_buffer(void *new_buffer);
 extern void Error_delete_buffer(void * buffer);
 extern void *Error_buffer(FILE *fp);
 
-extern void Errorrestart(FILE *yyin); // defined in Error.tab.c
-extern int Errorparse(void *arg);
+//extern void Errorrestart(FILE *yyin); // defined in Error.tab.c
+extern int Errorparse(libdap::parser_arg *arg);
 
 namespace libdap {
 
@@ -168,7 +168,7 @@ Error::parse(FILE *fp)
 
     bool status;
     try {
-        status = Errorparse((void *) & arg) == 0;
+        status = Errorparse(&arg) == 0;
         Error_delete_buffer(buffer);
     }
     catch (Error &e) {
diff --git a/Error.h b/Error.h
index d231aab..bdcb7a5 100644
--- a/Error.h
+++ b/Error.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Error.lex b/Error.lex
index 8b4ddc5..1a8f5ea 100644
--- a/Error.lex
+++ b/Error.lex
@@ -41,7 +41,7 @@
 
 #include "config_dap.h"
 
-static char rcsid[] not_used = {"$Id: Error.lex 25112 2011-12-29 21:44:54Z jimg $"};
+static char rcsid[] not_used = {"$Id: Error.lex 27157 2013-09-28 21:22:52Z jimg $"};
 
 #include <cstdlib>
 #include <cassert>
@@ -63,6 +63,7 @@ using namespace libdap;
 
 #define YY_FATAL_ERROR(msg) {\
     throw(Error(string("Error scanning the error response: ") + string(msg))); \
+    yy_fatal_error(msg); /* see das.lex */ \
 }
 
 int error_line_num = 1;
@@ -75,6 +76,8 @@ void store_string();
     
 %option noyywrap
 %option nounput
+%option noinput
+%option 8bit
 %option prefix="Error"
 %option outfile="lex.Error.cc"
 %x quote
diff --git a/Error.tab.cc b/Error.tab.cc
index d9f8942..720728b 100644
--- a/Error.tab.cc
+++ b/Error.tab.cc
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   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
@@ -29,7 +28,7 @@
    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.  */
 
@@ -47,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -55,50 +54,57 @@
 /* Pure parsers.  */
 #define YYPURE 0
 
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
 /* Substitute the variable and function names.  */
-#define yyparse Errorparse
-#define yylex   Errorlex
-#define yyerror Errorerror
-#define yylval  Errorlval
-#define yychar  Errorchar
-#define yydebug Errordebug
-#define yynerrs Errornerrs
+#define yyparse         Errorparse
+#define yylex           Errorlex
+#define yyerror         Errorerror
+#define yylval          Errorlval
+#define yychar          Errorchar
+#define yydebug         Errordebug
+#define yynerrs         Errornerrs
 
 
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     SCAN_INT = 258,
-     SCAN_STR = 259,
-     SCAN_ERROR = 260,
-     SCAN_CODE = 261,
-     SCAN_MSG = 262
-   };
+/* Copy the first part of user declarations.  */
+
+
+/* Line 189 of yacc.c  */
+#line 81 "Error.tab.cc"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
 #endif
-/* Tokens.  */
-#define SCAN_INT 258
-#define SCAN_STR 259
-#define SCAN_ERROR 260
-#define SCAN_CODE 261
-#define SCAN_MSG 262
 
+/* 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
 
+/* "%code requires" blocks.  */
 
-/* Copy the first part of user declarations.  */
-#line 32 "Error.y"
+/* Line 209 of yacc.c  */
+#line 32 "Error.yy"
 
 
 #include "config_dap.h"
 
-static char rcsid[] not_used = {"$Id: Error.y 18315 2008-03-03 20:14:44Z jimg $"};
-
 #include <iostream>
 
 #include "Error.h"
@@ -118,37 +124,39 @@ using namespace libdap;
 #define ERROR_OBJ(arg) ((Error *)((parser_arg *)(arg))->_object)
 #define STATUS(arg) ((parser_arg *)(arg))->_status
 
-#define YYPARSE_PARAM arg
+//#define YYPARSE_PARAM arg
 
 extern int error_line_num;	// defined in Error.lex
 
-int Errorlex();			// the scanner
-void Errorerror(char *s);	// gotta love automatically generated names...
 
 
 
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+/* Line 209 of yacc.c  */
+#line 136 "Error.tab.cc"
 
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     SCAN_INT = 258,
+     SCAN_STR = 259,
+     SCAN_ERROR = 260,
+     SCAN_CODE = 261,
+     SCAN_MSG = 262
+   };
 #endif
 
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
+
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 66 "Error.y"
 {
+
+/* Line 214 of yacc.c  */
+#line 75 "Error.yy"
+
 #ifdef __SUNPRO_CC
     int boolean;
 #else
@@ -156,22 +164,37 @@ typedef union YYSTYPE
 #endif
     int integer;
     char *string;
-}
-/* Line 193 of yacc.c.  */
-#line 162 "Error.tab.cc"
-	YYSTYPE;
+
+
+
+/* Line 214 of yacc.c  */
+#line 172 "Error.tab.cc"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 
-
 /* Copy the second part of user declarations.  */
 
 
-/* Line 216 of yacc.c.  */
-#line 175 "Error.tab.cc"
+/* Line 264 of yacc.c  */
+#line 184 "Error.tab.cc"
+/* Unqualified %code blocks.  */
+
+/* Line 265 of yacc.c  */
+#line 61 "Error.yy"
+
+
+int Errorlex();			// the scanner
+void Errorerror(parser_arg *arg, const string &s);	// gotta love automatically generated names...
+
+
+
+
+/* Line 265 of yacc.c  */
+#line 198 "Error.tab.cc"
 
 #ifdef short
 # undef short
@@ -221,7 +244,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -246,14 +269,14 @@ typedef short int yytype_int16;
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int i)
+YYID (int yyi)
 #else
 static int
-YYID (i)
-    int i;
+YYID (yyi)
+    int yyi;
 #endif
 {
-  return i;
+  return yyi;
 }
 #endif
 
@@ -334,9 +357,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-  };
+  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)
@@ -370,12 +393,12 @@ union yyalloc
    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)					\
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
@@ -455,7 +478,7 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint8 yyrline[] =
 {
-       0,    94,    94,    97,   100,   101,   104,   112,   111
+       0,   103,   103,   106,   109,   110,   113,   121,   120
 };
 #endif
 
@@ -466,7 +489,7 @@ static const char *const yytname[] =
 {
   "$end", "error", "$undefined", "SCAN_INT", "SCAN_STR", "SCAN_ERROR",
   "SCAN_CODE", "SCAN_MSG", "'{'", "'}'", "';'", "'='", "$accept",
-  "error_object", "contents", "description", "code", "message", "@1", 0
+  "error_object", "contents", "description", "code", "message", "$@1", 0
 };
 #endif
 
@@ -577,7 +600,7 @@ do								\
     }								\
   else								\
     {								\
-      yyerror (YY_("syntax error: cannot back up")); \
+      yyerror (arg, YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
 while (YYID (0))
@@ -618,7 +641,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -657,7 +680,7 @@ do {									  \
     {									  \
       YYFPRINTF (stderr, "%s ", Title);					  \
       yy_symbol_print (stderr,						  \
-		  Type, Value); \
+		  Type, Value, arg); \
       YYFPRINTF (stderr, "\n");						  \
     }									  \
 } while (YYID (0))
@@ -671,17 +694,19 @@ do {									  \
 #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)
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_arg *arg)
 #else
 static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg)
     FILE *yyoutput;
     int yytype;
     YYSTYPE const * const yyvaluep;
+    parser_arg *arg;
 #endif
 {
   if (!yyvaluep)
     return;
+  YYUSE (arg);
 # ifdef YYPRINT
   if (yytype < YYNTOKENS)
     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
@@ -703,13 +728,14 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_arg *arg)
 #else
 static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
+yy_symbol_print (yyoutput, yytype, yyvaluep, arg)
     FILE *yyoutput;
     int yytype;
     YYSTYPE const * const yyvaluep;
+    parser_arg *arg;
 #endif
 {
   if (yytype < YYNTOKENS)
@@ -717,7 +743,7 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
   else
     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg);
   YYFPRINTF (yyoutput, ")");
 }
 
@@ -729,17 +755,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 #else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
@@ -757,12 +786,13 @@ do {								\
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_arg *arg)
 #else
 static void
-yy_reduce_print (yyvsp, yyrule)
+yy_reduce_print (yyvsp, yyrule, arg)
     YYSTYPE *yyvsp;
     int yyrule;
+    parser_arg *arg;
 #endif
 {
   int yynrhs = yyr2[yyrule];
@@ -773,18 +803,18 @@ yy_reduce_print (yyvsp, yyrule)
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       		       );
-      fprintf (stderr, "\n");
+		       		       , arg);
+      YYFPRINTF (stderr, "\n");
     }
 }
 
 # define YY_REDUCE_PRINT(Rule)		\
 do {					\
   if (yydebug)				\
-    yy_reduce_print (yyvsp, Rule); \
+    yy_reduce_print (yyvsp, Rule, arg); \
 } while (YYID (0))
 
 /* Nonzero means print parse trace.  It is left uninitialized so that
@@ -1035,16 +1065,18 @@ yysyntax_error (char *yyresult, int yystate, int yychar)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_arg *arg)
 #else
 static void
-yydestruct (yymsg, yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep, arg)
     const char *yymsg;
     int yytype;
     YYSTYPE *yyvaluep;
+    parser_arg *arg;
 #endif
 {
   YYUSE (yyvaluep);
+  YYUSE (arg);
 
   if (!yymsg)
     yymsg = "Deleting";
@@ -1057,10 +1089,8 @@ yydestruct (yymsg, yytype, yyvaluep)
 	break;
     }
 }
-

 
 /* Prevent warnings from -Wmissing-prototypes.  */
-
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
 int yyparse (void *YYPARSE_PARAM);
@@ -1069,18 +1099,17 @@ int yyparse ();
 #endif
 #else /* ! YYPARSE_PARAM */
 #if defined __STDC__ || defined __cplusplus
-int yyparse (void);
+int yyparse (parser_arg *arg);
 #else
 int yyparse ();
 #endif
 #endif /* ! YYPARSE_PARAM */
 
 
-
-/* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
+/* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
 
 /* Number of syntax errors so far.  */
@@ -1088,9 +1117,9 @@ int yynerrs;
 
 
 
-/*----------.
-| yyparse.  |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1106,74 +1135,76 @@ yyparse (YYPARSE_PARAM)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 int
-yyparse (void)
+yyparse (parser_arg *arg)
 #else
 int
-yyparse ()
-
+yyparse (arg)
+    parser_arg *arg;
 #endif
 #endif
 {
-  
-  int yystate;
-  int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
 
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
 
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
 
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
+    /* 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;
 
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
 
-  YYSIZE_T yystacksize = YYINITDEPTH;
+    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.  */
+  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;
 
@@ -1203,7 +1234,6 @@ yyparse ()
 	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
@@ -1211,7 +1241,6 @@ yyparse ()
 	yyoverflow (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
-
 		    &yystacksize);
 
 	yyss = yyss1;
@@ -1234,9 +1263,8 @@ yyparse ()
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 #  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
@@ -1247,7 +1275,6 @@ yyparse ()
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
-
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 		  (unsigned long int) yystacksize));
 
@@ -1257,6 +1284,9 @@ yyparse ()
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
@@ -1265,16 +1295,16 @@ yyparse ()
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
+     lookahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to look-ahead token.  */
+  /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
   if (yyn == YYPACT_NINF)
     goto yydefault;
 
-  /* Not known => get a look-ahead token if don't already have one.  */
+  /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -1306,20 +1336,16 @@ yybackup:
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
   *++yyvsp = yylval;
@@ -1359,27 +1385,37 @@ yyreduce:
   switch (yyn)
     {
         case 2:
-#line 94 "Error.y"
+
+/* Line 1455 of yacc.c  */
+#line 103 "Error.yy"
     { (yyval.boolean) = (yyvsp[(3) - (5)].boolean); STATUS(arg) = (yyvsp[(3) - (5)].boolean); ;}
     break;
 
   case 3:
-#line 97 "Error.y"
+
+/* Line 1455 of yacc.c  */
+#line 106 "Error.yy"
     { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); ;}
     break;
 
   case 4:
-#line 100 "Error.y"
+
+/* Line 1455 of yacc.c  */
+#line 109 "Error.yy"
     { (yyval.boolean) = (yyvsp[(1) - (2)].boolean) && (yyvsp[(2) - (2)].boolean); ;}
     break;
 
   case 5:
-#line 101 "Error.y"
+
+/* Line 1455 of yacc.c  */
+#line 110 "Error.yy"
     { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); ;}
     break;
 
   case 6:
-#line 105 "Error.y"
+
+/* Line 1455 of yacc.c  */
+#line 114 "Error.yy"
     { 
 		    ERROR_OBJ(arg)->set_error_code((ErrorCode)(yyvsp[(3) - (4)].integer));
 		    (yyval.boolean) = true; 
@@ -1387,22 +1423,27 @@ yyreduce:
     break;
 
   case 7:
-#line 112 "Error.y"
+
+/* Line 1455 of yacc.c  */
+#line 121 "Error.yy"
     { 
 		    ERROR_OBJ(arg)->set_error_message((yyvsp[(3) - (3)].string));
 		;}
     break;
 
   case 8:
-#line 116 "Error.y"
+
+/* Line 1455 of yacc.c  */
+#line 125 "Error.yy"
     {
 		    (yyval.boolean) = true;
 		;}
     break;
 
 
-/* Line 1267 of yacc.c.  */
-#line 1406 "Error.tab.cc"
+
+/* Line 1455 of yacc.c  */
+#line 1447 "Error.tab.cc"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1413,7 +1454,6 @@ yyreduce:
 
   *++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.  */
@@ -1438,7 +1478,7 @@ yyerrlab:
     {
       ++yynerrs;
 #if ! YYERROR_VERBOSE
-      yyerror (YY_("syntax error"));
+      yyerror (arg, YY_("syntax error"));
 #else
       {
 	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
@@ -1462,11 +1502,11 @@ yyerrlab:
 	if (0 < yysize && yysize <= yymsg_alloc)
 	  {
 	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
+	    yyerror (arg, yymsg);
 	  }
 	else
 	  {
-	    yyerror (YY_("syntax error"));
+	    yyerror (arg, YY_("syntax error"));
 	    if (yysize != 0)
 	      goto yyexhaustedlab;
 	  }
@@ -1478,7 +1518,7 @@ yyerrlab:
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
+      /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
@@ -1490,12 +1530,12 @@ yyerrlab:
       else
 	{
 	  yydestruct ("Error: discarding",
-		      yytoken, &yylval);
+		      yytoken, &yylval, arg);
 	  yychar = YYEMPTY;
 	}
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -1546,15 +1586,12 @@ yyerrlab1:
 
 
       yydestruct ("Error: popping",
-		  yystos[yystate], yyvsp);
+		  yystos[yystate], yyvsp, arg);
       YYPOPSTACK (1);
       yystate = *yyssp;
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   *++yyvsp = yylval;
 
 
@@ -1579,20 +1616,20 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
 yyexhaustedlab:
-  yyerror (YY_("memory exhausted"));
+  yyerror (arg, YY_("memory exhausted"));
   yyresult = 2;
   /* Fall through.  */
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
+  if (yychar != YYEMPTY)
      yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
+		 yytoken, &yylval, arg);
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -1600,7 +1637,7 @@ yyreturn:
   while (yyssp != yyss)
     {
       yydestruct ("Cleanup: popping",
-		  yystos[*yyssp], yyvsp);
+		  yystos[*yyssp], yyvsp, arg);
       YYPOPSTACK (1);
     }
 #ifndef yyoverflow
@@ -1616,11 +1653,13 @@ yyreturn:
 }
 
 
-#line 121 "Error.y"
+
+/* Line 1675 of yacc.c  */
+#line 130 "Error.yy"
 
 
 void
-Errorerror(char *s)
+Errorerror(parser_arg *, const string &s)
 {
   string msg = s;
   msg += " line: ";
diff --git a/Error.tab.hh b/Error.tab.hh
index 6880db6..b8ba15f 100644
--- a/Error.tab.hh
+++ b/Error.tab.hh
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   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
@@ -29,10 +28,47 @@
    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.  */
 
+/* "%code requires" blocks.  */
+
+/* Line 1676 of yacc.c  */
+#line 32 "Error.yy"
+
+
+#include "config_dap.h"
+
+#include <iostream>
+
+#include "Error.h"
+
+#include "parser.h"
+#include "debug.h"
+#include "util.h"
+
+using namespace std;
+using namespace libdap;
+
+// These macros are used to access the `arguments' passed to the parser. A
+// pointer to an error object and a pointer to an integer status variable are
+// passed in to the parser within a structure (which itself is passed as a
+// pointer). Note that the ERROR macro explicitly casts OBJ to an ERROR *. 
+
+#define ERROR_OBJ(arg) ((Error *)((parser_arg *)(arg))->_object)
+#define STATUS(arg) ((parser_arg *)(arg))->_status
+
+//#define YYPARSE_PARAM arg
+
+extern int error_line_num;	// defined in Error.lex
+
+
+
+
+/* Line 1676 of yacc.c  */
+#line 71 "Error.tab.hh"
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -46,20 +82,16 @@
      SCAN_MSG = 262
    };
 #endif
-/* Tokens.  */
-#define SCAN_INT 258
-#define SCAN_STR 259
-#define SCAN_ERROR 260
-#define SCAN_CODE 261
-#define SCAN_MSG 262
-
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 66 "Error.y"
 {
+
+/* Line 1676 of yacc.c  */
+#line 75 "Error.yy"
+
 #ifdef __SUNPRO_CC
     int boolean;
 #else
@@ -67,14 +99,17 @@ typedef union YYSTYPE
 #endif
     int integer;
     char *string;
-}
-/* Line 1529 of yacc.c.  */
-#line 73 "Error.tab.hh"
-	YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c  */
+#line 107 "Error.tab.hh"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 extern YYSTYPE Errorlval;
 
+
diff --git a/Error.y b/Error.yy
similarity index 91%
rename from Error.y
rename to Error.yy
index 2e381a1..195fbf0 100644
--- a/Error.y
+++ b/Error.yy
@@ -29,12 +29,10 @@
 // Authors:
 //      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
 
-%{
+%code requires {
 
 #include "config_dap.h"
 
-static char rcsid[] not_used = {"$Id: Error.y 18315 2008-03-03 20:14:44Z jimg $"};
-
 #include <iostream>
 
 #include "Error.h"
@@ -54,14 +52,25 @@ using namespace libdap;
 #define ERROR_OBJ(arg) ((Error *)((parser_arg *)(arg))->_object)
 #define STATUS(arg) ((parser_arg *)(arg))->_status
 
-#define YYPARSE_PARAM arg
+//#define YYPARSE_PARAM arg
 
 extern int error_line_num;	// defined in Error.lex
 
+}
+
+%code {
+
 int Errorlex();			// the scanner
-void Errorerror(char *s);	// gotta love automatically generated names...
+void Errorerror(parser_arg *arg, const string &s);	// gotta love automatically generated names...
+
+}
 
-%}
+%require "2.4"
+%parse-param {parser_arg *arg}
+%name-prefix "Error"
+%defines
+%debug
+%verbose
 
 %union {
 #ifdef __SUNPRO_CC
@@ -121,7 +130,7 @@ message:	SCAN_MSG '=' SCAN_STR
 %%
 
 void
-Errorerror(char *s)
+Errorerror(parser_arg *, const string &s)
 {
   string msg = s;
   msg += " line: ";
diff --git a/EventHandler.h b/EventHandler.h
index ff40428..b27c34b 100644
--- a/EventHandler.h
+++ b/EventHandler.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Float32.cc b/Float32.cc
index 1cc6756..09b485a 100644
--- a/Float32.cc
+++ b/Float32.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -33,28 +33,26 @@
 //
 // 3/22/99 jhrg
 
-
-#include <iomanip>
-
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: Float32.cc 21699 2009-11-05 00:06:01Z jimg $"
-    };
+#include <sstream>
+#include <iomanip>
 
-#include "Byte.h"
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
 #include "Int16.h"
 #include "UInt16.h"
 #include "Int32.h"
 #include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
 #include "Float32.h"
 #include "Float64.h"
 #include "Str.h"
 #include "Url.h"
-#include "Array.h"
-#include "Structure.h"
-#include "Sequence.h"
-#include "Grid.h"
+
+#include "Marshaller.h"
+#include "UnMarshaller.h"
 
 #include "DDS.h"
 #include "util.h"
@@ -93,7 +91,7 @@ Float32::Float32(const string &n, const string &d)
 
 Float32::Float32(const Float32 &copy_from) : BaseType(copy_from)
 {
-    _buf = copy_from._buf;
+    d_buf = copy_from.d_buf;
 }
 
 BaseType *
@@ -110,13 +108,13 @@ Float32::operator=(const Float32 &rhs)
 
     dynamic_cast<BaseType &>(*this) = rhs;
 
-    _buf = rhs._buf;
+    d_buf = rhs.d_buf;
 
     return *this;
 }
 
 unsigned int
-Float32::width()
+Float32::width(bool)
 {
     return sizeof(dods_float32);
 }
@@ -137,7 +135,7 @@ Float32::serialize(ConstraintEvaluator &eval, DDS &dds,
 
     dds.timeout_off();
 
-    m.put_float32( _buf ) ;
+    m.put_float32( d_buf ) ;
 
     return true;
 }
@@ -145,7 +143,7 @@ Float32::serialize(ConstraintEvaluator &eval, DDS &dds,
 bool
 Float32::deserialize(UnMarshaller &um, DDS *, bool)
 {
-    um.get_float32( _buf ) ;
+    um.get_float32( d_buf ) ;
 
     return false;
 }
@@ -162,7 +160,7 @@ Float32::val2buf(void *val, bool)
         throw InternalErr(__FILE__, __LINE__,
                           "The incoming pointer does not contain any data.");
 
-    _buf = *(dods_float32 *)val;
+    d_buf = *(dods_float32 *)val;
 
     return width();
 }
@@ -178,7 +176,7 @@ Float32::buf2val(void **val)
     if (!*val)
         *val = new dods_float32;
 
-    *(dods_float32 *)*val = _buf;
+    *(dods_float32 *)*val = d_buf;
 
     return width();
 }
@@ -186,7 +184,7 @@ Float32::buf2val(void **val)
 bool
 Float32::set_value(dods_float32 f)
 {
-    _buf = f;
+    d_buf = f;
     set_read_p(true);
 
     return true;
@@ -200,24 +198,16 @@ Float32::set_value(dods_float32 f)
 dods_float32
 Float32::value() const
 {
-    return _buf;
+    return d_buf;
 }
 
-#if FILE_METHODS
 void
 Float32::print_val(FILE *out, string space, bool print_decl_p)
 {
-    // FIX: need to set precision in the printing somehow.
-    // os.precision(DODS_FLT_DIG);
-
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = %.6g;\n", _buf) ;
-    }
-    else
-        fprintf(out, "%.6g", _buf) ;
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Float32::print_val(ostream &out, string space, bool print_decl_p)
@@ -227,10 +217,10 @@ Float32::print_val(ostream &out, string space, bool print_decl_p)
 
     if (print_decl_p) {
         print_decl(out, space, false);
-	out << " = " << std::setprecision( 6 ) << _buf << ";\n" ;
+	out << " = " << std::setprecision( 6 ) << d_buf << ";\n" ;
     }
     else
-	out << std::setprecision( 6 ) << _buf ;
+	out << std::setprecision( 6 ) << d_buf ;
 }
 
 bool
@@ -251,29 +241,28 @@ Float32::ops(BaseType *b, int op)
     }
 
     switch (b->type()) {
-    case dods_byte_c:
-        return rops<dods_float32, dods_byte, Cmp<dods_float32, dods_byte> >
-               (_buf, dynamic_cast<Byte *>(b)->_buf, op);
-    case dods_int16_c:
-        return rops<dods_float32, dods_int16, Cmp<dods_float32, dods_int16> >
-               (_buf, dynamic_cast<Int16 *>(b)->_buf, op);
-    case dods_uint16_c:
-        return rops<dods_float32, dods_uint16, Cmp<dods_float32, dods_uint16> >
-               (_buf, dynamic_cast<UInt16 *>(b)->_buf, op);
-    case dods_int32_c:
-        return rops<dods_float32, dods_int32, Cmp<dods_float32, dods_int32> >
-               (_buf, dynamic_cast<Int32 *>(b)->_buf, op);
-    case dods_uint32_c:
-        return rops<dods_float32, dods_uint32, Cmp<dods_float32, dods_uint32> >
-               (_buf, dynamic_cast<UInt32 *>(b)->_buf, op);
-    case dods_float32_c:
-        return rops<dods_float32, dods_float32, Cmp<dods_float32, dods_float32> >
-               (_buf, dynamic_cast<Float32 *>(b)->_buf, op);
-    case dods_float64_c:
-        return rops<dods_float32, dods_float64, Cmp<dods_float32, dods_float64> >
-               (_buf, dynamic_cast<Float64 *>(b)->_buf, op);
-    default:
-        return false;
+        case dods_int8_c:
+            return Cmp<dods_float32, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return SUCmp<dods_float32, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return Cmp<dods_float32, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return SUCmp<dods_float32, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return Cmp<dods_float32, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return SUCmp<dods_float32, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return Cmp<dods_float32, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return SUCmp<dods_float32, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return Cmp<dods_float32, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return Cmp<dods_float32, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
     }
 }
 
@@ -292,7 +281,7 @@ Float32::dump(ostream &strm) const
 	 << endl ;
     DapIndent::Indent() ;
     BaseType::dump(strm) ;
-    strm << DapIndent::LMarg << "value: " << _buf << endl ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
     DapIndent::UnIndent() ;
 }
 
diff --git a/Float32.h b/Float32.h
index 737a099..fd900d5 100644
--- a/Float32.h
+++ b/Float32.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -49,8 +49,6 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -60,18 +58,8 @@ namespace libdap
     */
 class Float32: public BaseType
 {
-    /** This class allows Byte, ..., Float64 access to <tt>_buf</tt>
-	to simplify and speed up the relational operators. */
-
-    friend class Byte;
-    friend class Int16;
-    friend class UInt16;
-    friend class Int32;
-    friend class UInt32;
-    friend class Float64;
-
 protected:
-    dods_float32 _buf;
+    dods_float32 d_buf;
 
 public:
     Float32(const string &n);
@@ -86,7 +74,7 @@ public:
 
     virtual BaseType *ptr_duplicate();
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
 			   Marshaller &m, bool ce_eval = true);
@@ -97,10 +85,9 @@ public:
 
     virtual dods_float32 value() const;
     virtual bool set_value(dods_float32 f);
-#if FILE_METHODS
+
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
diff --git a/Float64.cc b/Float64.cc
index 72820be..04cdb70 100644
--- a/Float64.cc
+++ b/Float64.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -33,31 +33,28 @@
 //
 // jhrg 9/7/94
 
-#include <iomanip>
-
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: Float64.cc 21699 2009-11-05 00:06:01Z jimg $"
-    };
-
+#include <sstream>
 #include <iomanip>
 
-#include "Byte.h"
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
 #include "Int16.h"
 #include "UInt16.h"
 #include "Int32.h"
 #include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
 #include "Float32.h"
 #include "Float64.h"
 #include "Str.h"
 #include "Url.h"
-#include "Array.h"
-#include "Structure.h"
-#include "Sequence.h"
-#include "Grid.h"
 
 #include "DDS.h"
+#include "Marshaller.h"
+#include "UnMarshaller.h"
+
 #include "util.h"
 #include "parser.h"
 #include "Operators.h"
@@ -95,7 +92,7 @@ Float64::Float64(const string &n, const string &d)
 
 Float64::Float64(const Float64 &copy_from) : BaseType(copy_from)
 {
-    _buf = copy_from._buf;
+    d_buf = copy_from.d_buf;
 }
 
 BaseType *
@@ -112,13 +109,13 @@ Float64::operator=(const Float64 &rhs)
 
     dynamic_cast<BaseType &>(*this) = rhs;
 
-    _buf = rhs._buf;
+    d_buf = rhs.d_buf;
 
     return *this;
 }
 
 unsigned int
-Float64::width()
+Float64::width(bool)
 {
     return sizeof(dods_float64);
 }
@@ -139,7 +136,7 @@ Float64::serialize(ConstraintEvaluator &eval, DDS &dds,
 
     dds.timeout_off();
 
-    m.put_float64( _buf ) ;
+    m.put_float64( d_buf ) ;
 
     return true;
 }
@@ -147,7 +144,7 @@ Float64::serialize(ConstraintEvaluator &eval, DDS &dds,
 bool
 Float64::deserialize(UnMarshaller &um, DDS *, bool)
 {
-    um.get_float64( _buf ) ;
+    um.get_float64( d_buf ) ;
 
     return false;
 }
@@ -163,7 +160,7 @@ Float64::val2buf(void *val, bool)
         throw InternalErr(__FILE__, __LINE__,
                           "The incoming pointer does not contain any data.");
 
-    _buf = *(dods_float64 *)val;
+    d_buf = *(dods_float64 *)val;
 
     return width();
 }
@@ -179,7 +176,7 @@ Float64::buf2val(void **val)
     if (!*val)
         *val = new dods_float64;
 
-    *(dods_float64 *)*val = _buf;
+    *(dods_float64 *)*val = d_buf;
 
     return width();
 }
@@ -192,33 +189,25 @@ Float64::buf2val(void **val)
 dods_float64
 Float64::value() const
 {
-    return _buf;
+    return d_buf;
 }
 
 bool
 Float64::set_value(dods_float64 val)
 {
-    _buf = val;
+    d_buf = val;
     set_read_p(true);
 
     return true;
 }
 
-#if FILE_METHODS
 void
 Float64::print_val(FILE *out, string space, bool print_decl_p)
 {
-    // FIX: need to set precision in the printing somehow.
-    // os.precision(DODS_DBL_DIG);
-
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = %.15g;\n", _buf) ;
-    }
-    else
-        fprintf(out, "%.15g", _buf) ;
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Float64::print_val(ostream &out, string space, bool print_decl_p)
@@ -228,10 +217,10 @@ Float64::print_val(ostream &out, string space, bool print_decl_p)
 
     if (print_decl_p) {
         print_decl(out, space, false);
-	out << " = " << std::setprecision( 15 ) << _buf << ";\n" ;
+	out << " = " << std::setprecision( 15 ) << d_buf << ";\n" ;
     }
     else
-	out << std::setprecision( 15 ) << _buf ;
+	out << std::setprecision( 15 ) << d_buf ;
 }
 
 bool
@@ -258,29 +247,28 @@ Float64::ops(BaseType *b, int op)
     }
 
     switch (b->type()) {
-    case dods_byte_c:
-        return rops<dods_float64, dods_byte, Cmp<dods_float64, dods_byte> >
-               (_buf, dynamic_cast<Byte *>(b)->_buf, op);
-    case dods_int16_c:
-        return rops<dods_float64, dods_int16, Cmp<dods_float64, dods_int16> >
-               (_buf, dynamic_cast<Int16 *>(b)->_buf, op);
-    case dods_uint16_c:
-        return rops<dods_float64, dods_uint16, Cmp<dods_float64, dods_uint16> >
-               (_buf, dynamic_cast<UInt16 *>(b)->_buf, op);
-    case dods_int32_c:
-        return rops<dods_float64, dods_int32, Cmp<dods_float64, dods_int32> >
-               (_buf, dynamic_cast<Int32 *>(b)->_buf, op);
-    case dods_uint32_c:
-        return rops<dods_float64, dods_uint32, Cmp<dods_float64, dods_uint32> >
-               (_buf, dynamic_cast<UInt32 *>(b)->_buf, op);
-    case dods_float32_c:
-        return rops<dods_float64, dods_float32, Cmp<dods_float64, dods_float32> >
-               (_buf, dynamic_cast<Float32 *>(b)->_buf, op);
-    case dods_float64_c:
-        return rops<dods_float64, dods_float64, Cmp<dods_float64, dods_float64> >
-               (_buf, dynamic_cast<Float64 *>(b)->_buf, op);
-    default:
-        return false;
+        case dods_int8_c:
+            return Cmp<dods_float64, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return SUCmp<dods_float64, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return Cmp<dods_float64, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return SUCmp<dods_float64, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return Cmp<dods_float64, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return SUCmp<dods_float64, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return Cmp<dods_float64, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return SUCmp<dods_float64, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return Cmp<dods_float64, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return Cmp<dods_float64, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
     }
 }
 
@@ -299,7 +287,7 @@ Float64::dump(ostream &strm) const
     << (void *)this << ")" << endl ;
     DapIndent::Indent() ;
     BaseType::dump(strm) ;
-    strm << DapIndent::LMarg << "value: " << _buf << endl ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
     DapIndent::UnIndent() ;
 }
 
diff --git a/Float64.h b/Float64.h
index 1f34d69..34f41f9 100644
--- a/Float64.h
+++ b/Float64.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -49,8 +49,6 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -61,20 +59,8 @@ namespace libdap
 
 class Float64: public BaseType
 {
-    /** This class allows Byte, ..., Float32 access to <tt>_buf</tt> to
-    simplify and speed up the relational operators.
-
-    NB: According to Stroustrup it does not matter where (public, private
-    or protected) friend classes are declared. */
-    friend class Byte;
-    friend class Int16;
-    friend class UInt16;
-    friend class Int32;
-    friend class UInt32;
-    friend class Float32;
-
 protected:
-    dods_float64 _buf;
+    dods_float64 d_buf;
 
 public:
     Float64(const string &n);
@@ -88,7 +74,7 @@ public:
 
     virtual BaseType *ptr_duplicate();
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
 			   Marshaller &m, bool ce_eval = true);
@@ -99,10 +85,9 @@ public:
 
     virtual dods_float64 value() const;
     virtual bool set_value(dods_float64 val);
-#if FILE_METHODS
+
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
diff --git a/GNU/GNURegex.cc b/GNU/GNURegex.cc
index b216d5c..4eb0ff1 100644
--- a/GNU/GNURegex.cc
+++ b/GNU/GNURegex.cc
@@ -19,10 +19,13 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
+
+//#define DODS_DEBUG
+
 #include <config.h>
 
 #ifndef WIN32
@@ -41,6 +44,8 @@
 #include "GNURegex.h"
 #include "Error.h"
 #include "util.h"
+#include "debug.h"
+
 
 using namespace std;
 
@@ -49,20 +54,33 @@ namespace libdap {
 void
 Regex::init(const char *t)
 {
+    DBG( cerr << "Regex::init() - BEGIN" << endl);
+
+    DBG( cerr << "Regex::init() - creating new regex..." << endl);
     d_preg = static_cast<void*>(new regex_t);
+
+    DBG( cerr << "Regex::init() - Calling regcomp()..." << endl);
     int result = regcomp(static_cast<regex_t*>(d_preg), t, REG_EXTENDED);
 
     if  (result != 0) {
+        DBG( cerr << "Regex::init() - Call to regcomp FAILED" << endl);
+        DBG( cerr << "Regex::init() - Calling regerror()..." << endl);
         size_t msg_len = regerror(result, static_cast<regex_t*>(d_preg),
                                   static_cast<char*>(NULL),
                                   static_cast<size_t>(0));
+
+        DBG( cerr << "Regex::init() - Creating message" << endl);
         vector<char> msg(msg_len+1);
         //char *msg = new char[msg_len+1];
+        DBG( cerr << "Regex::init() - Calling regerror() again..." << endl);
         regerror(result, static_cast<regex_t*>(d_preg), &msg[0], msg_len);
+        DBG( cerr << "Regex::init() - Throwing libdap::Error" << endl);
         throw Error(string("Regex error: ") + string(&msg[0]));
         //delete[] msg;
         //throw e;
     }
+    DBG( cerr << "Regex::init() - Call to regcomp() SUCCEEDED" << endl);
+    DBG( cerr << "Regex::init() - END" << endl);
 }
 
 Regex::~Regex()
diff --git a/GNU/GNURegex.h b/GNU/GNURegex.h
index cd3cad8..cd6beaf 100644
--- a/GNU/GNURegex.h
+++ b/GNU/GNURegex.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/GNU/GetOpt.cc b/GNU/GetOpt.cc
index 24a7ad4..fa79ecc 100644
--- a/GNU/GetOpt.cc
+++ b/GNU/GetOpt.cc
@@ -13,10 +13,10 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 PURPOSE.  See the GNU Library General Public License for more details.
 You should have received a copy of the GNU Library General Public
 License along with this library; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+Foundation, 59 Temple Place - Fifth Floor, Boston, MA 02110-1301, USA.
 */
 
-#include <config.h>
+#include "config.h"
 
 /* AIX requires the alloca decl to be the first thing in the file. */
 #ifdef __GNUC__
@@ -33,7 +33,7 @@ char *alloca ();
 
 #include <vector>
 
-#ifndef WIN32
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #include <string.h>		// Added these. 10/20/98 jhrg
diff --git a/GSEClause.cc b/GSEClause.cc
deleted file mode 100644
index 25d93f9..0000000
--- a/GSEClause.cc
+++ /dev/null
@@ -1,351 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// (c) COPYRIGHT URI/MIT 1999
-// Please read the full copyright statement in the file COPYRIGHT_URI.
-//
-// Authors:
-//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
-
-// The Grid Selection Expression Clause class.
-
-
-#include "config.h"
-
-static char id[] not_used =
-    {"$Id: GSEClause.cc 24370 2011-03-28 16:21:32Z jimg $"
-    };
-
-#include <iostream>
-#include <sstream>
-
-#include "dods-datatypes.h"
-#include "Error.h"
-#include "InternalErr.h"
-
-#include "debug.h"
-#include "GSEClause.h"
-#include "parser.h"
-#include "gse.tab.hh"
-
-using namespace std;
-
-int gse_parse(void *arg);
-void gse_restart(FILE *in);
-
-// Glue routines declared in gse.lex
-void gse_switch_to_buffer(void *new_buffer);
-void gse_delete_buffer(void * buffer);
-void *gse_string(const char *yy_str);
-
-namespace libdap {
-
-// Private methods
-
-GSEClause::GSEClause()
-{
-    throw InternalErr(__FILE__, __LINE__, "default ctor called for GSEClause");
-}
-
-GSEClause::GSEClause(const GSEClause &)
-{
-    throw InternalErr(__FILE__, __LINE__, "copy ctor called for GSEClause");
-}
-
-GSEClause &GSEClause::operator=(GSEClause &)
-{
-    throw InternalErr(__FILE__, __LINE__, "assigment called for GSEClause");
-}
-
-// For the comparisions here, we should use an epsilon to catch issues
-// with floating point values. jhrg 01/12/06
-template<class T>
-static bool
-compare(T elem, relop op, double value)
-{
-    switch (op) {
-    case dods_greater_op:
-        return elem > value;
-    case dods_greater_equal_op:
-        return elem >= value;
-    case dods_less_op:
-        return elem < value;
-    case dods_less_equal_op:
-        return elem <= value;
-    case dods_equal_op:
-        return elem == value;
-    case dods_not_equal_op:
-        return elem != value;
-    case dods_nop_op:
-        throw Error(malformed_expr, "Attempt to use NOP in Grid selection.");
-    default:
-        throw Error(malformed_expr, "Unknown relational operator in Grid selection.");
-    }
-}
-
-// These values are used in error messages, hence the strings.
-template<class T>
-void
-GSEClause::set_map_min_max_value(T min, T max)
-{
-    DBG(cerr << "Inside set map min max value " << min << ", " << max << endl);
-    std::ostringstream oss1;
-    oss1 << min;
-    d_map_min_value = oss1.str();
-
-    std::ostringstream oss2;
-    oss2 << max;
-    d_map_max_value = oss2.str();
-}
-
-// Read the map array, scan, set start and stop.
-template<class T>
-void
-GSEClause::set_start_stop()
-{
-    T *vals = new T[d_map->length()];
-    d_map->value(vals);
-
-    // Set the map's max and min values for use in error messages (it's a lot
-    // easier to do here, now, than later... 9/20/2001 jhrg)
-    set_map_min_max_value<T>(vals[d_start], vals[d_stop]);
-
-    // Starting at the current start point in the map (initially index position
-    // zero), scan forward until the comparison is true. Set the new value
-    // of d_start to that location. Note that each clause applies to exactly
-    // one map. The 'i <= end' test keeps us from setting start _past_ the
-    // end ;-)
-    int i = d_start;
-    int end = d_stop;
-    while (i <= end && !compare<T>(vals[i], d_op1, d_value1))
-        i++;
-
-    d_start = i;
-
-    // Now scan backward from the end. We scan all the way to the actual start
-    // although it would probably work to stop at 'i >= d_start'.
-    i = end;
-    while (i >= 0 && !compare<T>(vals[i], d_op1, d_value1))
-        i--;
-    d_stop = i;
-
-    // Every clause must have one operator but the second is optional since
-    // the more complex form of a clause is optional. That is, the above two
-    // loops took care of constraints like 'x < 7' but we need the following
-    // for ones like '3 < x < 7'.
-    if (d_op2 != dods_nop_op) {
-        int i = d_start;
-        int end = d_stop;
-        while (i <= end && !compare<T>(vals[i], d_op2, d_value2))
-            i++;
-
-        d_start = i;
-
-        i = end;
-        while (i >= 0 && !compare<T>(vals[i], d_op2, d_value2))
-            i--;
-
-        d_stop = i;
-    }
-    
-    delete[] vals;
-}
-
-void
-GSEClause::compute_indices()
-{
-    switch (d_map->var()->type()) {
-    case dods_byte_c:
-        set_start_stop<dods_byte>();
-        break;
-    case dods_int16_c:
-        set_start_stop<dods_int16>();
-        break;
-    case dods_uint16_c:
-        set_start_stop<dods_uint16>();
-        break;
-    case dods_int32_c:
-        set_start_stop<dods_int32>();
-        break;
-    case dods_uint32_c:
-        set_start_stop<dods_uint32>();
-        break;
-    case dods_float32_c:
-        set_start_stop<dods_float32>();
-        break;
-    case dods_float64_c:
-        set_start_stop<dods_float64>();
-        break;
-    default:
-        throw Error(malformed_expr,
-                    "Grid selection using non-numeric map vectors is not supported");
-    }
-
-}
-
-// Public methods
-
-/** @brief Create an instance using discrete parameters. */
-GSEClause::GSEClause(Grid *grid, const string &map, const double value,
-                     const relop op)
-        : d_map(0),
-        d_value1(value), d_value2(0), d_op1(op), d_op2(dods_nop_op),
-        d_map_min_value(""), d_map_max_value("")
-{
-    d_map = dynamic_cast<Array *>(grid->var(map));
-    if (!d_map)
-        throw Error(string("The map variable '") + map
-                    + string("' does not exist in the grid '")
-                    + grid->name() + string("'."));
-
-    DBG(cerr << d_map->toString());
-
-    // Initialize the start and stop indices.
-    Array::Dim_iter iter = d_map->dim_begin();
-    d_start = d_map->dimension_start(iter);
-    d_stop = d_map->dimension_stop(iter);
-
-    compute_indices();
-}
-
-/** @brief Create an instance using discrete parameters. */
-GSEClause::GSEClause(Grid *grid, const string &map, const double value1,
-                     const relop op1, const double value2, const relop op2)
-        : d_map(0),
-        d_value1(value1), d_value2(value2), d_op1(op1), d_op2(op2),
-        d_map_min_value(""), d_map_max_value("")
-{
-    d_map = dynamic_cast<Array *>(grid->var(map));
-    if (!d_map)
-        throw Error(string("The map variable '") + map
-                    + string("' does not exist in the grid '")
-                    + grid->name() + string("'."));
-
-    DBG(cerr << d_map->toString());
-
-    // Initialize the start and stop indices.
-    Array::Dim_iter iter = d_map->dim_begin();
-    d_start = d_map->dimension_start(iter);
-    d_stop = d_map->dimension_stop(iter);
-
-    compute_indices();
-}
-
-/** Class invariant.
-    @return True if the object is valid, otherwise False. */
-bool
-GSEClause::OK() const
-{
-    if (!d_map)
-        return false;
-
-    // More ...
-
-    return true;
-}
-
-/** @brief Get a pointer to the map variable constrained by this clause.
-    @return The Array object. */
-Array *
-GSEClause::get_map() const
-{
-    return d_map;
-}
-
-/** @brief Set the pointer to the map vector contrained by this clause.
-
-    Note that this method also sets the name of the map vector.
-    @return void */
-void
-GSEClause::set_map(Array *map)
-{
-    d_map = map;
-}
-
-/** @brief Get the name of the map variable constrained by this clause.
-    @return The Array object's name. */
-string
-GSEClause::get_map_name() const
-{
-    return d_map->name();
-}
-
-/** @brief Get the starting index of the clause's map variable as
-    constrained by this clause.
-    @return The start index. */
-int
-GSEClause::get_start() const
-{
-    return d_start;
-}
-
-/** @brief Set the starting index.
-    @return void */
-void
-GSEClause::set_start(int start)
-{
-    d_start = start;
-}
-
-/** @brief Get the stopping index of the clause's map variable as
-    constrained by this clause.
-    @return The stop index. */
-int
-GSEClause::get_stop() const
-{
-    DBG(cerr << "Returning stop index value of: " << d_stop << endl);
-    return d_stop;
-}
-
-/** @brief Set the stopping index.
-    @return void */
-void
-GSEClause::set_stop(int stop)
-{
-    d_stop = stop;
-}
-
-/** @brief Get the minimum map vector value.
-
-    Useful in messages back to users.
-    @return The minimum map vetor value. */
-string
-GSEClause::get_map_min_value() const
-{
-    return d_map_min_value;
-}
-
-/** @brief Get the maximum map vector value.
-
-    Useful in messages back to users.
-    @return The maximum map vetor value. */
-string
-GSEClause::get_map_max_value() const
-{
-    return d_map_max_value;
-}
-
-} // namespace libdap
-
diff --git a/GSEClause.h b/GSEClause.h
deleted file mode 100644
index 7f5400e..0000000
--- a/GSEClause.h
+++ /dev/null
@@ -1,143 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// (c) COPYRIGHT URI/MIT 1999
-// Please read the full copyright statement in the file COPYRIGHT_URI.
-//
-// Authors:
-//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
-
-// The Grid Selection Expression Clause class.
-
-#ifndef _gseclause_h
-#define _gseclause_h 1
-
-
-#include <string>
-#include <sstream>
-
-#ifndef _basetype_h
-#include "BaseType.h"
-#endif
-
-#ifndef _array_h
-#include "Array.h"
-#endif
-
-#ifndef _grid_h
-#include "Grid.h"
-#endif
-
-namespace libdap
-{
-
-enum relop {
-    dods_nop_op,
-    dods_greater_op,
-    dods_greater_equal_op,
-    dods_less_op,
-    dods_less_equal_op,
-    dods_equal_op,
-    dods_not_equal_op
-};
-
-/** Holds the results of parsing one of the Grid Selection Expression
-    clauses. The Grid selection function takes a set of clauses as arguments
-    and must create one instance of this class for each of those clauses. The
-    GridSelectionExpr class holds N instances of this class.
-
-    @author James Gallagher
-    @see GridSelectionExpr */
-
-class GSEClause
-{
-private:
-    Array *d_map;
-    // _value1, 2 and _op1, 2 hold the first and second operators and
-    // operands. For a clause like `var op value' only _op1 and _value1 have
-    // valid information. For a clause like `value op var op value' the
-    // second operator and operand are on _op2 and _value2. 1/19/99 jhrg
-    double d_value1, d_value2;
-    relop d_op1, d_op2;
-    int d_start;
-    int d_stop;
-
-    string d_map_min_value, d_map_max_value;
-
-    GSEClause();  // Hidden default constructor.
-
-    GSEClause(const GSEClause &param); // Hide
-    GSEClause &operator=(GSEClause &rhs); // Hide
-
-    template<class T> void set_start_stop();
-    template<class T> void set_map_min_max_value(T min, T max);
-
-    void compute_indices();
-
-public:
-    /** @name Constructors */
-    //@{
-    GSEClause(Grid *grid, const string &map, const double value,
-              const relop op);
-
-    GSEClause(Grid *grid, const string &map, const double value1,
-              const relop op1, const double value2, const relop op2);
-    //@}
-
-    virtual ~GSEClause() {
-    	delete d_map; d_map = 0;
-    }
-    
-    bool OK() const;
-
-    /** @name Accessors */
-    //@{
-    Array *get_map() const;
-
-    string get_map_name() const;
-
-    int get_start() const;
-
-    int get_stop() const;
-
-    string get_map_min_value() const;
-
-    string get_map_max_value() const;
-    //@}
-
-    /** @name Mutators */
-    //@{
-    void set_map(Array *map);
-
-    void set_start(int start);
-
-    void set_stop(int stop);
-    //@}
-};
-
-} // namespace libdap
-
-#endif // _gseclause_h
-
diff --git a/GeoConstraint.cc b/GeoConstraint.cc
deleted file mode 100644
index f0afe80..0000000
--- a/GeoConstraint.cc
+++ /dev/null
@@ -1,658 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2006 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// The Grid Selection Expression Clause class.
-
-
-#include "config.h"
-
-static char id[] not_used =
-    { "$Id: GeoConstraint.cc 25112 2011-12-29 21:44:54Z jimg $"
-    };
-
-#include <cstring>
-#include <cmath>
-#include <iostream>
-#include <sstream>
-#include <algorithm>  //  for find_if
-
-//#define DODS_DEBUG
-//#define DODS_DEBUG2
-
-#include "debug.h"
-#include "dods-datatypes.h"
-#include "GeoConstraint.h"
-#include "Float64.h"
-
-#include "Error.h"
-#include "InternalErr.h"
-#include "ce_functions.h"
-#include "util.h"
-
-using namespace std;
-
-namespace libdap {
-
-/** This is used with find_if(). The GeoConstraint class holds a set of strings
-    which are prefixes for variable names. Using the regular find() locates
-    only the exact matches, using find_if() with this functor makes is easy
-    to treat those set<string> objects as collections of prefixes. */
-class is_prefix
-{
-private:
-    string s;
-public:
-    is_prefix(const string & in): s(in)
-    {}
-
-    bool operator()(const string & prefix)
-    {
-        return s.find(prefix) == 0;
-    }
-};
-
-/** Look in the containers which hold the units attributes and variable name
-    prefixes which are considered as identifying a vector as being a latitude
-    or longitude vector.
-
-    @param units A container with a bunch of units attribute values.
-    @param names A container with a bunch of variable name prefixes.
-    @param var_units The value of the 'units' attribute for this variable.
-    @param var_name The name of the variable.
-    @return True if the units_value matches any of the accepted attributes
-    exactly or if the name_value starts with any of the accepted prefixes */
-bool
-unit_or_name_match(set < string > units, set < string > names,
-                       const string & var_units, const string & var_name)
-{
-    return (units.find(var_units) != units.end()
-            || find_if(names.begin(), names.end(),
-                       is_prefix(var_name)) != names.end());
-}
-
-/** A private method that determines if the longitude part of the bounding
-    box uses 0/359 or -180/179 notation. This class only supports latitude
-    constraints which use 90/-90 notation, so there's no need to figure out
-    what sort of notation they use.
-
-    @note This function assumes that if one of the two values is
-    negative, then the notation is or the -180/179 form, otherwise not.
-    If the user asks for 30 degrees to 50 degrees (or 50 to 30,
-    for that matter), there's no real way to tell which notation they are
-    using.
-
-    @param left The left side of the bounding box, in degrees
-    @param right The right side of the bounding box
-    @return The notation (pos or neg_pos) */
-GeoConstraint::Notation
-GeoConstraint::categorize_notation(const double left,
-                                   const double right) const
-{
-    return (left < 0 || right < 0) ? neg_pos : pos;
-}
-
-/* A private method to translate the longitude constraint from -180/179
-   notation to 0/359 notation.
-
-   About the two notations:
-   0                          180                       360
-   |---------------------------|-------------------------|
-   0                        180,-180                     0
-
-   so in the neg-pos notation (using the name I give it in this class) both
-   180 and -180 are the same longitude. And in the pos notation 0 and 360 are
-   the same.
-
-   @param left Value-result parameter; the left side of the bounding box
-   @parm right Value-result parameter; the right side of the bounding box */
-void
-GeoConstraint::transform_constraint_to_pos_notation(double &left,
-        double &right) const
-{
-    if (left < 0)
-	left += 360 ;
-
-    if (right < 0)
-	right += 360;
-}
-
-/** Given that the Grid has a longitude map that uses the 'neg_pos' notation,
-    transform it to the 'pos' notation. This method modifies the d_lon array.
-
-    @note: About the two notations:
-   0                          180                       360
-   |---------------------------|-------------------------|
-   0                        180,-180                     0
-*/
-void GeoConstraint::transform_longitude_to_pos_notation()
-{
-    // Assume earlier logic is correct (since the test is expensive)
-    // for each value, add 180
-    // Longitude could be represented using any of the numeric types
-    for (int i = 0; i < d_lon_length; ++i)
-	if (d_lon[i] < 0)
-	    d_lon[i] += 360;
-}
-
-/** Given that the Grid has a longitude map that uses the 'pos' notation,
-    transform it to the 'neg_pos' notation. This method modifies the
-    d_lon array.
-
-    @note: About the two notations:
-   0                          180                       360
-   |---------------------------|-------------------------|
-   0                        180,-180                     0
-*/
-void GeoConstraint::transform_longitude_to_neg_pos_notation()
-{
-    for (int i = 0; i < d_lon_length; ++i)
-	if (d_lon[i] > 180)
-	    d_lon[i] -= 360;
-}
-
-bool GeoConstraint::is_bounding_box_valid(const double left, const double top,
-        const double right, const double bottom) const
-{
-    if ((left < d_lon[0] && right < d_lon[0])
-        || (left > d_lon[d_lon_length-1] && right > d_lon[d_lon_length-1]))
-        return false;
-
-    if (d_latitude_sense == normal) {
-        // When sense is normal, the largest values are at the origin.
-        if ((top > d_lat[0] && bottom > d_lat[0])
-            || (top < d_lat[d_lat_length-1] && bottom < d_lat[d_lat_length-1]))
-            return false;
-    }
-    else {
-        if ((top < d_lat[0] && bottom < d_lat[0])
-            || (top > d_lat[d_lat_length-1] && bottom > d_lat[d_lat_length-1]))
-            return false;
-    }
-
-    return true;
-}
-
-/** Scan from the left to the right, and the right to the left, looking
-    for the left and right bounding box edges, respectively.
-
-    @param left The left edge of the bounding box
-    @param right The right edge
-    @param longitude_index_left Value-result parameter that holds the index
-    in the grid's longitude map of the left bounding box edge. Uses a closed
-    interval for the test.
-    @param  longitude_index_right Value-result parameter for the right edge
-    index. */
-void GeoConstraint::find_longitude_indeces(double left, double right,
-        int &longitude_index_left, int &longitude_index_right) const
-{
-    // Use all values 'modulo 360' to take into account the cases where the
-    // constraint and/or the longitude vector are given using values greater
-    // than 360 (i.e., when 380 is used to mean 20).
-    double t_left = fmod(left, 360.0);
-    double t_right = fmod(right, 360.0);
-
-    // Find the place where 'longitude starts.' That is, what value of the
-    // index 'i' corresponds to the smallest value of d_lon. Why we do this:
-    // Some data sources use offset longitude axes so that the 'seam' is
-    // shifted to a place other than the date line.
-    int i = 0;
-    int lon_origin_index = 0;
-    double smallest_lon = fmod(d_lon[0], 360.0);
-    while (i < d_lon_length) {
-	double curent_lon_value = fmod(d_lon[i], 360.0);
-        if (smallest_lon > curent_lon_value) {
-            smallest_lon = curent_lon_value;
-            lon_origin_index = i;
-        }
-        ++i;
-    }
-
-    DBG2(cerr << "lon_origin_index: " << lon_origin_index << endl);
-
-    // Scan from the index of the smallest value looking for the place where
-    // the value is greater than or equal to the left most point of the bounding
-    // box.
-    i = lon_origin_index;
-    while (fmod(d_lon[i], 360.0) < t_left) {
-        ++i;
-        i = i % d_lon_length;
-
-        // If we cycle completely through all the values/indices, throw
-        if (i == lon_origin_index)
-            throw Error("geogrid: Could not find an index for the longitude value '" + double_to_string(left) + "'");
-    }
-
-    if (fmod(d_lon[i], 360.0) == t_left)
-        longitude_index_left = i;
-    else
-        longitude_index_left = (i - 1) > 0 ? i - 1 : 0;
-
-    DBG2(cerr << "longitude_index_left: " << longitude_index_left << endl);
-
-    // Assume the vector is circular --> the largest value is next to the
-    // smallest.
-    int largest_lon_index = (lon_origin_index - 1 + d_lon_length) % d_lon_length;
-    i = largest_lon_index;
-    while (fmod(d_lon[i], 360.0) > t_right) {
-        // This is like modulus but for 'counting down'
-        i = (i == 0) ? d_lon_length - 1 : i - 1;
-        if (i == largest_lon_index)
-            throw Error("geogrid: Could not find an index for the longitude value '" + double_to_string(right) + "'");
-    }
-
-    if (fmod(d_lon[i], 360.0) == t_right)
-        longitude_index_right = i;
-    else
-        longitude_index_right = (i + 1) < d_lon_length - 1 ? i + 1 : d_lon_length - 1;
-
-    DBG2(cerr << "longitude_index_right: " << longitude_index_right << endl);
-}
-
-/** Scan from the top to the bottom, and the bottom to the top, looking
-    for the top and bottom bounding box edges, respectively.
-
-    @param top The top edge of the bounding box
-    @param bottom The bottom edge
-    @param sense Does the array/grid store data with larger latitudes at
-    the starting indices or are the latitude 'upside down?'
-    @param latitude_index_top Value-result parameter that holds the index
-    in the grid's latitude map of the top bounding box edge. Uses a closed
-    interval for the test.
-    @param  latitude_index_bottom Value-result parameter for the bottom edge
-    index. */
-void GeoConstraint::find_latitude_indeces(double top, double bottom,
-        LatitudeSense sense,
-        int &latitude_index_top,
-        int &latitude_index_bottom) const
-{
-    int i, j;
-
-    if (sense == normal) {
-	i = 0;
-        while (i < d_lat_length - 1 && top < d_lat[i])
-            ++i;
-
-        j = d_lat_length - 1;
-        while (j > 0 && bottom > d_lat[j])
-            --j;
-
-        if (d_lat[i] == top)
-            latitude_index_top = i;
-        else
-            latitude_index_top = (i - 1) > 0 ? i - 1 : 0;
-
-        if (d_lat[j] == bottom)
-            latitude_index_bottom = j;
-        else
-            latitude_index_bottom =
-                (j + 1) < d_lat_length - 1 ? j + 1 : d_lat_length - 1;
-    }
-    else {
-        i = d_lat_length - 1;
-        while (i > 0 && d_lat[i] > top)
-            --i;
-
-        j = 0;
-        while (j < d_lat_length - 1 && d_lat[j] < bottom)
-            ++j;
-
-        if (d_lat[i] == top)
-            latitude_index_top = i;
-        else
-            latitude_index_top = (i + 1) < d_lat_length - 1 ? i + 1 : d_lat_length - 1;
-
-        if (d_lat[j] == bottom)
-            latitude_index_bottom = j;
-        else
-            latitude_index_bottom = (j - 1) > 0 ? j - 1 : 0;
-    }
-}
-
-/** Take a look at the latitude vector values and record whether the world is
-    normal or upside down.
-    @return normal or inverted. */
-GeoConstraint::LatitudeSense GeoConstraint::categorize_latitude() const
-{
-    return d_lat[0] >= d_lat[d_lat_length - 1] ? normal : inverted;
-}
-
-// Use 'index' as the pivot point. Move the points behind index to the front of
-// the vector and those points in front of and at index to the rear.
-static void
-swap_vector_ends(char *dest, char *src, int len, int index, int elem_sz)
-{
-    memcpy(dest, src + index * elem_sz, (len - index) * elem_sz);
-
-    memcpy(dest + (len - index) * elem_sz, src, index * elem_sz);
-}
-
-template<class T>
-static void transpose(std::vector<std::vector<T> > a,
-	std::vector<std::vector<T> > b, int width, int height)
-{
-    for (int i = 0; i < width; i++) {
-	for (int j = 0; j < height; j++) {
-	    b[j][i] = a[i][j];
-	}
-    }
-}
-
-/** Given a vector of doubles, transpose the elements. Use this to flip the
- * latitude vector for a Grid that stores the southern latitudes at the top
- * instead of the bottom.
- *
- * @param src A pointer to the vector
- * @param length The number of elements in the vector
- */
-void GeoConstraint::transpose_vector(double *src, const int length)
-{
-    double *tmp = new double[length];
-
-    int i = 0, j = length-1;
-    while (i < length)
-	tmp[j--] = src[i++];
-
-    memcpy(src, tmp,length * sizeof(double));
-
-    delete[] tmp;
-}
-
-static int
-count_size_except_latitude_and_longitude(Array &a)
-{
-    if (a.dim_end() - a.dim_begin() <= 2)	// < 2 is really an error...
-	return 1;
-
-    int size = 1;
-    for (Array::Dim_iter i = a.dim_begin(); (i + 2) != a.dim_end(); ++i)
-        size *= a.dimension_size(i, true);
-
-    return size;
-}
-
-void GeoConstraint::flip_latitude_within_array(Array &a, int lat_length,
-	int lon_length)
-{
-    if (!d_array_data) {
-	a.read();
-	d_array_data = static_cast<char*>(a.value());
-	d_array_data_size = a.width();	// Bytes not elements
-    }
-
-    int size = count_size_except_latitude_and_longitude(a);
-    // char *tmp_data = new char[d_array_data_size];
-    vector<char> tmp_data(d_array_data_size);
-    int array_elem_size = a.var()->width();
-    int lat_lon_size = (d_array_data_size / size);
-
-    DBG(cerr << "lat, lon_length: " << lat_length << ", " << lon_length << endl);
-    DBG(cerr << "size: " << size << endl);
-    DBG(cerr << "d_array_data_size: " << d_array_data_size << endl);
-    DBG(cerr << "array_elem_size: " << array_elem_size<< endl);
-    DBG(cerr << "lat_lon_size: " << lat_lon_size<< endl);
-
-    for (int i = 0; i < size; ++i) {
-	int lat = 0;
-	int s_lat = lat_length - 1;
-	// lon_length is the element size; memcpy() needs the number of bytes
-	int lon_size = array_elem_size * lon_length;
-	int offset = i * lat_lon_size;
-	while (s_lat > -1)
-	    memcpy(&tmp_data[0] + offset + (lat++ * lon_size),
-		    d_array_data + offset + (s_lat-- * lon_size),
-		    lon_size);
-    }
-
-    memcpy(d_array_data, &tmp_data[0], d_array_data_size);
-}
-
-/** Reorder the elements in the longitude map so that the longitude constraint no
-    longer crosses the edge of the map's storage. The d_lon field is
-    modified.
-
-    @note The d_lon vector always has double values regardless of the type
-    of d_longitude.
-
-    @param longitude_index_left The left edge of the bounding box. */
-void GeoConstraint::reorder_longitude_map(int longitude_index_left)
-{
-    double *tmp_lon = new double[d_lon_length];
-
-    swap_vector_ends((char *) tmp_lon, (char *) d_lon, d_lon_length,
-                     longitude_index_left, sizeof(double));
-
-    memcpy(d_lon, tmp_lon, d_lon_length * sizeof(double));
-
-    delete[]tmp_lon;
-}
-
-static int
-count_dimensions_except_longitude(Array &a)
-{
-    int size = 1;
-    for (Array::Dim_iter i = a.dim_begin(); (i + 1) != a.dim_end(); ++i)
-        size *= a.dimension_size(i, true);
-
-    return size;
-}
-
-/** Reorder the data values relative to the longitude axis so that the
-    reordered longitude map (see GeoConstraint::reorder_longitude_map())
-    and the data values match.
-
-    @note This should be called with the Array that contains the d_lon_dim
-    Array::Dim_iter.
-
-    @note This method must set the d_array_data and d_array_data_size
-    fields. If those are set, apply_constraint_to_data() will use those
-    values.
-
-    @note First set all the other constraints, including the latitude and
-    then make this call. Other constraints, besides latitude, will be simple
-    range constraints. Latitude might require that values be flipped, but
-    that can be done _after_ the longitude reordering takes place.
-
-    @todo Fix this code so that it works with latitude as the rightmost map */
-void GeoConstraint::reorder_data_longitude_axis(Array &a, Array::Dim_iter lon_dim)
-{
-
-    if (!is_longitude_rightmost())
-        throw Error("This grid does not have Longitude as its rightmost dimension, the geogrid()\ndoes not support constraints that wrap around the edges of this type of grid.");
-
-    DBG(cerr << "Constraint for the left half: " << get_longitude_index_left()
-        << ", " << get_lon_length() - 1 << endl);
-
-    // Build a constraint for the left part and get those values
-    a.add_constraint(lon_dim, get_longitude_index_left(), 1,
-                     get_lon_length() - 1);
-    a.set_read_p(false);
-    a.read();
-    DBG2(a.print_val(stderr));
-
-    // Save the left-hand data to local storage
-    int left_size = a.width();		// width() == length() * element size
-    char *left_data = (char*)a.value();	// value() allocates and copies
-
-    // Build a constraint for the 'right' part, which goes from the left edge
-    // of the array to the right index and read those data.
-    // (Don't call a.clear_constraint() since that will clear the constraint on
-    // all the dimensions while add_constraint() will replace a constraint on
-    // the given dimension).
-
-    DBG(cerr << "Constraint for the right half: " << 0
-        << ", " << get_longitude_index_right() << endl);
-
-    a.add_constraint(lon_dim, 0, 1, get_longitude_index_right());
-    a.set_read_p(false);
-    a.read();
-    DBG2(a.print_val(stderr));
-
-    char *right_data = (char*)a.value();
-    int right_size = a.width();
-
-    // Make one big lump O'data
-    d_array_data_size = left_size + right_size;
-    d_array_data = new char[d_array_data_size];
-
-    // Assume COARDS conventions are being followed: lon varies fastest.
-    // These *_elements variables are actually elements * bytes/element since
-    // memcpy() uses bytes.
-    int elem_size = a.var()->width();
-    int left_row_size = (get_lon_length() - get_longitude_index_left()) * elem_size;
-    int right_row_size = (get_longitude_index_right() + 1) * elem_size;
-    int total_bytes_per_row = left_row_size + right_row_size;
-
-    DBG2(cerr << "elem_size: " << elem_size << "; left & right size: "
-	    << left_row_size << ", " << right_row_size << endl);
-
-    // This will work for any number of dimension so long as longitude is the
-    // right-most array dimension.
-    int rows_to_copy = count_dimensions_except_longitude(a);
-    for (int i = 0; i < rows_to_copy; ++i) {
-	DBG(cerr << "Copying " << i << "th row" << endl);
-	DBG(cerr << "left memcpy: " << *(float *)(left_data + (left_row_size * i)) << endl);
-
-        memcpy(d_array_data + (total_bytes_per_row * i),
-               left_data + (left_row_size * i),
-               left_row_size);
-
-        DBG(cerr << "right memcpy: " << *(float *)(right_data + (right_row_size * i)) << endl);
-
-        memcpy(d_array_data + (total_bytes_per_row * i) + left_row_size,
-               right_data + (right_row_size * i),
-               right_row_size);
-    }
-
-    delete[]left_data;
-    delete[]right_data;
-}
-
-/** @brief Initialize GeoConstraint.
- */
-GeoConstraint::GeoConstraint()
-        : d_array_data(0), d_array_data_size(0),
-        d_lat(0), d_lon(0),
-        d_bounding_box_set(false),
-        d_longitude_rightmost(false),
-        d_longitude_notation(unknown_notation),
-        d_latitude_sense(unknown_sense)
-{
-    // Build sets of attribute values for easy searching. Maybe overkill???
-    d_coards_lat_units.insert("degrees_north");
-    d_coards_lat_units.insert("degree_north");
-    d_coards_lat_units.insert("degree_N");
-    d_coards_lat_units.insert("degrees_N");
-
-    d_coards_lon_units.insert("degrees_east");
-    d_coards_lon_units.insert("degree_east");
-    d_coards_lon_units.insert("degrees_E");
-    d_coards_lon_units.insert("degree_E");
-
-    d_lat_names.insert("COADSY");
-    d_lat_names.insert("lat");
-    d_lat_names.insert("Lat");
-    d_lat_names.insert("LAT");
-
-    d_lon_names.insert("COADSX");
-    d_lon_names.insert("lon");
-    d_lon_names.insert("Lon");
-    d_lon_names.insert("LON");
-}
-
-/** Set the bounding box for this constraint. After calling this method the
-    object has values for the indexes for the latitude and longitude extent
-    as well as the sense of the latitude (south pole at the top or bottom of
-    the Array or Grid). These are used by the apply_constraint_to_data()
-    method to actually constrain the data.
-
-    @param left The left side of the bounding box.
-    @param right The right side
-    @param top The top
-    @param bottom The bottom */
-void GeoConstraint::set_bounding_box(double top, double left,
-                                     double bottom, double right)
-{
-    // Ensure this method is called only once. What about pthreads?
-    // The method Array::reset_constraint() might make this so it could be
-    // called more than once. jhrg 8/30/06
-    if (d_bounding_box_set)
-        throw Error("It is not possible to register more than one geographical constraint on a variable.");
-
-    // Record the 'sense' of the latitude for use here and later on.
-    d_latitude_sense = categorize_latitude();
-#if 0
-    if (d_latitude_sense == inverted)
-	throw Error("geogrid() does not currently work with inverted data (data where the north pole is at a negative latitude value).");
-#endif
-
-    // Categorize the notation used by the bounding box (0/359 or -180/179).
-    d_longitude_notation = categorize_notation(left, right);
-
-    // If the notation uses -180/179, transform the request to 0/359 notation.
-    if (d_longitude_notation == neg_pos)
-        transform_constraint_to_pos_notation(left, right);
-
-    // If the grid uses -180/179, transform it to 0/359 as well. This will make
-    // subsequent logic easier and adds only a few extra operations, even with
-    // large maps.
-    Notation longitude_notation =
-        categorize_notation(d_lon[0], d_lon[d_lon_length - 1]);
-
-    if (longitude_notation == neg_pos)
-        transform_longitude_to_pos_notation();
-
-    if (!is_bounding_box_valid(left, top, right, bottom))
-        throw Error("The bounding box does not intersect any data within this Grid or Array. The\ngeographical extent of these data are from latitude "
-		    + double_to_string(d_lat[0]) + " to "
-		    + double_to_string(d_lat[d_lat_length-1])
-		    + "\nand longitude " + double_to_string(d_lon[0])
-		    + " to " + double_to_string(d_lon[d_lon_length-1])
-		    + " while the bounding box provided was latitude "
-		    + double_to_string(top) + " to "
-		    + double_to_string(bottom) + "\nand longitude "
-		    + double_to_string(left) + " to "
-		    + double_to_string(right));
-
-    // This is simpler than the longitude case because there's no need to
-    // test for several notations, no need to accommodate them in the return,
-    // no modulo arithmetic for the axis and no need to account for a
-    // constraint with two disconnected parts to be joined.
-    find_latitude_indeces(top, bottom, d_latitude_sense,
-                          d_latitude_index_top, d_latitude_index_bottom);
-
-
-    // Find the longitude map indexes that correspond to the bounding box.
-    find_longitude_indeces(left, right, d_longitude_index_left,
-                           d_longitude_index_right);
-
-    DBG(cerr << "Bounding box (tlbr): " << d_latitude_index_top << ", "
-        << d_longitude_index_left << ", "
-        << d_latitude_index_bottom << ", "
-        << d_longitude_index_right << endl);
-
-    d_bounding_box_set = true;
-}
-
-} // namespace libdap
diff --git a/GeoConstraint.h b/GeoConstraint.h
deleted file mode 100644
index 2e80b9a..0000000
--- a/GeoConstraint.h
+++ /dev/null
@@ -1,376 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2006 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-#ifndef _geo_constraint_h
-#define _geo_constraint_h 1
-
-#include <string>
-#include <sstream>
-#include <set>
-
-#ifndef _basetype_h
-#include "BaseType.h"
-#endif
-
-#ifndef _array_h
-#include "Array.h"
-#endif
-
-#ifndef _grid_h
-#include "Grid.h"
-#endif
-
-namespace libdap
-{
-
-/** Encapsulate the logic needed to handle geographical constraints
-    when they are applied to DAP Grid (and some Array) variables.
-
-    This class will apply a longitude/latitude bounding box to a Grid
-    that is a 'geo-referenced' Grid. That is, it follows the COARDS/CF
-    conventions. This may be relaxed...
-
-    If the longitude range of the constraint crosses the boundary of
-    the data array so that the constraint creates two separate
-    rectangles, this class will arrange to return the result as a
-    single Grid. It will do this by rearranging the data before
-    control is passed onto the constraint evaluator and serialization
-    logic. Here's a diagram of how it works:
-
-    Suppose a constraint for the longitude BB starts at the left edge
-    of L and goes to the right edge of R:
-
-    <pre>
-       0.0       180.0       360.0 (longitude, in degrees)
-        +----------------------+
-        |xxxxxyyyyyyyyyyyyzzzzz|
-        -----+            +-----
-        |    |            |    |
-        | R  |            | L  |
-        |    |            |    |
-        -----+            +-----
-        |                      |
-        +----------------------+
-    </pre>
-
-    For example, suppose the client provides a bounding box that
-    starts at 200 degrees and ends at 80. This class will first copy
-    the Left part to new storage and then copy the right part, thus
-    'stitching together' the two halves of the constraint. The result
-    looks like:
-
-    <pre>
-     80.0  360.0/0.0  180.0  ~200.0 (longitude, in degrees)
-        +----------------------+
-        |zzzzzxxxxxxyyyyyyyyyyy|
-        -----++-----           |
-        |    ||    |           |
-        | L  || R  |           |
-        |    ||    |           |
-        -----++-----           |
-        |                      |
-        +----------------------+
-    </pre>
-
-    The changes are made in the Grid variable itself, so once this is
-    done the Grid should not be re-read by the CE or serialization
-    code.
-
-    @author James Gallagher */
-
-class GeoConstraint
-{
-public:
-    /** The longitude extents of the constraint bounding box can be expressed
-        two ways: using a 0/359 notation and using a -180/179 notation. I call
-        the 0/359 notation 'pos' and the -180/179 notation 'neg_pos'. */
-    enum Notation {
-        unknown_notation,
-        pos,
-        neg_pos
-    };
-
-    /** Most of the time, latitude starts at the top of an array with
-        positive values and ends up at the bottom with negative ones.
-        But sometimes... the world is upside down. */
-    enum LatitudeSense {
-        unknown_sense,
-        normal,
-        inverted
-    };
-
-private:
-    char *d_array_data;    	//< Holds the Grid's data values
-    int d_array_data_size;	//< Total size (bytes) of the array data
-
-    double *d_lat;              //< Holds the latitude values
-    double *d_lon;              //< Holds the longitude values
-    int d_lat_length;           //< Elements (not bytes) in the latitude vector
-    int d_lon_length;           //< ... longitude vector
-
-    // These four are indexes of the constraint
-    int d_latitude_index_top;
-    int d_latitude_index_bottom;
-    int d_longitude_index_left;
-    int d_longitude_index_right;
-
-    bool d_bounding_box_set;    //< Has the bounding box been set?
-    bool d_longitude_rightmost; //< Is longitude the rightmost dimension?
-
-    Notation d_longitude_notation;
-    LatitudeSense d_latitude_sense;
-
-    Array::Dim_iter d_lon_dim;  //< References the longitude dimension
-    Array::Dim_iter d_lat_dim;  //< References the latitude dimension
-
-    // Sets of string values used to find stuff in attributes
-    set<string> d_coards_lat_units;
-    set<string> d_coards_lon_units;
-
-    set<string> d_lat_names;
-    set<string> d_lon_names;
-
-    // Hide these three automatically provided methods
-    GeoConstraint(const GeoConstraint &param);
-    GeoConstraint &operator=(GeoConstraint &rhs);
-
-protected:
-    /** A protected method that searches for latitude and longitude
-        map vectors and sets six key internal fields. This method
-        returns false if either map cannot be found.
-
-        The d_lon, d_lon_length and d_lon_dim (and matching lat)
-        fields <em>must be set</em> by this method.
-
-        @return True if the maps are found, otherwise False */
-    virtual bool build_lat_lon_maps() = 0;
-
-    /** Are the latitude and longitude dimensions ordered so that this
-	class can properly constrain the data? This method throws
-	Error if lat and lon are not to two 'fastest-varying' (or
-	'rightmost) dimensions. It sets the internal property \e
-	longitude_rightmost if that's true.
-
-	@note Called by the constructor once build_lat_lon_maps() has returned.
-
-	@return True if the lat/lon maps are the two rightmost maps,
-	false otherwise*/
-    virtual bool lat_lon_dimensions_ok() = 0;
-
-    Notation categorize_notation(const double left, const double right) const;
-    void transform_constraint_to_pos_notation(double &left, double &right) const;
-    virtual void transform_longitude_to_pos_notation();
-    virtual void transform_longitude_to_neg_pos_notation();
-    virtual bool is_bounding_box_valid(const double left, const double top,
-					const double right, const double bottom) const;
-    void find_longitude_indeces(double left, double right,
-                                int &longitude_index_left,
-                                int &longitude_index_right) const;
-
-    virtual void transpose_vector(double *src, const int length);
-    virtual void reorder_longitude_map(int longitude_index_left);
-
-    virtual LatitudeSense categorize_latitude() const;
-    void find_latitude_indeces(double top, double bottom, LatitudeSense sense,
-                               int &latitude_index_top,
-                               int &latitude_index_bottom) const;
-
-    virtual void reorder_data_longitude_axis(Array &a, Array::Dim_iter lon_dim);
-    virtual void flip_latitude_within_array(Array &a, int lat_length,
-					    int lon_length);
-
-    friend class GridGeoConstraintTest; // Unit tests
-
-public:
-    /** @name Constructors */
-    //@{
-    GeoConstraint();
-    //@}
-
-    virtual ~GeoConstraint()
-    {
-        delete [] d_lat; d_lat = 0;
-        delete [] d_lon; d_lon = 0;
-        delete [] d_array_data; d_array_data = 0;
-    }
-
-    /** @name Accessors/Mutators */
-    //@{
-    // These are set in reorder_data_longitude_axis()
-    char *get_array_data() const
-    {
-        return d_array_data;
-    }
-    int get_array_data_size() const
-    {
-        return d_array_data_size;
-    }
-
-    double *get_lat() const
-    {
-        return d_lat;
-    }
-    double *get_lon() const
-    {
-        return d_lon;
-    }
-    void set_lat(double *lat)
-    {
-        d_lat = lat;
-    }
-    void set_lon(double *lon)
-    {
-        d_lon = lon;
-    }
-
-    int get_lat_length() const
-    {
-        return d_lat_length;
-    }
-    int get_lon_length() const
-    {
-        return d_lon_length;
-    }
-    void set_lat_length(int len)
-    {
-        d_lat_length = len;
-    }
-    void set_lon_length(int len)
-    {
-        d_lon_length = len;
-    }
-
-    Array::Dim_iter get_lon_dim() const
-    {
-        return d_lon_dim;
-    }
-    Array::Dim_iter get_lat_dim() const
-    {
-        return d_lat_dim;
-    }
-    void set_lon_dim(Array::Dim_iter lon)
-    {
-        d_lon_dim = lon;
-    }
-    void set_lat_dim(Array::Dim_iter lat)
-    {
-        d_lat_dim = lat;
-    }
-
-    // These four are indexes of the constraint
-    int get_latitude_index_top() const
-    {
-        return d_latitude_index_top;
-    }
-    int get_latitude_index_bottom() const
-    {
-        return d_latitude_index_bottom;
-    }
-    void set_latitude_index_top(int top)
-    {
-        d_latitude_index_top = top;
-    }
-    void set_latitude_index_bottom(int bottom)
-    {
-        d_latitude_index_bottom = bottom;
-    }
-
-    int get_longitude_index_left() const
-    {
-        return d_longitude_index_left;
-    }
-    int get_longitude_index_right() const
-    {
-        return d_longitude_index_right;
-    }
-    void set_longitude_index_left(int left)
-    {
-        d_longitude_index_left = left;
-    }
-    void set_longitude_index_right(int right)
-    {
-        d_longitude_index_right = right;
-    }
-
-    bool is_bounding_box_set() const
-    {
-        return d_bounding_box_set;
-    }
-    bool is_longitude_rightmost() const
-    {
-        return d_longitude_rightmost;
-    }
-    void set_longitude_rightmost(bool state)
-    {
-        d_longitude_rightmost = state;
-    }
-
-    Notation get_longitude_notation() const
-    {
-        return d_longitude_notation;
-    }
-    LatitudeSense get_latitude_sense() const
-    {
-        return d_latitude_sense;
-    }
-    void set_longitude_notation(Notation n)
-    {
-        d_longitude_notation = n;
-    }
-    void set_latitude_sense(LatitudeSense l)
-    {
-        d_latitude_sense = l;
-    }
-
-    set<string> get_coards_lat_units() const
-        {
-            return d_coards_lat_units;
-        }
-    set<string> get_coards_lon_units() const
-        {
-            return d_coards_lon_units;
-        }
-
-    set<string> get_lat_names() const
-        {
-            return d_lat_names;
-        }
-    set<string> get_lon_names() const
-        {
-            return d_lon_names;
-        }
-    //@}
-
-    void set_bounding_box(double top, double left, double bottom, double right);
-
-    /** @brief Once the bounding box is set use this method to apply
-        the constraint. */
-    virtual void apply_constraint_to_data() = 0;
-};
-
-} // namespace libdap
-
-#endif // _geo_constraint_h
-
diff --git a/Grid.cc b/Grid.cc
index 1caf27d..c4b380c 100644
--- a/Grid.cc
+++ b/Grid.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -37,6 +37,7 @@
 
 // #define DODS_DEBUG
 
+#include <sstream>
 #include <functional>
 #include <algorithm>
 
@@ -54,22 +55,22 @@ using namespace std;
 namespace libdap {
 
 void
-Grid::_duplicate(const Grid &s)
+Grid::m_duplicate(const Grid &s)
 {
-    // Clear out any spurious vars in Constructor::_vars
-    _vars.clear(); // [mjohnson 10 Sep 2009]
+    // Clear out any spurious vars in Constructor::d_vars
+    d_vars.clear(); // [mjohnson 10 Sep 2009]
 
-    _array_var = s._array_var->ptr_duplicate();
-    _array_var->set_parent(this);
-    _vars.push_back(_array_var); // so the Constructor::Vars_Iter sees it [mjohnson 10 Sep 2009]
+    d_array_var = s.d_array_var->ptr_duplicate();
+    d_array_var->set_parent(this);
+    d_vars.push_back(d_array_var); // so the Constructor::Vars_Iter sees it [mjohnson 10 Sep 2009]
 
     Grid &cs = const_cast<Grid &>(s);
 
-    for (Map_iter i = cs._map_vars.begin(); i != cs._map_vars.end(); i++) {
+    for (Map_iter i = cs.d_map_vars.begin(); i != cs.d_map_vars.end(); i++) {
         BaseType *btp = (*i)->ptr_duplicate();
         btp->set_parent(this);
-        _map_vars.push_back(btp);
-        _vars.push_back(btp); // push all map vectors as weak refs into super::_vars which won't delete them [mjohnson 10 Sep 2009]
+        d_map_vars.push_back(btp);
+        d_vars.push_back(btp); // push all map vectors as weak refs into super::d_vars which won't delete them [mjohnson 10 Sep 2009]
     }
 
 }
@@ -83,7 +84,7 @@ Grid::_duplicate(const Grid &s)
 
     @brief The Grid constructor.
 */
-Grid::Grid(const string &n) : Constructor(n, dods_grid_c), _array_var(0)
+Grid::Grid(const string &n) : Constructor(n, dods_grid_c), d_array_var(0)
 {}
 
 /** The Grid server-side constructor requires the name of the variable
@@ -98,20 +99,20 @@ Grid::Grid(const string &n) : Constructor(n, dods_grid_c), _array_var(0)
     @brief The Grid constructor.
 */
 Grid::Grid(const string &n, const string &d)
-    : Constructor(n, d, dods_grid_c), _array_var(0)
+    : Constructor(n, d, dods_grid_c), d_array_var(0)
 {}
 
 /** @brief The Grid copy constructor. */
 Grid::Grid(const Grid &rhs) : Constructor(rhs)
 {
-    _duplicate(rhs);
+    m_duplicate(rhs);
 }
 
 Grid::~Grid()
 {
-    delete _array_var; _array_var = 0;
+    delete d_array_var; d_array_var = 0;
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         BaseType *btp = *i ;
         delete btp ; btp = 0;
     }
@@ -129,35 +130,46 @@ Grid::operator=(const Grid &rhs)
     if (this == &rhs)
         return *this;
 
-    delete _array_var; _array_var = 0;
+    delete d_array_var; d_array_var = 0;
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         BaseType *btp = *i ;
         delete btp ;
     }
 
-    // this doesn't copy Constructor::_vars so...
+    // this doesn't copy Constructor::d_vars so...
     dynamic_cast<Constructor &>(*this) = rhs;
 
     // we do it in here...
-    _duplicate(rhs);
+    m_duplicate(rhs);
 
     return *this;
 }
 
+/**
+ * Grid can only be used for DAP2.
+ * @note This might change depending on just how complex DAP4Array becomes,
+ * for example.
+ */
+bool
+Grid::is_dap2_only_type()
+{
+    return true;
+}
+
 int
 Grid::element_count(bool leaves)
 {
     if (!leaves)
-        return _map_vars.size() + 1;
+        return d_map_vars.size() + 1;
     else {
         int i = 0;
-        for (Map_iter j = _map_vars.begin(); j != _map_vars.end(); j++) {
+        for (Map_iter j = d_map_vars.begin(); j != d_map_vars.end(); j++) {
             j += (*j)->element_count(leaves);
         }
 
 		if (!get_array())
-			throw InternalErr(__FILE__, __LINE__, "No Grid arry!");
+			throw InternalErr(__FILE__, __LINE__, "No Grid array!");
 
         i += get_array()->element_count(leaves);
         return i;
@@ -167,9 +179,9 @@ Grid::element_count(bool leaves)
 void
 Grid::set_send_p(bool state)
 {
-    _array_var->set_send_p(state);
+    d_array_var->set_send_p(state);
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         (*i)->set_send_p(state);
     }
 
@@ -179,9 +191,9 @@ Grid::set_send_p(bool state)
 void
 Grid::set_read_p(bool state)
 {
-    _array_var->set_read_p(state);
+    d_array_var->set_read_p(state);
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         (*i)->set_read_p(state);
     }
 
@@ -191,27 +203,27 @@ Grid::set_read_p(bool state)
 void
 Grid::set_in_selection(bool state)
 {
-    _array_var->set_in_selection(state);
+    d_array_var->set_in_selection(state);
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         (*i)->set_in_selection(state);
     }
 
     BaseType::set_in_selection(state);
 }
-
+#if 0
 unsigned int
-Grid::width()
+Grid::width(bool)
 {
-    unsigned int sz = _array_var->width();
+    unsigned int sz = d_array_var->width();
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         sz += (*i)->width();
     }
 
     return sz;
 }
-
+#endif
 /** This version of width simply returns the same thing as width() for simple
     types and Arrays. For Structure it returns the total size if constrained
     is false, or the size of the elements in the current projection if true.
@@ -225,14 +237,14 @@ Grid::width(bool constrained)
     unsigned int sz = 0;
 
     if (constrained) {
-    	if (_array_var->send_p())
-    		sz = _array_var->width(constrained);
+    	if (d_array_var->send_p())
+    		sz = d_array_var->width(constrained);
     }
     else {
-    	sz = _array_var->width(constrained);
+    	sz = d_array_var->width(constrained);
     }
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
     	if (constrained) {
     		if ((*i)->send_p())
     			sz += (*i)->width(constrained);
@@ -255,10 +267,10 @@ Grid::intern_data(ConstraintEvaluator &eval, DDS &dds)
 
     dds.timeout_off();
 
-    if (_array_var->send_p())
-        _array_var->intern_data(eval, dds);
+    if (d_array_var->send_p())
+        d_array_var->intern_data(eval, dds);
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         if ((*i)->send_p()) {
             (*i)->intern_data(eval, dds);
         }
@@ -289,31 +301,33 @@ Grid::serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval
 
     dds.timeout_off();
 
-    if (_array_var->send_p()) {
+    if (d_array_var->send_p()) {
 #ifdef CHECKSUMS
-        XDRStreamMarshaller &sm = dynamic_cast<XDRStreamMarshaller &>(m);
-        sm.reset_checksum();
+        XDRStreamMarshaller *sm = dynamic_cast<XDRStreamMarshaller*>(&m);
+        if (sm && sm->checksums())
+            sm->reset_checksum();
 
-        _array_var->serialize(eval, dds, m, false);
+        d_array_var->serialize(eval, dds, m, false);
 
-        //cerr << _array_var->name() << ": " <<
-        sm.get_checksum();// << endl;
+        if (sm && sm->checksums())
+            sm->get_checksum();
 #else
         DBG(cerr << "About to call Array::serialize() in Grid::serialize" << endl);
-            _array_var->serialize(eval, dds, m, false);
+        d_array_var->serialize(eval, dds, m, false);
 #endif
     }
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         if ((*i)->send_p()) {
 #ifdef CHECKSUMS
-            XDRStreamMarshaller &sm = dynamic_cast<XDRStreamMarshaller &>(m);
-            sm.reset_checksum();
+            XDRStreamMarshaller *sm = dynamic_cast<XDRStreamMarshaller*>(&m);
+            if (sm && sm->checksums())
+                sm->reset_checksum();
 
             (*i)->serialize(eval, dds, m, false);
 
-            //cerr << (*i)->name() << ": " <<
-            sm.get_checksum(); // << endl;
+            if (sm && sm->checksums())
+                sm->get_checksum();
 #else
             (*i)->serialize(eval, dds, m, false);
 #endif
@@ -326,15 +340,16 @@ Grid::serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval
 bool
 Grid::deserialize(UnMarshaller &um, DDS *dds, bool reuse)
 {
-    _array_var->deserialize(um, dds, reuse);
+    d_array_var->deserialize(um, dds, reuse);
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         (*i)->deserialize(um, dds, reuse);
     }
 
     return false;
 }
 
+#if 0
 /** @brief Returns the size of the Grid type.
 
     Use the <tt>val2buf()</tt>
@@ -356,6 +371,7 @@ Grid::buf2val(void **)
 {
     return sizeof(Grid);
 }
+#endif
 
 BaseType *
 Grid::var(const string &n, btp_stack &s)
@@ -372,13 +388,13 @@ Grid::var(const string &n, bool, btp_stack *s)
 {
     string name = www2id(n);
 
-    if (_array_var->name() == name) {
+    if (d_array_var->name() == name) {
         if (s)
             s->push(static_cast<BaseType *>(this));
-        return _array_var;
+        return d_array_var;
     }
 
-    for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+    for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
         if ((*i)->name() == name) {
             if (s)
                 s->push(static_cast<BaseType *>(this));
@@ -404,12 +420,13 @@ Grid::var(const string &n, bool, btp_stack *s)
 void
 Grid::add_var(BaseType *bt, Part part)
 {
-    if (!bt) {
-        throw InternalErr(__FILE__, __LINE__,
-                          "Passing NULL pointer as variable to be added.");
-    }
-
-    if (part == array && _array_var) {
+    if (!bt)
+        throw InternalErr(__FILE__, __LINE__, "Passing NULL pointer as variable to be added.");
+#if 0
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Grid.");
+#endif
+    if (part == array && d_array_var) {
       // Avoid leaking memory...  Function is add, not set, so it is an error to call again for the array part.
       throw InternalErr(__FILE__, __LINE__, "Error: Grid::add_var called with part==Array, but the array was already set!");
     }
@@ -436,12 +453,12 @@ Grid::add_var(BaseType *bt, Part part)
     case maps: {
             bt_clone = bt->ptr_duplicate();
             bt_clone->set_parent(this);
-            _map_vars.push_back(bt_clone);
+            d_map_vars.push_back(bt_clone);
         }
     break;
 
     default: {
-        if (!_array_var) {
+        if (!d_array_var) {
             // Refactored to use new set_array ([mjohnson 11 nov 2009])
             Array* p_arr = dynamic_cast<Array*>(bt);
             // avoid obvious broken semantics
@@ -456,7 +473,7 @@ Grid::add_var(BaseType *bt, Part part)
         else {
             bt_clone = bt->ptr_duplicate();
             bt_clone->set_parent(this);
-            _map_vars.push_back(bt_clone);
+            d_map_vars.push_back(bt_clone);
         }
     }
     break;
@@ -464,9 +481,9 @@ Grid::add_var(BaseType *bt, Part part)
 
   // if we get ehre without exception, add the cloned object to the superclass variable iterator
   // mjohnson 10 Sep 2009
-  // Add it to the superclass _vars list so we can iterate on superclass vars
+  // Add it to the superclass d_vars list so we can iterate on superclass vars
   if (bt_clone) {
-    _vars.push_back(bt_clone);
+    d_vars.push_back(bt_clone);
   }
 }
 
@@ -488,12 +505,13 @@ Grid::add_var(BaseType *bt, Part part)
 void
 Grid::add_var_nocopy(BaseType *bt, Part part)
 {
-    if (!bt) {
-        throw InternalErr(__FILE__, __LINE__,
-                          "Passing NULL pointer as variable to be added.");
-    }
-
-    if (part == array && _array_var) {
+    if (!bt)
+        throw InternalErr(__FILE__, __LINE__, "Passing NULL pointer as variable to be added.");
+#if 0
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Grid.");
+#endif
+    if (part == array && d_array_var) {
       // Avoid leaking memory...  Function is add, not set, so it is an error to call again for the array part.
       throw InternalErr(__FILE__, __LINE__, "Error: Grid::add_var called with part==Array, but the array was already set!");
     }
@@ -516,12 +534,12 @@ Grid::add_var_nocopy(BaseType *bt, Part part)
 
     case maps: {
             //bt->set_parent(this);
-            _map_vars.push_back(bt);
+            d_map_vars.push_back(bt);
         }
     break;
 
     default: {
-        if (!_array_var) {
+        if (!d_array_var) {
             // Refactored to use new set_array ([mjohnson 11 nov 2009])
             Array* p_arr = dynamic_cast<Array*>(bt);
             // avoid obvious broken semantics
@@ -532,7 +550,7 @@ Grid::add_var_nocopy(BaseType *bt, Part part)
             set_array(static_cast<Array*>(bt));
         }
         else {
-            _map_vars.push_back(bt);
+            d_map_vars.push_back(bt);
         }
     }
     break;
@@ -540,9 +558,9 @@ Grid::add_var_nocopy(BaseType *bt, Part part)
 
   // if we get here without exception, add the cloned object to the superclass variable iterator
   // mjohnson 10 Sep 2009
-  // Add it to the superclass _vars list so we can iterate on superclass vars
+  // Add it to the superclass d_vars list so we can iterate on superclass vars
   if (bt) {
-    _vars.push_back(bt);
+    d_vars.push_back(bt);
   }
 }
 
@@ -563,14 +581,14 @@ Grid::set_array(Array* p_new_arr)
         "Grid::set_array(): Cannot set to null!");
   }
   // Make sure not same memory, this would be evil.
-  if (p_new_arr == _array_var) {
+  if (p_new_arr == d_array_var) {
       return;
    }
   // clean out any old array
-  delete _array_var; _array_var = 0;
+  delete d_array_var; d_array_var = 0;
   // Set the new, with parent
-  _array_var = p_new_arr;
-  _array_var->set_parent(this);
+  d_array_var = p_new_arr;
+  d_array_var->set_parent(this);
 }
 
 /**
@@ -602,18 +620,18 @@ Grid::set_array(Array* p_new_arr)
 Array*
 Grid::add_map(Array* p_new_map, bool add_as_copy)
 {
-  if (!p_new_map) {
-    throw InternalErr(__FILE__, __LINE__,
-        "Grid::add_map(): cannot have p_new_map null!");
-  }
-
-  if (add_as_copy) {
+  if (!p_new_map)
+    throw InternalErr(__FILE__, __LINE__, "Grid::add_map(): cannot have p_new_map null!");
+#if 0
+  if (p_new_map->is_dap4_only_type())
+      throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Grid.");
+#endif
+  if (add_as_copy)
     p_new_map = static_cast<Array*>(p_new_map->ptr_duplicate());
-  }
 
   p_new_map->set_parent(this);
-  _map_vars.push_back(p_new_map);
-  _vars.push_back(p_new_map); // allow superclass iter to work as well.
+  d_map_vars.push_back(p_new_map);
+  d_vars.push_back(p_new_map); // allow superclass iter to work as well.
 
   // return the one that got put into the Grid.
   return p_new_map;
@@ -640,8 +658,8 @@ Grid::prepend_map(Array* p_new_map, bool add_copy)
     }
 
   p_new_map->set_parent(this);
-  _map_vars.insert(_map_vars.begin(), p_new_map);
-  _vars.insert(_vars.begin(), p_new_map); // allow superclass iter to work as well.
+  d_map_vars.insert(d_map_vars.begin(), p_new_map);
+  d_vars.insert(d_vars.begin(), p_new_map); // allow superclass iter to work as well.
 
    // return the one that got put into the Grid.
    return p_new_map;
@@ -653,7 +671,7 @@ Grid::prepend_map(Array* p_new_map, bool add_copy)
 BaseType *
 Grid::array_var()
 {
-    return _array_var;
+    return d_array_var;
 }
 
 /** @brief Returns the Grid Array.
@@ -662,7 +680,7 @@ Grid::array_var()
 Array *
 Grid::get_array()
 {
-    Array *a = dynamic_cast<Array*>(_array_var);
+    Array *a = dynamic_cast<Array*>(d_array_var);
     if (a)
         return a;
     else
@@ -673,7 +691,7 @@ Grid::get_array()
 Grid::Map_iter
 Grid::map_begin()
 {
-    return _map_vars.begin() ;
+    return d_map_vars.begin() ;
 }
 
 /** Returns an iterator referencing the end of the list of Map vectors.
@@ -681,14 +699,14 @@ Grid::map_begin()
 Grid::Map_iter
 Grid::map_end()
 {
-    return _map_vars.end() ;
+    return d_map_vars.end() ;
 }
 
 /** @brief Returns an iterator referencing the first Map vector. */
 Grid::Map_riter
 Grid::map_rbegin()
 {
-    return _map_vars.rbegin() ;
+    return d_map_vars.rbegin() ;
 }
 
 /** Returns an iterator referencing the end of the list of Map vectors.
@@ -696,7 +714,7 @@ Grid::map_rbegin()
 Grid::Map_riter
 Grid::map_rend()
 {
-    return _map_vars.rend() ;
+    return d_map_vars.rend() ;
 }
 
 /** Return the iterator for the \e ith map.
@@ -705,7 +723,7 @@ Grid::map_rend()
 Grid::Map_iter
 Grid::get_map_iter(int i)
 {
-    return _map_vars.begin() + i;
+    return d_map_vars.begin() + i;
 }
 
 /** Returns the number of components in the Grid object.  This is
@@ -729,16 +747,16 @@ Grid::components(bool constrained)
     int comp;
 
     if (constrained) {
-        comp = _array_var->send_p() ? 1 : 0;
+        comp = d_array_var->send_p() ? 1 : 0;
 
-        for (Map_iter i = _map_vars.begin(); i != _map_vars.end(); i++) {
+        for (Map_iter i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
             if ((*i)->send_p()) {
                 comp++;
             }
         }
     }
     else {
-        comp = 1 + _map_vars.size();
+        comp = 1 + d_map_vars.size();
     }
 
     return comp;
@@ -805,7 +823,7 @@ Grid::projection_yields_grid()
     // projected dimension in the Array component, there is a matching Map
     // vector, then the Grid is valid.
     bool valid = true;
-    Array *a = (Array *)_array_var;
+    Array *a = (Array *)d_array_var;
 
     // Don't bother checking if the Array component is not included.
     if (!a->send_p())
@@ -844,68 +862,19 @@ Grid::projection_yields_grid()
 void
 Grid::clear_constraint()
 {
-    dynamic_cast<Array&>(*_array_var).clear_constraint();
+    dynamic_cast<Array&>(*d_array_var).clear_constraint();
     for (Map_iter m = map_begin(); m != map_end(); ++m)
         dynamic_cast<Array&>(*(*m)).clear_constraint();
 }
 
-#if FILE_METHODS
 void
 Grid::print_decl(FILE *out, string space, bool print_semi,
                  bool constraint_info, bool constrained)
 {
-    if (constrained && !send_p())
-        return;
-
-    // The problem with the above is that if two Grids are projected and each
-    // contain one variable, say a map, and it happens to have the same name
-    // in each Grid, then without the enclosing Structures, the returned dataset
-    // has two variables with the same name at the same lexical level. So I'm
-    // removing the code above.
-    if (constrained && !projection_yields_grid()) {
-        fprintf(out, "%sStructure {\n", space.c_str()) ;
-
-        _array_var->print_decl(out, space + "    ", true, constraint_info,
-                               constrained);
-
-        for (Map_citer i = _map_vars.begin(); i != _map_vars.end(); i++) {
-            (*i)->print_decl(out, space + "    ", true,
-                             constraint_info, constrained);
-        }
-
-        fprintf(out, "%s} %s", space.c_str(), id2www(name()).c_str()) ;
-    }
-    else {
-        // The number of elements in the (projected) Grid must be such that
-        // we have a valid Grid object; send it as such.
-        fprintf(out, "%s%s {\n", space.c_str(), type_name().c_str()) ;
-
-        fprintf(out, "%s  Array:\n", space.c_str()) ;
-        _array_var->print_decl(out, space + "    ", true, constraint_info,
-                               constrained);
-
-        fprintf(out, "%s  Maps:\n", space.c_str()) ;
-        for (Map_citer i = _map_vars.begin(); i != _map_vars.end(); i++) {
-            (*i)->print_decl(out, space + "    ", true,
-                             constraint_info, constrained);
-        }
-
-        fprintf(out, "%s} %s", space.c_str(), id2www(name()).c_str()) ;
-    }
-
-    if (constraint_info) {
-        if (send_p())
-            fprintf( out, ": Send True");
-        else
-            fprintf( out, ": Send False");
-    }
-
-    if (print_semi)
-        fprintf(out, ";\n") ;
-
-    return;
+    ostringstream oss;
+    print_decl(oss, space, print_semi, constraint_info, constrained);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Grid::print_decl(ostream &out, string space, bool print_semi,
@@ -918,10 +887,10 @@ Grid::print_decl(ostream &out, string space, bool print_semi,
     if (constrained && !projection_yields_grid()) {
 	out << space << "Structure {\n" ;
 
-        _array_var->print_decl(out, space + "    ", true, constraint_info,
+        d_array_var->print_decl(out, space + "    ", true, constraint_info,
                                constrained);
 
-        for (Map_citer i = _map_vars.begin(); i != _map_vars.end(); i++) {
+        for (Map_citer i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
             (*i)->print_decl(out, space + "    ", true,
                              constraint_info, constrained);
         }
@@ -934,11 +903,11 @@ Grid::print_decl(ostream &out, string space, bool print_semi,
 	out << space << type_name() << " {\n" ;
 
 	out << space << "  Array:\n" ;
-        _array_var->print_decl(out, space + "    ", true, constraint_info,
+        d_array_var->print_decl(out, space + "    ", true, constraint_info,
                                constrained);
 
 	out << space << "  Maps:\n" ;
-        for (Map_citer i = _map_vars.begin(); i != _map_vars.end(); i++) {
+        for (Map_citer i = d_map_vars.begin(); i != d_map_vars.end(); i++) {
             (*i)->print_decl(out, space + "    ", true,
                              constraint_info, constrained);
         }
@@ -959,92 +928,16 @@ Grid::print_decl(ostream &out, string space, bool print_semi,
     return;
 }
 
-#if FILE_METHODS
-class PrintMapField : public unary_function<BaseType *, void>
-{
-    FILE *d_out;
-    string d_space;
-    bool d_constrained;
-    string d_tag;
-public:
-    PrintMapField(FILE *o, string s, bool c, const string &t = "Map")
-            : d_out(o), d_space(s), d_constrained(c), d_tag(t)
-    {}
-
-    void operator()(BaseType *btp)
-    {
-        Array *a = dynamic_cast<Array*>(btp);
-        if (!a)
-            throw InternalErr(__FILE__, __LINE__, "Expected an Array.");
-        a->print_xml_core(d_out, d_space, d_constrained, d_tag);
-    }
-};
-
 /**
  * @deprecated
  */
 void
 Grid::print_xml(FILE *out, string space, bool constrained)
 {
-    if (constrained && !send_p())
-         return;
-
-     if (constrained && !projection_yields_grid()) {
-         fprintf(out, "%s<Structure", space.c_str());
-         if (!name().empty())
-             fprintf(out, " name=\"%s\"", id2xml(name()).c_str());
-
-         fprintf(out, ">\n");
-
-         get_attr_table().print_xml(out, space + "    ", constrained);
-
-         get_array()->print_xml(out, space + "    ", constrained);
-
-         for_each(map_begin(), map_end(),
-                  PrintMapField(out, space + "    ", constrained, "Array"));
-
-         fprintf(out, "%s</Structure>\n", space.c_str());
-     }
-     else {
-         // The number of elements in the (projected) Grid must be such that
-         // we have a valid Grid object; send it as such.
-         fprintf(out, "%s<Grid", space.c_str());
-         if (!name().empty())
-             fprintf(out, " name=\"%s\"", id2xml(name()).c_str());
-
-         fprintf(out, ">\n");
-
-         get_attr_table().print_xml(out, space + "    ", constrained);
-
-         get_array()->print_xml(out, space + "    ", constrained);
-
-         for_each(map_begin(), map_end(),
-                  PrintMapField(out, space + "    ", constrained));
-
-         fprintf(out, "%s</Grid>\n", space.c_str());
-     }
+    XMLWriter xml(space);
+    print_xml_writer(xml, constrained);
+    fwrite(xml.get_doc(), sizeof(char), xml.get_doc_size(), out);
 }
-#endif
-
-class PrintMapFieldStrm : public unary_function<BaseType *, void>
-{
-    ostream &d_out;
-    string d_space;
-    bool d_constrained;
-    string d_tag;
-public:
-    PrintMapFieldStrm(ostream &o, string s, bool c, const string &t = "Map")
-            : d_out(o), d_space(s), d_constrained(c), d_tag(t)
-    {}
-
-    void operator()(BaseType *btp)
-    {
-        Array *a = dynamic_cast<Array*>(btp);
-        if (!a)
-            throw InternalErr(__FILE__, __LINE__, "Expected an Array.");
-        a->print_xml_core(d_out, d_space, d_constrained, d_tag);
-    }
-};
 
 /**
  * @deprecated
@@ -1052,43 +945,9 @@ public:
 void
 Grid::print_xml(ostream &out, string space, bool constrained)
 {
-    if (constrained && !send_p())
-        return;
-
-    if (constrained && !projection_yields_grid()) {
-        out << space << "<Structure" ;
-        if (!name().empty())
-            out << " name=\"" << id2xml(name()) << "\"" ;
-
-        out << ">\n" ;
-
-        get_attr_table().print_xml(out, space + "    ", constrained);
-
-        get_array()->print_xml(out, space + "    ", constrained);
-
-        for_each(map_begin(), map_end(),
-                 PrintMapFieldStrm(out, space + "    ", constrained, "Array"));
-
-        out << space << "</Structure>\n" ;
-    }
-    else {
-        // The number of elements in the (projected) Grid must be such that
-        // we have a valid Grid object; send it as such.
-        out << space << "<Grid" ;
-        if (!name().empty())
-            out << " name=\"" << id2xml(name()) << "\"" ;
-
-        out << ">\n" ;
-
-        get_attr_table().print_xml(out, space + "    ", constrained);
-
-        get_array()->print_xml(out, space + "    ", constrained);
-
-        for_each(map_begin(), map_end(),
-                 PrintMapFieldStrm(out, space + "    ", constrained));
-
-        out << space << "</Grid>\n" ;
-    }
+    XMLWriter xml(space);
+    print_xml_writer(xml, constrained);
+    out << xml.get_doc();
 }
 
 
@@ -1157,37 +1016,13 @@ Grid::print_xml_writer(XMLWriter &xml, bool constrained)
     }
 }
 
-#if FILE_METHODS
 void
 Grid::print_val(FILE *out, string space, bool print_decl_p)
 {
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = ") ;
-    }
-
-    // If we are printing a value on the client-side, projection_yields_grid
-    // should not be called since we don't *have* a projection without a
-    // contraint. I think that if we are here and send_p() is not true, then
-    // the value of this function should be ignored. 4/6/2000 jhrg
-    bool pyg = projection_yields_grid(); // hack 12/1/99 jhrg
-    if (pyg || !send_p())
-        fprintf(out, "{  Array: ") ;
-    else
-        fprintf(out, "{") ;
-    _array_var->print_val(out, "", false);
-    if (pyg || !send_p())
-        fprintf(out, "  Maps: ") ;
-    for (Map_citer i = _map_vars.begin(); i != _map_vars.end();
-         i++, (void)(i != _map_vars.end() && fprintf(out, ", "))) {
-        (*i)->print_val(out, "", false);
-    }
-    fprintf(out, " }") ;
-
-    if (print_decl_p)
-        fprintf(out, ";\n") ;
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Grid::print_val(ostream &out, string space, bool print_decl_p)
@@ -1206,11 +1041,11 @@ Grid::print_val(ostream &out, string space, bool print_decl_p)
 	out << "{  Array: " ;
     else
 	out << "{" ;
-    _array_var->print_val(out, "", false);
+    d_array_var->print_val(out, "", false);
     if (pyg || !send_p())
 	out << "  Maps: " ;
-    for (Map_citer i = _map_vars.begin(); i != _map_vars.end();
-         i++, (void)(i != _map_vars.end() && out << ", ")) {
+    for (Map_citer i = d_map_vars.begin(); i != d_map_vars.end();
+         i++, (void)(i != d_map_vars.end() && out << ", ")) {
         (*i)->print_val(out, "", false);
     }
     out << " }" ;
@@ -1233,18 +1068,18 @@ Grid::check_semantics(string &msg, bool all)
 
     msg = "";
 
-    if (!_array_var) {
+    if (!d_array_var) {
         msg += "Null grid base array in `" + name() + "'\n";
         return false;
     }
 
     // Is it an array?
-    if (_array_var->type() != dods_array_c) {
-        msg += "Grid `" + name() + "'s' member `" + _array_var->name() + "' must be an array\n";
+    if (d_array_var->type() != dods_array_c) {
+        msg += "Grid `" + name() + "'s' member `" + d_array_var->name() + "' must be an array\n";
         return false;
     }
 
-    Array *av = (Array *)_array_var; // past test above, must be an array
+    Array *av = (Array *)d_array_var; // past test above, must be an array
 
     // Array must be of a simple_type.
     if (!av->var()->is_simple_type()) {
@@ -1253,7 +1088,7 @@ Grid::check_semantics(string &msg, bool all)
     }
 
     // enough maps?
-    if ((unsigned)_map_vars.size() != av->dimensions()) {
+    if ((unsigned)d_map_vars.size() != av->dimensions()) {
         msg += "The number of map variables for grid `" + this->name() + "' does not match the number of dimensions of `";
         msg += av->name() + "'\n";
         return false;
@@ -1261,8 +1096,8 @@ Grid::check_semantics(string &msg, bool all)
 
     const string array_var_name = av->name();
     Array::Dim_iter asi = av->dim_begin() ;
-    for (Map_iter mvi = _map_vars.begin();
-         mvi != _map_vars.end(); mvi++, asi++) {
+    for (Map_iter mvi = d_map_vars.begin();
+         mvi != d_map_vars.end(); mvi++, asi++) {
 
         BaseType *mv = *mvi;
 
@@ -1296,15 +1131,15 @@ Grid::check_semantics(string &msg, bool all)
         int av_size = av->dimension_size(asi) ;
         if (mv_a_size != av_size) {
             msg += "Grid map variable  `" + mv_a->name() + "'s' size does not match the size of array variable '";
-            msg += _array_var->name() + "'s' cooresponding dimension\n";
+            msg += d_array_var->name() + "'s' cooresponding dimension\n";
             return false;
         }
     }
 
     if (all) {
-        if (!_array_var->check_semantics(msg, true))
+        if (!d_array_var->check_semantics(msg, true))
             return false;
-        for (Map_iter mvi = _map_vars.begin(); mvi != _map_vars.end(); mvi++) {
+        for (Map_iter mvi = d_map_vars.begin(); mvi != d_map_vars.end(); mvi++) {
             if (!(*mvi)->check_semantics(msg, true)) {
                 return false;
             }
@@ -1329,10 +1164,10 @@ Grid::dump(ostream &strm) const
     << (void *)this << ")" << endl ;
     DapIndent::Indent() ;
     Constructor::dump(strm) ;
-    if (_array_var) {
+    if (d_array_var) {
         strm << DapIndent::LMarg << "array var: " << endl ;
         DapIndent::Indent() ;
-        _array_var->dump(strm) ;
+        d_array_var->dump(strm) ;
         DapIndent::UnIndent() ;
     }
     else {
@@ -1340,8 +1175,8 @@ Grid::dump(ostream &strm) const
     }
     strm << DapIndent::LMarg << "map var: " << endl ;
     DapIndent::Indent() ;
-    Map_citer i = _map_vars.begin() ;
-    Map_citer ie = _map_vars.end() ;
+    Map_citer i = d_map_vars.begin() ;
+    Map_citer ie = d_map_vars.end() ;
     for (; i != ie; i++) {
         (*i)->dump(strm) ;
     }
diff --git a/Grid.h b/Grid.h
index 3bbe0b6..813543a 100644
--- a/Grid.h
+++ b/Grid.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -60,8 +60,6 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -110,7 +108,7 @@ namespace libdap
     (<tt>get_array()</tt>), and a set of functions for cycling through the
     list of Map vectors.
 
-    @todo Move, in some sense, the _map_vars up to Constructor. Look at using
+    @todo Move, in some sense, the d_map_vars up to Constructor. Look at using
     Constructor's _var field for these.
     @todo Along the same lines as the previous item, consider removing the
     Part enum and adopting the convention that the first variable added is
@@ -123,11 +121,11 @@ namespace libdap
 class Grid: public Constructor
 {
 private:
-    BaseType *_array_var;
-    std::vector<BaseType *> _map_vars;
+    BaseType *d_array_var;
+    std::vector<BaseType *> d_map_vars;
 
 protected: // subclasses need access [mjohnson 11 nov 2009]
-    void _duplicate(const Grid &s);
+    void m_duplicate(const Grid &s);
 
 public:
 
@@ -144,15 +142,15 @@ public:
     Grid &operator=(const Grid &rhs);
     virtual BaseType *ptr_duplicate();
 
+    virtual bool is_dap2_only_type();
+
     virtual int element_count(bool leaves = false);
 
     virtual void set_send_p(bool state);
     virtual void set_read_p(bool state);
     virtual void set_in_selection(bool state);
 
-    virtual BaseType *var(const string &n, bool exact = true,
-                          btp_stack *s = 0);
-
+    virtual BaseType *var(const string &n, bool exact = true, btp_stack *s = 0);
     virtual BaseType *var(const string &n, btp_stack &s);
 
     virtual void add_var(BaseType *bt, Part part);
@@ -165,10 +163,10 @@ public:
     BaseType *array_var();
     Array *get_array();
 
-
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
+#if 0
     virtual unsigned int width(bool constrained);
-
+#endif
     virtual int components(bool constrained = false);
 
     virtual bool projection_yields_grid();
@@ -176,13 +174,12 @@ public:
     virtual void clear_constraint();
 
     virtual void intern_data(ConstraintEvaluator &eval, DDS &dds);
-    virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
-			   Marshaller &m, bool ce_eval = true);
+    virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval = true);
     virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse = false);
-
+#if 0
     virtual unsigned int val2buf(void *buf, bool reuse = false);
-
     virtual unsigned int buf2val(void **val);
+#endif
 
     virtual void print_decl(ostream &out, string space = "    ",
                             bool print_semi = true,
@@ -196,7 +193,6 @@ public:
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
-#if FILE_METHODS
     virtual void print_decl(FILE *out, string space = "    ",
                             bool print_semi = true,
                             bool constraint_info = false,
@@ -205,7 +201,6 @@ public:
                            bool constrained = false);
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
 
     virtual void transfer_attributes(AttrTable *at_container);
 
diff --git a/GridGeoConstraint.cc b/GridGeoConstraint.cc
deleted file mode 100644
index f75ee11..0000000
--- a/GridGeoConstraint.cc
+++ /dev/null
@@ -1,398 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// The Grid Selection Expression Clause class.
-
-
-#include "config.h"
-
-static char id[] not_used =
-    { "$Id: GridGeoConstraint.cc 25915 2012-10-24 00:14:58Z jimg $"
-    };
-
-#include <cmath>
-
-#include <iostream>
-#include <sstream>
-
-//#define DODS_DEBUG
-
-#include "debug.h"
-#include "dods-datatypes.h"
-#include "GridGeoConstraint.h"
-#include "Float64.h"
-
-#include "Error.h"
-#include "InternalErr.h"
-#include "ce_functions.h"
-#include "util.h"
-
-using namespace std;
-
-namespace libdap {
-
-/** @brief Initialize GeoConstraint with a Grid.
-
-    @param grid Set the GeoConstraint to use this Grid variable. It is the
-    caller's responsibility to ensure that the value \e grid is a valid Grid
-    variable.
- */
-GridGeoConstraint::GridGeoConstraint(Grid *grid)
-        : GeoConstraint(), d_grid(grid), d_latitude(0), d_longitude(0)
-{
-    if (d_grid->get_array()->dimensions() < 2
-        || d_grid->get_array()->dimensions() > 3)
-        throw Error("The geogrid() function works only with Grids of two or three dimensions.");
-
-    // Is this Grid a geo-referenced grid? Throw Error if not.
-    if (!build_lat_lon_maps())
-        throw Error(string("The grid '") + d_grid->name()
-                    + "' does not have identifiable latitude/longitude map vectors.");
-
-    if (!lat_lon_dimensions_ok())
-        throw Error("The geogrid() function will only work when the Grid's Longitude and Latitude\nmaps are the rightmost dimensions.");
-}
-
-GridGeoConstraint::GridGeoConstraint(Grid *grid, Array *lat, Array *lon)
-        : GeoConstraint(), d_grid(grid), d_latitude(0), d_longitude(0)
-{
-    if (d_grid->get_array()->dimensions() < 2
-        || d_grid->get_array()->dimensions() > 3)
-        throw Error("The geogrid() function works only with Grids of two or three dimensions.");
-
-    // Is this Grid a geo-referenced grid? Throw Error if not.
-    if (!build_lat_lon_maps(lat, lon))
-        throw Error(string("The grid '") + d_grid->name()
-                    + "' does not have valid latitude/longitude map vectors.");
-
-
-    if (!lat_lon_dimensions_ok())
-        throw Error("The geogrid() function will only work when the Grid's Longitude and Latitude\nmaps are the rightmost dimensions.");
-}
-
-/** A private method called by the constructor that searches for latitude
-    and longitude map vectors. This method returns false if either map
-    cannot be found. It assumes that the d_grid and d_dds fields are set.
-
-    The d_longitude, d_lon, d_lon_length and d_lon_grid_dim (and matching
-    lat) fields are modified.
-
-    @note Rules used to find Maps:<ul>
-    <li>Latitude: If the Map has a units attribute of "degrees_north",
-    "degree_north", "degree_N", or "degrees_N"</li>
-    <li>Longitude: If the map has a units attribute of "degrees_east"
-    (eastward positive), "degree_east", "degree_E", or "degrees_E"</li>
-    </ul>
-
-    @return True if the maps are found, otherwise False */
-bool GridGeoConstraint::build_lat_lon_maps()
-{
-    Grid::Map_iter m = d_grid->map_begin();
-
-    // Assume that a Grid is correct and thus has exactly as many maps as its
-    // array part has dimensions. Thus don't bother to test the Grid's array
-    // dimension iterator for '!= dim_end()'.
-    Array::Dim_iter d = d_grid->get_array()->dim_begin();
-
-    // The fields d_latitude and d_longitude may be initialized to null or they
-    // may already contain pointers to the maps to use. In the latter case,
-    // skip the heuristics used in this code. However, given that all this
-    // method does is find the lat/lon maps, if they are given in the ctor,
-    // This method will likely not be called at all.
-    while (m != d_grid->map_end() && (!d_latitude || !d_longitude)) {
-        string units_value = (*m)->get_attr_table().get_attr("units");
-        units_value = remove_quotes(units_value);
-        string map_name = (*m)->name();
-
-        // The 'units' attribute must match exactly; the name only needs to
-        // match a prefix.
-        if (!d_latitude
-            && unit_or_name_match(get_coards_lat_units(), get_lat_names(),
-                                  units_value, map_name)) {
-
-            // Set both d_latitude (a pointer to the real map vector) and
-            // d_lat, a vector of the values represented as doubles. It's easier
-            // to work with d_lat, but it's d_latitude that needs to be set
-            // when constraining the grid. Also, record the grid variable's
-            // dimension iterator so that it's easier to set the Grid's Array
-            // (which also has to be constrained).
-            d_latitude = dynamic_cast < Array * >(*m);
-            if (!d_latitude)
-                throw InternalErr(__FILE__, __LINE__, "Expected an array.");
-            if (!d_latitude->read_p())
-                d_latitude->read();
-
-            set_lat(extract_double_array(d_latitude));   // throws Error
-            set_lat_length(d_latitude->length());
-
-            set_lat_dim(d);
-        }
-
-        if (!d_longitude        // && !units_value.empty()
-            && unit_or_name_match(get_coards_lon_units(), get_lon_names(),
-                                  units_value, map_name)) {
-
-            d_longitude = dynamic_cast < Array * >(*m);
-            if (!d_longitude)
-                throw InternalErr(__FILE__, __LINE__, "Expected an array.");
-            if (!d_longitude->read_p())
-                d_longitude->read();
-
-            set_lon(extract_double_array(d_longitude));
-            set_lon_length(d_longitude->length());
-
-            set_lon_dim(d);
-
-            if (m + 1 == d_grid->map_end())
-            	set_longitude_rightmost(true);
-        }
-
-        ++m;
-        ++d;
-    }
-
-    return get_lat() && get_lon();
-}
-
-/** A private method called by the constructor that checks to make sure the
-    two arrays passed to the constructor are valid latitude and longitude
-    maps. If so, a they are read in and the values are slurped up by this
-    object. Then the Grid's dimension iterator is used to record a reference
-    the the lat and lon dimension of the Grid itself.
-
-    @return True if the maps are valid, otherwise False */
-bool GridGeoConstraint::build_lat_lon_maps(Array *lat, Array *lon)
-{
-    Grid::Map_iter m = d_grid->map_begin();
-
-    Array::Dim_iter d = d_grid->get_array()->dim_begin();
-
-    while (m != d_grid->map_end() && (!d_latitude || !d_longitude)) {
-	// Look for the Grid map that matches the variable passed as 'lat'
-	if (!d_latitude && *m == lat) {
-
-            d_latitude = lat;
-
-            if (!d_latitude->read_p())
-                d_latitude->read();
-
-            set_lat(extract_double_array(d_latitude));   // throws Error
-            set_lat_length(d_latitude->length());
-
-            set_lat_dim(d);
-        }
-
-        if (!d_longitude && *m == lon) {
-
-            d_longitude = lon;
-
-            if (!d_longitude->read_p())
-                d_longitude->read();
-
-            set_lon(extract_double_array(d_longitude));
-            set_lon_length(d_longitude->length());
-
-            set_lon_dim(d);
-
-            if (m + 1 == d_grid->map_end())
-            	set_longitude_rightmost(true);
-        }
-
-        ++m;
-        ++d;
-    }
-
-    return get_lat() && get_lon();
-}
-
-/** Are the latitude and longitude dimensions ordered so that this class can
-    properly constrain the data? This method throws Error if lat and lon are
-    not to two 'fastest-varying' (or 'rightmost') dimensions. It also sets the
-    internal property \e longitude_rightmost if that's true.
-
-    @note Called by the constructor once build_lat_lon_maps() has returned.
-
-    @return True if the lat/lon maps are the two rightmost maps,
-    false otherwise; modifies the \e longitude_rightmost property as aside
-    effect. */
-bool
-GridGeoConstraint::lat_lon_dimensions_ok()
-{
-    // get the last two map iterators
-    Grid::Map_riter rightmost = d_grid->map_rbegin();
-    Grid::Map_riter next_rightmost = rightmost + 1;
-
-    if (*rightmost == d_longitude && *next_rightmost == d_latitude)
-        set_longitude_rightmost(true);
-    else if (*rightmost == d_latitude && *next_rightmost == d_longitude)
-        set_longitude_rightmost(false);
-    else
-        return false;
-
-    return true;
-}
-
-/** Once the bounding box is set use this method to apply the constraint. This
-    modifies the data values in the Grid so that the software in
-    Vector::serialize() will work correctly. Vector::serialize() assumes that
-    the BaseType::read() method is called \e after the projection is applied to
-    the data. That is, the projection is applied, then data are read. but
-    geogrid() first reads all the data values and then computes the projection.
-    To make Vector::serialize() work, this method uses the projection
-    information recorded in the Grid by set_bounding_box() to arrange data so
-    that the information to be sent is all that is held by the Grid. Call this
-    after applying any 'Grid selection expressions' of the sort that can be
-    passed to the grid() function.
-
-    @note Why do this here? The grid() function uses the standard logic in
-    Vector and elsewhere to read data that's to be sent. The problem is that
-    the data values need to be reordered using information only this object
-    has. If this were implemented as a 'selection function' (i.e., if the code
-    was run by ConstraintExpression::eval() then we might be able to better
-    optimize how data are read, but in this case we have read all the data
-    and may have already reorganized it). Set up the internal buffers so they
-    hold the correct values and mark the Grid's array and lat/lon maps as
-    read. */
-void GridGeoConstraint::apply_constraint_to_data()
-{
-    if (!is_bounding_box_set())
-        throw InternalErr("The Latitude and Longitude constraints must be set before calling apply_constraint_to_data().");
-
-    Array::Dim_iter fd = d_latitude->dim_begin();
-
-    if (get_latitude_sense() == inverted) {
-        int tmp = get_latitude_index_top();
-        set_latitude_index_top(get_latitude_index_bottom());
-        set_latitude_index_bottom(tmp);
-    }
-
-    // It's easy to flip the Latitude values; if the bottom index value
-    // is before/above the top index, return an error explaining that.
-    if (get_latitude_index_top() > get_latitude_index_bottom())
-        throw Error("The upper and lower latitude indices appear to be reversed. Please provide the latitude bounding box numbers giving the northern-most latitude first.");
-
-    // Constrain the lat vector and lat dim of the array
-    d_latitude->add_constraint(fd, get_latitude_index_top(), 1,
-                               get_latitude_index_bottom());
-    d_grid->get_array()->add_constraint(get_lat_dim(),
-                                        get_latitude_index_top(), 1,
-                                        get_latitude_index_bottom());
-
-    // Does the longitude constraint cross the edge of the longitude vector?
-    // If so, reorder the grid's data (array), longitude map vector and the
-    // local vector of longitude data used for computation.
-    if (get_longitude_index_left() > get_longitude_index_right()) {
-        reorder_longitude_map(get_longitude_index_left());
-
-        // If the longitude constraint is 'split', join the two parts, reload
-        // the data into the Grid's Array and make sure the Array is marked as
-        // already read. This should be true for the whole Grid, but if some
-        // future modification changes that, the array will be covered here.
-        // Note that the following method only reads the data out and stores
-        // it in this object after joining the two parts. The method
-        // apply_constraint_to_data() transfers the data back from the this
-        // object to the DAP Grid variable.
-        reorder_data_longitude_axis(*d_grid->get_array(), get_lon_dim());
-
-        // Now that the data are all in local storage alter the indices; the
-        // left index has now been moved to 0, and the right index is now
-        // at lon_vector_length-left+right.
-        set_longitude_index_right(get_lon_length() - get_longitude_index_left()
-                                  + get_longitude_index_right());
-        set_longitude_index_left(0);
-    }
-
-    // If the constraint used the -180/179 (neg_pos) notation, transform
-    // the longitude map so it uses the -180/179 notation. Note that at this
-    // point, d_longitude always uses the pos notation because of the earlier
-    // conditional transformation.
-
-    // Do this _before_ applying the constraint since set_array_using_double()
-    // tests the array length using Vector::length() and that method returns
-    // the length _as constrained_. We want to move all of the longitude
-    // values from d_lon back into the map, not just the number that will be
-    // sent (although an optimization might do this, it's hard to imagine
-    // it would gain much).
-    if (get_longitude_notation() == neg_pos) {
-        transform_longitude_to_neg_pos_notation();
-    }
-
-    // Apply constraint; stride is always one and maps only have one dimension
-    fd = d_longitude->dim_begin();
-    d_longitude->add_constraint(fd, get_longitude_index_left(), 1,
-                                get_longitude_index_right());
-
-    d_grid->get_array()->add_constraint(get_lon_dim(),
-                                        get_longitude_index_left(),
-                                        1, get_longitude_index_right());
-
-    // Transfer values from the local lat vector to the Grid's
-    // Here test the sense of the latitude vector and invert the vector if the
-    // sense is 'inverted' so that the top is always the northern-most value
-    if (get_latitude_sense() == inverted) {
-	DBG(cerr << "Inverted latitude sense" << endl);
-	transpose_vector(get_lat() + get_latitude_index_top(),
-		get_latitude_index_bottom() - get_latitude_index_top() + 1);
-	// Now read the Array data and flip the latitudes.
-	flip_latitude_within_array(*d_grid->get_array(),
-		get_latitude_index_bottom() - get_latitude_index_top() + 1,
-		get_longitude_index_right() - get_longitude_index_left() + 1);
-    }
-
-    set_array_using_double(d_latitude, get_lat() + get_latitude_index_top(),
-                           get_latitude_index_bottom() - get_latitude_index_top() + 1);
-
-    set_array_using_double(d_longitude, get_lon() + get_longitude_index_left(),
-                           get_longitude_index_right() - get_longitude_index_left() + 1);
-
-    // Look for any non-lat/lon maps and make sure they are read correctly
-    Grid::Map_iter i = d_grid->map_begin();
-    Grid::Map_iter end = d_grid->map_end();
-    while (i != end) {
-	if (*i != d_latitude && *i != d_longitude) {
-	    if ((*i)->send_p()) {
-		DBG(cerr << "reading grid map: " << (*i)->name() << endl);
-		//(*i)->set_read_p(false);
-		(*i)->read();
-	    }
-	}
-	++i;
-    }
-
-    // ... and then the Grid's array if it has been read.
-    if (get_array_data()) {
-        int size = d_grid->get_array()->val2buf(get_array_data());
-
-        if (size != get_array_data_size())
-            throw InternalErr(__FILE__, __LINE__, "Expected data size not copied to the Grid's buffer.");
-
-        d_grid->set_read_p(true);
-    }
-    else {
-        d_grid->get_array()->read();
-    }
-}
-
-} // namespace libdap
diff --git a/GridGeoConstraint.h b/GridGeoConstraint.h
deleted file mode 100644
index 68a6178..0000000
--- a/GridGeoConstraint.h
+++ /dev/null
@@ -1,86 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2006 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-#ifndef _grid_geo_constraint_h
-#define _grid_geo_constraint_h 1
-
-#include <string>
-#include <sstream>
-#include <set>
-
-#ifndef _geo_constraint_h
-#include "GeoConstraint.h"
-#endif
-
-namespace libdap
-{
-
-// Defined in GeoConstraint; maybe move to util.cc/h?
-extern bool unit_or_name_match(set < string > units, set < string > names,
-			       const string & var_units,
-			       const string & var_name);
-
-/** Geographical constraint applied to a grid.
-    @author James Gallagher */
-
-class GridGeoConstraint : public GeoConstraint
-{
-
-private:
-    // Specific to a Grid
-    Grid *d_grid;               //< Constrain this Grid
-
-    Array *d_latitude;          //< A pointer to the Grid's latitude map
-    Array *d_longitude;         //< A pointer to the Grid's longitude map
-
-    bool build_lat_lon_maps();
-    bool build_lat_lon_maps(Array *lat, Array *lon);
-
-    bool lat_lon_dimensions_ok();
-
-    friend class GridGeoConstraintTest; // Unit tests
-
-public:
-    /** @name Constructors */
-    //@{
-    GridGeoConstraint(Grid *grid);
-    GridGeoConstraint(Grid *grid, Array *lat, Array *lon);
-    //@}
-
-    virtual ~GridGeoConstraint()
-    {}
-
-    virtual void apply_constraint_to_data() ;
-
-    virtual Grid *get_constrained_grid() const
-    {
-        return d_grid;
-    }
-};
-
-} // namespace libdap
-
-#endif // _grid_geo_constraint_h
-
diff --git a/HTTPCache.cc b/HTTPCache.cc
index 9e7a823..d852353 100644
--- a/HTTPCache.cc
+++ b/HTTPCache.cc
@@ -19,13 +19,13 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
 #include "config.h"
 
-// #define DODS_DEBUG
+//#define DODS_DEBUG
 // #define DODS_DEBUG2
 #undef USE_GETENV
 
@@ -1554,6 +1554,7 @@ HTTPCache::release_cached_response(FILE *body)
     lock_cache_interface();
 
     try {
+    	// fclose(body); This results in a seg fault on linux jhrg 8/27/13
     	d_http_cache_table->uncouple_entry_from_data(body);
     }
     catch (...) {
diff --git a/HTTPCache.h b/HTTPCache.h
index ae29742..f6f9d47 100644
--- a/HTTPCache.h
+++ b/HTTPCache.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/HTTPCacheDisconnectedMode.h b/HTTPCacheDisconnectedMode.h
index e474c46..2adf490 100644
--- a/HTTPCacheDisconnectedMode.h
+++ b/HTTPCacheDisconnectedMode.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/HTTPCacheInterruptHandler.h b/HTTPCacheInterruptHandler.h
index 98f253f..bd91ef8 100644
--- a/HTTPCacheInterruptHandler.h
+++ b/HTTPCacheInterruptHandler.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/HTTPCacheResponse.h b/HTTPCacheResponse.h
index b9d5c23..12c243d 100644
--- a/HTTPCacheResponse.h
+++ b/HTTPCacheResponse.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/HTTPCacheTable.cc b/HTTPCacheTable.cc
index 9785946..38066fe 100644
--- a/HTTPCacheTable.cc
+++ b/HTTPCacheTable.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -70,7 +70,6 @@
 #define DIR_SEPARATOR_STR "\\"
 #else
 #define MKDIR(a,b) mkdir((a), (b))
-#define REMOVE(a) remove((a))
 #define MKSTEMP(a) mkstemp((a))
 #define DIR_SEPARATOR_CHAR '/'
 #define DIR_SEPARATOR_STR "/"
@@ -540,8 +539,8 @@ entry_disk_space(int size, unsigned int block_size)
 void
 HTTPCacheTable::add_entry_to_cache_table(CacheEntry *entry)
 {
-    unsigned int hash = entry->hash;
-    if (hash >= CACHE_TABLE_SIZE)
+    int hash = entry->hash;
+    if (hash > CACHE_TABLE_SIZE-1 || hash < 0)
         throw InternalErr(__FILE__, __LINE__, "Hash value too large!");
 
     if (!d_cache_table[hash])
diff --git a/HTTPCacheTable.h b/HTTPCacheTable.h
index 4d6fb95..82cd219 100644
--- a/HTTPCacheTable.h
+++ b/HTTPCacheTable.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/HTTPConnect.cc b/HTTPConnect.cc
index 8692651..7072cca 100644
--- a/HTTPConnect.cc
+++ b/HTTPConnect.cc
@@ -19,17 +19,13 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    { "$Id: HTTPConnect.cc 25101 2011-12-19 22:03:29Z jimg $"
-    };
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -447,6 +443,9 @@ HTTPConnect::read_url(const string &url, FILE *stream,
     // value/result parameter to get the raw response header information .
     curl_easy_setopt(d_curl, CURLOPT_WRITEHEADER, resp_hdrs);
 
+    // This is the call that causes curl to go and get the remote resource and "write it down"
+    // utilizing the configuration state that has been previously conditioned by various perturbations
+    // of calls to curl_easy_setopt().
     CURLcode res = curl_easy_perform(d_curl);
 
     // Free the header list and null the value in d_curl.
@@ -524,8 +523,7 @@ HTTPConnect::HTTPConnect(RCReader *rcr) : d_username(""), d_password(""),
 
     // HTTPCache::instance returns a valid ptr or 0.
     if (d_rcr->get_use_cache())
-        d_http_cache = HTTPCache::instance(d_rcr->get_dods_cache_root(),
-                                           true);
+        d_http_cache = HTTPCache::instance(d_rcr->get_dods_cache_root(),true);
     else
         d_http_cache = 0;
 
@@ -886,7 +884,7 @@ HTTPConnect::plain_fetch_url(const string &url)
     try {
         status = read_url(url, stream, resp_hdrs); // Throws Error.
         if (status >= 400) {
-        	delete resp_hdrs;
+        	// delete resp_hdrs; resp_hdrs = 0;
             string msg = "Error while reading the URL: ";
             msg += url;
             msg += ".\nThe OPeNDAP server returned the following message:\n";
diff --git a/HTTPConnect.h b/HTTPConnect.h
index d903c74..c04972f 100644
--- a/HTTPConnect.h
+++ b/HTTPConnect.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/HTTPResponse.h b/HTTPResponse.h
index 6c2497c..3449463 100644
--- a/HTTPResponse.h
+++ b/HTTPResponse.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/INSTALL b/INSTALL
index 67e5900..b432a26 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
 
-Updated for version 3.11.7 of the OPeNDAP DAP 3.4 library software.
+Updated for version 3.12.0 of the OPeNDAP DAP 3.4 library software.
 
 Installing the DAP2/3.x library
 
@@ -74,7 +74,7 @@ REQUIREMENTS
     autoconf 2.63 and libtool 2.2.6. Earlier versions may work, but
     may cause problems, particularly with the 'distcheck' target for
     make. Given those requirements, use 'autoreconf --force --install
-    --verbose' and then build as described above. You also need bison
+    --verbose' and then build as described above. You also need bison 2.4
     and flex as of version 3.7.9.
 
   o The library uses libcurl and libxml2. You will need these libraries
diff --git a/Int16.cc b/Int16.cc
index 37c80a6..ad46358 100644
--- a/Int16.cc
+++ b/Int16.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,23 +36,24 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: Int16.cc 21699 2009-11-05 00:06:01Z jimg $"
-    };
+#include <sstream>
 
-#include "Byte.h"
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
 #include "Int16.h"
 #include "UInt16.h"
 #include "Int32.h"
 #include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
 #include "Float32.h"
 #include "Float64.h"
 #include "Str.h"
 #include "Url.h"
-#include "Array.h"
-#include "Structure.h"
-#include "Sequence.h"
-#include "Grid.h"
+
+
+#include "Marshaller.h"
+#include "UnMarshaller.h"
 
 #include "DDS.h"
 #include "util.h"
@@ -86,7 +87,7 @@ Int16::Int16(const string &n, const string &d) : BaseType(n, d, dods_int16_c)
 
 Int16::Int16(const Int16 &copy_from) : BaseType(copy_from)
 {
-    _buf = copy_from._buf;
+    d_buf = copy_from.d_buf;
 }
 
 BaseType *
@@ -103,13 +104,13 @@ Int16::operator=(const Int16 &rhs)
 
     dynamic_cast<BaseType &>(*this) = rhs;
 
-    _buf = rhs._buf;
+    d_buf = rhs.d_buf;
 
     return *this;
 }
 
 unsigned int
-Int16::width()
+Int16::width(bool)
 {
     return sizeof(dods_int16);
 }
@@ -130,7 +131,7 @@ Int16::serialize(ConstraintEvaluator &eval, DDS &dds,
 
     dds.timeout_off();
 
-    m.put_int16( _buf ) ;
+    m.put_int16( d_buf ) ;
 
     return true;
 }
@@ -138,7 +139,7 @@ Int16::serialize(ConstraintEvaluator &eval, DDS &dds,
 bool
 Int16::deserialize(UnMarshaller &um, DDS *, bool)
 {
-    um.get_int16( _buf ) ;
+    um.get_int16( d_buf ) ;
 
     return false;
 }
@@ -154,7 +155,7 @@ Int16::val2buf(void *val, bool)
         throw InternalErr(__FILE__, __LINE__,
                           "The incoming pointer does not contain any data.");
 
-    _buf = *(dods_int16 *)val;
+    d_buf = *(dods_int16 *)val;
 
     return width();
 }
@@ -170,7 +171,7 @@ Int16::buf2val(void **val)
     if (!*val)
         *val = new dods_int16;
 
-    *(dods_int16 *)*val = _buf;
+    *(dods_int16 *)*val = d_buf;
 
     return width();
 }
@@ -178,40 +179,35 @@ Int16::buf2val(void **val)
 dods_int16
 Int16::value() const
 {
-    return _buf;
+    return d_buf;
 }
 
 bool
 Int16::set_value(dods_int16 i)
 {
-    _buf = i;
+    d_buf = i;
     set_read_p(true);
 
     return true;
 }
 
-#if FILE_METHODS
 void
 Int16::print_val(FILE *out, string space, bool print_decl_p)
 {
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = %d;\n", _buf) ;
-    }
-    else
-        fprintf(out, "%d", _buf) ;
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Int16::print_val(ostream &out, string space, bool print_decl_p)
 {
     if (print_decl_p) {
         print_decl(out, space, false);
-	out << " = " << _buf << ";\n" ;
+	out << " = " << d_buf << ";\n" ;
     }
     else
-	out << _buf ;
+	out << d_buf ;
 }
 
 bool
@@ -239,29 +235,28 @@ Int16::ops(BaseType *b, int op)
     }
 
     switch (b->type()) {
-    case dods_byte_c:
-        return rops<dods_int16, dods_byte, SUCmp<dods_int16, dods_byte> >
-               (_buf, dynamic_cast<Byte *>(b)->_buf, op);
-    case dods_int16_c:
-        return rops<dods_int16, dods_int16, Cmp<dods_int16, dods_int16> >
-               (_buf, dynamic_cast<Int16 *>(b)->_buf, op);
-    case dods_uint16_c:
-        return rops<dods_int16, dods_uint16, SUCmp<dods_int16, dods_uint16> >
-               (_buf, dynamic_cast<UInt16 *>(b)->_buf, op);
-    case dods_int32_c:
-        return rops<dods_int16, dods_int32, Cmp<dods_int16, dods_int32> >
-               (_buf, dynamic_cast<Int32 *>(b)->_buf, op);
-    case dods_uint32_c:
-        return rops<dods_int16, dods_uint32, SUCmp<dods_int16, dods_uint32> >
-               (_buf, dynamic_cast<UInt32 *>(b)->_buf, op);
-    case dods_float32_c:
-        return rops<dods_int16, dods_float32, Cmp<dods_int16, dods_float32> >
-               (_buf, dynamic_cast<Float32 *>(b)->_buf, op);
-    case dods_float64_c:
-        return rops<dods_int16, dods_float64, Cmp<dods_int16, dods_float64> >
-               (_buf, dynamic_cast<Float64 *>(b)->_buf, op);
-    default:
-        return false;
+        case dods_int8_c:
+            return Cmp<dods_int16, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return SUCmp<dods_int16, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return Cmp<dods_int16, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return SUCmp<dods_int16, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return Cmp<dods_int16, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return SUCmp<dods_int16, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return Cmp<dods_int16, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return SUCmp<dods_int16, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return Cmp<dods_int16, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return Cmp<dods_int16, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
     }
 }
 
@@ -280,7 +275,7 @@ Int16::dump(ostream &strm) const
     << (void *)this << ")" << endl ;
     DapIndent::Indent() ;
     BaseType::dump(strm) ;
-    strm << DapIndent::LMarg << "value: " << _buf << endl ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
     DapIndent::UnIndent() ;
 }
 
diff --git a/Int16.h b/Int16.h
index 9c2b505..f26f8b3 100644
--- a/Int16.h
+++ b/Int16.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -49,8 +49,6 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -58,20 +56,8 @@ namespace libdap
 
 class Int16: public BaseType
 {
-    /** This class allows Byte, ..., Float64 access to <tt>_buf</tt> to
-    simplify and speed up the relational operators.
-
-    NB: According to Stroustrup it does not matter where (public, private
-    or protected) friend classes are declared. */
-    friend class Byte;
-    friend class UInt16;
-    friend class Int32;
-    friend class UInt32;
-    friend class Float32;
-    friend class Float64;
-
 protected:
-    dods_int16 _buf;
+    dods_int16 d_buf;
 
 public:
     Int16(const string &n);
@@ -85,7 +71,7 @@ public:
 
     virtual BaseType *ptr_duplicate();
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
 			   Marshaller &m, bool ce_eval = true);
@@ -96,10 +82,9 @@ public:
 
     virtual dods_int16 value() const;
     virtual bool set_value(dods_int16 val);
-#if FILE_METHODS
+
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
diff --git a/Int32.cc b/Int32.cc
index 8140a24..ca5a416 100644
--- a/Int32.cc
+++ b/Int32.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,25 +36,26 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: Int32.cc 21699 2009-11-05 00:06:01Z jimg $"
-    };
+#include <sstream>
 
-#include "Byte.h"
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
 #include "Int16.h"
 #include "UInt16.h"
 #include "Int32.h"
 #include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
 #include "Float32.h"
 #include "Float64.h"
 #include "Str.h"
 #include "Url.h"
-#include "Array.h"
-#include "Structure.h"
-#include "Sequence.h"
-#include "Grid.h"
+
 
 #include "DDS.h"
+#include "Marshaller.h"
+#include "UnMarshaller.h"
+
 #include "util.h"
 #include "parser.h"
 #include "Operators.h"
@@ -92,7 +93,7 @@ Int32::Int32(const string &n, const string &d)
 
 Int32::Int32(const Int32 &copy_from) : BaseType(copy_from)
 {
-    _buf = copy_from._buf;
+    d_buf = copy_from.d_buf;
 }
 
 BaseType *
@@ -114,13 +115,13 @@ Int32::operator=(const Int32 &rhs)
 
     dynamic_cast<BaseType &>(*this) = rhs;
 
-    _buf = rhs._buf;
+    d_buf = rhs.d_buf;
 
     return *this;
 }
 
 unsigned int
-Int32::width()
+Int32::width(bool)
 {
     return sizeof(dods_int32);
 }
@@ -141,7 +142,7 @@ Int32::serialize(ConstraintEvaluator &eval, DDS &dds,
 
     dds.timeout_off();
 
-    m.put_int32( _buf ) ;
+    m.put_int32( d_buf ) ;
 
     return true;
 }
@@ -149,7 +150,7 @@ Int32::serialize(ConstraintEvaluator &eval, DDS &dds,
 bool
 Int32::deserialize(UnMarshaller &um, DDS *, bool)
 {
-    um.get_int32( _buf ) ;
+    um.get_int32( d_buf ) ;
 
     return false;
 }
@@ -165,7 +166,7 @@ Int32::val2buf(void *val, bool)
         throw InternalErr(__FILE__, __LINE__,
                           "The incoming pointer does not contain any data.");
 
-    _buf = *(dods_int32 *)val;
+    d_buf = *(dods_int32 *)val;
 
     return width();
 }
@@ -181,7 +182,7 @@ Int32::buf2val(void **val)
     if (!*val)
         *val = new dods_int32;
 
-    *(dods_int32 *)*val = _buf;
+    *(dods_int32 *)*val = d_buf;
 
     return width();
 }
@@ -189,40 +190,35 @@ Int32::buf2val(void **val)
 dods_int32
 Int32::value() const
 {
-    return _buf;
+    return d_buf;
 }
 
 bool
 Int32::set_value(dods_int32 i)
 {
-    _buf = i;
+    d_buf = i;
     set_read_p(true);
 
     return true;
 }
 
-#if FILE_METHODS
 void
 Int32::print_val(FILE *out, string space, bool print_decl_p)
 {
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = %d;\n", (int)_buf) ;
-    }
-    else
-        fprintf(out, "%d", (int)_buf) ;
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Int32::print_val(ostream &out, string space, bool print_decl_p)
 {
     if (print_decl_p) {
         print_decl(out, space, false);
-	out << " = " << (int)_buf << ";\n" ;
+	out << " = " << (int)d_buf << ";\n" ;
     }
     else
-	out << (int)_buf ;
+	out << (int)d_buf ;
 }
 
 bool
@@ -250,29 +246,28 @@ Int32::ops(BaseType *b, int op)
     }
 
     switch (b->type()) {
-    case dods_byte_c:
-        return rops<dods_int32, dods_byte, SUCmp<dods_int32, dods_byte> >
-               (_buf, dynamic_cast<Byte *>(b)->_buf, op);
-    case dods_int16_c:
-        return rops<dods_int32, dods_int16, Cmp<dods_int32, dods_int16> >
-               (_buf, dynamic_cast<Int16 *>(b)->_buf, op);
-    case dods_uint16_c:
-        return rops<dods_int32, dods_uint16, SUCmp<dods_int32, dods_uint16> >
-               (_buf, dynamic_cast<UInt16 *>(b)->_buf, op);
-    case dods_int32_c:
-        return rops<dods_int32, dods_int32, Cmp<dods_int32, dods_int32> >
-               (_buf, dynamic_cast<Int32 *>(b)->_buf, op);
-    case dods_uint32_c:
-        return rops<dods_int32, dods_uint32, SUCmp<dods_int32, dods_uint32> >
-               (_buf, dynamic_cast<UInt32 *>(b)->_buf, op);
-    case dods_float32_c:
-        return rops<dods_int32, dods_float32, Cmp<dods_int32, dods_float32> >
-               (_buf, dynamic_cast<Float32 *>(b)->_buf, op);
-    case dods_float64_c:
-        return rops<dods_int32, dods_float64, Cmp<dods_int32, dods_float64> >
-               (_buf, dynamic_cast<Float64 *>(b)->_buf, op);
-    default:
-        return false;
+        case dods_int8_c:
+            return Cmp<dods_int32, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return SUCmp<dods_int32, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return Cmp<dods_int32, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return SUCmp<dods_int32, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return Cmp<dods_int32, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return SUCmp<dods_int32, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return Cmp<dods_int32, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return SUCmp<dods_int32, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return Cmp<dods_int32, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return Cmp<dods_int32, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
     }
 }
 
@@ -291,7 +286,7 @@ Int32::dump(ostream &strm) const
     << (void *)this << ")" << endl ;
     DapIndent::Indent() ;
     BaseType::dump(strm) ;
-    strm << DapIndent::LMarg << "value: " << _buf << endl ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
     DapIndent::UnIndent() ;
 }
 
diff --git a/Int32.h b/Int32.h
index 13d32d7..41183c9 100644
--- a/Int32.h
+++ b/Int32.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -45,15 +45,17 @@
 #include "BaseType.h"
 #endif
 
+#if 0
 #ifndef constraint_evaluator_h
 #include "ConstraintEvaluator.h"
 #endif
-
-#define FILE_METHODS 1
+#endif
 
 namespace libdap
 {
 
+class ConstraintEvaluator;
+
 /** @brief Holds a 32-bit signed integer.
 
     @see BaseType
@@ -61,20 +63,8 @@ namespace libdap
 
 class Int32: public BaseType
 {
-    /** This class allows Byte, ..., Float64 access to <tt>_buf</tt> to
-    simplify and speed up the relational operators.
-
-    NB: According to Stroustrup it does not matter where (public, private
-    or protected) friend classes are declared. */
-    friend class Byte;
-    friend class Int16;
-    friend class UInt16;
-    friend class UInt32;
-    friend class Float32;
-    friend class Float64;
-
 protected:
-    dods_int32 _buf;
+    dods_int32 d_buf;
 
 public:
     Int32(const string &n);
@@ -88,7 +78,7 @@ public:
 
     virtual BaseType *ptr_duplicate();
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
 			   Marshaller &m, bool ce_eval = true);
@@ -99,10 +89,9 @@ public:
 
     virtual bool set_value(dods_int32 i);
     virtual dods_int32 value() const;
-#if FILE_METHODS
+
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
diff --git a/Int64.cc b/Int64.cc
new file mode 100644
index 0000000..b0a73e8
--- /dev/null
+++ b/Int64.cc
@@ -0,0 +1,257 @@
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2002,2003 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+// (c) COPYRIGHT URI/MIT 1994-1999
+// Please read the full copyright statement in the file COPYRIGHT_URI.
+//
+// Authors:
+//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
+
+// Implementation for Int64.
+//
+// jhrg 9/7/94
+
+
+#include "config.h"
+
+#include <cassert>
+#include <sstream>
+
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
+#include "Int16.h"
+#include "UInt16.h"
+#include "Int32.h"
+#include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
+#include "Float32.h"
+#include "Float64.h"
+#include "Str.h"
+#include "Url.h"
+
+#if 0
+#include "Array.h"
+#include "Structure.h"
+#include "Sequence.h"
+#include "Grid.h"
+#endif
+
+#include "DAP4StreamMarshaller.h"
+#include "DAP4StreamUnMarshaller.h"
+
+#include "DDS.h"
+#include "util.h"
+#include "parser.h"
+#include "Operators.h"
+#include "dods-limits.h"
+#include "debug.h"
+#include "InternalErr.h"
+
+using std::cerr;
+using std::endl;
+
+namespace libdap {
+
+/** The Int64 constructor requires only the name of the variable
+    to be created.  The name may be omitted, which will create a
+    nameless variable.  This may be adequate for some applications.
+
+    @param n A string containing the name of the variable to be
+    created.
+*/
+Int64::Int64(const string &n) : BaseType(n, dods_int64_c)
+{}
+
+/** The Int64 server-side constructor accepts the name of the variable and
+    the dataset name from which this instance is created.
+
+    @param n A string containing the name of the variable to be created.
+    @param d A string containing the name of the dataset from which this
+    variable is created
+*/
+Int64::Int64(const string &n, const string &d) : BaseType(n, d, dods_int64_c)
+{}
+
+Int64::Int64(const Int64 &copy_from) : BaseType(copy_from)
+{
+    d_buf = copy_from.d_buf;
+}
+
+BaseType *
+Int64::ptr_duplicate()
+{
+    return new Int64(*this);
+}
+
+Int64::~Int64()
+{
+    DBG(cerr << "~Int64" << endl);
+}
+
+Int64 &
+Int64::operator=(const Int64 &rhs)
+{
+    if (this == &rhs)
+        return *this;
+
+    dynamic_cast<BaseType &>(*this) = rhs;
+
+    d_buf = rhs.d_buf;
+
+    return *this;
+}
+
+unsigned int
+Int64::width(bool)
+{
+    return sizeof(dods_int64);
+}
+
+bool
+Int64::serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval)
+{
+    dds.timeout_on();
+
+    if (!read_p())
+        read();  // read() throws Error and InternalErr
+
+#if EVAL
+    if (ce_eval && !eval.eval_selection(dds, dataset()))
+        return true;
+#endif
+
+    dds.timeout_off();
+
+    assert(typeid(m) == typeid(DAP4StreamMarshaller));
+
+    static_cast<DAP4StreamMarshaller*>(&m)->put_int64( d_buf ) ;
+
+    return true;
+}
+
+bool
+Int64::deserialize(UnMarshaller &um, DDS *, bool)
+{
+    assert(typeid(um) == typeid(DAP4StreamUnMarshaller));
+
+    static_cast<DAP4StreamUnMarshaller*>(&um)->get_int64( d_buf ) ;
+
+    return false;
+}
+
+dods_int64
+Int64::value() const
+{
+    return d_buf;
+}
+
+bool
+Int64::set_value(dods_int64 i)
+{
+    d_buf = i;
+    set_read_p(true);
+
+    return true;
+}
+
+void
+Int64::print_val(FILE *out, string space, bool print_decl_p)
+{
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
+}
+
+void Int64::print_val(ostream &out, string space, bool print_decl_p)
+{
+    if (print_decl_p) {
+        print_decl(out, space, false);
+        out << " = " << (dods_int64) d_buf << ";\n";
+    }
+    else
+        out << (int) d_buf;
+}
+
+bool
+Int64::ops(BaseType *b, int op)
+{
+    // Get the arg's value.
+    if (!read_p() && !read())
+        throw InternalErr(__FILE__, __LINE__, "This value not read!");
+
+    // Get the second arg's value.
+    if (!b->read_p() && !b->read())
+        throw InternalErr(__FILE__, __LINE__, "This value not read!");
+
+    switch (b->type()) {
+        case dods_int8_c:
+            return Cmp<dods_int64, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return SUCmp<dods_int64, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return Cmp<dods_int64, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return SUCmp<dods_int64, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return Cmp<dods_int64, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return SUCmp<dods_int64, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return Cmp<dods_int64, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return SUCmp<dods_int64, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return Cmp<dods_int64, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return Cmp<dods_int64, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
+    }
+
+    return false;
+}
+
+/** @brief dumps information about this object
+ *
+ * Displays the pointer value of this instance and information about this
+ * instance.
+ *
+ * @param strm C++ i/o stream to dump the information to
+ * @return void
+ */
+void
+Int64::dump(ostream &strm) const
+{
+    strm << DapIndent::LMarg << "Int64::dump - ("
+    << (void *)this << ")" << endl ;
+    DapIndent::Indent() ;
+    BaseType::dump(strm) ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
+    DapIndent::UnIndent() ;
+}
+
+} // namespace libdap
+
diff --git a/Float32.h b/Int64.h
similarity index 52%
copy from Float32.h
copy to Int64.h
index 737a099..d3178f6 100644
--- a/Float32.h
+++ b/Int64.h
@@ -4,7 +4,7 @@
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
 // Access Protocol.
 
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
+// Copyright (c) 2012 OPeNDAP, Inc.
 // Author: James Gallagher <jgallagher at opendap.org>
 //
 // This library is free software; you can redistribute it and/or
@@ -19,23 +19,12 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
-// (c) COPYRIGHT URI/MIT 1999
-// Please read the full copyright statement in the file COPYRIGHT_URI.
-//
-// Authors:
-//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
-
-// Interface for Float32 type.
-//
-// 3/22/99 jhrg
-
-#ifndef _float32_h
-#define _float32_h 1
-
+#ifndef _int64_h
+#define _int64_h 1
 
 #ifndef _dods_datatypes_h
 #include "dods-datatypes.h"
@@ -45,62 +34,48 @@
 #include "BaseType.h"
 #endif
 
-#ifndef constraint_evaluator_h
-#include "ConstraintEvaluator.h"
-#endif
-
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
-/** @brief Holds a 32-bit floating point value.
+class ConstraintEvaluator;
+class Marshaller;
+class UnMarshaller;
+
+/** @brief Holds a64-bit signed integer.
 
     @see BaseType
     */
-class Float32: public BaseType
-{
-    /** This class allows Byte, ..., Float64 access to <tt>_buf</tt>
-	to simplify and speed up the relational operators. */
 
-    friend class Byte;
-    friend class Int16;
-    friend class UInt16;
-    friend class Int32;
-    friend class UInt32;
-    friend class Float64;
+class Int64: public BaseType
+{
+    unsigned int val2buf(void *, bool)  { throw InternalErr(__FILE__, __LINE__, "Not implemented for Int64"); }
+    unsigned int buf2val(void **) { throw InternalErr(__FILE__, __LINE__, "Not implemented for Int64"); }
 
 protected:
-    dods_float32 _buf;
+    dods_int64 d_buf;
 
 public:
-    Float32(const string &n);
-    Float32(const string &n, const string &d);
+    Int64(const string &n);
+    Int64(const string &n, const string &d);
 
-    Float32(const Float32 &copy_from);
+    Int64(const Int64 &copy_from);
 
-    Float32 &operator=(const Float32 &rhs);
+    Int64 &operator=(const Int64 &rhs);
 
-    virtual ~Float32()
-    {}
+    virtual ~Int64();
 
     virtual BaseType *ptr_duplicate();
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
-    virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
-			   Marshaller &m, bool ce_eval = true);
+    virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval = true);
     virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse = false);
 
-    virtual unsigned int val2buf(void *val, bool reuse = false);
-    virtual unsigned int buf2val(void **val);
+    virtual bool set_value(dods_int64 i);
+    virtual dods_int64 value() const;
 
-    virtual dods_float32 value() const;
-    virtual bool set_value(dods_float32 f);
-#if FILE_METHODS
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
@@ -111,5 +86,5 @@ public:
 
 } // namespace libdap
 
-#endif // _float32_h
+#endif // _int64_h
 
diff --git a/Int8.cc b/Int8.cc
new file mode 100644
index 0000000..685965c
--- /dev/null
+++ b/Int8.cc
@@ -0,0 +1,252 @@
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2012 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#include "config.h"
+
+#include <cassert>
+#include <sstream>
+
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
+#include "Int16.h"
+#include "UInt16.h"
+#include "Int32.h"
+#include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
+#include "Float32.h"
+#include "Float64.h"
+#include "Str.h"
+#include "Url.h"
+
+#include "DAP4StreamMarshaller.h"
+#include "DAP4StreamUnMarshaller.h"
+
+#include "DDS.h"
+#include "util.h"
+#include "parser.h"
+#include "Operators.h"
+#include "dods-limits.h"
+#include "debug.h"
+#include "InternalErr.h"
+
+using std::cerr;
+using std::endl;
+
+namespace libdap {
+
+/** The Int8 constructor accepts the name of the variable to be created.
+
+    @param n A string containing the name of the variable to be created.
+*/
+Int8::Int8(const string &n) : BaseType(n, dods_int8_c)
+{}
+
+/** The Int8 server-side constructor accepts the name of the variable and
+    the dataset name from which this instance is created.
+
+    @param n A string containing the name of the variable to be created.
+    @param d A string containing the name of the dataset from which this
+    variable is created
+*/
+Int8::Int8(const string &n, const string &d) : BaseType(n, d, dods_int8_c)
+{}
+
+Int8::Int8(const Int8 &copy_from) : BaseType(copy_from)
+{
+    d_buf = copy_from.d_buf;
+}
+
+BaseType *
+Int8::ptr_duplicate()
+{
+    return new Int8(*this);
+}
+
+Int8 &
+Int8::operator=(const Int8 &rhs)
+{
+    if (this == &rhs)
+        return *this;
+
+    static_cast<BaseType &>(*this) = rhs;
+
+    d_buf = rhs.d_buf;
+
+    return *this;
+}
+
+unsigned int
+Int8::width(bool)
+{
+    return sizeof(dods_int8);
+}
+
+bool
+Int8::serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval)
+{
+    dds.timeout_on();
+
+    if (!read_p())
+        read();  // read() throws Error and InternalErr
+
+#if EVAL
+    if (ce_eval && !eval.eval_selection(dds, dataset()))
+        return true;
+#endif
+
+    dds.timeout_off();
+
+    assert(typeid(m)==typeid(DAP4StreamMarshaller));
+    static_cast<DAP4StreamMarshaller&>(m).put_int8( d_buf ) ;
+
+    return true;
+}
+
+bool
+Int8::deserialize(UnMarshaller &um, DDS *, bool)
+{
+    assert(typeid(um)==typeid(DAP4StreamUnMarshaller));
+    static_cast<DAP4StreamUnMarshaller&>(um).get_int8( d_buf ) ;
+
+    return false;
+}
+
+dods_int8
+Int8::value() const
+{
+    return d_buf;
+}
+
+bool
+Int8::set_value(dods_int8 i)
+{
+    d_buf = i;
+    set_read_p(true);
+
+    return true;
+}
+
+void
+Int8::print_val(FILE *out, string space, bool print_decl_p)
+{
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
+}
+
+void
+Int8::print_val(ostream &out, string space, bool print_decl_p)
+{
+    if (print_decl_p) {
+        print_decl(out, space, false);
+	out << " = " << d_buf << ";\n" ;
+    }
+    else
+	out << d_buf ;
+}
+
+bool
+Int8::ops(BaseType *b, int op)
+{
+    // Get the arg's value.
+    if (!read_p() && !read())
+        throw InternalErr(__FILE__, __LINE__, "This value not read!");
+
+    // Get the second arg's value.
+    if (!b->read_p() && !b->read())
+        throw InternalErr(__FILE__, __LINE__, "This value not read!");
+
+    switch (b->type()) {
+        case dods_int8_c:
+            return Cmp<dods_int8, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return SUCmp<dods_int8, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return Cmp<dods_int8, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return SUCmp<dods_int8, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return Cmp<dods_int8, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return SUCmp<dods_int8, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return Cmp<dods_int8, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return SUCmp<dods_int8, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return Cmp<dods_int8, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return Cmp<dods_int8, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
+    }
+#if 0
+    switch (b->type()) {
+        case dods_byte_c:
+            return rops<dods_int8, dods_byte, SUCmp<dods_int8, dods_byte> >(d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return rops<dods_int8, dods_int16, Cmp<dods_int8, dods_int16> >(d_buf, static_cast<Int16 *>(b)->value());
+        case dods_uint16_c:
+            return rops<dods_int8, dods_uint16, SUCmp<dods_int8, dods_uint16> >(d_buf, static_cast<UInt16 *>(b)->value());
+        case dods_int32_c:
+            return rops<dods_int8, dods_int32, Cmp<dods_int8, dods_int32> >(d_buf, static_cast<Int32 *>(b)->value());
+        case dods_uint32_c:
+            return rops<dods_int8, dods_uint32, SUCmp<dods_int8, dods_uint32> >(d_buf, static_cast<UInt32 *>(b)->value());
+        case dods_int64_c:
+            return rops<dods_int8, dods_int64, Cmp<dods_int8, dods_int64> >(d_buf, static_cast<Int64 *>(b)->value());
+        case dods_uint64_c:
+            return rops<dods_int8, dods_uint64, Cmp<dods_int8, dods_uint64> >(d_buf, static_cast<UInt64 *>(b)->value());
+        case dods_float32_c:
+            return rops<dods_int8, dods_float32, Cmp<dods_int64, dods_float32> >(d_buf, static_cast<Float32 *>(b)->value());
+        case dods_float64_c:
+            return rops<dods_int8, dods_float64, Cmp<dods_int64, dods_float64> >(d_buf, static_cast<Float64 *>(b)->value());
+        default:
+            return false;
+    }
+#endif
+}
+
+/** @brief dumps information about this object
+ *
+ * Displays the pointer value of this instance and information about this
+ * instance.
+ *
+ * @param strm C++ i/o stream to dump the information to
+ * @return void
+ */
+void
+Int8::dump(ostream &strm) const
+{
+    strm << DapIndent::LMarg << "Int8::dump - ("
+    << (void *)this << ")" << endl ;
+    DapIndent::Indent() ;
+    BaseType::dump(strm) ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
+    DapIndent::UnIndent() ;
+}
+
+} // namespace libdap
+
diff --git a/Int16.h b/Int8.h
similarity index 52%
copy from Int16.h
copy to Int8.h
index 9c2b505..d0182bb 100644
--- a/Int16.h
+++ b/Int8.h
@@ -4,7 +4,7 @@
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
 // Access Protocol.
 
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
+// Copyright (c) 2012 OPeNDAP, Inc.
 // Author: James Gallagher <jgallagher at opendap.org>
 //
 // This library is free software; you can redistribute it and/or
@@ -19,23 +19,12 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
-// (c) COPYRIGHT URI/MIT 1997,1999
-// Please read the full copyright statement in the file COPYRIGHT_URI.
-//
-// Authors:
-//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
-
-// Interface for Int16 type.
-//
-// jhrg 9/7/94
-
-#ifndef _int16_h
-#define _int16_h 1
-
+#ifndef _int8_h
+#define _int8_h 1
 
 #ifndef _dods_datatypes_h
 #include "dods-datatypes.h"
@@ -45,61 +34,41 @@
 #include "BaseType.h"
 #endif
 
-#ifndef constraint_evaluator_h
-#include "ConstraintEvaluator.h"
-#endif
-
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
 /** @brief Holds a 16-bit signed integer value. */
 
-class Int16: public BaseType
+class Int8: public BaseType
 {
-    /** This class allows Byte, ..., Float64 access to <tt>_buf</tt> to
-    simplify and speed up the relational operators.
-
-    NB: According to Stroustrup it does not matter where (public, private
-    or protected) friend classes are declared. */
-    friend class Byte;
-    friend class UInt16;
-    friend class Int32;
-    friend class UInt32;
-    friend class Float32;
-    friend class Float64;
+    virtual unsigned int val2buf(void *, bool)  { throw InternalErr(__FILE__, __LINE__, "Not implemented for Int8"); }
+    virtual unsigned int buf2val(void **)  { throw InternalErr(__FILE__, __LINE__, "Not implemented for Int8"); }
 
 protected:
-    dods_int16 _buf;
+    dods_int8 d_buf;
 
 public:
-    Int16(const string &n);
-    Int16(const string &n, const string &d);
-    virtual ~Int16()
+    Int8(const string &n);
+    Int8(const string &n, const string &d);
+    virtual ~Int8()
     {}
 
-    Int16(const Int16 &copy_from);
+    Int8(const Int8 &copy_from);
 
-    Int16 &operator=(const Int16 &rhs);
+    Int8 &operator=(const Int8 &rhs);
 
     virtual BaseType *ptr_duplicate();
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
-    virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
-			   Marshaller &m, bool ce_eval = true);
+    virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval = true);
     virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse = false);
 
-    virtual unsigned int val2buf(void *val, bool reuse = false);
-    virtual unsigned int buf2val(void **val);
+    virtual dods_int8 value() const;
+    virtual bool set_value(dods_int8 val);
 
-    virtual dods_int16 value() const;
-    virtual bool set_value(dods_int16 val);
-#if FILE_METHODS
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
diff --git a/InternalErr.cc b/InternalErr.cc
index f816a66..4a55a47 100644
--- a/InternalErr.cc
+++ b/InternalErr.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -35,7 +35,7 @@
 #include "config.h"
 
 static char rcsid[] not_used =
-    {"$Id: InternalErr.cc 21699 2009-11-05 00:06:01Z jimg $"
+    {"$Id: InternalErr.cc 27197 2013-10-01 21:29:54Z jimg $"
     };
 
 #include <string>
diff --git a/InternalErr.h b/InternalErr.h
index 5baefd9..e99d2d1 100644
--- a/InternalErr.h
+++ b/InternalErr.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Keywords2.cc b/Keywords2.cc
index 3366f26..73d3330 100644
--- a/Keywords2.cc
+++ b/Keywords2.cc
@@ -18,13 +18,11 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 #include "config.h"
 
-static char rcsid[] not_used = { "$Id: ResponseBuilder.cc 23477 2010-09-02 21:02:59Z jimg $" };
-
 #include <iostream>
 #include <vector>
 
@@ -58,7 +56,7 @@ Keywords::~Keywords()
 {
 }
 
-/** Static function to parse the curly-brace keyword notation.
+/** Static function to parse the keyword notation.
  * @param kw the keyword clause '<word> ( <value> )'
  * @param word (result) the word
  * @param value (result) the value
@@ -76,7 +74,7 @@ static bool f_parse_keyword(const string &kw, string &word, string &value)
     string::size_type j = kw.find(')');
     if (j == string::npos)
 	return false;
-    ++i; // Move past the opening brace
+    ++i; // Move past the opening paren
     value = kw.substr(i, j-i);
 
     return (!word.empty() && !value.empty());
diff --git a/Keywords2.h b/Keywords2.h
index 236bac7..1d6fa13 100644
--- a/Keywords2.h
+++ b/Keywords2.h
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Makefile.am b/Makefile.am
index 4804461..50aed3f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,36 +6,44 @@ ACLOCAL_AMFLAGS = -I conf -I gl/m4
 aclocaldir=$(datadir)/aclocal
 pkgconfigdir=$(libdir)/pkgconfig
 
-# Arrange to build with the backward compatibility mode enabled.
 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/GNU $(XML2_CFLAGS)
-# -I$(top_srcdir)/xstream
 AM_CXXFLAGS = 
+
 if COMPILER_IS_GCC
 AM_CXXFLAGS += -Wall -W -Wcast-align
 endif
 
-AM_YFLAGS = -d -v
+# if USING_GRIDFIELDS
+# AM_CPPFLAGS += $(GF_CFLAGS)
+# GRIDFIELDS = ugridFunctions
+# endif
+
+AM_YFLAGS = -d -v -t
 AM_LFLAGS = -8
 
 # These are not used by automake but are often useful for certain types of
 # debugging. The best way to use these is to run configure as:
 #     export CXXFLAGS='...'; ./configure --disable-shared
+# or ./configure --enable-developer --disable-shared
 # the --disable-shared is not required, but it seems to help with debuggers.
-CXXFLAGS_DEBUG = -g3 -O0 -fno-defer-pop -Wall -W -Wcast-align -Werror
+CXXFLAGS_DEBUG = -g3 -O0  -Wall -W -Wcast-align 
+# -Werror There are some warnings in this code that are here to stay...
 TEST_COV_FLAGS = -ftest-coverage -fprofile-arcs
 
+if BUILD_DEVELOPER
+AM_CXXFLAGS += $(CXXFLAGS_DEBUG)
+endif
+
 SUBDIRS = gl . tests unit-tests
-DIST_SUBDIRS = unit-tests gl tests
+DIST_SUBDIRS = gl tests unit-tests
 
 noinst_LTLIBRARIES = libparsers.la
+
 lib_LTLIBRARIES = libdap.la libdapclient.la libdapserver.la
 
 bin_SCRIPTS = dap-config dap-config-pkgconfig
 
 bin_PROGRAMS = getdap
-# fdiostream_test
-
-# sbin_PROGRAMS = deflate
 
 BUILT_SOURCES = $(GRAM_SRC) dods-datatypes.h xdr-datatypes.h getdap.1 dap-config.1
 
@@ -45,17 +53,23 @@ man_MANS = getdap.1 dap-config.1
 	groff -t -e -mandoc -Tascii $< | col -bx > $@
 
 libparsers_la_SOURCES = $(GRAM_SRC) 
-libparsers_la_CPPFLAGS = $(AM_CPPFLAGS) #$(XML2_CFLAGS)
+libparsers_la_CPPFLAGS = $(AM_CPPFLAGS)
 libparsers_la_LIBADD = $(XML2_LIBS)
 
-libdap_la_SOURCES = $(DAP_SRC) $(GNU_SRC) 
+libdap_la_SOURCES = $(DAP_SRC) $(GNU_SRC)
+if DAP4_DEFINED
+    libdap_la_SOURCES += $(DAP4_ONLY_SRC)
+endif
+
 libdap_la_LDFLAGS = -version-info $(LIBDAP_VERSION)
-libdap_la_CPPFLAGS = $(AM_CPPFLAGS) #$(XML2_CFLAGS)
-libdap_la_LIBADD = $(XML2_LIBS) $(PTHREAD_LIBS) -lcrypto gl/libgnu.la libparsers.la
+libdap_la_CPPFLAGS = $(AM_CPPFLAGS)
+libdap_la_LIBADD = $(XML2_LIBS) $(PTHREAD_LIBS) gl/libgnu.la libparsers.la
+if DAP4_DEFINED
+    libdap_la_LIBADD += -lcrypto 
+endif
 
 libdapclient_la_SOURCES = $(CLIENT_SRC) 
 libdapclient_la_LDFLAGS = -version-info $(CLIENTLIB_VERSION)
-#libdapclient_la_CPPFLAGS = $(AM_CPPFLAGS) $(CURL_CFLAGS) $(XML2_CFLAGS)
 libdapclient_la_CPPFLAGS = $(AM_CPPFLAGS) $(CURL_CFLAGS)
 libdapclient_la_LIBADD = $(CURL_LIBS) libdap.la $(PTHREAD_LIBS)
 
@@ -64,25 +78,26 @@ libdapserver_la_LDFLAGS = -version-info $(SERVERLIB_VERSION)
 libdapserver_la_LIBADD = libdap.la $(UUID_LIBS)
 
 pkginclude_HEADERS = $(DAP_HDR) $(GNU_HDR) $(CLIENT_HDR) $(SERVER_HDR) 
+# TODO Until the compile-time issue with headers like BaseType.h depending on
+# configure params is fixed, always install these headers.
+if DAP4_DEFINED
+    pkginclude_HEADERS += $(DAP4_ONLY_HDR)
+endif
 
 noinst_HEADERS = config_dap.h
 
-# fdiostream_test_SOURCES = GNU/fdiostream_test.cc
-
 getdap_SOURCES = getdap.cc
 getdap_LDADD = libdapclient.la libdap.la
 getdap_CPPFLAGS = $(AM_CPPFLAGS) $(CURL_CFLAGS)
 
-LEX_YACC_EXTRA = das.lex das.y dds.lex dds.y ce_expr.lex ce_expr.y gse.lex \
-	gse.y Error.lex Error.y
-
-EXTRA_DIST = ChangeLog COPYING README.dodsrc COPYRIGHT_URI	 \
-	COPYRIGHT_W3C GNU/README doxy.conf doxy_private.conf libdap.spec \
-	VCPP dods-datatypes-static.h xdr-datatypes-static.h \
-	dap-config-pkgconfig $(LEX_YACC_EXTRA) $(GRAM_SRC) OSX_Resources \
-	getdap.man1 dap-config.man1
+LEX_YACC_EXTRA = das.lex das.yy dds.lex dds.yy ce_expr.lex ce_expr.yy \
+Error.lex Error.yy
 
-# README.AIS xstream/README 
+EXTRA_DIST = ChangeLog COPYING README.dodsrc COPYRIGHT_URI		\
+	COPYRIGHT_W3C GNU/README doxy.conf doxy_private.conf		\
+	libdap.spec VCPP dods-datatypes-static.h			\
+	xdr-datatypes-static.h dap-config-pkgconfig $(LEX_YACC_EXTRA)	\
+	$(GRAM_SRC) OSX_Resources getdap.man1 dap-config.man1
 
 dist_aclocal_DATA = conf/libdap.m4
 pkgconfig_DATA = libdap.pc libdapclient.pc libdapserver.pc
@@ -95,8 +110,6 @@ CLEANFILES = *.log *.output *.gcda *.gcno $(GRAM_SRC) dods-datatypes.h \
 dist-hook:
 	rm -rf `find $(distdir) -name .svn`
 
-# MAINTAINERCLEANFILES = $(GRAM_SRC)
-
 # Copy the generated grammar files to the 'grammarfiles' directory.
 .PHONY: grammarfiles
 grammarfiles: $(GRAM_SRC)
@@ -118,16 +131,15 @@ cccc:
 ###########################################################################
 
 # Fortify targets.
-# dods-datatypes.h xdr-datatypes.h
 .PHONY: fortify
 fortify: $(BUILT_SOURCES)
-	(cd gl && sourceanalyzer -b @PACKAGE at -gl $(MAKE) )
-	sourceanalyzer -b @PACKAGE at -parsers $(MAKE) libparsers.la
-	sourceanalyzer -b @PACKAGE@ $(MAKE) libdap.la libdapserver.la libdapclient.la
+	(cd gl && sourceanalyzer -b @PACKAGE at -gl $(MAKE) $(MFLAGS) )
+	sourceanalyzer -b @PACKAGE at -parsers $(MAKE) $(MFLAGS) libparsers.la
+	sourceanalyzer -b @PACKAGE@ $(MAKE) $(MFLAGS) libdap.la libdapserver.la libdapclient.la
 	sourceanalyzer -b @PACKAGE@ -scan -f @PACKAGE at -@PACKAGE_VERSION at .fpr
 
 # run fortify on only our code, not the gnulib code or the flex/bison code.
-# This does skip testing some of the functions we wrote in the *.lex/*.y
+# This does skip testing some of the functions we wrote in the *.lex/*.yy
 # files but should eliminate the false positives from flex and bison, too.
 .PHONY: fortify-lite
 fortify-lite: dods-datatypes.h xdr-datatypes.h
@@ -136,8 +148,9 @@ fortify-lite: dods-datatypes.h xdr-datatypes.h
 	sourceanalyzer -b @PACKAGE@ $(MAKE) libdap.la libdapserver.la libdapclient.la
 	sourceanalyzer -b @PACKAGE@ -scan -f @PACKAGE at -@PACKAGE_VERSION at .fpr
 
-grammar_objects = lex.das.o das.tab.o lex.dds.o dds.tab.o lex.ce_expr.o \
-ce_expr.tab.o lex.gse_.o gse.tab.o lex.Error.o Error.tab.o
+# No longer used? jhrg 1/29/13
+#grammar_objects = lex.das.o das.tab.o lex.dds.o dds.tab.o lex.ce_expr.o \
+#ce_expr.tab.o lex.gse_.o gse.tab.o lex.Error.o Error.tab.o
 
 # Use this to clean the fortify project.
 .PHONY: fortifyclean
@@ -162,8 +175,6 @@ rpm: dist
 # are there so that the values built into dap-config will match the mac
 # osx install dirs and not the temp directory used to build the packages
 
-# PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker*
-
 PACKAGEMAKER=/Developer/usr/bin/packagemaker
 PKG_CONF_FLAGS=
 
@@ -178,7 +189,7 @@ pkg-build: clean-pkg
 pkg-main: pkg-build
 	./OSX_Resources/update_mac_package_contents.pl README
 	cat ./OSX_Resources/Info.plist.proto | \
-	   sed -e "s^_PREFIX_^$(prefix)^g" \
+	   sed -e "s^_PREFIX_^/usr/local/servers/hyrax-1.8.8^g" \
 	       -e "s^_FULL_VERSION_^@PACKAGE_VERSION@^g" \
 	       -e "s^_MAJOR_VERSION_^@PACKAGE_MAJOR_VERSION@^g" \
 	       -e "s^_MINOR_VERSION_^@PACKAGE_MINOR_VERSION@^g" \
@@ -188,6 +199,8 @@ pkg-main: pkg-build
 	    --title "@PACKAGE@ @PACKAGE_VERSION@" --version @PACKAGE_VERSION@ \
 	    --out @PACKAGE at -@PACKAGE_VERSION at .pkg --resources OSX_Resources
 
+# 	   sed -e "s^_PREFIX_^$(prefix)^g" 
+
 pkg-dmg: pkg-main
 	-rm -rf @PACKAGE at -@PACKAGE_VERSION@
 	-rm -rf @PACKAGE at -@PACKAGE_VERSION at .dmg
@@ -222,8 +235,7 @@ GNU_HDR = GNU/GetOpt.h GNU/GNURegex.h
 
 GRAM_SRC = lex.das.cc das.tab.cc das.tab.hh lex.dds.cc dds.tab.cc	\
 	dds.tab.hh lex.ce_expr.cc ce_expr.tab.cc ce_expr.tab.hh		\
-	lex.Error.cc Error.tab.cc Error.tab.hh gse.tab.hh gse.tab.cc	\
-	lex.gse_.cc
+	lex.Error.cc Error.tab.cc Error.tab.hh 
 
 DAP_SRC = AttrTable.cc DAS.cc DDS.cc DataDDS.cc DDXParserSAX2.cc	\
 	BaseType.cc Byte.cc Int32.cc Float64.cc Str.cc Url.cc		\
@@ -231,13 +243,18 @@ DAP_SRC = AttrTable.cc DAS.cc DDS.cc DataDDS.cc DDXParserSAX2.cc	\
 	Int16.cc UInt16.cc Float32.cc Constructor.cc			\
 	BaseTypeFactory.cc SignalHandler.cc Error.cc InternalErr.cc	\
 	util.cc xdrutil_ppc.c parser-util.cc escaping.cc		\
-	ce_functions.cc GSEClause.cc GeoConstraint.cc			\
-	GridGeoConstraint.cc Clause.cc RValue.cc			\
-	ConstraintEvaluator.cc ArrayGeoConstraint.cc DapIndent.cc	\
+	Clause.cc RValue.cc			\
+	ConstraintEvaluator.cc DapIndent.cc	\
 	Operators.h XDRUtils.cc XDRFileMarshaller.cc			\
-	XDRFileUnMarshaller.cc XDRStreamMarshaller.cc			\
+	XDRStreamMarshaller.cc XDRFileUnMarshaller.cc			\
 	XDRStreamUnMarshaller.cc mime_util.cc Keywords2.cc XMLWriter.cc \
-	DAPCache3.cc
+	ServerFunctionsList.cc ServerFunction.cc
+
+# DAPCache3.cc 
+
+DAP4_ONLY_SRC = DAP4StreamMarshaller.cc DAP4StreamUnMarshaller.cc Int64.cc \
+        UInt64.cc Int8.cc D4ParserSax2.cc D4BaseTypeFactory.cc \
+        D4Maps.cc D4Dimensions.cc  D4EnumDef.cc D4Group.cc
 
 Operators.h: ce_expr.tab.hh
 
@@ -247,7 +264,8 @@ Operators.h: ce_expr.tab.hh
 CLIENT_SRC = RCReader.cc Connect.cc HTTPConnect.cc HTTPCache.cc	\
 	util_mit.cc ResponseTooBigErr.cc HTTPCacheTable.cc
 
-SERVER_SRC = DODSFilter.cc Ancillary.cc ResponseBuilder.cc
+SERVER_SRC = DODSFilter.cc Ancillary.cc
+# ResponseBuilder.cc ResponseCache.cc
 
 DAP_HDR = AttrTable.h DAS.h DDS.h DataDDS.h DDXParserSAX2.h		\
 	DDXExceptions.h BaseType.h Byte.h Int32.h Float64.h Str.h	\
@@ -255,14 +273,19 @@ DAP_HDR = AttrTable.h DAS.h DDS.h DataDDS.h DDXParserSAX2.h		\
 	Grid.h UInt32.h Int16.h UInt16.h Float32.h BaseTypeFactory.h	\
 	ObjectType.h EncodingType.h SignalHandler.h Error.h		\
 	InternalErr.h util.h escaping.h parser.h debug.h dods-limits.h	\
-	dods-datatypes.h GeoConstraint.h GridGeoConstraint.h		\
-	ArrayGeoConstraint.h ce_functions.h gse_parser.h GSEClause.h	\
+	dods-datatypes.h 		\
 	util_mit.h expr.h Clause.h RValue.h ConstraintEvaluator.h	\
 	ce_parser.h DapIndent.h DapObj.h XDRFileMarshaller.h		\
-	Marshaller.h XDRFileUnMarshaller.h UnMarshaller.h		\
+	Marshaller.h UnMarshaller.h XDRFileUnMarshaller.h		\
 	XDRStreamMarshaller.h XDRUtils.h xdr-datatypes.h mime_util.h	\
 	cgi_util.h XDRStreamUnMarshaller.h Keywords2.h XMLWriter.h \
-	DAPCache3.h
+	ServerFunctionsList.h ServerFunction.h
+
+# DAPCache.h
+
+DAP4_ONLY_HDR = DAP4StreamMarshaller.h DAP4StreamUnMarshaller.h Int64.h \
+        UInt64.h Int8.h D4ParserSax2.h D4BaseTypeFactory.h D4ParseError.h \
+        D4Maps.h D4Dimensions.h D4EnumDef.h D4Group.h
 
 if USE_C99_TYPES
 dods-datatypes.h: dods-datatypes-static.h
@@ -280,8 +303,8 @@ CLIENT_HDR = RCReader.h Connect.h HTTPConnect.h HTTPCache.h		\
 	StdinResponse.h SignalHandlerRegisteredErr.h			\
 	ResponseTooBigErr.h Resource.h HTTPCacheTable.h HTTPCacheMacros.h
 
-SERVER_HDR = DODSFilter.h AlarmHandler.h EventHandler.h Ancillary.h	\
-	ResponseBuilder.h
+SERVER_HDR = DODSFilter.h AlarmHandler.h EventHandler.h Ancillary.h
+#	ResponseBuilder.h ResponseCache.h
 
 ############################################################################
 # Special rules for the grammars. I tried to use the automake grammar support
@@ -293,46 +316,31 @@ SERVER_HDR = DODSFilter.h AlarmHandler.h EventHandler.h Ancillary.h	\
 # Build the DAS scanner and parser
 
 lex.das.cc: das.lex das.tab.cc das.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
+	$(LEX) $(LFLAGS) $<
 
-# The funny if statment accommodates older versions of bison that treats
-# -o differently than the 2.x versions. jhrg 3/2/08
-das.tab.cc das.tab.hh: das.y DAS.h
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p das -o das.tab.cc $<
-	if test -e das.tab.cc.h; then mv das.tab.cc.h das.tab.hh; fi
+das.tab.cc das.tab.hh: das.yy DAS.h
+	$(YACC) $(YFLAGS) $<
 
 # DDS
 
 lex.dds.cc: dds.lex dds.tab.cc dds.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
+	$(LEX) $(LFLAGS) $<
 
-dds.tab.cc dds.tab.hh: dds.y
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p dds -o dds.tab.cc $<
-	if test -e dds.tab.cc.h; then mv dds.tab.cc.h dds.tab.hh; fi
+dds.tab.cc dds.tab.hh: dds.yy
+	$(YACC) $(YFLAGS) $<
 
 # CE
 
 lex.ce_expr.cc: ce_expr.lex ce_expr.tab.cc ce_expr.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
-
-ce_expr.tab.cc ce_expr.tab.hh: ce_expr.y
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p ce_expr -o ce_expr.tab.cc $<
-	if test -e ce_expr.tab.cc.h; then mv ce_expr.tab.cc.h ce_expr.tab.hh; fi
-
-# Build the grid selection sub_expression scanner and parser
-
-lex.gse_.cc: gse.lex gse.tab.cc gse.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
+	$(LEX) $(LFLAGS) $<
 
-gse.tab.cc gse.tab.hh: gse.y
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p gse_ -o gse.tab.cc $<
-	if test -e gse.tab.cc.h; then mv gse.tab.cc.h gse.tab.hh; fi
+ce_expr.tab.cc ce_expr.tab.hh: ce_expr.yy
+	$(YACC) $(YFLAGS) $<
 
 # Errors
 
 lex.Error.cc: Error.lex Error.tab.cc Error.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
+	$(LEX) $(LFLAGS) $<
 
-Error.tab.cc Error.tab.hh: Error.y
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p Error -o Error.tab.cc $<
-	if test -e Error.tab.cc.h; then mv Error.tab.cc.h Error.tab.hh; fi
+Error.tab.cc Error.tab.hh: Error.yy
+	$(YACC) $(YFLAGS) $<
diff --git a/Makefile.in b/Makefile.in
index 9e7aeda..8d5edcb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.12 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -22,6 +22,23 @@
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -40,23 +57,32 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 @COMPILER_IS_GCC_TRUE at am__append_1 = -Wall -W -Wcast-align
+ at BUILD_DEVELOPER_TRUE@am__append_2 = $(CXXFLAGS_DEBUG)
 bin_PROGRAMS = getdap$(EXEEXT)
+ at DAP4_DEFINED_TRUE@am__append_3 = $(DAP4_ONLY_SRC)
+ at DAP4_DEFINED_TRUE@am__append_4 = -lcrypto 
+# TODO Until the compile-time issue with headers like BaseType.h depending on
+# configure params is fixed, always install these headers.
+ at DAP4_DEFINED_TRUE@am__append_5 = $(DAP4_ONLY_HDR)
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(dist_aclocal_DATA) \
-	$(noinst_HEADERS) $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
-	$(srcdir)/dap-config.in $(srcdir)/dods-datatypes-config.h.in \
-	$(srcdir)/doxy.conf.in $(srcdir)/libdap.pc.in \
-	$(srcdir)/libdapclient.pc.in $(srcdir)/libdapserver.pc.in \
-	$(srcdir)/main_page.doxygen.in \
-	$(srcdir)/xdr-datatypes-config.h.in $(top_srcdir)/configure \
-	COPYING ChangeLog INSTALL NEWS conf/config.guess \
-	conf/config.sub conf/depcomp conf/install-sh conf/ltmain.sh \
-	conf/missing
+DIST_COMMON = README $(am__configure_deps) \
+	$(am__pkginclude_HEADERS_DIST) $(dist_aclocal_DATA) \
+	$(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/config.h.in $(srcdir)/dap-config.in \
+	$(srcdir)/dods-datatypes-config.h.in $(srcdir)/doxy.conf.in \
+	$(srcdir)/libdap.pc.in $(srcdir)/libdapclient.pc.in \
+	$(srcdir)/libdapserver.pc.in $(srcdir)/main_page.doxygen.in \
+	$(srcdir)/xdr-datatypes-config.h.in \
+	$(top_srcdir)/conf/config.guess $(top_srcdir)/conf/config.sub \
+	$(top_srcdir)/conf/depcomp $(top_srcdir)/conf/install-sh \
+	$(top_srcdir)/conf/ltmain.sh $(top_srcdir)/conf/missing \
+	$(top_srcdir)/configure COPYING ChangeLog INSTALL NEWS \
+	conf/config.guess conf/config.sub conf/depcomp conf/install-sh \
+	conf/ltmain.sh conf/missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/btowc.m4 \
-	$(top_srcdir)/gl/m4/codeset.m4 \
+	$(top_srcdir)/gl/m4/byteswap.m4 $(top_srcdir)/gl/m4/codeset.m4 \
 	$(top_srcdir)/gl/m4/configmake.m4 \
 	$(top_srcdir)/gl/m4/extensions.m4 \
 	$(top_srcdir)/gl/m4/fcntl-o.m4 $(top_srcdir)/gl/m4/glibc21.m4 \
@@ -69,14 +95,19 @@ am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/locale-fr.m4 \
 	$(top_srcdir)/gl/m4/locale-ja.m4 \
 	$(top_srcdir)/gl/m4/locale-zh.m4 \
+	$(top_srcdir)/gl/m4/locale_h.m4 \
+	$(top_srcdir)/gl/m4/localeconv.m4 \
 	$(top_srcdir)/gl/m4/longlong.m4 $(top_srcdir)/gl/m4/malloc.m4 \
 	$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
-	$(top_srcdir)/gl/m4/mbstate_t.m4 \
+	$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \
 	$(top_srcdir)/gl/m4/multiarch.m4 \
 	$(top_srcdir)/gl/m4/nl_langinfo.m4 \
-	$(top_srcdir)/gl/m4/regex.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
-	$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \
-	$(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \
+	$(top_srcdir)/gl/m4/off_t.m4 $(top_srcdir)/gl/m4/regex.m4 \
+	$(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \
+	$(top_srcdir)/gl/m4/stddef_h.m4 $(top_srcdir)/gl/m4/stdint.m4 \
+	$(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \
+	$(top_srcdir)/gl/m4/strings_h.m4 \
+	$(top_srcdir)/gl/m4/sys_types_h.m4 \
 	$(top_srcdir)/gl/m4/unistd_h.m4 \
 	$(top_srcdir)/gl/m4/warn-on-use.m4 \
 	$(top_srcdir)/gl/m4/wchar_h.m4 $(top_srcdir)/gl/m4/wchar_t.m4 \
@@ -118,6 +149,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
 	"$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
 	"$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(pkgconfigdir)" \
@@ -125,7 +162,21 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libdap_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	gl/libgnu.la libparsers.la
+	gl/libgnu.la libparsers.la $(am__DEPENDENCIES_1)
+am__libdap_la_SOURCES_DIST = AttrTable.cc DAS.cc DDS.cc DataDDS.cc \
+	DDXParserSAX2.cc BaseType.cc Byte.cc Int32.cc Float64.cc \
+	Str.cc Url.cc Vector.cc Array.cc Structure.cc Sequence.cc \
+	Grid.cc UInt32.cc Int16.cc UInt16.cc Float32.cc Constructor.cc \
+	BaseTypeFactory.cc SignalHandler.cc Error.cc InternalErr.cc \
+	util.cc xdrutil_ppc.c parser-util.cc escaping.cc Clause.cc \
+	RValue.cc ConstraintEvaluator.cc DapIndent.cc Operators.h \
+	XDRUtils.cc XDRFileMarshaller.cc XDRStreamMarshaller.cc \
+	XDRFileUnMarshaller.cc XDRStreamUnMarshaller.cc mime_util.cc \
+	Keywords2.cc XMLWriter.cc ServerFunctionsList.cc \
+	ServerFunction.cc GNU/GetOpt.cc GNU/GNURegex.cc \
+	DAP4StreamMarshaller.cc DAP4StreamUnMarshaller.cc Int64.cc \
+	UInt64.cc Int8.cc D4ParserSax2.cc D4BaseTypeFactory.cc \
+	D4Maps.cc D4Dimensions.cc D4EnumDef.cc D4Group.cc
 am__objects_1 = libdap_la-AttrTable.lo libdap_la-DAS.lo \
 	libdap_la-DDS.lo libdap_la-DataDDS.lo \
 	libdap_la-DDXParserSAX2.lo libdap_la-BaseType.lo \
@@ -138,49 +189,53 @@ am__objects_1 = libdap_la-AttrTable.lo libdap_la-DAS.lo \
 	libdap_la-SignalHandler.lo libdap_la-Error.lo \
 	libdap_la-InternalErr.lo libdap_la-util.lo \
 	libdap_la-xdrutil_ppc.lo libdap_la-parser-util.lo \
-	libdap_la-escaping.lo libdap_la-ce_functions.lo \
-	libdap_la-GSEClause.lo libdap_la-GeoConstraint.lo \
-	libdap_la-GridGeoConstraint.lo libdap_la-Clause.lo \
-	libdap_la-RValue.lo libdap_la-ConstraintEvaluator.lo \
-	libdap_la-ArrayGeoConstraint.lo libdap_la-DapIndent.lo \
+	libdap_la-escaping.lo libdap_la-Clause.lo libdap_la-RValue.lo \
+	libdap_la-ConstraintEvaluator.lo libdap_la-DapIndent.lo \
 	libdap_la-XDRUtils.lo libdap_la-XDRFileMarshaller.lo \
-	libdap_la-XDRFileUnMarshaller.lo \
 	libdap_la-XDRStreamMarshaller.lo \
+	libdap_la-XDRFileUnMarshaller.lo \
 	libdap_la-XDRStreamUnMarshaller.lo libdap_la-mime_util.lo \
 	libdap_la-Keywords2.lo libdap_la-XMLWriter.lo \
-	libdap_la-DAPCache3.lo
+	libdap_la-ServerFunctionsList.lo libdap_la-ServerFunction.lo
 am__objects_2 = libdap_la-GetOpt.lo libdap_la-GNURegex.lo
-am_libdap_la_OBJECTS = $(am__objects_1) $(am__objects_2)
+am__objects_3 = libdap_la-DAP4StreamMarshaller.lo \
+	libdap_la-DAP4StreamUnMarshaller.lo libdap_la-Int64.lo \
+	libdap_la-UInt64.lo libdap_la-Int8.lo \
+	libdap_la-D4ParserSax2.lo libdap_la-D4BaseTypeFactory.lo \
+	libdap_la-D4Maps.lo libdap_la-D4Dimensions.lo \
+	libdap_la-D4EnumDef.lo libdap_la-D4Group.lo
+ at DAP4_DEFINED_TRUE@am__objects_4 = $(am__objects_3)
+am_libdap_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
+	$(am__objects_4)
 libdap_la_OBJECTS = $(am_libdap_la_OBJECTS)
 libdap_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
 	$(CXXFLAGS) $(libdap_la_LDFLAGS) $(LDFLAGS) -o $@
 libdapclient_la_DEPENDENCIES = $(am__DEPENDENCIES_1) libdap.la \
 	$(am__DEPENDENCIES_1)
-am__objects_3 = libdapclient_la-RCReader.lo libdapclient_la-Connect.lo \
+am__objects_5 = libdapclient_la-RCReader.lo libdapclient_la-Connect.lo \
 	libdapclient_la-HTTPConnect.lo libdapclient_la-HTTPCache.lo \
 	libdapclient_la-util_mit.lo \
 	libdapclient_la-ResponseTooBigErr.lo \
 	libdapclient_la-HTTPCacheTable.lo
-am_libdapclient_la_OBJECTS = $(am__objects_3)
+am_libdapclient_la_OBJECTS = $(am__objects_5)
 libdapclient_la_OBJECTS = $(am_libdapclient_la_OBJECTS)
 libdapclient_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
 	$(CXXFLAGS) $(libdapclient_la_LDFLAGS) $(LDFLAGS) -o $@
 libdapserver_la_DEPENDENCIES = libdap.la $(am__DEPENDENCIES_1)
-am__objects_4 = DODSFilter.lo Ancillary.lo ResponseBuilder.lo
-am_libdapserver_la_OBJECTS = $(am__objects_4)
+am__objects_6 = DODSFilter.lo Ancillary.lo
+am_libdapserver_la_OBJECTS = $(am__objects_6)
 libdapserver_la_OBJECTS = $(am_libdapserver_la_OBJECTS)
 libdapserver_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
 	$(CXXFLAGS) $(libdapserver_la_LDFLAGS) $(LDFLAGS) -o $@
 libparsers_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_5 = libparsers_la-lex.das.lo libparsers_la-das.tab.lo \
+am__objects_7 = libparsers_la-lex.das.lo libparsers_la-das.tab.lo \
 	libparsers_la-lex.dds.lo libparsers_la-dds.tab.lo \
 	libparsers_la-lex.ce_expr.lo libparsers_la-ce_expr.tab.lo \
-	libparsers_la-lex.Error.lo libparsers_la-Error.tab.lo \
-	libparsers_la-gse.tab.lo libparsers_la-lex.gse_.lo
-am_libparsers_la_OBJECTS = $(am__objects_5)
+	libparsers_la-lex.Error.lo libparsers_la-Error.tab.lo
+am_libparsers_la_OBJECTS = $(am__objects_7)
 libparsers_la_OBJECTS = $(am_libparsers_la_OBJECTS)
 PROGRAMS = $(bin_PROGRAMS)
 am_getdap_OBJECTS = getdap-getdap.$(OBJEXT)
@@ -212,9 +267,9 @@ CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 SOURCES = $(libdap_la_SOURCES) $(libdapclient_la_SOURCES) \
 	$(libdapserver_la_SOURCES) $(libparsers_la_SOURCES) \
 	$(getdap_SOURCES)
-DIST_SOURCES = $(libdap_la_SOURCES) $(libdapclient_la_SOURCES) \
-	$(libdapserver_la_SOURCES) $(libparsers_la_SOURCES) \
-	$(getdap_SOURCES)
+DIST_SOURCES = $(am__libdap_la_SOURCES_DIST) \
+	$(libdapclient_la_SOURCES) $(libdapserver_la_SOURCES) \
+	$(libparsers_la_SOURCES) $(getdap_SOURCES)
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
 	install-dvi-recursive install-exec-recursive \
@@ -222,25 +277,56 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 man1dir = $(mandir)/man1
 NROFF = nroff
 MANS = $(man_MANS)
 DATA = $(dist_aclocal_DATA) $(pkgconfig_DATA)
+am__pkginclude_HEADERS_DIST = AttrTable.h DAS.h DDS.h DataDDS.h \
+	DDXParserSAX2.h DDXExceptions.h BaseType.h Byte.h Int32.h \
+	Float64.h Str.h Url.h Vector.h Array.h Constructor.h \
+	Structure.h Sequence.h Grid.h UInt32.h Int16.h UInt16.h \
+	Float32.h BaseTypeFactory.h ObjectType.h EncodingType.h \
+	SignalHandler.h Error.h InternalErr.h util.h escaping.h \
+	parser.h debug.h dods-limits.h dods-datatypes.h util_mit.h \
+	expr.h Clause.h RValue.h ConstraintEvaluator.h ce_parser.h \
+	DapIndent.h DapObj.h XDRFileMarshaller.h Marshaller.h \
+	UnMarshaller.h XDRFileUnMarshaller.h XDRStreamMarshaller.h \
+	XDRUtils.h xdr-datatypes.h mime_util.h cgi_util.h \
+	XDRStreamUnMarshaller.h Keywords2.h XMLWriter.h \
+	ServerFunctionsList.h ServerFunction.h GNU/GetOpt.h \
+	GNU/GNURegex.h RCReader.h Connect.h HTTPConnect.h HTTPCache.h \
+	HTTPCacheDisconnectedMode.h HTTPCacheInterruptHandler.h \
+	Response.h HTTPResponse.h HTTPCacheResponse.h PipeResponse.h \
+	StdinResponse.h SignalHandlerRegisteredErr.h \
+	ResponseTooBigErr.h Resource.h HTTPCacheTable.h \
+	HTTPCacheMacros.h DODSFilter.h AlarmHandler.h EventHandler.h \
+	Ancillary.h DAP4StreamMarshaller.h DAP4StreamUnMarshaller.h \
+	Int64.h UInt64.h Int8.h D4ParserSax2.h D4BaseTypeFactory.h \
+	D4ParseError.h D4Maps.h D4Dimensions.h D4EnumDef.h D4Group.h
 HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
 	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir dist dist-all distcheck
+	cscope distdir dist dist-all distcheck
 ETAGS = etags
 CTAGS = ctags
+CSCOPE = cscope
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -268,7 +354,10 @@ am__relativize = \
   reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
@@ -277,6 +366,7 @@ ALLOCA_H = @ALLOCA_H@
 AMTAR = @AMTAR@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
+ARFLAGS = @ARFLAGS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -286,6 +376,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
 BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
 BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
 BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+BYTESWAP_H = @BYTESWAP_H@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -328,15 +419,20 @@ GNULIB_ATOLL = @GNULIB_ATOLL@
 GNULIB_BTOWC = @GNULIB_BTOWC@
 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHDIR = @GNULIB_CHDIR@
 GNULIB_CHOWN = @GNULIB_CHOWN@
 GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DUP = @GNULIB_DUP@
 GNULIB_DUP2 = @GNULIB_DUP2@
 GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
 GNULIB_ENVIRON = @GNULIB_ENVIRON@
 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
 GNULIB_FCHDIR = @GNULIB_FCHDIR@
 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FFS = @GNULIB_FFS@
 GNULIB_FSYNC = @GNULIB_FSYNC@
 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
 GNULIB_GETCWD = @GNULIB_GETCWD@
@@ -351,9 +447,14 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
 GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
 GNULIB_LCHOWN = @GNULIB_LCHOWN@
 GNULIB_LINK = @GNULIB_LINK@
 GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
 GNULIB_LSEEK = @GNULIB_LSEEK@
 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
 GNULIB_MBRLEN = @GNULIB_MBRLEN@
@@ -361,6 +462,7 @@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
 GNULIB_MBSINIT = @GNULIB_MBSINIT@
 GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
 GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
@@ -369,11 +471,15 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
 GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
 GNULIB_PIPE = @GNULIB_PIPE@
 GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
 GNULIB_PREAD = @GNULIB_PREAD@
 GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
 GNULIB_PUTENV = @GNULIB_PUTENV@
 GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_READ = @GNULIB_READ@
 GNULIB_READLINK = @GNULIB_READLINK@
 GNULIB_READLINKAT = @GNULIB_READLINKAT@
 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
@@ -381,6 +487,8 @@ GNULIB_REALPATH = @GNULIB_REALPATH@
 GNULIB_RMDIR = @GNULIB_RMDIR@
 GNULIB_RPMATCH = @GNULIB_RPMATCH@
 GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
 GNULIB_SLEEP = @GNULIB_SLEEP@
 GNULIB_STRTOD = @GNULIB_STRTOD@
 GNULIB_STRTOLL = @GNULIB_STRTOLL@
@@ -388,19 +496,51 @@ GNULIB_STRTOULL = @GNULIB_STRTOULL@
 GNULIB_SYMLINK = @GNULIB_SYMLINK@
 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
 GNULIB_UNLINK = @GNULIB_UNLINK@
 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
 GNULIB_UNSETENV = @GNULIB_UNSETENV@
 GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_WCPCPY = @GNULIB_WCPCPY@
+GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
 GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
+GNULIB_WCSCAT = @GNULIB_WCSCAT@
+GNULIB_WCSCHR = @GNULIB_WCSCHR@
+GNULIB_WCSCMP = @GNULIB_WCSCMP@
+GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
+GNULIB_WCSCPY = @GNULIB_WCSCPY@
+GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
+GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSLEN = @GNULIB_WCSLEN@
+GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
+GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
+GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
+GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
+GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
 GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
+GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
 GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCSSPN = @GNULIB_WCSSPN@
+GNULIB_WCSSTR = @GNULIB_WCSSTR@
+GNULIB_WCSTOK = @GNULIB_WCSTOK@
+GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
+GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
 GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCTOMB = @GNULIB_WCTOMB@
+GNULIB_WCTRANS = @GNULIB_WCTRANS@
+GNULIB_WCTYPE = @GNULIB_WCTYPE@
 GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
+GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
+GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
+GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
+GNULIB_WMEMSET = @GNULIB_WMEMSET@
 GNULIB_WRITE = @GNULIB_WRITE@
 GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
@@ -410,23 +550,29 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
 HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFS = @HAVE_FFS@
 HAVE_FSYNC = @HAVE_FSYNC@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
@@ -436,6 +582,7 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
 HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
@@ -462,9 +609,12 @@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
 HAVE_OS_H = @HAVE_OS_H@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM = @HAVE_RANDOM@
 HAVE_RANDOM_H = @HAVE_RANDOM_H@
 HAVE_RANDOM_R = @HAVE_RANDOM_R@
 HAVE_READLINK = @HAVE_READLINK@
@@ -472,11 +622,14 @@ HAVE_READLINKAT = @HAVE_READLINKAT@
 HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
 HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
 HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
 HAVE_SLEEP = @HAVE_SLEEP@
 HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRTOD = @HAVE_STRTOD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
@@ -495,11 +648,42 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCPCPY = @HAVE_WCPCPY@
+HAVE_WCPNCPY = @HAVE_WCPNCPY@
 HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
+HAVE_WCSCAT = @HAVE_WCSCAT@
+HAVE_WCSCHR = @HAVE_WCSCHR@
+HAVE_WCSCMP = @HAVE_WCSCMP@
+HAVE_WCSCOLL = @HAVE_WCSCOLL@
+HAVE_WCSCPY = @HAVE_WCSCPY@
+HAVE_WCSCSPN = @HAVE_WCSCSPN@
+HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSLEN = @HAVE_WCSLEN@
+HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
+HAVE_WCSNCAT = @HAVE_WCSNCAT@
+HAVE_WCSNCMP = @HAVE_WCSNCMP@
+HAVE_WCSNCPY = @HAVE_WCSNCPY@
+HAVE_WCSNLEN = @HAVE_WCSNLEN@
 HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSPBRK = @HAVE_WCSPBRK@
+HAVE_WCSRCHR = @HAVE_WCSRCHR@
 HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCSSPN = @HAVE_WCSSPN@
+HAVE_WCSSTR = @HAVE_WCSSTR@
+HAVE_WCSTOK = @HAVE_WCSTOK@
+HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
+HAVE_WCSXFRM = @HAVE_WCSXFRM@
+HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
 HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
 HAVE_WINT_T = @HAVE_WINT_T@
+HAVE_WMEMCHR = @HAVE_WMEMCHR@
+HAVE_WMEMCMP = @HAVE_WMEMCMP@
+HAVE_WMEMCPY = @HAVE_WMEMCPY@
+HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
 HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -532,16 +716,22 @@ MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
 NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
 NEXT_STDINT_H = @NEXT_STDINT_H@
 NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRINGS_H = @NEXT_STRINGS_H@
+NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
 NEXT_UNISTD_H = @NEXT_UNISTD_H@
 NEXT_WCHAR_H = @NEXT_WCHAR_H@
 NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
@@ -575,17 +765,21 @@ REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
 REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
 REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
 REPLACE_LSEEK = @REPLACE_LSEEK@
 REPLACE_MALLOC = @REPLACE_MALLOC@
 REPLACE_MBRLEN = @REPLACE_MBRLEN@
@@ -594,20 +788,27 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
 REPLACE_NULL = @REPLACE_NULL@
 REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_REALLOC = @REPLACE_REALLOC@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
 REPLACE_UNLINK = @REPLACE_UNLINK@
 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
@@ -616,7 +817,9 @@ REPLACE_USLEEP = @REPLACE_USLEEP@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
 REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
@@ -637,10 +840,10 @@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOC
 UUID_LIBS = @UUID_LIBS@
 VERSION = @VERSION@
 WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
 WINT_T_SUFFIX = @WINT_T_SUFFIX@
 XML2_CFLAGS = @XML2_CFLAGS@
 XML2_LIBS = @XML2_LIBS@
-XML2_STATIC_LIBS = @XML2_STATIC_LIBS@
 YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -709,79 +912,72 @@ AUTOMAKE_OPTIONS = foreign check-news
 ACLOCAL_AMFLAGS = -I conf -I gl/m4
 aclocaldir = $(datadir)/aclocal
 pkgconfigdir = $(libdir)/pkgconfig
-
-# Arrange to build with the backward compatibility mode enabled.
 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/GNU $(XML2_CFLAGS)
-# -I$(top_srcdir)/xstream
-AM_CXXFLAGS = $(am__append_1)
-AM_YFLAGS = -d -v
+AM_CXXFLAGS = $(am__append_1) $(am__append_2)
+
+# if USING_GRIDFIELDS
+# AM_CPPFLAGS += $(GF_CFLAGS)
+# GRIDFIELDS = ugridFunctions
+# endif
+AM_YFLAGS = -d -v -t
 AM_LFLAGS = -8
 
 # These are not used by automake but are often useful for certain types of
 # debugging. The best way to use these is to run configure as:
 #     export CXXFLAGS='...'; ./configure --disable-shared
+# or ./configure --enable-developer --disable-shared
 # the --disable-shared is not required, but it seems to help with debuggers.
-CXXFLAGS_DEBUG = -g3 -O0 -fno-defer-pop -Wall -W -Wcast-align -Werror
+CXXFLAGS_DEBUG = -g3 -O0  -Wall -W -Wcast-align 
+# -Werror There are some warnings in this code that are here to stay...
 TEST_COV_FLAGS = -ftest-coverage -fprofile-arcs
 SUBDIRS = gl . tests unit-tests
-DIST_SUBDIRS = unit-tests gl tests
+DIST_SUBDIRS = gl tests unit-tests
 noinst_LTLIBRARIES = libparsers.la
 lib_LTLIBRARIES = libdap.la libdapclient.la libdapserver.la
 bin_SCRIPTS = dap-config dap-config-pkgconfig
-# fdiostream_test
-
-# sbin_PROGRAMS = deflate
 BUILT_SOURCES = $(GRAM_SRC) dods-datatypes.h xdr-datatypes.h getdap.1 dap-config.1
 man_MANS = getdap.1 dap-config.1
 libparsers_la_SOURCES = $(GRAM_SRC) 
-libparsers_la_CPPFLAGS = $(AM_CPPFLAGS) #$(XML2_CFLAGS)
+libparsers_la_CPPFLAGS = $(AM_CPPFLAGS)
 libparsers_la_LIBADD = $(XML2_LIBS)
-libdap_la_SOURCES = $(DAP_SRC) $(GNU_SRC) 
+libdap_la_SOURCES = $(DAP_SRC) $(GNU_SRC) $(am__append_3)
 libdap_la_LDFLAGS = -version-info $(LIBDAP_VERSION)
-libdap_la_CPPFLAGS = $(AM_CPPFLAGS) #$(XML2_CFLAGS)
-libdap_la_LIBADD = $(XML2_LIBS) $(PTHREAD_LIBS) -lcrypto gl/libgnu.la libparsers.la
+libdap_la_CPPFLAGS = $(AM_CPPFLAGS)
+libdap_la_LIBADD = $(XML2_LIBS) $(PTHREAD_LIBS) gl/libgnu.la \
+	libparsers.la $(am__append_4)
 libdapclient_la_SOURCES = $(CLIENT_SRC) 
 libdapclient_la_LDFLAGS = -version-info $(CLIENTLIB_VERSION)
-#libdapclient_la_CPPFLAGS = $(AM_CPPFLAGS) $(CURL_CFLAGS) $(XML2_CFLAGS)
 libdapclient_la_CPPFLAGS = $(AM_CPPFLAGS) $(CURL_CFLAGS)
 libdapclient_la_LIBADD = $(CURL_LIBS) libdap.la $(PTHREAD_LIBS)
 libdapserver_la_SOURCES = $(SERVER_SRC)
 libdapserver_la_LDFLAGS = -version-info $(SERVERLIB_VERSION)
 libdapserver_la_LIBADD = libdap.la $(UUID_LIBS)
-pkginclude_HEADERS = $(DAP_HDR) $(GNU_HDR) $(CLIENT_HDR) $(SERVER_HDR) 
+pkginclude_HEADERS = $(DAP_HDR) $(GNU_HDR) $(CLIENT_HDR) $(SERVER_HDR) \
+	$(am__append_5)
 noinst_HEADERS = config_dap.h
-
-# fdiostream_test_SOURCES = GNU/fdiostream_test.cc
 getdap_SOURCES = getdap.cc
 getdap_LDADD = libdapclient.la libdap.la
 getdap_CPPFLAGS = $(AM_CPPFLAGS) $(CURL_CFLAGS)
-LEX_YACC_EXTRA = das.lex das.y dds.lex dds.y ce_expr.lex ce_expr.y gse.lex \
-	gse.y Error.lex Error.y
+LEX_YACC_EXTRA = das.lex das.yy dds.lex dds.yy ce_expr.lex ce_expr.yy \
+Error.lex Error.yy
 
-EXTRA_DIST = ChangeLog COPYING README.dodsrc COPYRIGHT_URI	 \
-	COPYRIGHT_W3C GNU/README doxy.conf doxy_private.conf libdap.spec \
-	VCPP dods-datatypes-static.h xdr-datatypes-static.h \
-	dap-config-pkgconfig $(LEX_YACC_EXTRA) $(GRAM_SRC) OSX_Resources \
-	getdap.man1 dap-config.man1
+EXTRA_DIST = ChangeLog COPYING README.dodsrc COPYRIGHT_URI		\
+	COPYRIGHT_W3C GNU/README doxy.conf doxy_private.conf		\
+	libdap.spec VCPP dods-datatypes-static.h			\
+	xdr-datatypes-static.h dap-config-pkgconfig $(LEX_YACC_EXTRA)	\
+	$(GRAM_SRC) OSX_Resources getdap.man1 dap-config.man1
 
-
-# README.AIS xstream/README 
 dist_aclocal_DATA = conf/libdap.m4
 pkgconfig_DATA = libdap.pc libdapclient.pc libdapserver.pc
 CLEANFILES = *.log *.output *.gcda *.gcno $(GRAM_SRC) dods-datatypes.h \
     xdr-datatypes.h getdap.1 dap-config.1
 
-grammar_objects = lex.das.o das.tab.o lex.dds.o dds.tab.o lex.ce_expr.o \
-ce_expr.tab.o lex.gse_.o gse.tab.o lex.Error.o Error.tab.o
-
 
 ###########################################################################
 
 # Build OS/X Packages. The strange operations with configure and make
 # are there so that the values built into dap-config will match the mac
 # osx install dirs and not the temp directory used to build the packages
-
-# PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker*
 PACKAGEMAKER = /Developer/usr/bin/packagemaker
 PKG_CONF_FLAGS = 
 
@@ -792,8 +988,7 @@ GNU_SRC = GNU/GetOpt.cc GNU/GNURegex.cc
 GNU_HDR = GNU/GetOpt.h GNU/GNURegex.h
 GRAM_SRC = lex.das.cc das.tab.cc das.tab.hh lex.dds.cc dds.tab.cc	\
 	dds.tab.hh lex.ce_expr.cc ce_expr.tab.cc ce_expr.tab.hh		\
-	lex.Error.cc Error.tab.cc Error.tab.hh gse.tab.hh gse.tab.cc	\
-	lex.gse_.cc
+	lex.Error.cc Error.tab.cc Error.tab.hh 
 
 DAP_SRC = AttrTable.cc DAS.cc DDS.cc DataDDS.cc DDXParserSAX2.cc	\
 	BaseType.cc Byte.cc Int32.cc Float64.cc Str.cc Url.cc		\
@@ -801,13 +996,18 @@ DAP_SRC = AttrTable.cc DAS.cc DDS.cc DataDDS.cc DDXParserSAX2.cc	\
 	Int16.cc UInt16.cc Float32.cc Constructor.cc			\
 	BaseTypeFactory.cc SignalHandler.cc Error.cc InternalErr.cc	\
 	util.cc xdrutil_ppc.c parser-util.cc escaping.cc		\
-	ce_functions.cc GSEClause.cc GeoConstraint.cc			\
-	GridGeoConstraint.cc Clause.cc RValue.cc			\
-	ConstraintEvaluator.cc ArrayGeoConstraint.cc DapIndent.cc	\
+	Clause.cc RValue.cc			\
+	ConstraintEvaluator.cc DapIndent.cc	\
 	Operators.h XDRUtils.cc XDRFileMarshaller.cc			\
-	XDRFileUnMarshaller.cc XDRStreamMarshaller.cc			\
+	XDRStreamMarshaller.cc XDRFileUnMarshaller.cc			\
 	XDRStreamUnMarshaller.cc mime_util.cc Keywords2.cc XMLWriter.cc \
-	DAPCache3.cc
+	ServerFunctionsList.cc ServerFunction.cc
+
+
+# DAPCache3.cc 
+DAP4_ONLY_SRC = DAP4StreamMarshaller.cc DAP4StreamUnMarshaller.cc Int64.cc \
+        UInt64.cc Int8.cc D4ParserSax2.cc D4BaseTypeFactory.cc \
+        D4Maps.cc D4Dimensions.cc  D4EnumDef.cc D4Group.cc
 
 
 # Operators.h is included in with the source to prevent it from bing installed
@@ -815,21 +1015,27 @@ DAP_SRC = AttrTable.cc DAS.cc DDS.cc DataDDS.cc DDXParserSAX2.cc	\
 CLIENT_SRC = RCReader.cc Connect.cc HTTPConnect.cc HTTPCache.cc	\
 	util_mit.cc ResponseTooBigErr.cc HTTPCacheTable.cc
 
-SERVER_SRC = DODSFilter.cc Ancillary.cc ResponseBuilder.cc
+SERVER_SRC = DODSFilter.cc Ancillary.cc
+# ResponseBuilder.cc ResponseCache.cc
 DAP_HDR = AttrTable.h DAS.h DDS.h DataDDS.h DDXParserSAX2.h		\
 	DDXExceptions.h BaseType.h Byte.h Int32.h Float64.h Str.h	\
 	Url.h Vector.h Array.h Constructor.h Structure.h Sequence.h	\
 	Grid.h UInt32.h Int16.h UInt16.h Float32.h BaseTypeFactory.h	\
 	ObjectType.h EncodingType.h SignalHandler.h Error.h		\
 	InternalErr.h util.h escaping.h parser.h debug.h dods-limits.h	\
-	dods-datatypes.h GeoConstraint.h GridGeoConstraint.h		\
-	ArrayGeoConstraint.h ce_functions.h gse_parser.h GSEClause.h	\
+	dods-datatypes.h 		\
 	util_mit.h expr.h Clause.h RValue.h ConstraintEvaluator.h	\
 	ce_parser.h DapIndent.h DapObj.h XDRFileMarshaller.h		\
-	Marshaller.h XDRFileUnMarshaller.h UnMarshaller.h		\
+	Marshaller.h UnMarshaller.h XDRFileUnMarshaller.h		\
 	XDRStreamMarshaller.h XDRUtils.h xdr-datatypes.h mime_util.h	\
 	cgi_util.h XDRStreamUnMarshaller.h Keywords2.h XMLWriter.h \
-	DAPCache3.h
+	ServerFunctionsList.h ServerFunction.h
+
+
+# DAPCache.h
+DAP4_ONLY_HDR = DAP4StreamMarshaller.h DAP4StreamUnMarshaller.h Int64.h \
+        UInt64.h Int8.h D4ParserSax2.h D4BaseTypeFactory.h D4ParseError.h \
+        D4Maps.h D4Dimensions.h D4EnumDef.h D4Group.h
 
 CLIENT_HDR = RCReader.h Connect.h HTTPConnect.h HTTPCache.h		\
 	HTTPCacheDisconnectedMode.h HTTPCacheInterruptHandler.h		\
@@ -837,15 +1043,13 @@ CLIENT_HDR = RCReader.h Connect.h HTTPConnect.h HTTPCache.h		\
 	StdinResponse.h SignalHandlerRegisteredErr.h			\
 	ResponseTooBigErr.h Resource.h HTTPCacheTable.h HTTPCacheMacros.h
 
-SERVER_HDR = DODSFilter.h AlarmHandler.h EventHandler.h Ancillary.h	\
-	ResponseBuilder.h
-
+SERVER_HDR = DODSFilter.h AlarmHandler.h EventHandler.h Ancillary.h
 all: $(BUILT_SOURCES) config.h dods-datatypes-config.h xdr-datatypes-config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
 .SUFFIXES: .c .cc .lo .o .obj
-am--refresh:
+am--refresh: Makefile
 	@:
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
@@ -881,10 +1085,8 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-	@if test ! -f $@; then \
-	  rm -f stamp-h1; \
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-	else :; fi
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
@@ -895,20 +1097,16 @@ $(srcdir)/config.h.in:  $(am__configure_deps)
 	touch $@
 
 dods-datatypes-config.h: stamp-h2
-	@if test ! -f $@; then \
-	  rm -f stamp-h2; \
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h2; \
-	else :; fi
+	@if test ! -f $@; then rm -f stamp-h2; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi
 
 stamp-h2: $(srcdir)/dods-datatypes-config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h2
 	cd $(top_builddir) && $(SHELL) ./config.status dods-datatypes-config.h
 
 xdr-datatypes-config.h: stamp-h3
-	@if test ! -f $@; then \
-	  rm -f stamp-h3; \
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h3; \
-	else :; fi
+	@if test ! -f $@; then rm -f stamp-h3; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h3; else :; fi
 
 stamp-h3: $(srcdir)/xdr-datatypes-config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h3
@@ -930,7 +1128,6 @@ dap-config: $(top_builddir)/config.status $(srcdir)/dap-config.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
 	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
 	list2=; for p in $$list; do \
 	  if test -f $$p; then \
@@ -938,6 +1135,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	  else :; fi; \
 	done; \
 	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
 	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
 	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
 	}
@@ -953,33 +1152,40 @@ uninstall-libLTLIBRARIES:
 
 clean-libLTLIBRARIES:
 	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
+	@list='$(lib_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
 
 clean-noinstLTLIBRARIES:
 	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libdap.la: $(libdap_la_OBJECTS) $(libdap_la_DEPENDENCIES) 
+	@list='$(noinst_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+libdap.la: $(libdap_la_OBJECTS) $(libdap_la_DEPENDENCIES) $(EXTRA_libdap_la_DEPENDENCIES) 
 	$(libdap_la_LINK) -rpath $(libdir) $(libdap_la_OBJECTS) $(libdap_la_LIBADD) $(LIBS)
-libdapclient.la: $(libdapclient_la_OBJECTS) $(libdapclient_la_DEPENDENCIES) 
+libdapclient.la: $(libdapclient_la_OBJECTS) $(libdapclient_la_DEPENDENCIES) $(EXTRA_libdapclient_la_DEPENDENCIES) 
 	$(libdapclient_la_LINK) -rpath $(libdir) $(libdapclient_la_OBJECTS) $(libdapclient_la_LIBADD) $(LIBS)
-libdapserver.la: $(libdapserver_la_OBJECTS) $(libdapserver_la_DEPENDENCIES) 
+libdapserver.la: $(libdapserver_la_OBJECTS) $(libdapserver_la_DEPENDENCIES) $(EXTRA_libdapserver_la_DEPENDENCIES) 
 	$(libdapserver_la_LINK) -rpath $(libdir) $(libdapserver_la_OBJECTS) $(libdapserver_la_LIBADD) $(LIBS)
-libparsers.la: $(libparsers_la_OBJECTS) $(libparsers_la_DEPENDENCIES) 
+libparsers.la: $(libparsers_la_OBJECTS) $(libparsers_la_DEPENDENCIES) $(EXTRA_libparsers_la_DEPENDENCIES) 
 	$(CXXLINK)  $(libparsers_la_OBJECTS) $(libparsers_la_LIBADD) $(LIBS)
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
 	for p in $$list; do echo "$$p $$p"; done | \
 	sed 's/$(EXEEXT)$$//' | \
 	while read p p1; do if test -f $$p || test -f $$p1; \
@@ -1019,13 +1225,16 @@ clean-binPROGRAMS:
 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
 	echo " rm -f" $$list; \
 	rm -f $$list
-getdap$(EXEEXT): $(getdap_OBJECTS) $(getdap_DEPENDENCIES) 
+getdap$(EXEEXT): $(getdap_OBJECTS) $(getdap_DEPENDENCIES) $(EXTRA_getdap_DEPENDENCIES) 
 	@rm -f getdap$(EXEEXT)
 	$(CXXLINK) $(getdap_OBJECTS) $(getdap_LDADD) $(LIBS)
 install-binSCRIPTS: $(bin_SCRIPTS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@@ -1053,9 +1262,7 @@ uninstall-binSCRIPTS:
 	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
 	files=`for p in $$list; do echo "$$p"; done | \
 	       sed -e 's,.*/,,;$(transform)'`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+	dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -1065,10 +1272,8 @@ distclean-compile:
 
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Ancillary.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DODSFilter.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ResponseBuilder.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/getdap-getdap.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Array.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-ArrayGeoConstraint.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-AttrTable.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-BaseType.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-BaseTypeFactory.Plo at am__quote@
@@ -1076,7 +1281,14 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Clause.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-ConstraintEvaluator.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Constructor.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-DAPCache3.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-D4BaseTypeFactory.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-D4Dimensions.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-D4EnumDef.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-D4Group.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-D4Maps.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-D4ParserSax2.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-DAP4StreamMarshaller.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-DAP4StreamUnMarshaller.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-DAS.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-DDS.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-DDXParserSAX2.Plo at am__quote@
@@ -1086,22 +1298,24 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Float32.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Float64.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-GNURegex.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-GSEClause.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-GeoConstraint.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-GetOpt.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Grid.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-GridGeoConstraint.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Int16.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Int32.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Int64.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Int8.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-InternalErr.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Keywords2.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-RValue.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Sequence.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-ServerFunction.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-ServerFunctionsList.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-SignalHandler.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Str.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Structure.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-UInt16.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-UInt32.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-UInt64.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Url.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-Vector.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-XDRFileMarshaller.Plo at am__quote@
@@ -1110,7 +1324,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-XDRStreamUnMarshaller.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-XDRUtils.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-XMLWriter.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-ce_functions.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-escaping.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-mime_util.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdap_la-parser-util.Plo at am__quote@
@@ -1127,12 +1340,10 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparsers_la-ce_expr.tab.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparsers_la-das.tab.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparsers_la-dds.tab.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparsers_la-gse.tab.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparsers_la-lex.Error.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparsers_la-lex.ce_expr.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparsers_la-lex.das.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparsers_la-lex.dds.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparsers_la-lex.gse_.Plo at am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -1379,34 +1590,6 @@ libdap_la-escaping.lo: escaping.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-escaping.lo `test -f 'escaping.cc' || echo '$(srcdir)/'`escaping.cc
 
-libdap_la-ce_functions.lo: ce_functions.cc
- at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-ce_functions.lo -MD -MP -MF $(DEPDIR)/libdap_la-ce_functions.Tpo -c -o libdap_la-ce_functions.lo `test -f 'ce_functions.cc' || echo '$(srcdir)/'`ce_functions.cc
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-ce_functions.Tpo $(DEPDIR)/libdap_la-ce_functions.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ce_functions.cc' object='libdap_la-ce_functions.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-ce_functions.lo `test -f 'ce_functions.cc' || echo '$(srcdir)/'`ce_functions.cc
-
-libdap_la-GSEClause.lo: GSEClause.cc
- at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-GSEClause.lo -MD -MP -MF $(DEPDIR)/libdap_la-GSEClause.Tpo -c -o libdap_la-GSEClause.lo `test -f 'GSEClause.cc' || echo '$(srcdir)/'`GSEClause.cc
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-GSEClause.Tpo $(DEPDIR)/libdap_la-GSEClause.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GSEClause.cc' object='libdap_la-GSEClause.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-GSEClause.lo `test -f 'GSEClause.cc' || echo '$(srcdir)/'`GSEClause.cc
-
-libdap_la-GeoConstraint.lo: GeoConstraint.cc
- at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-GeoConstraint.lo -MD -MP -MF $(DEPDIR)/libdap_la-GeoConstraint.Tpo -c -o libdap_la-GeoConstraint.lo `test -f 'GeoConstraint.cc' || echo '$(srcdir)/'`GeoConstraint.cc
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-GeoConstraint.Tpo $(DEPDIR)/libdap_la-GeoConstraint.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GeoConstraint.cc' object='libdap_la-GeoConstraint.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-GeoConstraint.lo `test -f 'GeoConstraint.cc' || echo '$(srcdir)/'`GeoConstraint.cc
-
-libdap_la-GridGeoConstraint.lo: GridGeoConstraint.cc
- at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-GridGeoConstraint.lo -MD -MP -MF $(DEPDIR)/libdap_la-GridGeoConstraint.Tpo -c -o libdap_la-GridGeoConstraint.lo `test -f 'GridGeoConstraint.cc' || echo '$(srcdir)/'`GridGeoConstraint.cc
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-GridGeoConstraint.Tpo $(DEPDIR)/libdap_la-GridGeoConstraint.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='GridGeoConstraint.cc' object='libdap_la-GridGeoConstraint.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-GridGeoConstraint.lo `test -f 'GridGeoConstraint.cc' || echo '$(srcdir)/'`GridGeoConstraint.cc
-
 libdap_la-Clause.lo: Clause.cc
 @am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-Clause.lo -MD -MP -MF $(DEPDIR)/libdap_la-Clause.Tpo -c -o libdap_la-Clause.lo `test -f 'Clause.cc' || echo '$(srcdir)/'`Clause.cc
 @am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-Clause.Tpo $(DEPDIR)/libdap_la-Clause.Plo
@@ -1428,13 +1611,6 @@ libdap_la-ConstraintEvaluator.lo: ConstraintEvaluator.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-ConstraintEvaluator.lo `test -f 'ConstraintEvaluator.cc' || echo '$(srcdir)/'`ConstraintEvaluator.cc
 
-libdap_la-ArrayGeoConstraint.lo: ArrayGeoConstraint.cc
- at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-ArrayGeoConstraint.lo -MD -MP -MF $(DEPDIR)/libdap_la-ArrayGeoConstraint.Tpo -c -o libdap_la-ArrayGeoConstraint.lo `test -f 'ArrayGeoConstraint.cc' || echo '$(srcdir)/'`ArrayGeoConstraint.cc
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-ArrayGeoConstraint.Tpo $(DEPDIR)/libdap_la-ArrayGeoConstraint.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ArrayGeoConstraint.cc' object='libdap_la-ArrayGeoConstraint.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-ArrayGeoConstraint.lo `test -f 'ArrayGeoConstraint.cc' || echo '$(srcdir)/'`ArrayGeoConstraint.cc
-
 libdap_la-DapIndent.lo: DapIndent.cc
 @am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-DapIndent.lo -MD -MP -MF $(DEPDIR)/libdap_la-DapIndent.Tpo -c -o libdap_la-DapIndent.lo `test -f 'DapIndent.cc' || echo '$(srcdir)/'`DapIndent.cc
 @am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-DapIndent.Tpo $(DEPDIR)/libdap_la-DapIndent.Plo
@@ -1456,13 +1632,6 @@ libdap_la-XDRFileMarshaller.lo: XDRFileMarshaller.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-XDRFileMarshaller.lo `test -f 'XDRFileMarshaller.cc' || echo '$(srcdir)/'`XDRFileMarshaller.cc
 
-libdap_la-XDRFileUnMarshaller.lo: XDRFileUnMarshaller.cc
- at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-XDRFileUnMarshaller.lo -MD -MP -MF $(DEPDIR)/libdap_la-XDRFileUnMarshaller.Tpo -c -o libdap_la-XDRFileUnMarshaller.lo `test -f 'XDRFileUnMarshaller.cc' || echo '$(srcdir)/'`XDRFileUnMarshaller.cc
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-XDRFileUnMarshaller.Tpo $(DEPDIR)/libdap_la-XDRFileUnMarshaller.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XDRFileUnMarshaller.cc' object='libdap_la-XDRFileUnMarshaller.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-XDRFileUnMarshaller.lo `test -f 'XDRFileUnMarshaller.cc' || echo '$(srcdir)/'`XDRFileUnMarshaller.cc
-
 libdap_la-XDRStreamMarshaller.lo: XDRStreamMarshaller.cc
 @am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-XDRStreamMarshaller.lo -MD -MP -MF $(DEPDIR)/libdap_la-XDRStreamMarshaller.Tpo -c -o libdap_la-XDRStreamMarshaller.lo `test -f 'XDRStreamMarshaller.cc' || echo '$(srcdir)/'`XDRStreamMarshaller.cc
 @am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-XDRStreamMarshaller.Tpo $(DEPDIR)/libdap_la-XDRStreamMarshaller.Plo
@@ -1470,6 +1639,13 @@ libdap_la-XDRStreamMarshaller.lo: XDRStreamMarshaller.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-XDRStreamMarshaller.lo `test -f 'XDRStreamMarshaller.cc' || echo '$(srcdir)/'`XDRStreamMarshaller.cc
 
+libdap_la-XDRFileUnMarshaller.lo: XDRFileUnMarshaller.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-XDRFileUnMarshaller.lo -MD -MP -MF $(DEPDIR)/libdap_la-XDRFileUnMarshaller.Tpo -c -o libdap_la-XDRFileUnMarshaller.lo `test -f 'XDRFileUnMarshaller.cc' || echo '$(srcdir)/'`XDRFileUnMarshaller.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-XDRFileUnMarshaller.Tpo $(DEPDIR)/libdap_la-XDRFileUnMarshaller.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='XDRFileUnMarshaller.cc' object='libdap_la-XDRFileUnMarshaller.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-XDRFileUnMarshaller.lo `test -f 'XDRFileUnMarshaller.cc' || echo '$(srcdir)/'`XDRFileUnMarshaller.cc
+
 libdap_la-XDRStreamUnMarshaller.lo: XDRStreamUnMarshaller.cc
 @am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-XDRStreamUnMarshaller.lo -MD -MP -MF $(DEPDIR)/libdap_la-XDRStreamUnMarshaller.Tpo -c -o libdap_la-XDRStreamUnMarshaller.lo `test -f 'XDRStreamUnMarshaller.cc' || echo '$(srcdir)/'`XDRStreamUnMarshaller.cc
 @am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-XDRStreamUnMarshaller.Tpo $(DEPDIR)/libdap_la-XDRStreamUnMarshaller.Plo
@@ -1498,12 +1674,19 @@ libdap_la-XMLWriter.lo: XMLWriter.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-XMLWriter.lo `test -f 'XMLWriter.cc' || echo '$(srcdir)/'`XMLWriter.cc
 
-libdap_la-DAPCache3.lo: DAPCache3.cc
- at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-DAPCache3.lo -MD -MP -MF $(DEPDIR)/libdap_la-DAPCache3.Tpo -c -o libdap_la-DAPCache3.lo `test -f 'DAPCache3.cc' || echo '$(srcdir)/'`DAPCache3.cc
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-DAPCache3.Tpo $(DEPDIR)/libdap_la-DAPCache3.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DAPCache3.cc' object='libdap_la-DAPCache3.lo' libtool=yes @AMDEPBACKSLASH@
+libdap_la-ServerFunctionsList.lo: ServerFunctionsList.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-ServerFunctionsList.lo -MD -MP -MF $(DEPDIR)/libdap_la-ServerFunctionsList.Tpo -c -o libdap_la-ServerFunctionsList.lo `test -f 'ServerFunctionsList.cc' || echo '$(srcdir)/'`ServerFunctionsList.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-ServerFunctionsList.Tpo $(DEPDIR)/libdap_la-ServerFunctionsList.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ServerFunctionsList.cc' object='libdap_la-ServerFunctionsList.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-ServerFunctionsList.lo `test -f 'ServerFunctionsList.cc' || echo '$(srcdir)/'`ServerFunctionsList.cc
+
+libdap_la-ServerFunction.lo: ServerFunction.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-ServerFunction.lo -MD -MP -MF $(DEPDIR)/libdap_la-ServerFunction.Tpo -c -o libdap_la-ServerFunction.lo `test -f 'ServerFunction.cc' || echo '$(srcdir)/'`ServerFunction.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-ServerFunction.Tpo $(DEPDIR)/libdap_la-ServerFunction.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='ServerFunction.cc' object='libdap_la-ServerFunction.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-DAPCache3.lo `test -f 'DAPCache3.cc' || echo '$(srcdir)/'`DAPCache3.cc
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-ServerFunction.lo `test -f 'ServerFunction.cc' || echo '$(srcdir)/'`ServerFunction.cc
 
 libdap_la-GetOpt.lo: GNU/GetOpt.cc
 @am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-GetOpt.lo -MD -MP -MF $(DEPDIR)/libdap_la-GetOpt.Tpo -c -o libdap_la-GetOpt.lo `test -f 'GNU/GetOpt.cc' || echo '$(srcdir)/'`GNU/GetOpt.cc
@@ -1519,6 +1702,83 @@ libdap_la-GNURegex.lo: GNU/GNURegex.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-GNURegex.lo `test -f 'GNU/GNURegex.cc' || echo '$(srcdir)/'`GNU/GNURegex.cc
 
+libdap_la-DAP4StreamMarshaller.lo: DAP4StreamMarshaller.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-DAP4StreamMarshaller.lo -MD -MP -MF $(DEPDIR)/libdap_la-DAP4StreamMarshaller.Tpo -c -o libdap_la-DAP4StreamMarshaller.lo `test -f 'DAP4StreamMarshaller.cc' || echo '$(srcdir)/'`DAP4StreamMarshaller.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-DAP4StreamMarshaller.Tpo $(DEPDIR)/libdap_la-DAP4StreamMarshaller.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DAP4StreamMarshaller.cc' object='libdap_la-DAP4StreamMarshaller.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-DAP4StreamMarshaller.lo `test -f 'DAP4StreamMarshaller.cc' || echo '$(srcdir)/'`DAP4StreamMarshaller.cc
+
+libdap_la-DAP4StreamUnMarshaller.lo: DAP4StreamUnMarshaller.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-DAP4StreamUnMarshaller.lo -MD -MP -MF $(DEPDIR)/libdap_la-DAP4StreamUnMarshaller.Tpo -c -o libdap_la-DAP4StreamUnMarshaller.lo `test -f 'DAP4StreamUnMarshaller.cc' || echo '$(srcdir)/'`DAP4StreamUnMarshaller.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-DAP4StreamUnMarshaller.Tpo $(DEPDIR)/libdap_la-DAP4StreamUnMarshaller.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='DAP4StreamUnMarshaller.cc' object='libdap_la-DAP4StreamUnMarshaller.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-DAP4StreamUnMarshaller.lo `test -f 'DAP4StreamUnMarshaller.cc' || echo '$(srcdir)/'`DAP4StreamUnMarshaller.cc
+
+libdap_la-Int64.lo: Int64.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-Int64.lo -MD -MP -MF $(DEPDIR)/libdap_la-Int64.Tpo -c -o libdap_la-Int64.lo `test -f 'Int64.cc' || echo '$(srcdir)/'`Int64.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-Int64.Tpo $(DEPDIR)/libdap_la-Int64.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Int64.cc' object='libdap_la-Int64.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-Int64.lo `test -f 'Int64.cc' || echo '$(srcdir)/'`Int64.cc
+
+libdap_la-UInt64.lo: UInt64.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-UInt64.lo -MD -MP -MF $(DEPDIR)/libdap_la-UInt64.Tpo -c -o libdap_la-UInt64.lo `test -f 'UInt64.cc' || echo '$(srcdir)/'`UInt64.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-UInt64.Tpo $(DEPDIR)/libdap_la-UInt64.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='UInt64.cc' object='libdap_la-UInt64.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-UInt64.lo `test -f 'UInt64.cc' || echo '$(srcdir)/'`UInt64.cc
+
+libdap_la-Int8.lo: Int8.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-Int8.lo -MD -MP -MF $(DEPDIR)/libdap_la-Int8.Tpo -c -o libdap_la-Int8.lo `test -f 'Int8.cc' || echo '$(srcdir)/'`Int8.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-Int8.Tpo $(DEPDIR)/libdap_la-Int8.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='Int8.cc' object='libdap_la-Int8.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-Int8.lo `test -f 'Int8.cc' || echo '$(srcdir)/'`Int8.cc
+
+libdap_la-D4ParserSax2.lo: D4ParserSax2.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-D4ParserSax2.lo -MD -MP -MF $(DEPDIR)/libdap_la-D4ParserSax2.Tpo -c -o libdap_la-D4ParserSax2.lo `test -f 'D4ParserSax2.cc' || echo '$(srcdir)/'`D4ParserSax2.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-D4ParserSax2.Tpo $(DEPDIR)/libdap_la-D4ParserSax2.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='D4ParserSax2.cc' object='libdap_la-D4ParserSax2.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-D4ParserSax2.lo `test -f 'D4ParserSax2.cc' || echo '$(srcdir)/'`D4ParserSax2.cc
+
+libdap_la-D4BaseTypeFactory.lo: D4BaseTypeFactory.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-D4BaseTypeFactory.lo -MD -MP -MF $(DEPDIR)/libdap_la-D4BaseTypeFactory.Tpo -c -o libdap_la-D4BaseTypeFactory.lo `test -f 'D4BaseTypeFactory.cc' || echo '$(srcdir)/'`D4BaseTypeFactory.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-D4BaseTypeFactory.Tpo $(DEPDIR)/libdap_la-D4BaseTypeFactory.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='D4BaseTypeFactory.cc' object='libdap_la-D4BaseTypeFactory.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-D4BaseTypeFactory.lo `test -f 'D4BaseTypeFactory.cc' || echo '$(srcdir)/'`D4BaseTypeFactory.cc
+
+libdap_la-D4Maps.lo: D4Maps.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-D4Maps.lo -MD -MP -MF $(DEPDIR)/libdap_la-D4Maps.Tpo -c -o libdap_la-D4Maps.lo `test -f 'D4Maps.cc' || echo '$(srcdir)/'`D4Maps.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-D4Maps.Tpo $(DEPDIR)/libdap_la-D4Maps.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='D4Maps.cc' object='libdap_la-D4Maps.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-D4Maps.lo `test -f 'D4Maps.cc' || echo '$(srcdir)/'`D4Maps.cc
+
+libdap_la-D4Dimensions.lo: D4Dimensions.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-D4Dimensions.lo -MD -MP -MF $(DEPDIR)/libdap_la-D4Dimensions.Tpo -c -o libdap_la-D4Dimensions.lo `test -f 'D4Dimensions.cc' || echo '$(srcdir)/'`D4Dimensions.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-D4Dimensions.Tpo $(DEPDIR)/libdap_la-D4Dimensions.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='D4Dimensions.cc' object='libdap_la-D4Dimensions.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-D4Dimensions.lo `test -f 'D4Dimensions.cc' || echo '$(srcdir)/'`D4Dimensions.cc
+
+libdap_la-D4EnumDef.lo: D4EnumDef.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-D4EnumDef.lo -MD -MP -MF $(DEPDIR)/libdap_la-D4EnumDef.Tpo -c -o libdap_la-D4EnumDef.lo `test -f 'D4EnumDef.cc' || echo '$(srcdir)/'`D4EnumDef.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-D4EnumDef.Tpo $(DEPDIR)/libdap_la-D4EnumDef.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='D4EnumDef.cc' object='libdap_la-D4EnumDef.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-D4EnumDef.lo `test -f 'D4EnumDef.cc' || echo '$(srcdir)/'`D4EnumDef.cc
+
+libdap_la-D4Group.lo: D4Group.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdap_la-D4Group.lo -MD -MP -MF $(DEPDIR)/libdap_la-D4Group.Tpo -c -o libdap_la-D4Group.lo `test -f 'D4Group.cc' || echo '$(srcdir)/'`D4Group.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdap_la-D4Group.Tpo $(DEPDIR)/libdap_la-D4Group.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='D4Group.cc' object='libdap_la-D4Group.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdap_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdap_la-D4Group.lo `test -f 'D4Group.cc' || echo '$(srcdir)/'`D4Group.cc
+
 libdapclient_la-RCReader.lo: RCReader.cc
 @am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdapclient_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdapclient_la-RCReader.lo -MD -MP -MF $(DEPDIR)/libdapclient_la-RCReader.Tpo -c -o libdapclient_la-RCReader.lo `test -f 'RCReader.cc' || echo '$(srcdir)/'`RCReader.cc
 @am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libdapclient_la-RCReader.Tpo $(DEPDIR)/libdapclient_la-RCReader.Plo
@@ -1624,20 +1884,6 @@ libparsers_la-Error.tab.lo: Error.tab.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libparsers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libparsers_la-Error.tab.lo `test -f 'Error.tab.cc' || echo '$(srcdir)/'`Error.tab.cc
 
-libparsers_la-gse.tab.lo: gse.tab.cc
- at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libparsers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libparsers_la-gse.tab.lo -MD -MP -MF $(DEPDIR)/libparsers_la-gse.tab.Tpo -c -o libparsers_la-gse.tab.lo `test -f 'gse.tab.cc' || echo '$(srcdir)/'`gse.tab.cc
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libparsers_la-gse.tab.Tpo $(DEPDIR)/libparsers_la-gse.tab.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='gse.tab.cc' object='libparsers_la-gse.tab.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libparsers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libparsers_la-gse.tab.lo `test -f 'gse.tab.cc' || echo '$(srcdir)/'`gse.tab.cc
-
-libparsers_la-lex.gse_.lo: lex.gse_.cc
- at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libparsers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libparsers_la-lex.gse_.lo -MD -MP -MF $(DEPDIR)/libparsers_la-lex.gse_.Tpo -c -o libparsers_la-lex.gse_.lo `test -f 'lex.gse_.cc' || echo '$(srcdir)/'`lex.gse_.cc
- at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/libparsers_la-lex.gse_.Tpo $(DEPDIR)/libparsers_la-lex.gse_.Plo
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lex.gse_.cc' object='libparsers_la-lex.gse_.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libparsers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libparsers_la-lex.gse_.lo `test -f 'lex.gse_.cc' || echo '$(srcdir)/'`lex.gse_.cc
-
 getdap-getdap.o: getdap.cc
 @am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(getdap_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT getdap-getdap.o -MD -MP -MF $(DEPDIR)/getdap-getdap.Tpo -c -o getdap-getdap.o `test -f 'getdap.cc' || echo '$(srcdir)/'`getdap.cc
 @am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/getdap-getdap.Tpo $(DEPDIR)/getdap-getdap.Po
@@ -1662,11 +1908,18 @@ distclean-libtool:
 	-rm -f libtool config.lt
 install-man1: $(man_MANS)
 	@$(NORMAL_INSTALL)
-	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
-	@list=''; test -n "$(man1dir)" || exit 0; \
-	{ for i in $$list; do echo "$$i"; done; \
-	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.1[a-z]*$$/p'; \
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man1dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.1[a-z]*$$/p'; \
+	fi; \
 	} | while read p; do \
 	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; echo "$$p"; \
@@ -1695,13 +1948,14 @@ uninstall-man1:
 	  sed -n '/\.1[a-z]*$$/p'; \
 	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
 	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
-	test -z "$$files" || { \
-	  echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
-	  cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
 install-dist_aclocalDATA: $(dist_aclocal_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(aclocaldir)" || $(MKDIR_P) "$(DESTDIR)$(aclocaldir)"
 	@list='$(dist_aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(aclocaldir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(aclocaldir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -1715,13 +1969,14 @@ uninstall-dist_aclocalDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(dist_aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(aclocaldir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(aclocaldir)" && rm -f $$files
+	dir='$(DESTDIR)$(aclocaldir)'; $(am__uninstall_files_from_dir)
 install-pkgconfigDATA: $(pkgconfig_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
 	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -1735,13 +1990,14 @@ uninstall-pkgconfigDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
 install-pkgincludeHEADERS: $(pkginclude_HEADERS)
 	@$(NORMAL_INSTALL)
-	test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
 	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -1755,18 +2011,16 @@ uninstall-pkgincludeHEADERS:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
+	dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -1791,7 +2045,7 @@ $(RECURSIVE_TARGETS):
 	fi; test -z "$$fail"
 
 $(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -1828,6 +2082,10 @@ ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
+cscopelist-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -1891,8 +2149,32 @@ GTAGS:
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+	-rm -f cscope.files
+
+cscope.files: clean-cscope cscopelist-recursive cscopelist
+
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS) $(LISP)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
 	@case `sed 15q $(srcdir)/NEWS` in \
@@ -1907,10 +2189,10 @@ distdir: $(DISTFILES)
 	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
 	  if test -n "$$list" && \
 	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
-	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
 	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
 	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
-	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    echo "       typically 'make maintainer-clean' will remove them" >&2; \
 	    exit 1; \
 	  else :; fi; \
 	else :; fi
@@ -1947,13 +2229,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -1977,43 +2256,44 @@ distdir: $(DISTFILES)
 	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
 	  dist-hook
 	-test -n "$(am__skip_mode_fix)" \
-	|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
 	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
-	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-	$(am__remove_distdir)
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__post_remove_distdir)
 
-dist-lzma: distdir
-	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-	$(am__remove_distdir)
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__post_remove_distdir)
 
 dist-xz: distdir
-	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
-	$(am__remove_distdir)
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__post_remove_distdir)
 
 dist-tarZ: distdir
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-shar: distdir
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-zip: distdir
 	-rm -f $(distdir).zip
 	zip -rq $(distdir).zip $(distdir)
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
-dist dist-all: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
+dist dist-all:
+	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+	$(am__post_remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
@@ -2021,17 +2301,17 @@ dist dist-all: distdir
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
-	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
-	*.tar.lzma*) \
-	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
 	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
@@ -2045,6 +2325,7 @@ distcheck: dist
 	  && am__cwd=`pwd` \
 	  && $(am__cd) $(distdir)/_build \
 	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -2068,13 +2349,21 @@ distcheck: dist
 	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
 	  && cd "$$am__cwd" \
 	  || exit 1
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 	@(echo "$(distdir) archives ready for distribution: "; \
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
 	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-	@$(am__cd) '$(distuninstallcheck_dir)' \
-	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
 	   || { echo "ERROR: files left after uninstall:" ; \
 	        if test -n "$(DESTDIR)"; then \
 	          echo "  (check DESTDIR support)"; \
@@ -2114,10 +2403,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
@@ -2213,26 +2507,27 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
 uninstall-man: uninstall-man1
 
 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
-	ctags-recursive install install-am install-strip \
-	tags-recursive
+	cscopelist-recursive ctags-recursive install install-am \
+	install-strip tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
 	all all-am am--refresh check check-am clean clean-binPROGRAMS \
-	clean-generic clean-libLTLIBRARIES clean-libtool \
-	clean-noinstLTLIBRARIES ctags ctags-recursive dist dist-all \
-	dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
-	dist-xz dist-zip distcheck distclean distclean-compile \
-	distclean-generic distclean-hdr distclean-libtool \
-	distclean-tags distcleancheck distdir distuninstallcheck dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-binSCRIPTS install-data \
-	install-data-am install-dist_aclocalDATA install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-libLTLIBRARIES install-man install-man1 install-pdf \
-	install-pdf-am install-pkgconfigDATA install-pkgincludeHEADERS \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
+	clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstLTLIBRARIES cscope cscopelist cscopelist-recursive \
+	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+	dist-hook dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
+	distcheck distclean distclean-compile distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags distcleancheck \
+	distdir distuninstallcheck dvi dvi-am html html-am info \
+	info-am install install-am install-binPROGRAMS \
+	install-binSCRIPTS install-data install-data-am \
+	install-dist_aclocalDATA install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-libLTLIBRARIES \
+	install-man install-man1 install-pdf install-pdf-am \
+	install-pkgconfigDATA install-pkgincludeHEADERS install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs installdirs-am maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-recursive uninstall uninstall-am \
@@ -2250,8 +2545,6 @@ uninstall-man: uninstall-man1
 dist-hook:
 	rm -rf `find $(distdir) -name .svn`
 
-# MAINTAINERCLEANFILES = $(GRAM_SRC)
-
 # Copy the generated grammar files to the 'grammarfiles' directory.
 .PHONY: grammarfiles
 grammarfiles: $(GRAM_SRC)
@@ -2273,16 +2566,15 @@ cccc:
 ###########################################################################
 
 # Fortify targets.
-# dods-datatypes.h xdr-datatypes.h
 .PHONY: fortify
 fortify: $(BUILT_SOURCES)
-	(cd gl && sourceanalyzer -b @PACKAGE at -gl $(MAKE) )
-	sourceanalyzer -b @PACKAGE at -parsers $(MAKE) libparsers.la
-	sourceanalyzer -b @PACKAGE@ $(MAKE) libdap.la libdapserver.la libdapclient.la
+	(cd gl && sourceanalyzer -b @PACKAGE at -gl $(MAKE) $(MFLAGS) )
+	sourceanalyzer -b @PACKAGE at -parsers $(MAKE) $(MFLAGS) libparsers.la
+	sourceanalyzer -b @PACKAGE@ $(MAKE) $(MFLAGS) libdap.la libdapserver.la libdapclient.la
 	sourceanalyzer -b @PACKAGE@ -scan -f @PACKAGE at -@PACKAGE_VERSION at .fpr
 
 # run fortify on only our code, not the gnulib code or the flex/bison code.
-# This does skip testing some of the functions we wrote in the *.lex/*.y
+# This does skip testing some of the functions we wrote in the *.lex/*.yy
 # files but should eliminate the false positives from flex and bison, too.
 .PHONY: fortify-lite
 fortify-lite: dods-datatypes.h xdr-datatypes.h
@@ -2291,6 +2583,10 @@ fortify-lite: dods-datatypes.h xdr-datatypes.h
 	sourceanalyzer -b @PACKAGE@ $(MAKE) libdap.la libdapserver.la libdapclient.la
 	sourceanalyzer -b @PACKAGE@ -scan -f @PACKAGE at -@PACKAGE_VERSION at .fpr
 
+# No longer used? jhrg 1/29/13
+#grammar_objects = lex.das.o das.tab.o lex.dds.o dds.tab.o lex.ce_expr.o \
+#ce_expr.tab.o lex.gse_.o gse.tab.o lex.Error.o Error.tab.o
+
 # Use this to clean the fortify project.
 .PHONY: fortifyclean
 fortifyclean:
@@ -2319,7 +2615,7 @@ pkg-build: clean-pkg
 pkg-main: pkg-build
 	./OSX_Resources/update_mac_package_contents.pl README
 	cat ./OSX_Resources/Info.plist.proto | \
-	   sed -e "s^_PREFIX_^$(prefix)^g" \
+	   sed -e "s^_PREFIX_^/usr/local/servers/hyrax-1.8.8^g" \
 	       -e "s^_FULL_VERSION_^@PACKAGE_VERSION@^g" \
 	       -e "s^_MAJOR_VERSION_^@PACKAGE_MAJOR_VERSION@^g" \
 	       -e "s^_MINOR_VERSION_^@PACKAGE_MINOR_VERSION@^g" \
@@ -2329,6 +2625,8 @@ pkg-main: pkg-build
 	    --title "@PACKAGE@ @PACKAGE_VERSION@" --version @PACKAGE_VERSION@ \
 	    --out @PACKAGE at -@PACKAGE_VERSION at .pkg --resources OSX_Resources
 
+# 	   sed -e "s^_PREFIX_^$(prefix)^g" 
+
 pkg-dmg: pkg-main
 	-rm -rf @PACKAGE at -@PACKAGE_VERSION@
 	-rm -rf @PACKAGE at -@PACKAGE_VERSION at .dmg
@@ -2361,6 +2659,7 @@ Operators.h: ce_expr.tab.hh
 
 xdr-datatypes.h: xdr-datatypes-config.h
 	cp -p $< xdr-datatypes.h
+#	ResponseBuilder.h ResponseCache.h
 
 ############################################################################
 # Special rules for the grammars. I tried to use the automake grammar support
@@ -2372,49 +2671,34 @@ xdr-datatypes.h: xdr-datatypes-config.h
 # Build the DAS scanner and parser
 
 lex.das.cc: das.lex das.tab.cc das.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
+	$(LEX) $(LFLAGS) $<
 
-# The funny if statment accommodates older versions of bison that treats
-# -o differently than the 2.x versions. jhrg 3/2/08
-das.tab.cc das.tab.hh: das.y DAS.h
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p das -o das.tab.cc $<
-	if test -e das.tab.cc.h; then mv das.tab.cc.h das.tab.hh; fi
+das.tab.cc das.tab.hh: das.yy DAS.h
+	$(YACC) $(YFLAGS) $<
 
 # DDS
 
 lex.dds.cc: dds.lex dds.tab.cc dds.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
+	$(LEX) $(LFLAGS) $<
 
-dds.tab.cc dds.tab.hh: dds.y
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p dds -o dds.tab.cc $<
-	if test -e dds.tab.cc.h; then mv dds.tab.cc.h dds.tab.hh; fi
+dds.tab.cc dds.tab.hh: dds.yy
+	$(YACC) $(YFLAGS) $<
 
 # CE
 
 lex.ce_expr.cc: ce_expr.lex ce_expr.tab.cc ce_expr.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
-
-ce_expr.tab.cc ce_expr.tab.hh: ce_expr.y
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p ce_expr -o ce_expr.tab.cc $<
-	if test -e ce_expr.tab.cc.h; then mv ce_expr.tab.cc.h ce_expr.tab.hh; fi
-
-# Build the grid selection sub_expression scanner and parser
-
-lex.gse_.cc: gse.lex gse.tab.cc gse.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
+	$(LEX) $(LFLAGS) $<
 
-gse.tab.cc gse.tab.hh: gse.y
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p gse_ -o gse.tab.cc $<
-	if test -e gse.tab.cc.h; then mv gse.tab.cc.h gse.tab.hh; fi
+ce_expr.tab.cc ce_expr.tab.hh: ce_expr.yy
+	$(YACC) $(YFLAGS) $<
 
 # Errors
 
 lex.Error.cc: Error.lex Error.tab.cc Error.tab.hh
-	$(LEX) $(LFLAGS) $(AM_LFLAGS) $<
+	$(LEX) $(LFLAGS) $<
 
-Error.tab.cc Error.tab.hh: Error.y
-	$(YACC) $(YFLAGS) $(AM_YFLAGS) -p Error -o Error.tab.cc $<
-	if test -e Error.tab.cc.h; then mv Error.tab.cc.h Error.tab.hh; fi
+Error.tab.cc Error.tab.hh: Error.yy
+	$(YACC) $(YFLAGS) $<
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/Marshaller.h b/Marshaller.h
index 45af73d..9217440 100644
--- a/Marshaller.h
+++ b/Marshaller.h
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/NEWS b/NEWS
index b8afa7c..ba78352 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,16 @@
+News for version 3.12.0
+
+Moved server functions out of libdap; they are now stored in a BES module.
+
+Added support for building large (constant) arrays to be used in
+server functions. The arrays are defined using a new special form that
+the ConstraintEvaluator class supports. The server side functions are
+now in their own BES module (built as part of the BES for now) and
+it's possible to name the constant arrays. Arrays of 1 million
+elements can be made in a fraction of a second (although it will take
+longer to send the constraint to the server). See the README file for
+more details.
+
 News for version 3.11.7
 
 Bug fix for the server function caching code. Now if the function
diff --git a/OSX_Resources/Info.plist b/OSX_Resources/Info.plist
deleted file mode 100644
index 8ef3318..0000000
--- a/OSX_Resources/Info.plist
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleGetInfoString</key>
-	<string>3.11.5, OPeNDAP libdap</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.opendap.libdap</string>
-	<key>CFBundleShortVersionString</key>
-	<string>3.11.5</string>
-	<key>IFMajorVersion</key>
-	<integer>3</integer>
-	<key>IFMinorVersion</key>
-	<integer>11</integer>
-	<key>IFPkgFlagAllowBackRev</key>
-	<false/>
-	<key>IFPkgFlagAuthorizationAction</key>
-	<string>RootAuthorization</string>
-	<key>IFPkgFlagBackgroundAlignment</key>
-	<string>topleft</string>
-	<key>IFPkgFlagBackgroundScaling</key>
-	<string>none</string>
-	<key>IFPkgFlagDefaultLocation</key>
-	<string>/Users/jimg/src/hyrax_1.8_release</string>
-	<key>IFPkgFlagFollowLinks</key>
-	<true/>
-	<key>IFPkgFlagInstallFat</key>
-	<false/>
-	<key>IFPkgFlagInstalledSize</key>
-	<integer>10000</integer>
-	<key>IFPkgFlagIsRequired</key>
-	<true/>
-	<key>IFPkgFlagOverwritePermissions</key>
-	<false/>
-	<key>IFPkgFlagRelocatable</key>
-	<false/>
-	<key>IFPkgFlagRestartAction</key>
-	<string>NoRestart</string>
-	<key>IFPkgFlagRootVolumeOnly</key>
-	<false/>
-	<key>IFPkgFlagUpdateInstalledLanguages</key>
-	<false/>
-	<key>IFPkgFormatVersion</key>
-	<real>0.10000000149011612</real>
-</dict>
-</plist>
diff --git a/OSX_Resources/ReadMe.txt b/OSX_Resources/ReadMe.txt
deleted file mode 100644
index 0e80851..0000000
--- a/OSX_Resources/ReadMe.txt
+++ /dev/null
@@ -1,247 +0,0 @@
-Updated for version 3.11.5
-
-A memory leak in XDRStreamMarshaller was fixed.
-
-A bug in DDS::add_var_nocopy() was fixed.
-
-Updated for version 3.11.2
-
-Bug fixes and improvements in the implementations of some methods.
-
-Updated for version 3.11.1
-
-Bug fixes only.
-
-Updated for version 3.11.0
-
-Now constraint expressions can have multiple function calls that return data.
-
-I've bumped up the DAP version from 3.3 to 3.4 to reflect this change.
-
-Updated for Version 3.10.2
-
-BaseType::transfer_attributes() and related methods provide a way forhandlers to customize how attributes from a DAS object are merged intoa DDS.
-
-In the past we supported a kind of client-side system that could augmentthe attributes call the 'AIS' (Ancillary Information System). This hasbeen removed - our server now supports the NcML language to do much the samething but in a way that can be set on the server once for all users. It's alsoan emerging convention that's gaining wide support within the community.
-
-Updated for Version 3.10.0
-
-DAP 3.3 is now supported; see http://docs.opendap.org/index.php/DAP3/4.
-
-This version of libdap contains many changes that are needed for bothDAP 4 and the NcML handler. This version of the library is requiredfor the Hyrax 1.6 handlers.
-
-The 'deflate' program is no longer part of this library package sincewe are no longer supporting the old data server system (based on WWW'sCGI specification).
-
-Updated for version 3.9.2
-
-Now libdap supports DAP 3.2. You can read about the evolving DAP 3.x protocolat http://docs.opendap.org/index.php/DAP3/4. If your client sends theXDAP-Accept header with a value of 3.2 the DDX is different (it includesprotocol information and also an xmlbase element).
-
-Behavior change for the DAS: In the past the format handlers added doublequotes to the values of string attributes when they added those values to theAttrTable object. This meant that the value of the attribute in the C++object was actually not correct since it contained quotes not found in theoriginal attribute value. I modified libdap so that if an attribute value inthe C++ AttrTable object does not have quotes then those quotes are addedwhen the value is output in a DAS response (but  [...]
-
-If you have a handler and it's not adding quotes to the String attribute values - good, don't change that! If your handler does add quotes, pleasemodify it so the DDX will be correct.  
-
-Our handler's old, broken, behavior can be resurrected by removing the ATTR_STRING_QUOTE FIX define in the appropriate files.
-
-Updated for version 3.8.2 (23 June 2008)
-
-HTTP Cache and win32 installer fixes (the latter are actually in the 3.8.1installer for winXP). API change: The functions used to merge ancillary datahave been moved to their own class (Ancillary).
-
-Updated for version 3.8.1 (10 June 2008)
-
-The syntax for PROXY_SERVER in the .dodsrc file was relaxed. See the .dodsrcfile for more information.
-
-Updated for Version 3.8.0 (29 February 2008)
-
-The libdap classes and code are now inside of the libdap namespace. In orderto access any of the classes, for example, you will need to do one of thefollowing. After including the libdap headers you can:
-
-1. add a using statement for the entire libdap namespace:
-
-using namespace libdap ;
-
-2. add a using statement for the classes that you will be using:
-
-using libdap::DAS ;
-
-3. inside your code scope the use of libdap classes.
-
-libdap::DAS *das = code_to_get_das() ;
-
-Added method to HTTPCache to return not only the FILE pointer of a cachedresponse but also the name of the file in the cache, to allow for this filename to be passed to data handlers in the BES to be read.
-
-See NEWS for more information about changes for this version and ChangeLogfor the gory details.
-
-Updated for Version 3.7.10 (28 November 2007)
-
-A bug fix release. See NEWS.
-
-Updated for Version 3.7.9 (13 November 2007)
-
-This release is a bug fix and refactoring release. Old classes which were nolonger used have been removed, the FILE* output methods are slated to bereplaced with ones which will use iostream and will support a chuckedtransfer 'Marshaller,' and the transfer_data() methods have been made aformal part of the library, implemented for all classes, fixed and renamed tointern_data(). Many bugs in the library were also fixed.
-
-Updated for version 3.7.8 (26 June 2007)
-
-The major fixes in this version are memory errors found and fixed in theRegex class and HTTP header processing software. This version also supportspkg-config on hosts that have that installed.
-
-See NEWS for more information about changes for this version and ChangeLogfor the gory details.
-
-Notes for version 3.7.7 (2 May 2007)
-
-The major fix here is to the source build. We've fixed the issue where sourcebuilds failed to make the dapserver and dapclient libraries.
-
-Notes for version 3.7.6 (12 March 2007)
-
-Two bug fixes, both minor. Problems in the linear_scale() constraintexpression function and a bad/missing #include in GNURegex.h were fixed.
-
-There was an error in the INSTALL file sent out in the previous release. Itsaid this library implemented DAP version 3.2, but in fact it implementsversion 3.1. The version 3.2 release will be along soon (RSN).
-
-Notes for version 3.7.5 (7 Feb 2007)
-
-This version includes many fixes from the first Server4 beta releaseplus fixes for the server-side functions. It also includes a smootherWin32 build.
-
-Notes for version 3.7.4 (2 Jan 2007)
-
-Release for the Server4 beta release.
-
-Notes for version 3.7.3 (24 Nov 2006)
-
-This version of libdap contains a beta release of the server-side functionsgeogrid(), geoarray(), linear_scale() and version(). These can be used toselect parts of Grids and Arrays using latitude and longitude values insteadof array position indexes. The linear_scale() function can be used to scalevariables (including those return by other function) using 'y = mx + b'. Theversion() function can be used to find out which versions of the functions areinstalled.
-
-EXAMPLES
-
-To get version information use the 'version()' function. Currently, version()can only be called when asking for data, and you must give the name of a datasource, although in the default version of version() the data source is notused. The version function takes one optional argument which may be the strings'help' or 'xml'. Use 'help' to get help on using the function; use 'xml' to getversion information encoded using XML instead of plain text:
-
-[jimg at zoe libdap]$ url=http://test.opendap.org/dap/data/nc/coads_climatology.nc
-[jimg at zoe libdap]$ ./getdap -D "$url?version()"
-The data:
-String version = "Function set: version 1.0, grid 1.0, geogrid 1.0b2, 
-		          geoarray 0.9b1, linear_scale 1.0b1";
-
-[jimg at zoe libdap]$ ./getdap -D "$url?version(help)"
-The data:
-String version = "Usage: version() returns plain text information about ...
-
-[jimg at zoe libdap]$ ./getdap -D "$url?version(xml)"
-The data:
-String version = "<?xml version=\"1.0\"?>
-    <functions>
-        <function name=\"version\" version=\"1.0\"/>
-        <function name=\"grid\" version=\"1.0\"/>
-        <function name=\"geogrid\" version=\"1.0\"/>
-        <function name=\"geoarray\" version=\"1.0\"/>
-        <function name=\"linear_scale\" version=\"1.0\"/>
-    </functions>";
-
-The geogrid function can only be used with variables that are Grids:
-
-[jimg at zoe libdap]$ getdap -d "$url"
-Dataset {
-    Float64 COADSX[COADSX = 180];
-    Float64 COADSY[COADSY = 90];
-    Float64 TIME[TIME = 12];
-    Grid {
-      Array:
-        Float32 SST[TIME = 12][COADSY = 90][COADSX = 180];
-      Maps:
-        Float64 TIME[TIME = 12];
-        Float64 COADSY[COADSY = 90];
-        Float64 COADSX[COADSX = 180];
-    } SST;
-    Grid {
-    .
-    .
-    .
-
-
-Pass the name of the Grid variable and the upper-left and lower-right corners of the lat/lon rectangle to geogrid. Optionally, pass one or more relationalexpressions to select parts of dimensions that are not lat/lon. 
-
-Note: in libdap 3.7.3 calling geogrid with a constraint on each dimensionmay return incorrect values that indicate missing data even though data shouldhave been returned.
-
-[jimg at zoe libdap]$ getdap -D "$url?geogrid(SST,30,-60,20,-60,\"TIME=366\")"
-The data:
-Grid {
-  Array:
-    Float32 SST[TIME = 1][COADSY = 7][COADSX = 2];
-  Maps:
-    Float64 TIME[TIME = 1];
-    Float64 COADSY[COADSY = 7];
-    Float64 COADSX[COADSX = 2];
-} SST = {  Array: {{{24.4364, 25.0923},{23.7465, 24.4146},{19.843, 23.6033},
-{16.8464, 17.7756},{16.65, 16.818},{-1e+34, 15.3656},{18.7214, 13.1286}}}  
-Maps: {366}, {19, 21, 23, 25, 27, 29, 31}, {-61, -59} };
-
-
-The geoarray() function works like geogrid() except that it's used to selectfrom an Array variable and not a Grid. In addition to the four lat/lon valuesfor selection rectangle, the caller must supply the data's corner points. A subsequent release of libdap will include a version that reads the data extentfrom the data source when possible so caller's won't normally have to know thedata's extent ahead of time.
-
-The linear_scale() function take either one or three arguments. The first(only) argument is the name of a variable or the return from anotherfunction. This variable will be scaled using the 'y = mx + b' equation where'x' is the value(s) of the input variable and 'm' and 'b' are read from thedata source using the values of attributes name 'scale_factor' and'add_offset.' If these are not present, or to over ride their values, m and bcan be supplied using the second and third arguments.
-
-Note that there are still some problems with linear_scale() in this release.
-
-See NEWS and ChangeLog for information about other changes
-
-Notes for version 3.7.2
-
-This version of libdap is required for the 9/15/06 alpha release of Server4.The library now contains software which enables Server4 to build the ASCIIdata response for all types of variables, including Sequence and nestedSequence variables. These features are additions to the API, so older codewill work just fine with the new library. See NEWS for more specific infoabout bug fixes.
-
-Notes for version 3.7.1
-
-This is a bug fix release (mostly) made for users of the netcdf clientlibrary who need a fix for a problem dealing with attributes from the HDF4server. 
-
-NOTES for version 3.7.0
-
-This version includes new features and an implementation change.
-
-This version of libdap now returns the DAP protocol version number, 3.1, inan HTTP response header. Use this to determine which protocol version thelibrary implements. The inclusion of a protocol version number is the soleofficial new feature of DAP 3.1. Use Connect::get_protocol() to get theversion number. Clients can use this to determine the features supported by aserver. The Connect::get_version() method can still be used to get ourserver's implementation version. The distinction is  [...]
-
-The libdap library now contains an implementation of the DDX object/response,although this is an alpha implementation and it's actually been part of thelibrary for some time now. The implementation contained in this version ofthe library is close enough to the version we intend for DAP4 that developerscan start to use it. Most of the server handlers will return DDXs when asked.
-
-The DDX combines the information previously held by the DDS and DAS objects,making it much easier to associate attributes to variables. As the namesuggests, the DDX uses XML rather than curly-braces. You can drop the DDXinto your favorite XML parser and get a DOM tree; no need to use our parsers.However, libdap contains a nice SAX parser that will build the libdap objectsdirectly from the XML DDX object/response. Also included in libdap aremethods to build a DDX using a DDS and DAS, so t [...]
-
-Finally, the library contains two structural changes. First, the librarynamed 'libdap' now holds the DAP implementation while two new libraries,'libdapclient' and 'libdapserver', now hold the client and server helperclasses which are not strictly part of the DAP. Secondly, the DDS/DDX objectnow takes the constraint evaluator as a parameter. The classConstraintEvaluator holds our default evaluator, but it's now possible to useyour own evaluator .
-
-NOTES for version 3.6.1
-
-Version 3.6.1 is bug fix release.
-
-NOTES for version 3.6.0
-
-This version of the library may not work older source code. Many of the deprecated methods have been removed. 
-
-Added are headers which send information about the version of the DAP protocolthat the library implements (in contrast to the implementation of the libraryitself). A new header named XOPeNDAP-Server is used to send information aboutthe implementation of servers.
-
-The libtool interface version has been incremented from 3 to 4 (these versionsdo no track the software's release version since several releases might present compatible binary interfaces). 
-
-NOTES for version 3.5.3
-
-This version of libdap++ cannot be used to build the 3.4.x and previousclients and/or servers. However, client and servers built using this code_will_ work with the older clients and servers.
-
-WHAT'S IN THIS DIRECTORY?
-
-This directory contains the OPeNDAP C++ implementation of the DataAccess Protocol version 2 (DAP2) with some extensions that will bepart of DAP3.  Documentation for this software can be found on theOPeNDAP home page at http://www.opendap.org/. The NASA/ESE RFC whichdescribes DAP2, implemented by the library, can be found athttp://spg.gsfc.nasa.gov/rfc/004/.
-
-The DAP2 is used to provide a uniform way of accessing a variety ofdifferent types of data across the Internet. It was originally part ofthe DODS and then NVODS projects. The focus of those projects wasaccess to Earth-Science data, so much of the software developed usingthe DAP2 to date has centered on that discipline. However, the DAP2data model is very general (and similar to a modern structuredprogramming language) so it can be applied to a wide variety offields.
-
-The DAP2 is implemented as a set of C++ classes that can be used tobuild data servers and clients. The classes may be specialized tomimic the behavior of other data access APIs, such as netCDF. In thisway, programs originally meant to work with local data in thoseformats can be re-linked and equipped to work with data storedremotely in many different formats.  The classes can also byspecialized to build standalone client programs.
-
-The DAP2 is contained in a single library: libdap++.a. Also includedin the library are classes and utility functions which simplifybuilding clients and servers.
-
-WHAT ELSE IS THERE?
-
-The file README.dodsrc describes the client-side behavior which can becontrolled using the .dodsrc file. This includes client-side caching,proxy servers, et c., and is described in a separate file so it's easyto include in your clients.
-
-The file README.AIS describes the prototype Ancillary InformationService (AIS) included in this version of the library. The AIS is(currently) a client-side capability which provides a way to augmentDAP attributes. This is a very useful feature because it can be usedto add missing metadata to a data source. The AIS is accessed by usingthe AISConnect class in place of Connect in your client.
-
-This directory also contains test programs for the DAP2, a samplespecialization of the classes, getdap (a useful command-line webclient created with DAP2) and dap-config (a utility script to simplifylinking with libdap.a). Also included as of version 3.5.2 islibdap.m4, an autoconf macro which developers can use along withautoconf to test for libdap. This macro will be installed in${prefix}/share/aclocal and can be by any package which uses autoconffor its builds. See the file for more in [...]
-
-We also have Java and C versions of the DAP2 library whichinter-operate with software which uses this library. In other words,client programs built with the Java DAP2 implementation cancommunicate with servers built with this (C++) implementation of theDAP2. The C DAP2 library, called the Ocapi, only implements theclient-side part of the protocol. Clients written using the Ocapi areinteroperable with both the Java and C++ DAP2 libraries. Note that theOcapi is in early beta and available  [...]
-
-THREAD SAFETY
-
-We don't need to do this since the STL is also not thread safe. Usersof libdap have to be sure that multiple threads never makesimultaneous and/or overlapping calls to a single copy of libdap. Ifseveral threads are part of a program and each will make calls tolibdap, either those threads must synchronize their calls or arrangeto each use their own copy of libdap.  Some aspects of the library''are'' thread-safe: the singleton classes are all protected as is theHTTP cache (which uses the l [...]
-
-INSTALLATION INSTRUCTIONS
-
-See the file INSTALL in this directory for information on building thelibrary and the geturl client.
-
-COPYRIGHT INFORMATION
-
-The OPeNDAP DAP library is copyrighted using the GNU Lesser GPL. Seethe file COPYING or contact the Free Software Foundation, Inc., at 59Temple Place, Suite 330, Boston, MA 02111-1307 USA. Older versions ofthe DAP were copyrighted by the University of Rhode Island andMassachusetts Institute of Technology; see the file COPYRIGHT_URI. Thefile deflate.c is also covered by COPYRIGHT_W3C.
\ No newline at end of file
diff --git a/ObjectType.h b/ObjectType.h
index fdda7f7..553146a 100644
--- a/ObjectType.h
+++ b/ObjectType.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Operators.h b/Operators.h
index 58fa1de..89abeb5 100644
--- a/Operators.h
+++ b/Operators.h
@@ -1,4 +1,3 @@
-
 // -*- mode: c++; c-basic-offset:4 -*-
 
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
@@ -19,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,238 +35,143 @@
 #ifndef _operators_h
 #define _operators_h
 
-
 #include "GNURegex.h"  // GNU Regex class used for string =~ op.
 #include "parser.h"  // for ID_MAX
 #include "ce_expr.tab.hh"
 
 using namespace std;
 
-namespace libdap
-{
+namespace libdap {
 
-inline unsigned
-dods_max(int i1, int i2)
+/** Compare two numerical types, both of which are either signed or unsigned.
+ This class is one implementation of the comparison policy used by
+ rops.
+
+ @see rops
+ @see USCmp
+ @see SUCmp */
+template<class T1, class T2>
+bool Cmp(int op, T1 v1, T2 v2)
 {
-    return (unsigned)((i1 > i2) ? i1 : i2);
+    switch (op) {
+        case SCAN_EQUAL:
+            return v1 == v2;
+        case SCAN_NOT_EQUAL:
+            return v1 != v2;
+        case SCAN_GREATER:
+            return v1 > v2;
+        case SCAN_GREATER_EQL:
+            return v1 >= v2;
+        case SCAN_LESS:
+            return v1 < v2;
+        case SCAN_LESS_EQL:
+            return v1 <= v2;
+        case SCAN_REGEXP:
+            throw Error("Regular expressions are supported for strings only.");
+        default:
+            throw Error("Unrecognized operator.");
+    }
 }
 
-/** Compare two numerical types, both of which are either signed or unsigned.
-    This class is one implementation of the comparison policy used by
-    rops.
-
-    @see rops
-    @see USCmp
-    @see SUCmp */
-template<class T1, class T2> class Cmp
+template<class T>
+static inline unsigned long long dap_floor_zero(T i)
 {
-public:
-    static bool eq(T1 v1, T2 v2)
-    {
-        return v1 == v2;
-    }
-    static bool ne(T1 v1, T2 v2)
-    {
-        return v1 != v2;
-    }
-    static bool gr(T1 v1, T2 v2)
-    {
-        return v1 > v2;
-    }
-    static bool ge(T1 v1, T2 v2)
-    {
-        return v1 >= v2;
-    }
-    static bool lt(T1 v1, T2 v2)
-    {
-        return v1 < v2;
-    }
-    static bool le(T1 v1, T2 v2)
-    {
-        return v1 <= v2;
-    }
-    static bool re(T1, T2)
-    {
-        cerr << "Illegal operation" << endl;
-        return false;
-    }
-};
+    return (unsigned long long) ((i < 0) ? 0 : i);
+}
 
 /** Compare two numerical types, the first one unsigned and the second
-    signed. If the signed argument is negative, zero is used in the
-    comparison. This class is one implementation of the comparison policy
-    used by rops.
-
-    @see rops
-    @see SUCmp
-    @see Cmp */
-template<class UT1, class T2> class USCmp
+ signed. If the signed argument is negative, zero is used in the
+ comparison. This class is one implementation of the comparison policy
+ used by rops.
+
+ @see rops
+ @see SUCmp
+ @see Cmp */
+template<class UT1, class T2>
+bool USCmp(int op, UT1 v1, T2 v2)
 {
-public:
-    static bool eq(UT1 v1, T2 v2)
-    {
-        return v1 == dods_max(0, v2);
-    }
-    static bool ne(UT1 v1, T2 v2)
-    {
-        return v1 != dods_max(0, v2);
-    }
-    static bool gr(UT1 v1, T2 v2)
-    {
-        return v1 > dods_max(0, v2);
-    }
-    static bool ge(UT1 v1, T2 v2)
-    {
-        return v1 >= dods_max(0, v2);
-    }
-    static bool lt(UT1 v1, T2 v2)
-    {
-        return v1 < dods_max(0, v2);
-    }
-    static bool le(UT1 v1, T2 v2)
-    {
-        return v1 <= dods_max(0, v2);
-    }
-    static bool re(UT1, T2)
-    {
-        cerr << "Illegal operation" << endl;
-        return false;
+    switch (op) {
+        case SCAN_EQUAL:
+            return v1 == dap_floor_zero<T2>(v2);
+        case SCAN_NOT_EQUAL:
+            return v1 != dap_floor_zero<T2>(v2);
+        case SCAN_GREATER:
+            return v1 > dap_floor_zero<T2>(v2);
+        case SCAN_GREATER_EQL:
+            return v1 >= dap_floor_zero<T2>(v2);
+        case SCAN_LESS:
+            return v1 < dap_floor_zero<T2>(v2);
+        case SCAN_LESS_EQL:
+            return v1 <= dap_floor_zero<T2>(v2);
+        case SCAN_REGEXP:
+            throw Error("Regular expressions are supported for strings only.");
+        default:
+            throw Error("Unrecognized operator.");
     }
-};
+}
 
 /** Compare two numerical types, the first one signed and the second
-    unsigned. If the signed argument is negative, zero is used in the
-    comparison. This class is one implementation of the comparison policy
-    used by rops. This class is here to make writing the Byte::ops, ...
-    member functions simpler. It is not necessary since the functions could
-    twiddle the order of arguments to rops and use <tt>USCmp</tt>. Having
-    this class make Byte:ops, ... simpler to read and write.
-
-    @see Byte::ops
-    @see USCmp
-    @see Cmp
-    @see ops */
-template<class T1, class UT2> class SUCmp
+ unsigned. If the signed argument is negative, zero is used in the
+ comparison. This class is one implementation of the comparison policy
+ used by rops. This class is here to make writing the Byte::ops, ...
+ member functions simpler. It is not necessary since the functions could
+ twidle the order of arguments to rops and use <tt>USCmp</tt>. Having
+ this class make Byte:ops, ... simpler to read and write.
+
+ @see Byte::ops
+ @see USCmp
+ @see Cmp
+ @see ops */
+template<class T1, class UT2>
+bool SUCmp(int op, T1 v1, UT2 v2)
 {
-public:
-    static bool eq(T1 v1, UT2 v2)
-    {
-        return dods_max(0, v1) == v2;
-    }
-    static bool ne(T1 v1, UT2 v2)
-    {
-        return dods_max(0, v1) != v2;
-    }
-    static bool gr(T1 v1, UT2 v2)
-    {
-        return dods_max(0, v1) > v2;
-    }
-    static bool ge(T1 v1, UT2 v2)
-    {
-        return dods_max(0, v1) >= v2;
-    }
-    static bool lt(T1 v1, UT2 v2)
-    {
-        return dods_max(0, v1) < v2;
-    }
-    static bool le(T1 v1, UT2 v2)
-    {
-        return dods_max(0, v1) <= v2;
-    }
-    static bool re(T1, UT2)
-    {
-        cerr << "Illegal operation" << endl;
-        return false;
+    switch (op) {
+        case SCAN_EQUAL:
+            return dap_floor_zero<T1>(v1) == v2;
+        case SCAN_NOT_EQUAL:
+            return dap_floor_zero<T1>(v1) != v2;
+        case SCAN_GREATER:
+            return dap_floor_zero<T1>(v1) > v2;
+        case SCAN_GREATER_EQL:
+            return dap_floor_zero<T1>(v1) >= v2;
+        case SCAN_LESS:
+            return dap_floor_zero<T1>(v1) < v2;
+        case SCAN_LESS_EQL:
+            return dap_floor_zero<T1>(v1) <= v2;
+        case SCAN_REGEXP:
+            throw Error("Regular expressions are supported for strings only.");
+        default:
+            throw Error("Unrecognized operator.");
     }
-};
+}
 
 /** Compare two string types.
-    This class is one implementation of the comparison policy used by
-    rops.
-
-    @see rops */
-template<class T1, class T2> class StrCmp
-{
-public:
-    static bool eq(T1 v1, T2 v2)
-    {
-        return v1 == v2;
-    }
-    static bool ne(T1 v1, T2 v2)
-    {
-        return v1 != v2;
-    }
-    static bool gr(T1 v1, T2 v2)
-    {
-        return v1 > v2;
-    }
-    static bool ge(T1 v1, T2 v2)
-    {
-        return v1 >= v2;
-    }
-    static bool lt(T1 v1, T2 v2)
-    {
-        return v1 < v2;
-    }
-    static bool le(T1 v1, T2 v2)
-    {
-        return v1 <= v2;
-    }
-    static bool re(T1 v1, T2 v2)
-    {
-        Regex r(v2.c_str());
-        return r.match(v1.c_str(), v1.length()) > 0;
-    }
-};
-
-/** This template function is used to compare two values of two instances of
-    the DAP2 simple types (Byte, ..., Str). The function does not take the
-    DAP2 objects as arguments; the caller must access the values of those
-    objects and pass them to this function. The reason for this is that all
-    the possible functions that could be generated from this template would
-    have to be explicitly listed as friend functions in each of the DAP2
-    simple type classes. In the current implementation, only the simple type
-    classes must be friends - to see why, look at Byte::ops and note that it
-    accesses the <tt>_buf</tt> member of Int16, ..., Float64 and thus must be a
-    friend of those classes.
-
-    NB: This would all be simpler if: 1) g++ supported template friend
-    functions (without explicit listing of all the template's arguments). 2)
-    we did not have unsigned types.
-
-    T1 The type of <tt>a</tt>.
-
-    T2 The type of <tt>b</tt>.
-
-    C A class which implements the policy used for comparing <tt>a</tt>
-    and <tt>b</tt>.
-
-    @param a The first argument.
-    @param b The second argument.
-    @param op The relational operator.
-    @see Byte::ops */
+ This class is one implementation of the comparison policy used by
+ rops.
 
-template<class T1, class T2, class C>
-bool rops(T1 a, T2 b, int op)
+ @see rops */
+template<class T1, class T2>
+bool StrCmp(int op, T1 v1, T2 v2)
 {
     switch (op) {
-    case SCAN_EQUAL:
-        return C::eq(a, b);
-    case SCAN_NOT_EQUAL:
-        return C::ne(a, b);
-    case SCAN_GREATER:
-        return C::gr(a, b);
-    case SCAN_GREATER_EQL:
-        return C::ge(a, b);
-    case SCAN_LESS:
-        return C::lt(a, b);
-    case SCAN_LESS_EQL:
-        return C::le(a, b);
-    case SCAN_REGEXP:
-        return C::re(a, b);
-    default:
-        cerr << "Unknown operator" << endl;
-        return false;
+        case SCAN_EQUAL:
+            return v1 == v2;
+        case SCAN_NOT_EQUAL:
+            return v1 != v2;
+        case SCAN_GREATER:
+            return v1 > v2;
+        case SCAN_GREATER_EQL:
+            return v1 >= v2;
+        case SCAN_LESS:
+            return v1 < v2;
+        case SCAN_LESS_EQL:
+            return v1 <= v2;
+        case SCAN_REGEXP: {
+            Regex r(v2.c_str());
+            return r.match(v1.c_str(), v1.length()) > 0;
+        }
+        default:
+            throw Error("Unrecognized operator.");
     }
 }
 
diff --git a/PipeResponse.h b/PipeResponse.h
index bb720fc..2e148d7 100644
--- a/PipeResponse.h
+++ b/PipeResponse.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/RCReader.cc b/RCReader.cc
index 780f7b2..e04b165 100644
--- a/RCReader.cc
+++ b/RCReader.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/RCReader.h b/RCReader.h
index 8df3492..7adef35 100644
--- a/RCReader.h
+++ b/RCReader.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/README b/README
index a34d4ac..2118519 100644
--- a/README
+++ b/README
@@ -1,3 +1,17 @@
+Updated for version 3.12.0
+
+The server functions have been moved out of libdap and into their own 
+BES module. Currently this modules is part of the BES, but that will change
+in the future. This version of libdap supports building very large arrays
+made up of constant value (e.g., to be used as masks in server functions
+you write). 
+
+For information on the way to make these functions, see:
+http://docs.opendap.org/index.php/Expanded_arguments_for_Constraint_Expressions 
+Note that this version of libdap requries bison 2.4. This is a change so
+the parsers can use C++ I/O streams and we can eventually drop the FILE*
+interfaces.
+
 Updated for version 3.11.7
 
 Minor tweak for the server function caching code: turn on or off the 
@@ -420,7 +434,7 @@ simultaneous and/or overlapping calls to a single copy of libdap. If
 several threads are part of a program and each will make calls to
 libdap, either those threads must synchronize their calls or arrange
 to each use their own copy of libdap.  Some aspects of the library
-''are'' thread-safe: the singleton classes are all protected as is the
+are thread-safe: the singleton classes are all protected as is the
 HTTP cache (which uses the local file system).
 
 INSTALLATION INSTRUCTIONS
diff --git a/RValue.cc b/RValue.cc
index adbe583..bf8dab6 100644
--- a/RValue.cc
+++ b/RValue.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -37,7 +37,7 @@
 #include "config.h"
 
 static char rcsid[] not_used =
-    {"$Id: RValue.cc 24281 2011-03-09 00:22:31Z jimg $"
+    {"$Id: RValue.cc 27197 2013-10-01 21:29:54Z jimg $"
     };
 
 #include <cassert>
@@ -109,15 +109,17 @@ build_btp_args(rvalue_list *args, DDS &dds)
         for (rvalue::Args_iter i = args->begin(); i != args->end() && index
                 < argc + 1; ++i)
             argv[index++] = (*i)->bvalue(dds);
+
+        argv[index] = 0; // Add the null terminator.
     }
 
     if (index != argc) {
         delete[] argv;
         throw InternalErr(__FILE__, __LINE__, "index out of range.");
     }
-
+#if 0
     argv[index] = 0; // Add the null terminator.
-
+#endif
     return argv;
 }
 
diff --git a/RValue.h b/RValue.h
index 5175e72..825fa35 100644
--- a/RValue.h
+++ b/RValue.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -68,6 +68,14 @@ typedef std::vector<rvalue *> rvalue_list;
 typedef std::vector<rvalue *>::const_iterator rvalue_list_citer ;
 typedef std::vector<rvalue *>::iterator rvalue_list_iter ;
 
+typedef std::vector<dods_byte> *byte_arg_list;
+typedef std::vector<dods_int16> *int16_arg_list;
+typedef std::vector<dods_uint16> *uint16_arg_list;
+typedef std::vector<dods_int32> *int32_arg_list;
+typedef std::vector<dods_uint32> *uint32_arg_list;
+typedef std::vector<dods_float32> *float32_arg_list;
+typedef std::vector<dods_float64> *float64_arg_list;
+
 rvalue_list *make_rvalue_list(rvalue *rv);
 rvalue_list *append_rvalue_list(rvalue_list *rvals, rvalue *rv);
 
diff --git a/Resource.h b/Resource.h
index 96389fd..77478db 100644
--- a/Resource.h
+++ b/Resource.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Response.h b/Response.h
index aaa96f2..7fd1549 100644
--- a/Response.h
+++ b/Response.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/ResponseBuilder.cc b/ResponseBuilder.cc
deleted file mode 100644
index ed5bc6d..0000000
--- a/ResponseBuilder.cc
+++ /dev/null
@@ -1,1507 +0,0 @@
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2011 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-#include "config.h"
-
-#include <signal.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <uuid/uuid.h>  // used to build CID header value for data ddx
-
-#ifndef WIN32
-#include <sys/wait.h>
-#else
-#include <io.h>
-#include <fcntl.h>
-#include <process.h>
-#endif
-
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <fstream>
-
-#include <cstring>
-#include <ctime>
-
-//#define DODS_DEBUG
-
-#if 0
-//FIXME
-#include "BaseType.h"
-#include "Array.h"
-#include "Grid.h"
-#endif
-#include "DAS.h"
-#include "DDS.h"
-//#include "Connect.h"
-//#include "Response.h"
-#include "DDXParserSAX2.h"
-#include "Ancillary.h"
-#include "ResponseBuilder.h"
-#include "XDRStreamMarshaller.h"
-#include "XDRFileUnMarshaller.h"
-
-#include "DAPCache3.h"
-
-#include "debug.h"
-#include "mime_util.h"	// for last_modified_time() and rfc_822_date()
-#include "escaping.h"
-#include "util.h"
-
-#ifndef WIN32
-#include "SignalHandler.h"
-#include "EventHandler.h"
-#include "AlarmHandler.h"
-#endif
-
-#define CRLF "\r\n"             // Change here, expr-test.cc
-#define FUNCTION_CACHE "/tmp/dap_functions_cache/"
-#define FUNCTION_CACHE_PREFIX "f"
-// Cache size in megabytes; 20,000M -> 20GB
-#define FUNCTION_CACHE_SIZE 20000
-
-using namespace std;
-
-namespace libdap {
-
-ResponseBuilder::~ResponseBuilder() {
-}
-
-/** Called when initializing a ResponseBuilder that's not going to be passed a
- command line arguments. */
-void ResponseBuilder::initialize() {
-    // Set default values. Don't use the C++ constructor initialization so
-    // that a subclass can have more control over this process.
-    d_dataset = "";
-    d_ce = "";
-    d_btp_func_ce = "";
-    d_timeout = 0;
-
-    d_default_protocol = DAP_PROTOCOL_VERSION;
-
-    // Cache size is given in megabytes and later converted to bytes
-    // for internal use.
-    d_cache = 0;
-
-    // Without this, the directory becomes a low-budget config param since
-    // the cache will only be used if the directory exists.
-    // TODO fix this mess by adding a real config param in bes.conf
-#if 0
-    if (!dir_writable(FUNCTION_CACHE))
-        mkdir(FUNCTION_CACHE, 0777);
-#endif
-
-    if (dir_exists(FUNCTION_CACHE)) {
-        DBG(cerr << "the FUNCTION_CACHE directory (" << FUNCTION_CACHE <<") exists" << endl);
-        d_cache = DAPCache3::get_instance(FUNCTION_CACHE, FUNCTION_CACHE_PREFIX, FUNCTION_CACHE_SIZE);
-    }
-    else {
-        DBG(cerr << "the FUNCTION_CACHE directory (" << FUNCTION_CACHE <<") does not exist - not caching" << endl);
-    }
-
-#ifdef WIN32
-    //  We want serving from win32 to behave in a manner
-    //  similar to the UNIX way - no CR->NL terminated lines
-    //  in files. Hence stdout goes to binary mode.
-    _setmode(_fileno(stdout), _O_BINARY);
-#endif
-}
-
-/** Return the entire constraint expression in a string.  This
- includes both the projection and selection clauses, but not the
- question mark.
-
- @brief Get the constraint expression.
- @return A string object that contains the constraint expression. */
-string ResponseBuilder::get_ce() const {
-    return d_ce;
-}
-
-void ResponseBuilder::set_ce(string _ce) {
-    d_ce = www2id(_ce, "%", "%20");
-}
-
-/** The ``dataset name'' is the filename or other string that the
- filter program will use to access the data. In some cases this
- will indicate a disk file containing the data.  In others, it
- may represent a database query or some other exotic data
- access method.
-
- @brief Get the dataset name.
- @return A string object that contains the name of the dataset. */
-string ResponseBuilder::get_dataset_name() const {
-    return d_dataset;
-}
-
-void ResponseBuilder::set_dataset_name(const string ds) {
-    d_dataset = www2id(ds, "%", "%20");
-}
-
-/** Set the server's timeout value. A value of zero (the default) means no
- timeout.
-
- @param t Server timeout in seconds. Default is zero (no timeout). */
-void ResponseBuilder::set_timeout(int t) {
-    d_timeout = t;
-}
-
-/** Get the server's timeout value. */
-int ResponseBuilder::get_timeout() const {
-    return d_timeout;
-}
-
-/** Use values of this instance to establish a timeout alarm for the server.
- If the timeout value is zero, do nothing.
-
- @todo When the alarm handler is called, two CRLF pairs are dumped to the
- stream and then an Error object is sent. No attempt is made to write the
- 'correct' MIME headers for an Error object. Instead, a savvy client will
- know that when an exception is thrown during a deserialize operation, it
- should scan ahead in the input stream for an Error object. Add this, or a
- sensible variant once libdap++ supports reliable error delivery. Dumb
- clients will never get the Error object... */
-void ResponseBuilder::establish_timeout(ostream &stream) const {
-#ifndef WIN32
-    if (d_timeout > 0) {
-        SignalHandler *sh = SignalHandler::instance();
-        EventHandler *old_eh = sh->register_handler(SIGALRM, new AlarmHandler(stream));
-        delete old_eh;
-        alarm(d_timeout);
-    }
-#endif
-}
-
-/**
- *  Split the CE so that the server functions that compute new values are
- *  separated into their own string and can be evaluated separately from
- *  the rest of the CE (which can contain simple and slicing projection
- *  as well as other types of function calls).
- *
- */
-void
-ResponseBuilder::split_ce(ConstraintEvaluator &eval, const string &expr)
-{
-    string ce;
-    if (!expr.empty())
-        ce = expr;
-    else
-        ce = d_ce;
-
-    string btp_function_ce = "";
-    string::size_type pos = 0;
-    DBG(cerr << "ce: " << ce << endl);
-
-    string::size_type first_paren = ce.find("(", pos);
-    string::size_type closing_paren = ce.find(")", pos);
-    while (first_paren != string::npos && closing_paren != string::npos) {
-        // Maybe a BTP function; get the name of the potential function
-        string name = ce.substr(pos, first_paren-pos);
-        DBG(cerr << "name: " << name << endl);
-        // is this a BTP function
-        btp_func f;
-        if (eval.find_function(name, &f)) {
-            // Found a BTP function
-            if (!btp_function_ce.empty())
-                btp_function_ce += ",";
-            btp_function_ce += ce.substr(pos, closing_paren+1-pos);
-            ce.erase(pos, closing_paren+1-pos);
-            if (ce[pos] == ',')
-                ce.erase(pos, 1);
-        }
-        else {
-            pos = closing_paren + 1;
-            // exception?
-            if (pos < ce.length() && ce.at(pos) == ',')
-                ++pos;
-        }
-
-        first_paren = ce.find("(", pos);
-        closing_paren = ce.find(")", pos);
-    }
-
-    DBG(cerr << "Modified constraint: " << ce << endl);
-    DBG(cerr << "BTP Function part: " << btp_function_ce << endl);
-
-    d_ce = ce;
-    d_btp_func_ce = btp_function_ce;
-}
-
-/**
- * Use the dataset name and the function-part of the CE to build a name
- * that can be used to index the result of that CE on the dataset. This
- * name can be used both to store a result for later (re)use or to access
- * a previously-stored result.
- *
- */
-static string
-build_cache_file_name(const string &dataset, const string &ce)
-{
-    DBG(cerr << "build_cache_file_name: dataset: " << dataset << ", ce: " << ce << endl);
-
-    string name = dataset + "#" + ce;
-    string::size_type pos = name.find_first_of("/(),\"\'");
-    while (pos != string::npos) {
-        name.replace(pos, 1, "#", 1);
-        pos = name.find_first_of("/()\"\'");
-    }
-
-    DBG(cerr << "build_cache_file_name: name: " << name << endl);
-
-    return name;
-}
-
-#if 0
-static bool cached_data_ddx_exists(const string &cache_file_name)
-{
-    ifstream icache_file(cache_file_name.c_str()); // closes on return
-
-    return !icache_file.fail() && !icache_file.bad() && !icache_file.eof();
-}
-#endif
-/**
- * Is the item named by cache_entry_name valid? This code tests that the
- * cache entry is non-zero in size (returns false if that is the case, although
- * that might not be correct) and that the dataset associated with this
- * ResponseBulder instance is at least as old as the cached entry.
- *
- * @param cache_file_name File name of the cached entry
- * @return True if the thing is valid, false otherwise.
- */
-bool ResponseBuilder::is_valid(const string &cache_file_name)
-{
-    // If the cached response is zero bytes in size, it's not valid.
-    // (hmmm...)
-
-    off_t entry_size = 0;
-    time_t entry_time = 0;
-    struct stat buf;
-    if (stat(cache_file_name.c_str(), &buf) == 0) {
-        entry_size = buf.st_size;
-        entry_time = buf.st_mtime;
-    }
-    else {
-        return false;
-    }
-
-    if (entry_size == 0)
-        return false;
-
-    time_t dataset_time = entry_time;
-    if (stat(d_dataset.c_str(), &buf) == 0) {
-        dataset_time = buf.st_mtime;
-    }
-
-    // Trick: if the d_dataset is not a file, stat() returns error and
-    // the times stay equal and the code uses the cache entry.
-
-    // TODO Fix this so that the code can get a LMT from the correct
-    // handler.
-    if (dataset_time > entry_time)
-        return false;
-
-    return true;
-}
-
-/**
- * Get the cache DDS pointer - which will contain both attributes
- * and data values.
- *
- * @note Do not call this when d_cache is null or when d_btp_func_ce
- * is empty!
- *
- * @param dds The DDS of the dataset referenced by the URL
- * @return The cached DDS that resulted from calling the server functions
- * in the original CE.
- * @param cache_token A value-result parameter that contains teh name of
- * the file in the cache. Used to release the lock on the cached file.
- */
-DDS *ResponseBuilder::read_cached_dataset(DDS &dds, ConstraintEvaluator &eval,
-                                          string &cache_token)
-{
-    DBG(cerr << "Found function(s) in CE: " << d_btp_func_ce << endl);
-
-    // These are used for the cached or newly created DDS object
-    BaseTypeFactory factory;
-    DDS *fdds;
-
-    // Get the cache filename for this thing. Do not use the default
-    // name mangling; instead use what build_cache_file_name() does.
-    string cache_file_name = d_cache->get_cache_file_name(build_cache_file_name(d_dataset, d_btp_func_ce), false);
-    int fd;
-    try {
-        // If the object in the cache is not valid, remove it. The read_lock will
-        // then fail and the code will drop down to the create_and_lock() call.
-        // is_valid() tests for a non-zero object and for d_dateset newer than
-        // the cached object.
-        if (!is_valid(cache_file_name))
-            d_cache->purge_file(cache_file_name);
-
-        if (d_cache->get_read_lock(cache_file_name, fd)) {
-            DBG(cerr << "function ce - cached hit: " << cache_file_name << endl );
-            fdds = get_cached_data_ddx(cache_file_name, &factory);
-        }
-
-        // If here, the cache_file_name could not be locked for read access;
-        // try to build it. First make an empty file and get an exclusive lock on it.
-        // TODO Make this an 'else if'?
-        if (d_cache->create_and_lock(cache_file_name, fd)) {
-            DBG(cerr << "function ce - caching " << cache_file_name << endl );
-
-            eval.parse_constraint(d_btp_func_ce, dds);
-            fdds = eval.eval_function_clauses(dds);
-
-            // TODO cache it using fd. Since this is advisory locking, this will work...
-            // Improve?
-            cache_data_ddx(cache_file_name, *fdds);
-
-            // Change the exclusive lock on the new file to a shared lock. This keeps
-            // other processes from purging the new file and ensures that the reading
-            // process can use it.
-            d_cache->exclusive_to_shared_lock(fd);
-
-            // Now update the total cache size info and purge if needed. The new file's
-            // name is passed into the purge method because this process cannot detect its
-            // own lock on the file.
-            unsigned long long size = d_cache->update_cache_info(cache_file_name);
-            if (d_cache->cache_too_big(size))
-                d_cache->update_and_purge(cache_file_name);
-        }
-        // get_read_lock() returns immediately if the file does not exist,
-        // but blocks waiting to get a shared lock if the file does exist.
-        else if (d_cache->get_read_lock(cache_file_name, fd)) {
-            DBG(cerr << "function ce - cached hit: " << cache_file_name << endl );
-            fdds = get_cached_data_ddx(cache_file_name, &factory);
-        }
-        else {
-            throw InternalErr(__FILE__, __LINE__, "Cache error during function invocation.");
-        }
-    }
-    catch (...) {
-        DBG(cerr << "caught exception, unlocking cache and re-throw." << endl );
-        // I think this call is not needed. jhrg 10/23/12
-        d_cache->unlock_cache();
-        throw;
-    }
-
-    cache_token = cache_file_name;  // Set this value-result parameter
-    return fdds;
-}
-
-/** This function formats and prints an ASCII representation of a
- DAS on stdout.  This has the effect of sending the DAS object
- back to the client program.
-
- @brief Transmit a DAS.
- @param out The output stream to which the DAS is to be sent.
- @param das The DAS object to be sent.
- @param with_mime_headers If true (the default) send MIME headers.
- @return void
- @see DAS */
-void ResponseBuilder::send_das(ostream &out, DAS &das, bool with_mime_headers)
-{
-    if (with_mime_headers)
-        set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), "2.0");
-
-    das.print(out);
-
-    out << flush;
-}
-
-/** This function formats and prints an ASCII representation of a
- DAS on stdout.  This has the effect of sending the DAS object
- back to the client program. This version of send_das() uses the
- DDS object (and assumes it's populated with attributes). If the
- request contains a CE, that's fine and if the request has been
- cached, it will read the DDS from the cache.
-
- @todo Test me! Modify the BES to use this code!!
-
- @brief Transmit a DAS using the DDS.
- @param out The output stream to which the DAS is to be sent.
- @param das The DAS object to be sent.
- @param with_mime_headers If true (the default) send MIME headers.
- @return void
- @see DAS */
-void ResponseBuilder::send_das(ostream &out, DDS &dds, ConstraintEvaluator &eval, bool constrained,
-                               bool with_mime_headers)
-{
-    // Set up the alarm.
-    establish_timeout(out);
-    dds.set_timeout(d_timeout);
-
-    if (!constrained) {
-        if (with_mime_headers)
-            set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), "2.0");
-
-        dds.print_das(out);
-        out << flush;
-
-        return;
-    }
-
-    split_ce(eval);
-
-    // If there are functions, parse them and eval.
-    // Use that DDS and parse the non-function ce
-    // Serialize using the second ce and the second dds
-    if (!d_btp_func_ce.empty()) {
-#if 0
-        DBG(cerr << "Found function(s) in CE: " << d_btp_func_ce << endl);
-
-        // These are used for the cached or newly created DDS object
-        BaseTypeFactory factory;
-        DDS *fdds;
-
-        // Get the cache filename for this thing. Do not use the default
-        // name mangling; instead use what build_cache_file_name() does.
-        string cache_file_name = d_cache->get_cache_file_name(build_cache_file_name(d_dataset, d_btp_func_ce), false);
-        int fd;
-        try {
-            // If the object in the cache is not valid, remove it. The read_lock will
-            // then fail and the code will drop down to the create_and_lock() call.
-            // is_valid() tests for a non-zero object and for d_dateset newer than
-            // the cached object.
-            if (!is_valid(cache_file_name))
-                d_cache->purge_file(cache_file_name);
-
-            if (d_cache->get_read_lock(cache_file_name, fd)) {
-                DBG(cerr << "function ce - cached hit: " << cache_file_name << endl );
-                fdds = get_cached_data_ddx(cache_file_name, &factory);
-            }
-
-            // If here, the cache_file_name could not be locked for read access;
-            // try to build it. First make an empty file and get an exclusive lock on it.
-            // TODO Make this an 'else if'?
-            if (d_cache->create_and_lock(cache_file_name, fd)) {
-                DBG(cerr << "function ce - caching " << cache_file_name << endl );
-
-                eval.parse_constraint(d_btp_func_ce, dds);
-                fdds = eval.eval_function_clauses(dds);
-
-                // TODO cache it using fd. Since this is advisory locking, this will work...
-                // Improve?
-                cache_data_ddx(cache_file_name, *fdds);
-
-                // Change the exclusive lock on the new file to a shared lock. This keeps
-                // other processes from purging the new file and ensures that the reading
-                // process can use it.
-                d_cache->exclusive_to_shared_lock(fd);
-
-                // Now update the total cache size info and purge if needed. The new file's
-                // name is passed into the purge method because this process cannot detect its
-                // own lock on the file.
-                unsigned long long size = d_cache->update_cache_info(cache_file_name);
-                if (d_cache->cache_too_big(size))
-                    d_cache->update_and_purge(cache_file_name);
-            }
-            else if (d_cache->get_read_lock(cache_file_name, fd)) {
-                DBG(cerr << "function ce - cached hit: " << cache_file_name << endl );
-                fdds = get_cached_data_ddx(cache_file_name, &factory);
-            }
-            else {
-                throw InternalErr(__FILE__, __LINE__, "Cache error during function invocation.");
-            }
-        }
-        catch (...) {
-            DBG(cerr << "caught exception, unlocking cache and re-throw." << endl );
-            // I think this call is not needed. jhrg 10/23/12
-            d_cache->unlock_cache();
-            throw;
-        }
-#endif
-        DDS *fdds = 0;
-        string cache_token = "";
-
-        if (d_cache) {
-            DBG(cerr << "Using the cache for the server function CE" << endl);
-            fdds = read_cached_dataset(dds, eval, cache_token);
-        }
-        else {
-            DBG(cerr << "Cache not found; (re)calculating" << endl);
-            eval.parse_constraint(d_btp_func_ce, dds);
-            fdds = eval.eval_function_clauses(dds);
-        }
-
-        if (with_mime_headers)
-            set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-        fdds->print_das(out);
-
-        if (d_cache)
-            d_cache->unlock_and_close(cache_token);
-
-        delete fdds;
-    }
-    else {
-        DBG(cerr << "Simple constraint" << endl);
-
-        eval.parse_constraint(d_ce, dds); // Throws Error if the ce doesn't parse.
-
-        if (with_mime_headers)
-            set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-        dds.print_das(out);
-    }
-
-    out << flush;
-}
-
-/** This function formats and prints an ASCII representation of a
- DDS on stdout. Either an entire DDS or a constrained DDS may be sent.
- This function looks in the local cache and uses a DDS object there
- if it's valid. Otherwise, if the request CE contains server functions
- that build data for the response, the resulting DDS will be cached.
-
- @brief Transmit a DDS.
- @param out The output stream to which the DAS is to be sent.
- @param dds The DDS to send back to a client.
- @param eval A reference to the ConstraintEvaluator to use.
- @param constrained If this argument is true, evaluate the
- current constraint expression and send the `constrained DDS'
- back to the client.
- @param anc_location The directory in which the external DAS file resides.
- @param with_mime_headers If true (the default) send MIME headers.
- @return void
- @see DDS */
-void ResponseBuilder::send_dds(ostream &out, DDS &dds, ConstraintEvaluator &eval, bool constrained,
-                               bool with_mime_headers)
-{
-    if (!constrained) {
-        if (with_mime_headers)
-            set_mime_text(out, dods_dds, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-        dds.print(out);
-        out << flush;
-        return;
-    }
-
-    // Set up the alarm.
-    establish_timeout(out);
-    dds.set_timeout(d_timeout);
-
-    // Split constraint into two halves
-    split_ce(eval);
-
-    // If there are functions, parse them and eval.
-    // Use that DDS and parse the non-function ce
-    // Serialize using the second ce and the second dds
-    if (!d_btp_func_ce.empty()) {
-#if 0
-        DBG(cerr << "Found function(s) in CE: " << d_btp_func_ce << endl);
-
-        // These are used for the cached or newly created DDS object
-        BaseTypeFactory factory;
-        DDS *fdds;
-
-        // Get the cache filename for this thing. Do not use the default
-        // name mangling; instead use what build_cache_file_name() does.
-        string cache_file_name = d_cache->get_cache_file_name(build_cache_file_name(d_dataset, d_btp_func_ce), false);
-        int fd;
-        try {
-            // If the object in the cache is not valid, remove it. The read_lock will
-            // then fail and the code will drop down to the create_and_lock() call.
-            // is_valid() tests for a non-zero object and for d_dateset newer than
-            // the cached object.
-            if (!is_valid(cache_file_name))
-                d_cache->purge_file(cache_file_name);
-
-            if (d_cache->get_read_lock(cache_file_name, fd)) {
-                DBG(cerr << "function ce - cached hit: " << cache_file_name << endl );
-                fdds = get_cached_data_ddx(cache_file_name, &factory);
-            }
-
-            // If here, the cache_file_name could not be locked for read access;
-            // try to build it. First make an empty file and get an exclusive lock on it.
-            if (d_cache->create_and_lock(cache_file_name, fd)) {
-                DBG(cerr << "function ce - caching " << cache_file_name << endl );
-
-                eval.parse_constraint(d_btp_func_ce, dds);
-                fdds = eval.eval_function_clauses(dds);
-
-                // TODO cache it using fd. Since this is advisory locking, this will work...
-                // Improve?
-                cache_data_ddx(cache_file_name, *fdds);
-
-                // Change the exclusive lock on the new file to a shared lock. This keeps
-                // other processes from purging the new file and ensures that the reading
-                // process can use it.
-                d_cache->exclusive_to_shared_lock(fd);
-
-                // Now update the total cache size info and purge if needed. The new file's
-                // name is passed into the purge method because this process cannot detect its
-                // own lock on the file.
-                unsigned long long size = d_cache->update_cache_info(cache_file_name);
-                if (d_cache->cache_too_big(size))
-                    d_cache->update_and_purge(cache_file_name);
-            }
-            else if (d_cache->get_read_lock(cache_file_name, fd)) {
-                    DBG(cerr << "function ce - cached hit: " << cache_file_name << endl );
-                    fdds = get_cached_data_ddx(cache_file_name, &factory);
-            }
-            else {
-                throw InternalErr(__FILE__, __LINE__, "Cache error during function invocation.");
-            }
-        }
-        catch (...) {
-            DBG(cerr << "caught exception, unlocking cache and re-throw." << endl );
-            // I think this call is not needed. jhrg 10/23/12
-            d_cache->unlock_cache();
-            throw;
-        }
-#endif
-        string cache_token = "";
-        DDS *fdds = 0;
-
-        if (d_cache) {
-            DBG(cerr << "Using the cache for the server function CE" << endl);
-            fdds = read_cached_dataset(dds, eval, cache_token);
-        }
-        else {
-            DBG(cerr << "Cache not found; (re)calculating" << endl);
-            eval.parse_constraint(d_btp_func_ce, dds);
-            fdds = eval.eval_function_clauses(dds);
-        }
-
-        // Server functions might mark variables to use their read()
-        // methods. Clear that so the CE in d_ce will control what is
-        // sent. If that is empty (there was only a function call) all
-        // of the variables in the intermediate DDS (i.e., the function
-        // result) will be sent.
-        fdds->mark_all(false);
-
-        eval.parse_constraint(d_ce, *fdds);
-
-        if (with_mime_headers)
-            set_mime_text(out, dods_dds, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-        fdds->print_constrained(out);
-
-        if (d_cache)
-            d_cache->unlock_and_close(cache_token);
-
-        delete fdds;
-    }
-    else {
-        DBG(cerr << "Simple constraint" << endl);
-
-        eval.parse_constraint(d_ce, dds); // Throws Error if the ce doesn't parse.
-
-        if (with_mime_headers)
-            set_mime_text(out, dods_dds, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-        dds.print_constrained(out);
-    }
-
-    out << flush;
-}
-
-void ResponseBuilder::dataset_constraint(ostream &out, DDS & dds, ConstraintEvaluator & eval, bool ce_eval) const {
-    // send constrained DDS
-    DBG(cerr << "Inside dataset_constraint" << endl);
-    dds.print_constrained(out);
-    out << "Data:\n";
-    out << flush;
-#ifdef CHECKSUMS
-    // Grab a stream that encodes using XDR.
-    XDRStreamMarshaller m(out, true, true);
-#else
-    XDRStreamMarshaller m(out, false, true);
-#endif
-    DBG(cerr << "Built stream encoder" << endl);
-    try {
-        // Send all variables in the current projection (send_p())
-        for (DDS::Vars_iter i = dds.var_begin(); i != dds.var_end(); i++)
-            if ((*i)->send_p()) {
-                DBG(cerr << "Sending " << (*i)->name() << endl);
-#ifdef CHECKSUMS
-                if ((*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
-                    m.reset_checksum();
-
-                (*i)->serialize(eval, dds, m, ce_eval);
-
-                if ((*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
-                    cerr << (*i)->name() << ": " << m.get_checksum() << endl;
-#else
-                (*i)->serialize(eval, dds, m, ce_eval);
-#endif
-            }
-    }
-    catch (Error & e) {
-        throw;
-    }
-}
-
-void ResponseBuilder::dataset_constraint_ddx(ostream &out, DDS & dds, ConstraintEvaluator & eval, const string &boundary, const string &start, bool ce_eval) const
-{
-    // Write the MPM headers for the DDX (text/xml) part of the response
-    set_mime_ddx_boundary(out, boundary, start, dap4_ddx);
-
-    // Make cid
-    uuid_t uu;
-    uuid_generate(uu);
-    char uuid[37];
-    uuid_unparse(uu, &uuid[0]);
-    char domain[256];
-    if (getdomainname(domain, 255) != 0 || strlen(domain) == 0)
-        strncpy(domain, "opendap.org", 255);
-
-    string cid = string(&uuid[0]) + "@" + string(&domain[0]);
-
-    // Send constrained DDX with a data blob reference
-    dds.print_xml(out, true, cid);
-
-    // Write the MPM headers for the data part of the response.
-    set_mime_data_boundary(out, boundary, cid, dap4_data, binary);
-
-    // Grab a stream that encodes using XDR.
-    XDRStreamMarshaller m(out);
-
-    // TODO Remove useless try/catch
-    try {
-        // Send all variables in the current projection (send_p())
-        for (DDS::Vars_iter i = dds.var_begin(); i != dds.var_end(); i++) {
-            if ((*i)->send_p()) {
-                DBG(cerr << "Sending " << (*i)->name() << endl);
-                (*i)->serialize(eval, dds, m, ce_eval);
-            }
-        }
-    }
-    catch (Error & e) {
-        throw;
-    }
-}
-
-/** Send the data in the DDS object back to the client program. The data is
- encoded using a Marshaller, and enclosed in a MIME document which is all sent
- to \c data_stream. If this is being called from a CGI, \c data_stream is
- probably \c stdout and writing to it has the effect of sending the
- response back to the client.
-
- @brief Transmit data.
- @param dds A DDS object containing the data to be sent.
- @param eval A reference to the ConstraintEvaluator to use.
- @param data_stream Write the response to this stream.
- @param anc_location A directory to search for ancillary files (in
- addition to the CWD).  This is used in a call to
- get_data_last_modified_time().
- @param with_mime_headers If true, include the MIME headers in the response.
- Defaults to true.
- @return void */
-void ResponseBuilder::send_data(ostream & data_stream, DDS & dds, ConstraintEvaluator & eval, bool with_mime_headers)
-{
-    // Set up the alarm.
-    establish_timeout(data_stream);
-    dds.set_timeout(d_timeout);
-
-#if 0
-    eval.parse_constraint(d_ce, dds); // Throws Error if the ce doesn't parse.
-
-    dds.tag_nested_sequences(); // Tag Sequences as Parent or Leaf node.
-
-    if (dds.get_response_limit() != 0 && dds.get_request_size(true) > dds.get_response_limit()) {
-        string msg = "The Request for " + long_to_string(dds.get_request_size(true) / 1024)
-                + "KB is too large; requests for this user are limited to "
-                + long_to_string(dds.get_response_limit() / 1024) + "KB.";
-        throw Error(msg);
-    }
-#endif
-
-    // Split constraint into two halves
-    split_ce(eval);
-
-    // If there are functions, parse them and eval.
-    // Use that DDS and parse the non-function ce
-    // Serialize using the second ce and the second dds
-    if (!d_btp_func_ce.empty()) {
-        DBG(cerr << "Found function(s) in CE: " << d_btp_func_ce << endl);
-#if 0
-        // These are used for the cached or newly created DDS object
-        BaseTypeFactory factory;
-        DDS *fdds;
-
-        // Get the cache filename for this thing. Do not use the default
-        // name mangling; instead use what build_cache_file_name() does.
-        string cache_file_name = d_cache->get_cache_file_name(build_cache_file_name(d_dataset, d_btp_func_ce), false);
-        int fd;
-        try {
-            // If the object in the cache is not valid, remove it. The read_lock will
-            // then fail and the code will drop down to the create_and_lock() call.
-            // is_valid() tests for a non-zero object and for d_dateset newer than
-            // the cached object.
-            if (!is_valid(cache_file_name))
-                d_cache->purge_file(cache_file_name);
-
-            if (d_cache->get_read_lock(cache_file_name, fd)) {
-                DBG(cerr << "function ce - cached hit: " << cache_file_name << endl );
-                fdds = get_cached_data_ddx(cache_file_name, &factory);
-            }
-
-            // If here, the cache_file_name could not be locked for read access;
-            // try to build it. First make an empty file and get an exclusive lock on it.
-            if (d_cache->create_and_lock(cache_file_name, fd)) {
-                DBG(cerr << "function ce - caching " << cache_file_name << endl );
-
-                eval.parse_constraint(d_btp_func_ce, dds);
-                fdds = eval.eval_function_clauses(dds);
-
-                // TODO cache it using fd. Since this is advisory locking, this will work...
-                // Improve?
-                // Until Connect/Response support working with file descriptors, it's
-                // better to use the names.
-                cache_data_ddx(cache_file_name, *fdds);
-
-                // Change the exclusive lock on the new file to a shared lock. This keeps
-                // other processes from purging the new file and ensures that the reading
-                // process can use it.
-                d_cache->exclusive_to_shared_lock(fd);
-
-                // Now update the total cache size info and purge if needed. The new file's
-                // name is passed into the purge method because this process cannot detect its
-                // own lock on the file.
-                unsigned long long size = d_cache->update_cache_info(cache_file_name);
-                if (d_cache->cache_too_big(size))
-                    d_cache->update_and_purge(cache_file_name);
-            }
-            else if (d_cache->get_read_lock(cache_file_name, fd)) {
-                    DBG(cerr << "function ce - cached hit: " << cache_file_name << endl );
-                    fdds = get_cached_data_ddx(cache_file_name, &factory);
-            }
-            else {
-                throw InternalErr(__FILE__, __LINE__, "Cache error during function invocation.");
-            }
-        }
-        catch (...) {
-            DBG(cerr << "caught exception, unlocking cache and re-throw." << endl );
-            // I think this call is not needed. jhrg 10/23/12
-            d_cache->unlock_cache();
-            throw;
-        }
-#endif
-#if 0
-        // ******** original code here ***********
-
-        // Check to see if the cached data ddx exists and is valid
-        if (cached_data_ddx_exists(cache_file_name)) {
-            fdds = get_cached_data_ddx(cache_file_name, &factory);
-#if 0
-            // Use the cache file and don't eval the function(s)
-            DBG(cerr << "Reading cache for " << d_dataset + "?" + d_btp_func_ce << endl);
-            icache_file.close(); // only opened to see if it's there; Connect/Response do their own thing
-
-            fdds = new DDS(&factory);
-            fdds->set_dap_version("4.0"); // TODO note about cid, ...
-            // FIXME name should be...
-            fdds->filename( d_dataset ) ;
-            fdds->set_dataset_name( name_path( d_dataset ) ) ;
-
-            Connect *url = new Connect( d_dataset ) ;
-            Response *r = new Response( fopen( cache_file_name.c_str(), "r" ), 0 ) ;
-            if( !r->get_stream() )
-                throw Error("The input source: " + cache_file_name +  " could not be opened");
-
-            url->read_data( *fdds, r ) ;
-            fdds->set_factory( 0 ) ;
-
-            // mark everything as read.
-            DDS::Vars_iter i = fdds->var_begin() ;
-            DDS::Vars_iter e = fdds->var_end() ;
-            for( ; i != e; i++ ) {
-                BaseType *b = (*i) ;
-                b->set_read_p( true ) ;
-            }
-            // for_each(dds->var_begin(), dds->var_end(), mfunc(BaseType::set_read_p));
-
-            DAS *das = new DAS ;
-            Ancillary::read_ancillary_das( *das, d_dataset ) ;
-            fdds->transfer_attributes( das ) ;
-#endif
-        }
-        else {
-            eval.parse_constraint(d_btp_func_ce, dds);
-            fdds = eval.eval_function_clauses(dds);
-
-            cache_data_ddx(cache_file_name, *fdds);
-#if 0
-            // TODO cache the fdds here
-            ofstream ocache_file(cache_file_name.c_str());
-
-            DBG(cerr << "Caching " << d_dataset + "?" + d_btp_func_ce << endl);
-            cache_data_ddx(ocache_file, *fdds);
-            ocache_file.close();
-#endif
-        }
-#endif
-        string cache_token = "";
-        DDS *fdds = 0;
-
-        if (d_cache) {
-            DBG(cerr << "Using the cache for the server function CE" << endl);
-            fdds = read_cached_dataset(dds, eval, cache_token);
-        }
-        else {
-            DBG(cerr << "Cache not found; (re)calculating" << endl);
-            eval.parse_constraint(d_btp_func_ce, dds);
-            fdds = eval.eval_function_clauses(dds);
-        }
-
-        DBG(cerr << "Intermediate DDS: " << endl);
-        DBG(fdds->print_constrained(cerr));
-
-        DBG(cerr << "Parsing remaining CE: " << d_ce << endl);
-
-        // Server functions might mark variables to use their read()
-        // methods. Clear that so the CE in d_ce will control what is
-        // sent. If that is empty (there was only a function call) all
-        // of the variables in the intermediate DDS (i.e., the function
-        // result) will be sent.
-        fdds->mark_all(false);
-
-        eval.parse_constraint(d_ce, *fdds);
-
-        fdds->tag_nested_sequences(); // Tag Sequences as Parent or Leaf node.
-
-        if (fdds->get_response_limit() != 0 && fdds->get_request_size(true) > fdds->get_response_limit()) {
-            string msg = "The Request for " + long_to_string(dds.get_request_size(true) / 1024)
-                    + "KB is too large; requests for this user are limited to "
-                    + long_to_string(dds.get_response_limit() / 1024) + "KB.";
-            throw Error(msg);
-        }
-
-        if (with_mime_headers)
-            set_mime_binary(data_stream, dods_data, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-        DBG(cerr << "About to call dataset_constraint" << endl);
-        dataset_constraint(data_stream, *fdds, eval, false);
-
-        if (d_cache)
-            d_cache->unlock_and_close(cache_token);
-
-        delete fdds;
-    }
-    else {
-        DBG(cerr << "Simple constraint" << endl);
-
-        eval.parse_constraint(d_ce, dds); // Throws Error if the ce doesn't parse.
-
-        dds.tag_nested_sequences(); // Tag Sequences as Parent or Leaf node.
-
-        if (dds.get_response_limit() != 0 && dds.get_request_size(true) > dds.get_response_limit()) {
-            string msg = "The Request for " + long_to_string(dds.get_request_size(true) / 1024)
-                    + "KB is too large; requests for this user are limited to "
-                    + long_to_string(dds.get_response_limit() / 1024) + "KB.";
-            throw Error(msg);
-        }
-
-        if (with_mime_headers)
-            set_mime_binary(data_stream, dods_data, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-        dataset_constraint(data_stream, dds, eval);
-    }
-
-#if 0
-    // Start sending the response...
-
-    // Handle *functional* constraint expressions specially
-    if (eval.function_clauses()) {
-        DDS *fdds = eval.eval_function_clauses(dds);
-        if (with_mime_headers)
-            set_mime_binary(data_stream, dods_data, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-        dataset_constraint(data_stream, *fdds, eval, false);
-        delete fdds;
-    }
-    else {
-        if (with_mime_headers)
-            set_mime_binary(data_stream, dods_data, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-        dataset_constraint(data_stream, dds, eval);
-    }
-#endif
-
-    data_stream << flush;
-}
-
-/** Send the DDX response. The DDX never contains data, instead it holds a
- reference to a Blob response which is used to get the data values. The
- DDS and DAS objects are built using code that already exists in the
- servers.
-
- FIXME!!!
- @todo I am broken WRT the other code here for sending data and DDS
- responses
-
- @param dds The dataset's DDS \e with attributes in the variables.
- @param eval A reference to the ConstraintEvaluator to use.
- @param out Destination
- @param with_mime_headers If true, include the MIME headers in the response.
- Defaults to true. */
-void ResponseBuilder::send_ddx(ostream &out, DDS &dds, ConstraintEvaluator &eval, bool with_mime_headers)
-{
-    // If constrained, parse the constraint. Throws Error or InternalErr.
-    if (!d_ce.empty())
-        eval.parse_constraint(d_ce, dds);
-
-    if (eval.functional_expression())
-        throw Error("Function calls can only be used with data requests. To see the structure of the underlying data source, reissue the URL without the function.");
-
-    if (with_mime_headers)
-        set_mime_text(out, dap4_ddx, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
-
-    dds.print_xml_writer(out, !d_ce.empty(), "");
-}
-
-/** Send the data in the DDS object back to the client program. The data is
- encoded using a Marshaller, and enclosed in a MIME document which is all sent
- to \c data_stream. If this is being called from a CGI, \c data_stream is
- probably \c stdout and writing to it has the effect of sending the
- response back to the client.
-
- FIXME!!!
- @todo I am broken WRT the other code here for sending data and DDS
- responses
-
- @brief Transmit data.
- @param dds A DDS object containing the data to be sent.
- @param eval A reference to the ConstraintEvaluator to use.
- @param data_stream Write the response to this stream.
- @param anc_location A directory to search for ancillary files (in
- addition to the CWD).  This is used in a call to
- get_data_last_modified_time().
- @param with_mime_headers If true, include the MIME headers in the response.
- Defaults to true.
- @return void */
-void ResponseBuilder::send_data_ddx(ostream & data_stream, DDS & dds, ConstraintEvaluator & eval, const string &start, const string &boundary, bool with_mime_headers)
-{
-
-    // Set up the alarm.
-    establish_timeout(data_stream);
-    dds.set_timeout(d_timeout);
-
-    eval.parse_constraint(d_ce, dds); // Throws Error if the ce doesn't parse.
-
-    if (dds.get_response_limit() != 0 && dds.get_request_size(true) > dds.get_response_limit()) {
-        string msg = "The Request for " + long_to_string(dds.get_request_size(true) / 1024) + "KB is too large; requests for this user are limited to " + long_to_string(
-                dds.get_response_limit() / 1024) + "KB.";
-        throw Error(msg);
-    }
-
-    dds.tag_nested_sequences(); // Tag Sequences as Parent or Leaf node.
-
-    // Start sending the response...
-
-    // Handle *functional* constraint expressions specially
-    if (eval.function_clauses()) {
-        DDS *fdds = eval.eval_function_clauses(dds);
-        if (with_mime_headers)
-            set_mime_multipart(data_stream, boundary, start, dap4_data_ddx, x_plain, last_modified_time(d_dataset));
-        data_stream << flush;
-        // TODO: Change this to dataset_constraint_ddx()
-        dataset_constraint(data_stream, *fdds, eval, false);
-        delete fdds;
-    }
-    else {
-        if (with_mime_headers)
-            set_mime_multipart(data_stream, boundary, start, dap4_data_ddx, x_plain, last_modified_time(d_dataset));
-        data_stream << flush;
-        dataset_constraint_ddx(data_stream, dds, eval, boundary, start);
-    }
-
-    data_stream << flush;
-
-    if (with_mime_headers)
-        data_stream << CRLF << "--" << boundary << "--" << CRLF;
-}
-
-/** Write a DDS to an output stream. This method is intended to be used
-    to write to a cache so that interim results can be reused w/o needing
-    to be recomputed. I chose the 'data ddx' response because it combines
-    the syntax and semantic metadata along with the data and all
-    three DAP2 requests can be satisfied using it.
-
-    @brief Cache data.
-
-    @param cache_file_name Put the data here
-    @param dds A DDS object containing the data to be sent.
-    @return void */
-
-void ResponseBuilder::cache_data_ddx(const string &cache_file_name, DDS &dds)
-{
-    DBG(cerr << "Caching " << d_dataset + "?" + d_btp_func_ce << endl);
-
-    ofstream data_stream(cache_file_name.c_str());
-    // Test for a valid file open
-
-    string start="dataddx_cache_start", boundary="dataddx_cache_boundary";
-#if 1
-    // Does this really need the full set of MIME headers? Not including these
-    // might make it comparible with the dapreader module in the BES.
-    set_mime_multipart(data_stream, boundary, start, dap4_data_ddx, x_plain, last_modified_time(d_dataset));
-    data_stream << flush;
-#endif
-
-    // dataset_constraint_ddx() needs a ConstraintEvaluator because
-    // it calls serialize().
-    ConstraintEvaluator eval;
-
-    // Setting the DDS version to 3.2 causes the print_xml() code
-    // to write out a 'blob' element with a valid cid. The reader
-    // code in Connect needs this (or thinks it does...)
-    dds.set_dap_version("3.2");
-
-    dataset_constraint_ddx(data_stream, dds, eval, boundary, start);
-    data_stream << flush;
-
-    data_stream << CRLF << "--" << boundary << "--" << CRLF;
-    data_stream.close();
-}
-
-/**
- * Read the data from the saved response document.
- *
- * @note this method is made of code copied from Connect (process_data(0)
- * but this copy assumes ot is reading a DDX with data written using the
- * code in ResponseBuilder::cache_data_ddx().
- *
- * @note I put this code here instead of using what was in Connect because
- * I did not want all of the handlers to be modified to inlcude libdapclient
- * and thus libcurl and libuuid.
- *
- * @todo Maybe move this code into libdap as a general 'get it from
- * disk' method. Use that code in libdapclient.
- *
- * @param data The input stream
- * @parma fdds Load this DDS object with the variables, attributes and
- * data values from the cached DDS.
- */
-void ResponseBuilder::read_data_from_cache(FILE *data, DDS *fdds)
-{
-    // Rip off the MIME headers from the response if they are present
-    string mime = get_next_mime_header(data);
-    while (!mime.empty()) {
-#if 0
-        string header, value;
-        parse_mime_header(mime, header, value);
-#endif
-        mime = get_next_mime_header(data);
-    }
-
-    // Parse the DDX; throw an exception on error.
-    DDXParser ddx_parser(fdds->get_factory());
-
-    // Read the MPM boundary and then read the subsequent headers
-    string boundary = read_multipart_boundary(data);
-    DBG(cerr << "MPM Boundary: " << boundary << endl);
-
-    read_multipart_headers(data, "text/xml", dap4_ddx);
-
-    // Parse the DDX, reading up to and including the next boundary.
-    // Return the CID for the matching data part
-    string data_cid;
-    ddx_parser.intern_stream(data, fdds, data_cid, boundary);
-
-    // Munge the CID into something we can work with
-    data_cid = cid_to_header_value(data_cid);
-    DBG(cerr << "Data CID: " << data_cid << endl);
-
-    // Read the data part's MPM part headers (boundary was read by
-    // DDXParse::intern)
-    read_multipart_headers(data, "application/octet-stream", dap4_data, data_cid);
-
-    // Now read the data
-
-    XDRFileUnMarshaller um(data);
-    for (DDS::Vars_iter i = fdds->var_begin(); i != fdds->var_end(); i++) {
-        (*i)->deserialize(um, fdds);
-    }
-}
-
-/**
- * Read data from cache. Allocates a new DDS using the given factory.
- */
-DDS *
-ResponseBuilder::get_cached_data_ddx(const string &cache_file_name, BaseTypeFactory *factory)
-{
-    DBG(cerr << "Reading cache for " << d_dataset + "?" + d_btp_func_ce << endl);
-
-    DDS *fdds = new DDS(factory);
-
-    fdds->filename( d_dataset ) ;
-    fdds->set_dataset_name( "function_result_" + name_path( d_dataset ) ) ;
-
-#if 0
-    Connect *url = new Connect( d_dataset ) ;
-    Response *r = new Response( fopen( cache_file_name.c_str(), "r" ), 0 ) ;
-    if( !r->get_stream() )
-        throw Error("The input source: " + cache_file_name +  " could not be opened");
-
-    url->read_data( *fdds, r ) ;
-#endif
-
-    // fstream data(cache_file_name.c_str());
-    FILE *data = fopen( cache_file_name.c_str(), "r" );
-    read_data_from_cache(data, fdds);
-    fclose(data);
-
-    fdds->set_factory( 0 ) ;
-
-    // mark everything as read.
-    DDS::Vars_iter i = fdds->var_begin() ;
-    DDS::Vars_iter e = fdds->var_end() ;
-    for( ; i != e; i++ ) {
-        BaseType *b = (*i) ;
-        b->set_read_p( true ) ;
-    }
-
-    // for_each(dds->var_begin(), dds->var_end(), mfunc(BaseType::set_read_p));
-
-#if 0
-    // Ancillary attributes were read when the DDX was built and are part of the
-    // cached BLOB.
-    DAS *das = new DAS ;
-    Ancillary::read_ancillary_das( *das, d_dataset ) ;
-    fdds->transfer_attributes( das ) ;
-#endif
-    return fdds;
-}
-
-static const char *descrip[] = { "unknown", "dods_das", "dods_dds", "dods_data", "dods_error", "web_error", "dap4-ddx", "dap4-data", "dap4-error", "dap4-data-ddx", "dods_ddx" };
-
-static const char *encoding[] = { "unknown", "deflate", "x-plain", "gzip", "binary" };
-
-/** Generate an HTTP 1.0 response header for a text document. This is used
- when returning a serialized DAS or DDS object.
-
- @param strm Write the MIME header to this stream.
- @param type The type of this this response. Defaults to
- application/octet-stream.
- @param ver The version string; denotes the libdap implementation
- version.
- @param enc How is this response encoded? Can be plain or deflate or the
- x_... versions of those. Default is x_plain.
- @param last_modified The time to use for the Last-Modified header value.
- Default is zero which means use the current time. */
-void ResponseBuilder::set_mime_text(ostream &strm, ObjectType type, EncodingType enc, const time_t last_modified, const string &protocol) const
-{
-    strm << "HTTP/1.0 200 OK" << CRLF;
-
-    strm << "XDODS-Server: " << DVR << CRLF;
-    strm << "XOPeNDAP-Server: " << DVR << CRLF;
-
-    if (protocol == "")
-        strm << "XDAP: " << d_default_protocol << CRLF;
-    else
-        strm << "XDAP: " << protocol << CRLF;
-
-    const time_t t = time(0);
-    strm << "Date: " << rfc822_date(t).c_str() << CRLF;
-
-    strm << "Last-Modified: ";
-    if (last_modified > 0)
-        strm << rfc822_date(last_modified).c_str() << CRLF;
-    else
-        strm << rfc822_date(t).c_str() << CRLF;
-
-    if (type == dap4_ddx)
-        strm << "Content-Type: text/xml" << CRLF;
-    else
-        strm << "Content-Type: text/plain" << CRLF;
-
-    // Note that Content-Description is from RFC 2045 (MIME, pt 1), not 2616.
-    // jhrg 12/23/05
-    strm << "Content-Description: " << descrip[type] << CRLF;
-    if (type == dods_error) // don't cache our error responses.
-        strm << "Cache-Control: no-cache" << CRLF;
-    // Don't write a Content-Encoding header for x-plain since that breaks
-    // Netscape on NT. jhrg 3/23/97
-    if (enc != x_plain)
-        strm << "Content-Encoding: " << encoding[enc] << CRLF;
-    strm << CRLF;
-}
-
-/** Generate an HTTP 1.0 response header for a html document.
-
- @param strm Write the MIME header to this stream.
- @param type The type of this this response.
- @param ver The version string; denotes the libdap implementation
- version.
- @param enc How is this response encoded? Can be plain or deflate or the
- x_... versions of those. Default is x_plain.
- @param last_modified The time to use for the Last-Modified header value.
- Default is zero which means use the current time. */
-void ResponseBuilder::set_mime_html(ostream &strm, ObjectType type, EncodingType enc, const time_t last_modified, const string &protocol) const
-{
-    strm << "HTTP/1.0 200 OK" << CRLF;
-
-    strm << "XDODS-Server: " << DVR << CRLF;
-    strm << "XOPeNDAP-Server: " << DVR << CRLF;
-
-    if (protocol == "")
-        strm << "XDAP: " << d_default_protocol << CRLF;
-    else
-        strm << "XDAP: " << protocol << CRLF;
-
-    const time_t t = time(0);
-    strm << "Date: " << rfc822_date(t).c_str() << CRLF;
-
-    strm << "Last-Modified: ";
-    if (last_modified > 0)
-        strm << rfc822_date(last_modified).c_str() << CRLF;
-    else
-        strm << rfc822_date(t).c_str() << CRLF;
-
-    strm << "Content-type: text/html" << CRLF;
-    // See note above about Content-Description header. jhrg 12/23/05
-    strm << "Content-Description: " << descrip[type] << CRLF;
-    if (type == dods_error) // don't cache our error responses.
-        strm << "Cache-Control: no-cache" << CRLF;
-    // Don't write a Content-Encoding header for x-plain since that breaks
-    // Netscape on NT. jhrg 3/23/97
-    if (enc != x_plain)
-        strm << "Content-Encoding: " << encoding[enc] << CRLF;
-    strm << CRLF;
-}
-
-/** Write an HTTP 1.0 response header for our binary response document (i.e.,
- the DataDDS object).
-
- @param strm Write the MIME header to this stream.
- @param type The type of this this response. Defaults to
- application/octet-stream.
- @param ver The version string; denotes the libdap implementation
- version.
- @param enc How is this response encoded? Can be plain or deflate or the
- x_... versions of those. Default is x_plain.
- @param last_modified The time to use for the Last-Modified header value.
- Default is zero which means use the current time.
- */
-void ResponseBuilder::set_mime_binary(ostream &strm, ObjectType type, EncodingType enc, const time_t last_modified, const string &protocol) const
-{
-    strm << "HTTP/1.0 200 OK" << CRLF;
-
-    strm << "XDODS-Server: " << DVR << CRLF;
-    strm << "XOPeNDAP-Server: " << DVR << CRLF;
-
-    if (protocol == "")
-        strm << "XDAP: " << d_default_protocol << CRLF;
-    else
-        strm << "XDAP: " << protocol << CRLF;
-
-    const time_t t = time(0);
-    strm << "Date: " << rfc822_date(t).c_str() << CRLF;
-
-    strm << "Last-Modified: ";
-    if (last_modified > 0)
-        strm << rfc822_date(last_modified).c_str() << CRLF;
-    else
-        strm << rfc822_date(t).c_str() << CRLF;
-
-    strm << "Content-Type: application/octet-stream" << CRLF;
-    strm << "Content-Description: " << descrip[type] << CRLF;
-    if (enc != x_plain)
-        strm << "Content-Encoding: " << encoding[enc] << CRLF;
-
-    strm << CRLF;
-}
-
-void ResponseBuilder::set_mime_multipart(ostream &strm, const string &boundary, const string &start, ObjectType type, EncodingType enc, const time_t last_modified, const string &protocol) const
-{
-    strm << "HTTP/1.0 200 OK" << CRLF;
-
-    strm << "XDODS-Server: " << DVR << CRLF;
-    strm << "XOPeNDAP-Server: " << DVR << CRLF;
-
-    if (protocol == "")
-        strm << "XDAP: " << d_default_protocol << CRLF;
-    else
-        strm << "XDAP: " << protocol << CRLF;
-
-    const time_t t = time(0);
-    strm << "Date: " << rfc822_date(t).c_str() << CRLF;
-
-    strm << "Last-Modified: ";
-    if (last_modified > 0)
-        strm << rfc822_date(last_modified).c_str() << CRLF;
-    else
-        strm << rfc822_date(t).c_str() << CRLF;
-
-    strm << "Content-Type: Multipart/Related; boundary=" << boundary << "; start=\"<" << start << ">\"; type=\"Text/xml\"" << CRLF;
-
-    strm << "Content-Description: " << descrip[type] << CRLF;
-    if (enc != x_plain)
-        strm << "Content-Encoding: " << encoding[enc] << CRLF;
-
-    strm << CRLF;
-}
-
-void ResponseBuilder::set_mime_ddx_boundary(ostream &strm, const string &boundary, const string &cid, ObjectType type, EncodingType enc) const
-{
-    strm << "--" << boundary << CRLF;
-    strm << "Content-Type: Text/xml; charset=iso-8859-1" << CRLF;
-    strm << "Content-Id: <" << cid << ">" << CRLF;
-    strm << "Content-Description: " << descrip[type] << CRLF;
-    if (enc != x_plain)
-        strm << "Content-Encoding: " << encoding[enc] << CRLF;
-
-    strm << CRLF;
-}
-
-void ResponseBuilder::set_mime_data_boundary(ostream &strm, const string &boundary, const string &cid, ObjectType type, EncodingType enc) const
-{
-    strm << "--" << boundary << CRLF;
-    strm << "Content-Type: application/octet-stream" << CRLF;
-    strm << "Content-Id: <" << cid << ">" << CRLF;
-    strm << "Content-Description: " << descrip[type] << CRLF;
-    if (enc != x_plain)
-        strm << "Content-Encoding: " << encoding[enc] << CRLF;
-
-    strm << CRLF;
-}
-
-/** Generate an HTTP 1.0 response header for an Error object.
- @param strm Write the MIME header to this stream.
- @param code HTTP 1.0 response code. Should be 400, ... 500, ...
- @param reason Reason string of the HTTP 1.0 response header.
- @param version The version string; denotes the DAP spec and implementation
- version. */
-void ResponseBuilder::set_mime_error(ostream &strm, int code, const string &reason, const string &protocol) const
-{
-    strm << "HTTP/1.0 " << code << " " << reason.c_str() << CRLF;
-
-    strm << "XDODS-Server: " << DVR << CRLF;
-    strm << "XOPeNDAP-Server: " << DVR << CRLF;
-
-    if (protocol == "")
-        strm << "XDAP: " << d_default_protocol << CRLF;
-    else
-        strm << "XDAP: " << protocol << CRLF;
-
-    const time_t t = time(0);
-    strm << "Date: " << rfc822_date(t).c_str() << CRLF;
-    strm << "Cache-Control: no-cache" << CRLF;
-    strm << CRLF;
-}
-
-} // namespace libdap
-
diff --git a/ResponseBuilder.h b/ResponseBuilder.h
deleted file mode 100644
index cc9874a..0000000
--- a/ResponseBuilder.h
+++ /dev/null
@@ -1,184 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2011 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-#ifndef _response_builder_h
-#define _response_builder_h
-
-#include <string>
-#include <set>
-
-#ifndef _das_h
-#include "DAS.h"
-#endif
-
-#ifndef _dds_h
-#include "DDS.h"
-#endif
-
-#ifndef constraint_evaluator_h
-#include "ConstraintEvaluator.h"
-#endif
-
-#ifndef _object_type_h
-#include "ObjectType.h"
-#endif
-
-#ifndef _encodingtype_h
-#include "EncodingType.h"
-#endif
-
-class DAPCache3;
-
-namespace libdap
-{
-
-/**
-
- @brief Build responses for Hyrax server modules/handlers.
- @author jhrg 1/28/2011 */
-
-class ResponseBuilder
-{
-public:
-    friend class ResponseBuilderTest;
-
-protected:
-    string d_dataset;  		/// Name of the dataset/database
-    string d_ce;  		    /// Constraint expression
-    string d_btp_func_ce;   /// The BTP functions, extracted from the CE
-    int d_timeout;  		/// Response timeout after N seconds
-    string d_default_protocol;	/// Version string for the library's default protocol version
-
-    DAPCache3 *d_cache;
-
-#if 0	// Keyword support moved to Keywords class
-    set<string> d_keywords; 	/// Holds all of the keywords passed in the CE
-    set<string> d_known_keywords; /// Holds all of the keywords libdap understands.
-#endif
-    void initialize();
-
-public:
-
-    /** Make an empty instance. Use the set_*() methods to load with needed
-        values. You must call at least set_dataset_name() or be requesting
-        version information. */
-    ResponseBuilder() {
-        initialize();
-    }
-
-    virtual ~ResponseBuilder();
-#if 0
-    virtual void add_keyword(const string &kw);
-    virtual bool is_keyword(const string &kw) const;
-    virtual list<string> get_keywords() const;
-    // This method holds all of the keywords that this version of libdap groks
-    virtual bool is_known_keyword(const string &w) const;
-#endif
-
-    virtual string get_ce() const;
-    virtual void set_ce(string _ce);
-
-    virtual string get_btp_func_ce() const { return d_btp_func_ce; }
-    virtual void set_btp_func_ce(string _ce) { d_btp_func_ce = _ce; }
-
-    virtual string get_dataset_name() const;
-    virtual void set_dataset_name(const string _dataset);
-
-    void set_timeout(int timeout = 0);
-    int get_timeout() const;
-
-    virtual void establish_timeout(ostream &stream) const;
-
-    virtual void split_ce(ConstraintEvaluator &eval, const string &expr = "");
-    virtual bool is_valid(const string &cache_file_name);
-
-    virtual void send_das(ostream &out, DAS &das, bool with_mime_headers = true);
-    virtual void send_das(ostream &out, DDS &dds, ConstraintEvaluator &eval,
-                          bool constrained = false, bool with_mime_headers = true);
-
-    virtual void send_dds(ostream &out, DDS &dds, ConstraintEvaluator &eval,
-                          bool constrained = false,  bool with_mime_headers = true);
-
-    virtual void dataset_constraint(ostream &out, DDS &dds, ConstraintEvaluator &eval,
-                                    bool ce_eval = true) const;
-    virtual void dataset_constraint_ddx(ostream &out, DDS & dds, ConstraintEvaluator & eval,
-                                   const string &boundary, const string &start,
-                                   bool ce_eval = true) const;
-
-    virtual void send_data(ostream &data_stream, DDS &dds, ConstraintEvaluator &eval, bool with_mime_headers = true);
-
-    virtual void send_ddx(ostream &out, DDS &dds, ConstraintEvaluator &eval,
-                          bool with_mime_headers = true);
-
-    virtual void send_data_ddx(ostream &data_stream, DDS &dds, ConstraintEvaluator &eval,
-                           const string &start, const string &boundary,
-                           bool with_mime_headers = true);
-
-    virtual void cache_data_ddx(const string &cache_file_name, DDS &dds);
-    virtual void read_data_from_cache(FILE *data, DDS *fdds);
-    virtual DDS *get_cached_data_ddx(const string &cache_file_name, BaseTypeFactory *factory);
-
-    // This method is uses the above three and is used by send_das(), send_dds(), and send_data().
-    virtual DDS *read_cached_dataset(DDS &dds, ConstraintEvaluator & eval, string &cache_token);
-
-    // These functions are used both by the methods above and by other code
-
-    void set_mime_text(ostream &out, ObjectType type = unknown_type,
-                       EncodingType enc = x_plain,
-                       const time_t last_modified = 0,
-                       const string &protocol = "") const;
-
-    void set_mime_html(ostream &out, ObjectType type = unknown_type,
-                       EncodingType enc = x_plain,
-                       const time_t last_modified = 0,
-                       const string &protocol = "") const;
-
-    void set_mime_binary(ostream &out, ObjectType type = unknown_type,
-                         EncodingType enc = x_plain,
-                         const time_t last_modified = 0,
-                         const string &protocol = "") const;
-
-    void set_mime_multipart(ostream &out, const string &boundary,
-    	const string &start, ObjectType type = unknown_type,
-            EncodingType enc = x_plain,
-            const time_t last_modified = 0,
-            const string &protocol = "") const;
-
-    void set_mime_ddx_boundary(ostream &out, const string &boundary,
-    	const string &start, ObjectType type = unknown_type,
-            EncodingType enc = x_plain) const;
-
-    void set_mime_data_boundary(ostream &out, const string &boundary,
-    	const string &cid, ObjectType type = unknown_type,
-            EncodingType enc = x_plain) const;
-
-    void set_mime_error(ostream &out, int code = 404,
-                        const string &reason = "Dataset not found",
-                        const string &protocol = "") const;
-};
-
-} // namespace libdap
-
-#endif // _response_builder_h
diff --git a/ResponseTooBigErr.cc b/ResponseTooBigErr.cc
index c0017d5..8847427 100644
--- a/ResponseTooBigErr.cc
+++ b/ResponseTooBigErr.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -27,7 +27,7 @@
 #include "config.h"
 
 static char rcsid[] not_used =
-    {"$Id: ResponseTooBigErr.cc 17856 2008-02-02 21:25:59Z pwest $"
+    {"$Id: ResponseTooBigErr.cc 27197 2013-10-01 21:29:54Z jimg $"
     };
 
 #include <string>
diff --git a/ResponseTooBigErr.h b/ResponseTooBigErr.h
index 6f87fb8..6fec914 100644
--- a/ResponseTooBigErr.h
+++ b/ResponseTooBigErr.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Sequence.cc b/Sequence.cc
index 25e1947..e6be993 100644
--- a/Sequence.cc
+++ b/Sequence.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -56,6 +56,9 @@
 #include "Sequence.h"
 #include "Grid.h"
 
+#include "Marshaller.h"
+#include "UnMarshaller.h"
+
 #include "debug.h"
 #include "Error.h"
 #include "InternalErr.h"
@@ -76,7 +79,7 @@ static const unsigned char start_of_instance = 0x5A; // binary pattern 0101 1010
 // Private member functions
 
 void
-Sequence::_duplicate(const Sequence &s)
+Sequence::m_duplicate(const Sequence &s)
 {
     d_row_number = s.d_row_number;
     d_starting_row_number = s.d_starting_row_number;
@@ -187,7 +190,7 @@ Sequence::Sequence(const string &n, const string &d)
 /** @brief The Sequence copy constructor. */
 Sequence::Sequence(const Sequence &rhs) : Constructor(rhs)
 {
-    _duplicate(rhs);
+    m_duplicate(rhs);
 }
 
 BaseType *
@@ -216,7 +219,7 @@ delete_rows(BaseTypeRow *bt_row_ptr)
 Sequence::~Sequence()
 {
     DBG2(cerr << "Entering Sequence::~Sequence" << endl);
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         BaseType *btp = *i ;
         delete btp ; btp = 0;
     }
@@ -233,11 +236,20 @@ Sequence::operator=(const Sequence &rhs)
 
     dynamic_cast<Constructor &>(*this) = rhs; // run Constructor=
 
-    _duplicate(rhs);
+    m_duplicate(rhs);
 
     return *this;
 }
 
+/**
+ * The Sequence class will be streamlined for DAP4.
+ */
+bool
+Sequence::is_dap2_only_type()
+{
+    return true;
+}
+
 string
 Sequence::toString()
 {
@@ -245,7 +257,7 @@ Sequence::toString()
 
     oss << BaseType::toString();
 
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         oss << (*i)->toString();
     }
 
@@ -254,26 +266,28 @@ Sequence::toString()
     return oss.str();
 }
 
+#if 0
 int
 Sequence::element_count(bool leaves)
 {
     if (!leaves)
-        return _vars.size();
+        return d_vars.size();
     else {
         int i = 0;
-        for (Vars_iter iter = _vars.begin(); iter != _vars.end(); iter++) {
+        for (Vars_iter iter = d_vars.begin(); iter != d_vars.end(); iter++) {
             i += (*iter)->element_count(true);
         }
         return i;
     }
 }
+#endif
 
 bool
 Sequence::is_linear()
 {
     bool linear = true;
     bool seq_found = false;
-    for (Vars_iter iter = _vars.begin(); linear && iter != _vars.end(); iter++) {
+    for (Vars_iter iter = d_vars.begin(); linear && iter != d_vars.end(); iter++) {
         if ((*iter)->type() == dods_sequence_c) {
             // A linear sequence cannot have more than one child seq. at any
             // one level. If we've already found a seq at this level, return
@@ -283,10 +297,10 @@ Sequence::is_linear()
                 break;
             }
             seq_found = true;
-            linear = dynamic_cast<Sequence *>((*iter))->is_linear();
+            linear = static_cast<Sequence *>((*iter))->is_linear();
         }
         else if ((*iter)->type() == dods_structure_c) {
-            linear = dynamic_cast<Structure*>((*iter))->is_linear();
+            linear = static_cast<Structure*>((*iter))->is_linear();
         }
         else {
             // A linear sequence cannot have Arrays, Lists or Grids.
@@ -297,10 +311,11 @@ Sequence::is_linear()
     return linear;
 }
 
+#if 0
 void
 Sequence::set_send_p(bool state)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         (*i)->set_send_p(state);
     }
 
@@ -310,23 +325,25 @@ Sequence::set_send_p(bool state)
 void
 Sequence::set_read_p(bool state)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         (*i)->set_read_p(state);
     }
 
     BaseType::set_read_p(state);
 }
-
+#endif
+#if 0
 void
 Sequence::set_in_selection(bool state)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         (*i)->set_in_selection(state);
     }
 
     BaseType::set_in_selection(state);
 }
-
+#endif
+#if 0
 /** @brief Adds a variable to the Sequence.
 
     Remember that if you wish to add a member to a nested
@@ -342,12 +359,15 @@ Sequence::add_var(BaseType *bt, Part)
     if (!bt)
         throw InternalErr(__FILE__, __LINE__,
                           "Cannot add variable: NULL pointer");
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Sequence.");
+
     // Jose Garcia
     // We append a copy of bt so the owner of bt is free to deallocate
 
     BaseType *bt_copy = bt->ptr_duplicate();
     bt_copy->set_parent(this);
-    _vars.push_back(bt_copy);
+    d_vars.push_back(bt_copy);
 }
 
 /** @brief Adds a variable to the Sequence.
@@ -367,10 +387,14 @@ Sequence::add_var_nocopy(BaseType *bt, Part)
     if (!bt)
         throw InternalErr(__FILE__, __LINE__,
                           "Cannot add variable: NULL pointer");
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Sequence.");
+
     bt->set_parent(this);
-    _vars.push_back(bt);
+    d_vars.push_back(bt);
 }
-
+#endif
+#if 0
 // Deprecated
 BaseType *
 Sequence::var(const string &n, btp_stack &s)
@@ -394,11 +418,12 @@ Sequence::var(const string &name, bool exact_match, btp_stack *s)
     else
         return m_leaf_match(n, s);
 }
-
+#endif
+#if 0
 BaseType *
 Sequence::m_leaf_match(const string &name, btp_stack *s)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         if ((*i)->name() == name) {
             if (s)
                 s->push(static_cast<BaseType *>(this));
@@ -420,7 +445,7 @@ Sequence::m_leaf_match(const string &name, btp_stack *s)
 BaseType *
 Sequence::m_exact_match(const string &name, btp_stack *s)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         if ((*i)->name() == name) {
             if (s)
                 s->push(static_cast<BaseType *>(this));
@@ -445,7 +470,7 @@ Sequence::m_exact_match(const string &name, btp_stack *s)
 
     return 0;
 }
-
+#endif
 /** @brief Get a whole row from the sequence.
     @param row Get row number <i>row</i> from the sequence.
     @return A BaseTypeRow object (vector<BaseType *>). Null if there's no such
@@ -519,12 +544,13 @@ Sequence::var_value(size_t row, size_t i)
     return (*bt_row_ptr)[i];
 }
 
+#if 0
 unsigned int
 Sequence::width()
 {
     unsigned int sz = 0;
 
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         sz += (*i)->width();
     }
 
@@ -543,7 +569,7 @@ Sequence::width(bool constrained)
 {
     unsigned int sz = 0;
 
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
     	if (constrained) {
     		if ((*i)->send_p())
     			sz += (*i)->width(constrained);
@@ -555,6 +581,7 @@ Sequence::width(bool constrained)
 
     return sz;
 }
+#endif
 
 // This version returns -1. Each API-specific subclass should define a more
 // reasonable version. jhrg 5/24/96
@@ -562,7 +589,7 @@ Sequence::width(bool constrained)
 /** Returns the number of elements in a Sequence object. Note that
     this is <i>not</i> the number of items in a row, but the number
     of rows in the complete sequence object. To be meaningful, this
-    must be computed after constraint expresseion (CE) evaluation.
+    must be computed after constraint expression (CE) evaluation.
     The purpose of this function is to facilitate translations
     between Sequence objects and Array objects, particularly when
     the Sequence is too large to be transferred from the server to
@@ -571,7 +598,7 @@ Sequence::width(bool constrained)
     This function, to be useful, must be specialized for the API and
     data format in use.
 
-    @return The base implentation returns -1, indicating that the
+    @return The base implementation returns -1, indicating that the
     length is not known.  Sub-classes specific to a particular API
     will have a more complete implementation. */
 int
@@ -762,7 +789,7 @@ Sequence::is_end_of_rows(int i)
 
     <li>CE evaluation happens only in a leaf sequence.</li>
 
-    <li>When no data statisfies a CE, the empty Sequence is signalled by a
+    <li>When no data satisfies a CE, the empty Sequence is signaled by a
     single EOS marker, regardless of the level of nesting of Sequences. That
     is, the EOS marker is sent for only the outer Sequence in the case of a
     completely empty response.</li>
@@ -807,10 +834,10 @@ Sequence::serialize_parent_part_one(DDS &dds,
         // write_start_of_instance(sink);
 
         // In this loop serialize will signal an error with an exception.
-        for (Vars_iter iter = _vars.begin(); iter != _vars.end(); iter++) {
+        for (Vars_iter iter = d_vars.begin(); iter != d_vars.end(); iter++) {
             // Only call serialize for child Sequences; the leaf sequence
             // will trigger the transmission of values for its parents (this
-            // sequence and maybe others) once it gets soem valid data to
+            // sequence and maybe others) once it gets some valid data to
             // send.
             // Note that if the leaf sequence has no variables in the current
             // projection, its serialize() method will never be called and that's
@@ -830,7 +857,7 @@ Sequence::serialize_parent_part_one(DDS &dds,
     d_row_number = -1;
 
     // Always write the EOS marker? 12/23/04 jhrg
-    // Yes. According to DAP2, a completely empty response is signalled by
+    // Yes. According to DAP2, a completely empty response is signaled by
     // a return value of only the EOS marker for the outermost sequence.
     if (d_top_most || d_wrote_soi) {
         DBG(cerr << "Writing End of Sequence marker" << endl);
@@ -842,9 +869,9 @@ Sequence::serialize_parent_part_one(DDS &dds,
 }
 
 // If we are here then we know that this is 'parent sequence' and that the
-// leaf seq has found valid data to send. We also know that
+// leaf sequence has found valid data to send. We also know that
 // serialize_parent_part_one has been called so data are in the instance's
-// fields. This is wheree we send data. Whereas ..._part_one() contains a
+// fields. This is where we send data. Whereas ..._part_one() contains a
 // loop to iterate over all of rows in a parent sequence, this does not. This
 // method assumes that the serialize_leaf() will call it each time it needs
 // to be called.
@@ -859,7 +886,7 @@ Sequence::serialize_parent_part_two(DDS &dds,
 
     BaseType *btp = get_parent();
     if (btp && btp->type() == dods_sequence_c)
-        dynamic_cast<Sequence&>(*btp).serialize_parent_part_two(dds, eval, m);
+        static_cast<Sequence&>(*btp).serialize_parent_part_two(dds, eval, m);
 
     if (d_unsent_data) {
         DBG(cerr << "Writing Start of Instance marker" << endl);
@@ -867,7 +894,7 @@ Sequence::serialize_parent_part_two(DDS &dds,
         write_start_of_instance(m);
 
         // In this loop serialize will signal an error with an exception.
-        for (Vars_iter iter = _vars.begin(); iter != _vars.end(); iter++) {
+        for (Vars_iter iter = d_vars.begin(); iter != d_vars.end(); iter++) {
             // Send all the non-sequence variables
             DBG(cerr << "Sequence::serialize_parent_part_two(), serializing "
                 << (*iter)->name() << endl);
@@ -910,7 +937,7 @@ Sequence::serialize_leaf(DDS &dds,
     if (status && !is_end_of_rows(i)) {
         BaseType *btp = get_parent();
         if (btp && btp->type() == dods_sequence_c)
-            dynamic_cast<Sequence&>(*btp).serialize_parent_part_two(dds,
+            static_cast<Sequence&>(*btp).serialize_parent_part_two(dds,
 								    eval, m);
     }
 
@@ -923,7 +950,7 @@ Sequence::serialize_leaf(DDS &dds,
         write_start_of_instance(m);
 
         // In this loop serialize will signal an error with an exception.
-        for (Vars_iter iter = _vars.begin(); iter != _vars.end(); iter++) {
+        for (Vars_iter iter = d_vars.begin(); iter != d_vars.end(); iter++) {
             DBG(cerr << "Sequence::serialize_leaf(), serializing "
                 << (*iter)->name() << endl);
             if ((*iter)->send_p()) {
@@ -938,7 +965,7 @@ Sequence::serialize_leaf(DDS &dds,
         DBG(cerr << "Sequence::serialize_leaf::read_row() status: " << status << endl);
     }
 
-    // Only write the EOS marker if there's a matching Start Of Instnace
+    // Only write the EOS marker if there's a matching Start Of Instance
     // Marker in the stream.
     if (d_wrote_soi || d_top_most) {
         DBG(cerr << "Writing End of Sequence marker" << endl);
@@ -968,7 +995,7 @@ Sequence::serialize_leaf(DDS &dds,
     Sequences which have a parent (directly or indirectly) variable that is
     a Sequence.
 
-    @param eval Use this contraint evaluator
+    @param eval Use this constraint evaluator
     @param dds This DDS holds the variables for the data source */
 void
 Sequence::intern_data(ConstraintEvaluator &eval, DDS &dds)
@@ -1019,9 +1046,9 @@ Sequence::intern_data_parent_part_one(DDS & dds,
 
     // Grab the current size of the value stack. We do this because it is
     // possible that no nested sequences for this row happened to be
-    // selected because of a constract evaluation or the last row is not
+    // selected because of a constraint evaluation or the last row is not
     // selected because of a constraint evaluation. In either case, no
-    // nested sequence d_values are pused onto the stack, so there is
+    // nested sequence d_values are pushed onto the stack, so there is
     // nothing to pop at the end of this function. pcw 07/14/08
     SequenceValues::size_type orig_stack_size = sequence_values_stack.size() ;
 
@@ -1034,7 +1061,7 @@ Sequence::intern_data_parent_part_one(DDS & dds,
             if ((*iter)->send_p()) {
                 switch ((*iter)->type()) {
                 case dods_sequence_c:
-                    dynamic_cast<Sequence&>(**iter).intern_data_private(
+                	static_cast<Sequence&>(**iter).intern_data_private(
                             eval, dds, sequence_values_stack);
                     break;
 
@@ -1075,7 +1102,7 @@ Sequence::intern_data_parent_part_two(DDS &dds,
 
     BaseType *btp = get_parent();
     if (btp && btp->type() == dods_sequence_c) {
-        dynamic_cast<Sequence&>(*btp).intern_data_parent_part_two(
+    	static_cast<Sequence&>(*btp).intern_data_parent_part_two(
                                       dds, eval, sequence_values_stack);
     }
 
@@ -1138,7 +1165,7 @@ Sequence::intern_data_for_leaf(DDS &dds,
             // This call will read the values for the parent sequences and
             // then allocate a new instance for the leaf and push that onto
             // the stack.
-            dynamic_cast<Sequence&>(*btp).intern_data_parent_part_two(
+        	static_cast<Sequence&>(*btp).intern_data_parent_part_two(
 					    dds, eval, sequence_values_stack);
         }
 
@@ -1188,7 +1215,7 @@ Sequence::intern_data_for_leaf(DDS &dds,
     @param um An UnMarshaller that knows how to deserialize data
     @param dds A DataDDS from which to read.
     @param reuse Passed to child objects when they are deserialized. Some
-    implementations of derialize() use this to determine if new storage should
+    implementations of deserialize() use this to determine if new storage should
     be allocated or existing storage reused.
     @exception Error if a sequence stream marker cannot be read.
     @exception InternalErr if the <tt>dds</tt> param is not a DataDDS.
@@ -1225,7 +1252,7 @@ Sequence::deserialize(UnMarshaller &um, DDS *dds, bool reuse)
                  << name() << endl);
             BaseTypeRow *bt_row_ptr = new BaseTypeRow;
             // Read the instance's values, building up the row
-            for (Vars_iter iter = _vars.begin(); iter != _vars.end(); iter++) {
+            for (Vars_iter iter = d_vars.begin(); iter != d_vars.end(); iter++) {
                 BaseType *bt_ptr = (*iter)->ptr_duplicate();
                 bt_ptr->deserialize(um, dds, reuse);
                 DBG2(cerr << "Deserialized " << bt_ptr->name() << " ("
@@ -1301,7 +1328,7 @@ Sequence::get_ending_row_number()
     If omitted, the stride defaults to 1.
 
     @param start The starting row number. The first row is row zero.
-    @param stop The eding row number. The 20th row is row 19.
+    @param stop The ending row number. The 20th row is row 19.
     @param stride The stride. A stride of two skips every other row. */
 void
 Sequence::set_row_number_constraint(int start, int stop, int stride)
@@ -1314,6 +1341,7 @@ Sequence::set_row_number_constraint(int start, int stop, int stride)
     d_ending_row_number = stop;
 }
 
+#if 0
 /** Never use this interface for Sequence! To add data to the members of a
     Sequence, use BaseTypeRow variables and operate on them individually. */
 unsigned int
@@ -1333,46 +1361,16 @@ Sequence::buf2val(void **)
     throw InternalErr(__FILE__, __LINE__, "Use Sequence::var_value() or Sequence::row_value() in place of Sequence::buf2val()");
     return sizeof(Sequence);
 }
+#endif
 
-#if FILE_METHODS
 void
 Sequence::print_one_row(FILE *out, int row, string space,
                         bool print_row_num)
 {
-    if (print_row_num)
-        fprintf(out, "\n%s%d: ", space.c_str(), row) ;
-
-    fprintf(out, "{ ") ;
-
-    int elements = element_count() - 1;
-    int j;
-    BaseType *bt_ptr;
-    // Print first N-1 elements of the row.
-    for (j = 0; j < elements; ++j) {
-        bt_ptr = var_value(row, j);
-        if (bt_ptr) {  // data
-            if (bt_ptr->type() == dods_sequence_c)
-                dynamic_cast<Sequence*>(bt_ptr)->print_val_by_rows
-                (out, space + "    ", false, print_row_num);
-            else
-                bt_ptr->print_val(out, space, false);
-            fprintf(out, ", ") ;
-        }
-    }
-
-    // Print Nth element; end with a `}.'
-    bt_ptr = var_value(row, j);
-    if (bt_ptr) {  // data
-        if (bt_ptr->type() == dods_sequence_c)
-            dynamic_cast<Sequence*>(bt_ptr)->print_val_by_rows
-            (out, space + "    ", false, print_row_num);
-        else
-            bt_ptr->print_val(out, space, false);
-    }
-
-    fprintf(out, " }") ;
+    ostringstream oss;
+    print_one_row(oss, row, space, print_row_num);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Sequence::print_one_row(ostream &out, int row, string space,
@@ -1397,7 +1395,7 @@ Sequence::print_one_row(ostream &out, int row, string space,
         bt_ptr = var_value(row, j++);
         if (bt_ptr) {  // data
             if (bt_ptr->type() == dods_sequence_c)
-                dynamic_cast<Sequence*>(bt_ptr)->print_val_by_rows
+            	static_cast<Sequence*>(bt_ptr)->print_val_by_rows
                      (out, space + "    ", false, print_row_num);
             else
                 bt_ptr->print_val(out, space, false);
@@ -1410,7 +1408,7 @@ Sequence::print_one_row(ostream &out, int row, string space,
         if (bt_ptr) {  // data
             out << ", ";
             if (bt_ptr->type() == dods_sequence_c)
-                dynamic_cast<Sequence*>(bt_ptr)->print_val_by_rows
+            	static_cast<Sequence*>(bt_ptr)->print_val_by_rows
                         (out, space + "    ", false, print_row_num);
             else
                 bt_ptr->print_val(out, space, false);
@@ -1420,32 +1418,14 @@ Sequence::print_one_row(ostream &out, int row, string space,
     out << " }" ;
 }
 
-#if FILE_METHODS
 void
 Sequence::print_val_by_rows(FILE *out, string space, bool print_decl_p,
                             bool print_row_numbers)
 {
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = ") ;
-    }
-
-    fprintf(out, "{ ") ;
-
-    int rows = number_of_rows() - 1;
-    int i;
-    for (i = 0; i < rows; ++i) {
-        print_one_row(out, i, space, print_row_numbers);
-        fprintf(out, ", ") ;
-    }
-    print_one_row(out, i, space, print_row_numbers);
-
-    fprintf(out, " }") ;
-
-    if (print_decl_p)
-        fprintf(out, ";\n") ;
+    ostringstream oss;
+    print_val_by_rows(oss, space, print_decl_p, print_row_numbers);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Sequence::print_val_by_rows(ostream &out, string space, bool print_decl_p,
@@ -1472,13 +1452,11 @@ Sequence::print_val_by_rows(ostream &out, string space, bool print_decl_p,
 	out << ";\n" ;
 }
 
-#if FILE_METHODS
 void
 Sequence::print_val(FILE *out, string space, bool print_decl_p)
 {
     print_val_by_rows(out, space, print_decl_p, false);
 }
-#endif
 
 void
 Sequence::print_val(ostream &out, string space, bool print_decl_p)
@@ -1486,18 +1464,18 @@ Sequence::print_val(ostream &out, string space, bool print_decl_p)
     print_val_by_rows(out, space, print_decl_p, false);
 }
 
-
+#if 0
 bool
 Sequence::check_semantics(string &msg, bool all)
 {
     if (!BaseType::check_semantics(msg))
         return false;
 
-    if (!unique_names(_vars, name(), type_name(), msg))
+    if (!unique_names(d_vars, name(), type_name(), msg))
         return false;
 
     if (all)
-        for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+        for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
             if (!(*i)->check_semantics(msg, true)) {
                 return false;
             }
@@ -1505,6 +1483,7 @@ Sequence::check_semantics(string &msg, bool all)
 
     return true;
 }
+#endif
 
 void
 Sequence::set_leaf_p(bool state)
@@ -1523,8 +1502,8 @@ Sequence::is_leaf_sequence()
     In a nested Sequence, the Sequence which holds the leaf elements is special
     because it during the serialization of this Sequence's data that constraint
     Expressions must be evaluated. If CEs are evaluated at the upper levels,
-    then valid data may not be sent because it was effectlively hidden from the
-    serialization and evaluation code (see the documentatin for the serialize_leaf()
+    then valid data may not be sent because it was effectively hidden from the
+    serialization and evaluation code (see the documentation for the serialize_leaf()
     method).
 
     The notion of the leaf Sequence needs to be modified to mean the lowest level
@@ -1551,7 +1530,7 @@ Sequence::set_leaf_sequence(int lvl)
 
     DBG2(cerr << "Processing sequence " << name() << endl);
 
-    for (Vars_iter iter = _vars.begin(); iter != _vars.end(); iter++) {
+    for (Vars_iter iter = d_vars.begin(); iter != d_vars.end(); iter++) {
         // About the test for send_p(): Only descend into a sequence if it has
         // fields that might be sent. Thus if, in a two-level sequence, nothing
         // in the lower level is to be sent, the upper level is marked as the
@@ -1562,10 +1541,10 @@ Sequence::set_leaf_sequence(int lvl)
                 throw Error("This implementation does not support more than one nested sequence at a level. Contact the server administrator.");
 
             has_child_sequence = true;
-            dynamic_cast<Sequence&>(**iter).set_leaf_sequence(++lvl);
+            static_cast<Sequence&>(**iter).set_leaf_sequence(++lvl);
         }
         else if ((*iter)->type() == dods_structure_c) {
-            dynamic_cast<Structure&>(**iter).set_leaf_sequence(lvl);
+        	static_cast<Structure&>(**iter).set_leaf_sequence(lvl);
         }
     }
 
diff --git a/Sequence.h b/Sequence.h
index 7d52a31..26bbd27 100644
--- a/Sequence.h
+++ b/Sequence.h
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -57,10 +57,9 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-// FIXME
+#ifndef S_XDRUtils_h
 #include "XDRUtils.h"
-
-#define FILE_METHODS 1
+#endif
 
 namespace libdap
 {
@@ -205,17 +204,16 @@ private:
 
     // In a hierarchy of sequences, is this the top most?
     bool d_top_most;
-
-    void _duplicate(const Sequence &s);
+#if 0
     BaseType *m_leaf_match(const string &name, btp_stack *s = 0);
     BaseType *m_exact_match(const string &name, btp_stack *s = 0);
-
+#endif
     bool is_end_of_rows(int i);
 
     friend class SequenceTest;
 
 protected:
-
+    void m_duplicate(const Sequence &s);
     typedef stack<SequenceValues*> sequence_values_stack_t;
 
     virtual bool serialize_parent_part_one(DDS &dds,
@@ -256,18 +254,24 @@ public:
 
     virtual BaseType *ptr_duplicate();
 
-    virtual string toString();
+    virtual bool is_dap2_only_type();
 
+    virtual string toString();
+#if 0
     virtual int element_count(bool leaves = false);
-
+#endif
     virtual bool is_linear();
-
+#if 0
     virtual void set_send_p(bool state);
     virtual void set_read_p(bool state);
+#endif
+#if 0
     virtual void set_in_selection(bool state);
-
-    virtual unsigned int width();
+#endif
+#if 0
+    virtual unsigned int width(bool constrained = false);
     virtual unsigned int width(bool constrained);
+#endif
 
     virtual int length();
 
@@ -277,8 +281,7 @@ public:
                           ConstraintEvaluator &eval, bool ce_eval = true);
 
     virtual void intern_data(ConstraintEvaluator &eval, DDS &dds);
-    virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
-			   Marshaller &m, bool ce_eval = true);
+    virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval = true);
     virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse = false);
 
     /// Rest the row number counter
@@ -304,26 +307,28 @@ public:
         d_unsent_data = usd;
     }
 
+#if 0
     // Move me!
     virtual unsigned int val2buf(void *val, bool reuse = false);
     virtual unsigned int buf2val(void **val);
+#endif
 
     virtual void set_value(SequenceValues &values);
     virtual SequenceValues value();
-
-    virtual BaseType *var(const string &name, bool exact_match = true,
-                          btp_stack *s = 0);
+#if 0
+    virtual BaseType *var(const string &name, bool exact_match = true,btp_stack *s = 0);
     virtual BaseType *var(const string &n, btp_stack &s);
+#endif
 
     virtual BaseType *var_value(size_t row, const string &name);
 
     virtual BaseType *var_value(size_t row, size_t i);
 
     virtual BaseTypeRow *row_value(size_t row);
-
+#if 0
     virtual void add_var(BaseType *, Part part = nil);
     virtual void add_var_nocopy(BaseType *, Part part = nil);
-
+#endif
     virtual void print_one_row(ostream &out, int row, string space,
                                bool print_row_num = false);
     virtual void print_val_by_rows(ostream &out, string space = "",
@@ -332,7 +337,6 @@ public:
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
-#if FILE_METHODS
     virtual void print_one_row(FILE *out, int row, string space,
                                bool print_row_num = false);
     virtual void print_val_by_rows(FILE *out, string space = "",
@@ -340,10 +344,9 @@ public:
                                    bool print_row_numbers = true);
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
-
+#if 0
     virtual bool check_semantics(string &msg, bool all = false);
-
+#endif
     virtual void set_leaf_p(bool state);
 
     virtual bool is_leaf_sequence();
diff --git a/ServerFunction.cc b/ServerFunction.cc
new file mode 100644
index 0000000..6f83ee5
--- /dev/null
+++ b/ServerFunction.cc
@@ -0,0 +1,88 @@
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2013 OPeNDAP, Inc.
+// Author: Nathan Potter <npotter at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+/*
+ * AbstractFunction.cc
+ *
+ *  Created on: Feb 2, 2013
+ *      Author: ndp
+ */
+
+#include "ServerFunction.h"
+
+namespace libdap {
+
+ServerFunction::ServerFunction() {
+	setName("abstract_function");
+	setDescriptionString("This function does nothing.");
+	setUsageString("You can't use this function");
+	setRole("http://services.opendap.org/dap4/server-side-function/null");
+	setDocUrl("http://docs.opendap.org/index.php/Server_Side_Processing_Functions");
+    d_bool_func = 0;
+	d_btp_func  = 0;
+	d_proj_func = 0;
+
+}
+
+ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url, string role, bool_func f){
+	setName(name);
+	setVersion(version);
+	setDescriptionString(description);
+	setUsageString(usage);
+	setRole(role);
+	setDocUrl(doc_url);
+	setFunction(f);
+}
+
+ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url, string role, btp_func f){
+	setName(name);
+	setVersion(version);
+	setDescriptionString(description);
+	setUsageString(usage);
+	setRole(role);
+	setDocUrl(doc_url);
+	setFunction(f);
+
+}
+
+ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url, string role, proj_func f){
+	setName(name);
+	setVersion(version);
+	setDescriptionString(description);
+	setUsageString(usage);
+	setRole(role);
+	setDocUrl(doc_url);
+	setFunction(f);
+}
+
+
+ServerFunction::~ServerFunction() {
+    d_bool_func = 0;
+	d_btp_func  = 0;
+	d_proj_func = 0;
+}
+
+
+
+} /* namespace libdap */
diff --git a/ServerFunction.h b/ServerFunction.h
new file mode 100644
index 0000000..b2b90c7
--- /dev/null
+++ b/ServerFunction.h
@@ -0,0 +1,136 @@
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2013 OPeNDAP, Inc.
+// Author: Nathan Potter <npotter at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+/*
+ * AbstractFunction.h
+ *
+ *  Created on: Feb 2, 2013
+ *      Author: ndp
+ */
+
+#ifndef ABSTRACTFUNCTION_H_
+#define ABSTRACTFUNCTION_H_
+
+#include <iostream>
+#include "expr.h"
+
+using std::endl;
+
+#include "BaseType.h"
+
+namespace libdap {
+
+
+class ServerFunction {
+
+private:
+    string name;
+    string description;
+    string usage;
+    string doc_url; // @TODO 'doc_url' Should be a URL object.
+    string role;    // @TODO 'role' Should be a URI object.
+    string version;
+
+    libdap::bool_func d_bool_func;
+    libdap::btp_func  d_btp_func;
+    libdap::proj_func d_proj_func;
+
+public:
+    ServerFunction();
+    ServerFunction(string name, string version, string description, string usage, string doc_url, string role, bool_func f);
+    ServerFunction(string name, string version, string description, string usage, string doc_url, string role, btp_func f);
+    ServerFunction(string name, string version, string description, string usage, string doc_url, string role, proj_func f);
+    virtual ~ServerFunction();
+
+
+
+	string getName() { return name; }
+	void   setName(const string &n){ name = n; }
+
+	string getUsageString() { return usage; }
+	void   setUsageString(const string &u){ usage = u; }
+
+	string getDocUrl() { return doc_url; }
+	void   setDocUrl(const string &url){ doc_url = url; }
+
+	string getRole() { return role; }
+	void   setRole(const string &r){ role = r; }
+
+	string getDescriptionString(){ return description; }
+	void   setDescriptionString(const string &desc){ description = desc; }
+
+	string getVersion(){ return version; }
+	void   setVersion(const string &ver){ version = ver; }
+
+	/**
+	 * If you are writing a function that can only operate on a particular kind of data, or one that relies on the presence
+	 * of particular metadata, then you might orride this method in order to stop the server from
+	 * advertising the function in conjunction with datasets to which it cannot be applied.
+	 *
+	 * @param dds A DDS object for the dataset about which we will ask the question:
+	 * Can this function operate on all or some portion of the contents of this dataset?
+	 * CAUTION: Any implementation of this should be careful not to read data (or read as little as possible) from the
+	 * passed DDS. Reading data in this method may have negative effect on overall performance. Examining metadata and
+	 * dataset structure should be the basis for determining the applicability of a function to the dataset.
+	 * @return true If this function operate on all or some portion of the contents of this dataset, false otherwise.
+	 */
+	virtual bool canOperateOn(DDS &) { return true; }
+
+	void setFunction(bool_func bf){
+		d_bool_func = bf;
+		d_btp_func  = 0;
+		d_proj_func = 0;
+	}
+
+	void setFunction(btp_func btp){
+		d_bool_func = 0;
+		d_btp_func  = btp;
+		d_proj_func = 0;
+	}
+
+	void setFunction(proj_func pf){
+		d_bool_func = 0;
+		d_btp_func  = 0;
+		d_proj_func = pf;
+	}
+
+	string getTypeString(){
+		if(d_bool_func)
+			return "boolean";
+		if(d_btp_func)
+			return "basetype";
+		if(d_proj_func)
+			return "projection";
+		return "null";
+	}
+
+
+	bool_func get_bool_func(){ return d_bool_func; }
+	btp_func  get_btp_func() { return d_btp_func;  }
+	proj_func get_proj_func(){ return d_proj_func; }
+
+};
+
+} /* namespace libdap */
+#endif /* ABSTRACTFUNCTION_H_ */
diff --git a/ServerFunctionsList.cc b/ServerFunctionsList.cc
new file mode 100644
index 0000000..eb117fa
--- /dev/null
+++ b/ServerFunctionsList.cc
@@ -0,0 +1,457 @@
+// ServerFunctionsList.cc
+
+// This file is part of bes, A C++ back-end server implementation framework
+// for the OPeNDAP Data Access Protocol.
+
+// Copyright (c) 2013 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#include "config.h"
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <pthread.h>
+
+#include <iostream>
+#include <algorithm>
+
+//#define DODS_DEBUG
+
+#include <expr.h>
+#include "debug.h"
+
+#include "ServerFunctionsList.h"
+
+using std::cerr;
+using std::string;
+using std::endl;
+using namespace std;
+using namespace libdap;
+
+namespace libdap {
+
+static pthread_once_t ServerFunctionsList_instance_control = PTHREAD_ONCE_INIT;
+
+ServerFunctionsList *ServerFunctionsList::d_instance = 0 ;
+
+/**
+ * private static that only gets called once in the life cycle of the process.
+ */
+void ServerFunctionsList::initialize_instance() {
+    if (d_instance == 0) {
+        DBG(cerr << "ServerFunctionsList::initialize_instance() - Creating singleton ServerFunctionList instance." << endl);
+        d_instance = new ServerFunctionsList;
+        #if HAVE_ATEXIT
+            atexit(delete_instance);
+        #endif
+    }
+}
+
+/**
+ * Private static function can only be called by friends andf pThreads code.
+ */
+void ServerFunctionsList::delete_instance() {
+    DBG(cerr << "ServerFunctionsList::delete_instance() - Deleting singleton ServerFunctionList instance." << endl);
+    delete d_instance;
+    d_instance = 0;
+}
+
+/**
+ * Private method insures that nobody can try to delete the singleton class.
+ */
+
+ServerFunctionsList::~ServerFunctionsList() {
+    std::multimap<string,libdap::ServerFunction *>::iterator fit;
+    for(fit=d_func_list.begin(); fit!=d_func_list.end() ; fit++){
+        libdap::ServerFunction *func = fit->second;
+        DBG(cerr << "ServerFunctionsList::~ServerFunctionsList() - Deleting ServerFunction " << func->getName() << " from ServerFunctionsList." << endl);
+        delete func;
+    }
+    d_func_list.clear();
+}
+
+ServerFunctionsList * ServerFunctionsList::TheList() {
+    pthread_once(&ServerFunctionsList_instance_control, initialize_instance);
+    DBG(cerr << "ServerFunctionsList::TheList() - Returning singleton ServerFunctionList instance." << endl);
+    return d_instance;
+}
+
+/**
+ * Adds the passed ServerFunction pointer to the list of ServerFunctions using
+ * the value of ServerFunction.getName() as the key in the list.
+ *
+ * @brief Adds the passed ServerFunction pointer to the list of ServerFunctions.
+ * @param *func A pointer to the ServerFunction object to add to the ServerFunctionList.
+ * The pointer is copied, not the object referenced; this class does not
+ * delete the pointer.
+ */
+void ServerFunctionsList::add_function(ServerFunction *func )
+{
+    DBG(cerr << "ServerFunctionsList::add_function() - Adding ServerFunction " << func->getName() << endl);
+    d_func_list.insert(std::make_pair(func->getName(),func));
+}
+
+#if 0
+
+bool
+ServerFunctionsList::add_function( string name, btp_func func )
+{
+    if (d_btp_func_list[name] == 0) {
+        d_btp_func_list[name] = func;
+        return true;
+    }
+
+    return false;
+}
+
+
+bool
+ServerFunctionsList::add_function( string name, bool_func func )
+{
+    if (d_bool_func_list[name] == 0) {
+        d_bool_func_list[name] = func;
+        return true;
+    }
+
+    return false;
+}
+
+bool
+ServerFunctionsList::add_function( string name, proj_func func )
+{
+    if (d_proj_func_list[name] == 0) {
+        d_proj_func_list[name] = func;
+        return true;
+    }
+
+    return false;
+}
+#endif
+
+#if 0
+void ServerFunctionsList::store_functions(ConstraintEvaluator &ce)
+{
+    if (d_btp_func_list.size() > 0) {
+        map<string, btp_func>::iterator i = d_btp_func_list.begin();
+        map<string, btp_func>::iterator e = d_btp_func_list.end();
+        while (i != e) {
+            ce.add_function((*i).first, (*i).second);
+            ++i;
+        }
+    }
+
+    if (d_bool_func_list.size() > 0) {
+        map<string, bool_func>::iterator i = d_bool_func_list.begin();
+        map<string, bool_func>::iterator e = d_bool_func_list.end();
+        while (i != e) {
+            ce.add_function((*i).first, (*i).second);
+            ++i;
+        }
+    }
+
+    if (d_proj_func_list.size() > 0) {
+        map<string, proj_func>::iterator i = d_proj_func_list.begin();
+        map<string, proj_func>::iterator e = d_proj_func_list.end();
+        while (i != e) {
+            ce.add_function((*i).first, (*i).second);
+            ++i;
+        }
+    }
+}
+#endif
+
+/**
+ * Returns the first boolean function in the list whose key value matches the passed string name.
+ * When a match is found the function returns true and sets returned value parameter *f to
+ * the boolean function held by the ServerFunction object extracted from the list.
+ *
+ * Method:
+ * Looks through the list of ServerFunctions and compares each function's key value (which
+ * would be the value of SurverFunction.getName()) with the value of the string parameter
+ * 'name'. When they match then the returned value parameter is set to the value returned
+ * by ServerFunction.get_btp_func(). If the ServerFunction _is not_  a instance of a boolean
+ * function then the return value will be 0 (null) and the search for matching function will continue.
+ * If the ServerFunction _is_ a boolean function then the returned value will be non-zero and
+ * the search will return true (it found the thing) and the returned value parameter *f will have
+ * it's value set to the boolean function.
+ *
+ *  @brief Find a boolean function with a given name in the function list.
+ *  @param name A string containing the name of the function to find.
+ *  @param *f   A returned value parameter through which a point to the desired function is returned.
+ *
+ */
+bool ServerFunctionsList::find_function(const std::string &name, bool_func *f) const
+{
+#if 0
+    if (d_bool_func_list.empty())
+        return false;
+
+    map<string, bool_func>::const_iterator i = d_bool_func_list.begin();
+    while(i != d_bool_func_list.end()) {
+        if (name == (*i).first && (*f = (*i).second)) {
+            return true;
+        }
+        ++i;
+    }
+
+    return false;
+#endif
+
+    if (d_func_list.empty())
+        return false;
+
+    std::pair <std::multimap<std::string,libdap::ServerFunction *>::const_iterator, std::multimap<std::string,libdap::ServerFunction *>::const_iterator> ret;
+    ret = d_func_list.equal_range(name);
+    for (std::multimap<std::string,libdap::ServerFunction *>::const_iterator it=ret.first; it!=ret.second; ++it) {
+        if (name == it->first && (*f = it->second->get_bool_func())){
+            DBG(cerr << "ServerFunctionsList::find_function() - Found boolean function " << it->second->getName() << endl);
+            return true;
+        }
+    }
+    return false;
+
+}
+
+
+
+/**
+ * Returns the first BaseType function in the list whose key value matches the passed string name.
+ * When a match is found the function returns true and sets returned value parameter *f to
+ * the BaseType function held by the ServerFunction object extracted from the list.
+ *
+ * Method:
+ * Looks through the list of ServerFunctions and compares each function's key value (which
+ * would be the value of SurverFunction.getName()) with the value of the string parameter
+ * 'name'. When they match then the returned value parameter is set to the value returned
+ * by ServerFunction.get_btp_func(). If the ServerFunction _is not_  a instance of a BaseType
+ * function then the return value will be 0 (null) and the search for matching function will continue.
+ * If the ServerFunction _is_ a BaseType function then the returned value will be non-zero and
+ * the search will return true (it found the thing) and the returned value parameter *f will have
+ * it's value set to the BaseType function.
+ *
+ *  @brief Find a BaseType function with a given name in the function list.
+ *  @param name A string containing the name of the function to find.
+ *  @param *f   A returned value parameter through which a point to the desired function is returned.
+ *
+ */
+bool ServerFunctionsList::find_function(const string &name, btp_func *f) const
+{
+
+#if 0
+    if (d_btp_func_list.empty())
+        return false;
+
+    map<string, btp_func>::const_iterator i = d_btp_func_list.begin();
+    while(i != d_btp_func_list.end()) {
+        if (name == (*i).first && (*f = (*i).second)) {
+            return true;
+        }
+        ++i;
+    }
+
+    return false;
+#endif
+
+    if (d_func_list.empty())
+        return false;
+    DBG(cerr << "ServerFunctionsList::find_function() - Looking for ServerFunction '" << name << "'" << endl);
+
+    std::pair <std::multimap<string,libdap::ServerFunction *>::const_iterator, std::multimap<string,libdap::ServerFunction *>::const_iterator> ret;
+    ret = d_func_list.equal_range(name);
+    for (std::multimap<string,libdap::ServerFunction *>::const_iterator it=ret.first; it!=ret.second; ++it) {
+        if (name == it->first && (*f = it->second->get_btp_func())){
+            DBG(cerr << "ServerFunctionsList::find_function() - Found basetype function " << it->second->getName() << endl);
+            return true;
+        }
+    }
+
+    return false;
+
+
+
+}
+
+/**
+ * Returns the first projection function in the list whose key value matches the passed string name.
+ * When a match is found the function returns true and sets returned value parameter *f to
+ * the projection function held by the ServerFunction object extracted from the list.
+ *
+ * Method:
+ * Looks through the list of ServerFunctions and looks at each function's key value (which
+ * would be the value of SurverFunction.getName() for each function). When a function has the same
+ * key name as the value of the string parameter 'name', then the returned value parameter is set
+ * the value returned by ServerFunction.get_proj_func(). If the ServerFunction _is not_  a projection
+ * function then the return value will be 0 (null) and the search for matching function will continue.
+ * If the ServerFunction _is_ a projection then the returned value will be non-zero and the search will
+ * return true (it found the thing) and the returned value parameter *f will have it's value set
+ * to the projection function.
+ *
+ *  @brief Find a projection function with a given name in the function list.
+ *  @param name A string containing the name of the function to find.
+ *  @param *f   A returned value parameter through which a point to the desired function is returned.
+ *
+ */
+bool ServerFunctionsList::find_function(const string &name, proj_func *f) const
+{
+
+#if 0
+    if (d_proj_func_list.empty())
+        return false;
+
+    map<string, proj_func>::const_iterator i = d_proj_func_list.begin();
+    while(i != d_proj_func_list.end()) {
+        if (name == (*i).first && (*f = (*i).second)) {
+            return true;
+        }
+        ++i;
+    }
+
+    return false;
+#endif
+
+    if (d_func_list.empty())
+        return false;
+
+    std::pair <std::multimap<string,libdap::ServerFunction *>::const_iterator, std::multimap<string,libdap::ServerFunction *>::const_iterator> ret;
+    ret = d_func_list.equal_range(name);
+    for (std::multimap<string,libdap::ServerFunction *>::const_iterator it=ret.first; it!=ret.second; ++it) {
+        if (name == it->first && (*f = it->second->get_proj_func())){
+            DBG(cerr << "ServerFunctionsList::find_function() - Found projection function " << it->second->getName() << endl);
+           return true;
+        }
+    }
+    return false;
+
+}
+
+
+
+/** @brief Returns an iterator pointing to the first key pair in the ServerFunctionList. */
+std::multimap<string,libdap::ServerFunction *>::iterator ServerFunctionsList::begin()
+{
+    return d_func_list.begin();
+}
+
+/** @brief Returns an iterator pointing to the last key pair in the ServerFunctionList. */
+std::multimap<string,libdap::ServerFunction *>::iterator ServerFunctionsList::end()
+{
+    return d_func_list.end();
+}
+
+
+/**
+ *
+ *
+ * @brief Returns the ServerFunction pointed to by the passed iterator.
+ *
+ */
+libdap::ServerFunction *ServerFunctionsList::getFunction(std::multimap<string,libdap::ServerFunction *>::iterator it)
+{
+    return (*it).second;
+}
+
+
+
+
+
+
+#if 0
+/** @brief dumps information about this object
+ *
+ * Displays the pointer value of this instance along with information about
+ * this catalog directory.
+ *
+ * @param strm C++ i/o stream to dump the information to
+ */
+void ServerFunctionsList::dump(ostream &strm) const
+{
+    strm << BESIndent::LMarg << "ServerFunctionsList::dump - (" << (void *) this << ")" << endl;
+    BESIndent::Indent();
+
+    if (d_btp_func_list.size() > 0) {
+        strm << BESIndent::LMarg << "registered btp functions:" << endl;
+        BESIndent::Indent();
+        map<string, btp_func>::const_iterator i = d_btp_func_list.begin();
+        map<string, btp_func>::const_iterator e = d_btp_func_list.end();
+        while (i != e) {
+            strm << (*i).first << endl;
+            ++i;
+        }
+        BESIndent::UnIndent();
+    }
+    else {
+        strm << BESIndent::LMarg << "registered btp functions: none" << endl;
+    }
+
+    if (d_bool_func_list.size() > 0) {
+        strm << BESIndent::LMarg << "registered bool functions:" << endl;
+        BESIndent::Indent();
+        map<string, bool_func>::const_iterator i = d_bool_func_list.begin();
+        map<string, bool_func>::const_iterator e = d_bool_func_list.end();
+        while (i != e) {
+            strm << (*i).first << endl;
+            ++i;
+        }
+        BESIndent::UnIndent();
+    }
+    else {
+        strm << BESIndent::LMarg << "registered bool functions: none" << endl;
+    }
+
+    if (d_proj_func_list.size() > 0) {
+        strm << BESIndent::LMarg << "registered projection functions:" << endl;
+        BESIndent::Indent();
+        map<string, proj_func>::const_iterator i = d_proj_func_list.begin();
+        map<string, proj_func>::const_iterator e = d_proj_func_list.end();
+        while (i != e) {
+            strm << (*i).first << endl;
+            ++i;
+        }
+        BESIndent::UnIndent();
+    }
+    else {
+        strm << BESIndent::LMarg << "registered projection functions: none" << endl;
+    }
+
+    BESIndent::UnIndent();
+}
+
+ServerFunctionsList *
+ServerFunctionsList::TheList()
+{
+    if (d_instance == 0) {
+        d_instance = new ServerFunctionsList;
+    }
+    return d_instance;
+}
+
+#endif
+
+void ServerFunctionsList::getFunctionNames(vector<string> *names){
+    std::multimap<string,libdap::ServerFunction *>::iterator fit;
+    for(fit=d_func_list.begin(); fit!=d_func_list.end() ; fit++){
+        ServerFunction *func = fit->second;
+        names->push_back(func->getName());
+    }
+}
+
+
+}
diff --git a/ServerFunctionsList.h b/ServerFunctionsList.h
new file mode 100644
index 0000000..59c3551
--- /dev/null
+++ b/ServerFunctionsList.h
@@ -0,0 +1,83 @@
+// ServerFunctionsList.h
+
+// This file is part of bes, A C++ back-end server implementation framework
+// for the OPeNDAP Data Access Protocol.
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2013 OPeNDAP, Inc.
+// Author: Nathan Potter <npotter at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#ifndef I_ServerFunctionsList_h
+#define I_ServerFunctionsList_h 1
+
+#include <map>
+#include <string>
+#include <expr.h>
+
+#include "ServerFunction.h"
+
+
+namespace libdap {
+class ServerFunctionsListUnitTest;
+class ConstraintEvaluator;
+
+//#include "BESObj.h"
+
+class ServerFunctionsList {
+private:
+    static ServerFunctionsList * d_instance;
+    std::multimap<std::string, libdap::ServerFunction *> d_func_list;
+
+    static void initialize_instance();
+    static void delete_instance();
+
+    virtual ~ServerFunctionsList();
+
+    friend class libdap::ServerFunctionsListUnitTest;
+
+protected:
+    ServerFunctionsList() {}
+
+public:
+    static ServerFunctionsList * TheList();
+
+
+    virtual void add_function(libdap::ServerFunction *func);
+
+    virtual bool find_function(const std::string &name, libdap::bool_func *f) const;
+    virtual bool find_function(const std::string &name, libdap::btp_func  *f) const;
+    virtual bool find_function(const std::string &name, libdap::proj_func *f) const;
+
+    //virtual void dump(ostream &strm) const;
+
+    std::multimap<string,libdap::ServerFunction *>::iterator begin();
+    std::multimap<string,libdap::ServerFunction *>::iterator end();
+    ServerFunction *getFunction(std::multimap<string,libdap::ServerFunction *>::iterator it);
+
+    virtual void getFunctionNames(vector<string> *names);
+
+};
+
+}
+
+#endif // I_ServerFunctionsList_h
diff --git a/SignalHandler.cc b/SignalHandler.cc
index 819bb06..d894157 100644
--- a/SignalHandler.cc
+++ b/SignalHandler.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -31,10 +31,6 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    { "$Id: SignalHandler.cc 25112 2011-12-29 21:44:54Z jimg $"
-    };
-
 #include <cstdlib>
 
 #include <signal.h>
@@ -86,7 +82,7 @@ SignalHandler::delete_instance()
 }
 
 /** This private method is the adapter between the C-style interface of the
-    signal sub-system and C++'s method interface. This uses the lookup table
+    signal subsystem and C++'s method interface. This uses the lookup table
     to find an instance of EventHandler and calls that instance's
     handle_signal method.
 
diff --git a/SignalHandler.h b/SignalHandler.h
index ef13015..cd6ac7c 100644
--- a/SignalHandler.h
+++ b/SignalHandler.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/SignalHandlerRegisteredErr.h b/SignalHandlerRegisteredErr.h
index 5a6b8fb..3bf112d 100644
--- a/SignalHandlerRegisteredErr.h
+++ b/SignalHandlerRegisteredErr.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/StdinResponse.h b/StdinResponse.h
index 333f0ff..c5fc1ac 100644
--- a/StdinResponse.h
+++ b/StdinResponse.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Str.cc b/Str.cc
index d93507b..04ab8b3 100644
--- a/Str.cc
+++ b/Str.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,9 +36,7 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: Str.cc 21699 2009-11-05 00:06:01Z jimg $"
-    };
+#include <sstream>
 
 #include "Byte.h"
 #include "Int16.h"
@@ -54,6 +52,8 @@ static char rcsid[] not_used =
 #include "Sequence.h"
 #include "Grid.h"
 
+#include "Marshaller.h"
+#include "UnMarshaller.h"
 
 #include "DDS.h"
 #include "util.h"
@@ -77,7 +77,7 @@ namespace libdap {
     created.
 
 */
-Str::Str(const string &n) : BaseType(n, dods_str_c), _buf("")
+Str::Str(const string &n) : BaseType(n, dods_str_c), d_buf("")
 {}
 
 /** The Str server-side constructor accepts the name of the variable and the
@@ -88,12 +88,12 @@ Str::Str(const string &n) : BaseType(n, dods_str_c), _buf("")
     variable is created
 */
 Str::Str(const string &n, const string &d)
-    : BaseType(n, d, dods_str_c), _buf("")
+    : BaseType(n, d, dods_str_c), d_buf("")
 {}
 
 Str::Str(const Str &copy_from) : BaseType(copy_from)
 {
-    _buf = copy_from._buf;
+    d_buf = copy_from.d_buf;
 }
 
 BaseType *
@@ -111,7 +111,7 @@ Str::operator=(const Str &rhs)
     // Call BaseType::operator=.
     dynamic_cast<BaseType &>(*this) = rhs;
 
-    _buf = rhs._buf;
+    d_buf = rhs.d_buf;
 
     return *this;
 }
@@ -119,11 +119,11 @@ Str::operator=(const Str &rhs)
 unsigned int
 Str::length()
 {
-    return _buf.length();
+    return d_buf.length();
 }
 
 unsigned int
-Str::width()
+Str::width(bool)
 {
     return sizeof(string);
 }
@@ -147,9 +147,9 @@ Str::serialize(ConstraintEvaluator &eval, DDS &dds,
 
     dds.timeout_off();
 
-    m.put_str( _buf ) ;
+    m.put_str( d_buf ) ;
 
-    DBG(cerr << "Exiting: buf = " << _buf << endl);
+    DBG(cerr << "Exiting: buf = " << d_buf << endl);
 
     return true;
 }
@@ -159,7 +159,7 @@ Str::serialize(ConstraintEvaluator &eval, DDS &dds,
 bool
 Str::deserialize(UnMarshaller &um, DDS *, bool)
 {
-    um.get_str( _buf ) ;
+    um.get_str( d_buf ) ;
 
     return false;
 }
@@ -183,11 +183,11 @@ Str::buf2val(void **val)
                           "No place to store a reference to the data.");
     // If *val is null, then the caller has not allocated storage for the
     // value; we must. If there is storage there, assume it is a string and
-    // assign _buf's value to that storage.
+    // assign d_buf's value to that storage.
     if (!*val)
-        *val = new string(_buf);
+        *val = new string(d_buf);
     else
-        *static_cast<string*>(*val) = _buf;
+        *static_cast<string*>(*val) = d_buf;
 
     return sizeof(string*);
 }
@@ -211,7 +211,7 @@ Str::val2buf(void *val, bool)
     if (!val)
         throw InternalErr(__FILE__, __LINE__, "NULL pointer.");
 
-    _buf = *static_cast<string*>(val);
+    d_buf = *static_cast<string*>(val);
 
     return sizeof(string*);
 }
@@ -223,7 +223,7 @@ Str::val2buf(void *val, bool)
 bool
 Str::set_value(const string &value)
 {
-    _buf = value;
+    d_buf = value;
     set_read_p(true);
 
     return true;
@@ -234,31 +234,26 @@ Str::set_value(const string &value)
 string
 Str::value() const
 {
-    return _buf;
+    return d_buf;
 }
 
-#if FILE_METHODS
 void
 Str::print_val(FILE *out, string space, bool print_decl_p)
 {
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = \"%s\";\n", escattr(_buf).c_str()) ;
-    }
-    else
-        fprintf(out, "\"%s\"", escattr(_buf).c_str()) ;
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Str::print_val(ostream &out, string space, bool print_decl_p)
 {
     if (print_decl_p) {
         print_decl(out, space, false);
-	out << " = \"" << escattr(_buf) << "\";\n" ;
+	out << " = \"" << escattr(d_buf) << "\";\n" ;
     }
     else
-	out << "\"" << escattr(_buf) << "\"" ;
+	out << "\"" << escattr(d_buf) << "\"" ;
 }
 
 bool
@@ -286,11 +281,9 @@ Str::ops(BaseType *b, int op)
 
     switch (b->type()) {
     case dods_str_c:
-        return rops<string, string, StrCmp<string, string> >
-               (_buf, dynamic_cast<Str *>(b)->_buf, op);
+        return StrCmp<string, string>(op, d_buf, static_cast<Str*>(b)->value());
     case dods_url_c:
-        return rops<string, string, StrCmp<string, string> >
-               (_buf, dynamic_cast<Url *>(b)->_buf, op);
+        return StrCmp<string, string>(op, d_buf, static_cast<Url*>(b)->value());
     default:
         return false;
     }
@@ -311,7 +304,7 @@ Str::dump(ostream &strm) const
     << (void *)this << ")" << endl ;
     DapIndent::Indent() ;
     BaseType::dump(strm) ;
-    strm << DapIndent::LMarg << "value: " << _buf << endl ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
     DapIndent::UnIndent() ;
 }
 
diff --git a/Str.h b/Str.h
index 1479e41..ca1d93c 100644
--- a/Str.h
+++ b/Str.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -41,8 +41,6 @@
 #include "dods-limits.h"
 #include "BaseType.h"
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -65,7 +63,7 @@ class Str: public BaseType
 {
 
 protected:
-    string _buf;
+    string d_buf;
 
 public:
     Str(const string &n);
@@ -80,7 +78,7 @@ public:
 
     virtual BaseType *ptr_duplicate();
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     // Return the length of the stored string or zero if no string has been
     // stored in the instance's internal buffer.
@@ -95,10 +93,9 @@ public:
 
     virtual bool set_value(const string &value);
     virtual string value() const;
-#if FILE_METHODS
+
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
diff --git a/Structure.cc b/Structure.cc
index e151b22..026ff37 100644
--- a/Structure.cc
+++ b/Structure.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -37,6 +37,8 @@
 
 #include "config.h"
 
+#include <sstream>
+
 #include "Byte.h"
 #include "Int16.h"
 #include "UInt16.h"
@@ -51,6 +53,9 @@
 #include "Sequence.h"
 #include "Grid.h"
 
+#include "DDS.h"
+#include "ConstraintEvaluator.h"
+
 #include "XDRStreamMarshaller.h"
 #include "util.h"
 #include "debug.h"
@@ -62,14 +67,21 @@ using std::endl;
 
 namespace libdap {
 
+#if 0
+/** This method is protected so it's hidden from the whole world, but
+ * available to direct child classes. Because of that, we need a glue-routine
+ * here so children of Structure can specialize it.
+ */
 void
-Structure::_duplicate(const Structure &s)
+Structure::m_duplicate(const Structure &s)
 {
+    Constructor::m_duplicate(s);
+#if 0
     Structure &cs = const_cast<Structure &>(s);
 
     DBG(cerr << "Copying structure: " << name() << endl);
 
-    for (Vars_iter i = cs._vars.begin(); i != cs._vars.end(); i++) {
+    for (Vars_iter i = cs.d_vars.begin(); i != cs.d_vars.end(); i++) {
         DBG(cerr << "Copying field: " << (*i)->name() << endl);
         // Jose Garcia
         // I think this assert here is part of a debugging
@@ -78,9 +90,11 @@ Structure::_duplicate(const Structure &s)
         // assert(*i);
         BaseType *btp = (*i)->ptr_duplicate();
         btp->set_parent(this);
-        _vars.push_back(btp);
+        d_vars.push_back(btp);
     }
+#endif
 }
+#endif
 
 /** The Structure constructor requires only the name of the variable
     to be created. The name may be omitted, which will create a
@@ -108,12 +122,12 @@ Structure::Structure(const string &n, const string &d)
 /** The Structure copy constructor. */
 Structure::Structure(const Structure &rhs) : Constructor(rhs)
 {
-    _duplicate(rhs);
+    m_duplicate(rhs);
 }
 
 Structure::~Structure()
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         BaseType *btp = *i ;
         delete btp ;  btp = 0;
     }
@@ -133,32 +147,34 @@ Structure::operator=(const Structure &rhs)
 
     dynamic_cast<Constructor &>(*this) = rhs; // run Constructor=
 
-    _duplicate(rhs);
+    m_duplicate(rhs);
 
     return *this;
 }
 
+#if 0
 int
 Structure::element_count(bool leaves)
 {
     if (!leaves)
-        return _vars.size();
+        return d_vars.size();
     else {
         int i = 0;
-        for (Vars_iter j = _vars.begin(); j != _vars.end(); j++) {
-            j += (*j)->element_count(leaves);
+        for (Vars_iter j = d_vars.begin(); j != d_vars.end(); j++) {
+            i += (*j)->element_count(leaves);
         }
         return i;
     }
 }
+#endif
 
 bool
 Structure::is_linear()
 {
     bool linear = true;
-    for (Vars_iter i = _vars.begin(); linear && i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); linear && i != d_vars.end(); i++) {
         if ((*i)->type() == dods_structure_c)
-            linear = linear && dynamic_cast<Structure*>((*i))->is_linear();
+            linear = linear && static_cast<Structure*>((*i))->is_linear();
         else
             linear = linear && (*i)->is_simple_type();
     }
@@ -166,10 +182,11 @@ Structure::is_linear()
     return linear;
 }
 
+#if 0
 void
 Structure::set_send_p(bool state)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         (*i)->set_send_p(state);
     }
 
@@ -179,13 +196,14 @@ Structure::set_send_p(bool state)
 void
 Structure::set_read_p(bool state)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         (*i)->set_read_p(state);
     }
 
     BaseType::set_read_p(state);
 }
-
+#endif
+#if 0
 /** Set the \e in_selection property for this variable and all of its
     children.
 
@@ -194,25 +212,26 @@ Structure::set_read_p(bool state)
 void
 Structure::set_in_selection(bool state)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         (*i)->set_in_selection(state);
     }
 
     BaseType::set_in_selection(state);
 }
-
+#endif
 /** @brief Traverse Structure, set Sequence leaf nodes. */
 void
 Structure::set_leaf_sequence(int level)
 {
     for (Vars_iter i = var_begin(); i != var_end(); i++) {
         if ((*i)->type() == dods_sequence_c)
-            dynamic_cast<Sequence&>(**i).set_leaf_sequence(++level);
+        	static_cast<Sequence&>(**i).set_leaf_sequence(++level);
         else if ((*i)->type() == dods_structure_c)
-            dynamic_cast<Structure&>(**i).set_leaf_sequence(level);
+        	static_cast<Structure&>(**i).set_leaf_sequence(level);
     }
 }
 
+#if 0
 /** Adds an element to a Structure.
 
     @param bt A pointer to the DAP2 type variable to add to this Structure.
@@ -223,8 +242,10 @@ Structure::add_var(BaseType *bt, Part)
     // Jose Garcia
     // Passing and invalid pointer to an object is a developer's error.
     if (!bt)
-        throw InternalErr(__FILE__, __LINE__,
-                          "The BaseType parameter cannot be null.");
+        throw InternalErr(__FILE__, __LINE__, "The BaseType parameter cannot be null.");
+
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Structure.");
 
     // Jose Garcia
     // Now we add a copy of bt so the external user is able to destroy bt as
@@ -233,7 +254,7 @@ Structure::add_var(BaseType *bt, Part)
     // inside"
     BaseType *btp = bt->ptr_duplicate();
     btp->set_parent(this);
-    _vars.push_back(btp);
+    d_vars.push_back(btp);
 }
 
 /** Adds an element to a Structure.
@@ -243,14 +264,14 @@ Structure::add_var(BaseType *bt, Part)
 void
 Structure::add_var_nocopy(BaseType *bt, Part)
 {
-    // Jose Garcia
-    // Passing and invalid pointer to an object is a developer's error.
     if (!bt)
-        throw InternalErr(__FILE__, __LINE__,
-                          "The BaseType parameter cannot be null.");
+        throw InternalErr(__FILE__, __LINE__, "The BaseType parameter cannot be null.");
+
+    if (bt->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Structure.");
 
     bt->set_parent(this);
-    _vars.push_back(bt);
+    d_vars.push_back(bt);
 }
 
 
@@ -260,42 +281,42 @@ Structure::add_var_nocopy(BaseType *bt, Part)
 void
 Structure::del_var(const string &n)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         if ((*i)->name() == n) {
             BaseType *bt = *i ;
-            _vars.erase(i) ;
+            d_vars.erase(i) ;
             delete bt ; bt = 0;
             return;
         }
     }
 }
-
-/** @brief simple implementation of reat that iterates through vars
+#endif
+#if 0
+/** @brief simple implementation of read that iterates through vars
  *  and calls read on them
  *
  * @return returns false to signify all has been read
  */
-bool
-Structure::read()
+bool Structure::read()
 {
-    if( !read_p() )
-    {
-	for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
-	    (*i)->read() ;
-	}
-	set_read_p(true) ;
+    if (!read_p()) {
+        for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
+            (*i)->read();
+        }
+        set_read_p(true);
     }
 
-    return false ;
+    return false;
 }
-
+#endif
+#if 0
 // TODO Recode to use width(bool)
 unsigned int
 Structure::width()
 {
     unsigned int sz = 0;
 
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         sz += (*i)->width();
     }
 
@@ -314,7 +335,7 @@ Structure::width(bool constrained)
 {
     unsigned int sz = 0;
 
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
     	if (constrained) {
     		if ((*i)->send_p())
     			sz += (*i)->width(constrained);
@@ -326,8 +347,9 @@ Structure::width(bool constrained)
 
     return sz;
 }
+#endif
 
-
+#if 0
 void
 Structure::intern_data(ConstraintEvaluator & eval, DDS & dds)
 {
@@ -335,7 +357,7 @@ Structure::intern_data(ConstraintEvaluator & eval, DDS & dds)
     if (!read_p())
         read();          // read() throws Error and InternalErr
 
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         if ((*i)->send_p()) {
             (*i)->intern_data(eval, dds);
         }
@@ -358,17 +380,17 @@ Structure::serialize(ConstraintEvaluator &eval, DDS &dds,
 
     dds.timeout_off();
 
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         if ((*i)->send_p()) {
 #ifdef CHECKSUMS
-            XDRStreamMarshaller &sm = dynamic_cast<XDRStreamMarshaller &>(m);
-            if ((*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
-                sm.reset_checksum();
+            XDRStreamMarshaller *sm = dynamic_cast<XDRStreamMarshaller*>(&m);
+            if (sm && sm->checksums() && (*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
+                sm->reset_checksum();
 
-            (*i)->serialize(eval, dds, sm, false);
+            (*i)->serialize(eval, dds, m, false);
 
-            if ((*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
-                cerr << (*i)->name() << ": " << sm.get_checksum() << endl;
+            if (sm && sm->checksums() && (*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
+                sm->get_checksum();
 #else
             (*i)->serialize(eval, dds, m, false);
 #endif
@@ -381,13 +403,14 @@ Structure::serialize(ConstraintEvaluator &eval, DDS &dds,
 bool
 Structure::deserialize(UnMarshaller &um, DDS *dds, bool reuse)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         (*i)->deserialize(um, dds, reuse);
     }
 
     return false;
 }
-
+#endif
+#if 0
 /**  @brief Never call this
 
      This method cannot be used to change values of a Structure since
@@ -411,7 +434,9 @@ Structure::buf2val(void **)
 {
     return sizeof(Structure);
 }
+#endif
 
+#if 0
 BaseType *
 Structure::var(const string &name, bool exact_match, btp_stack *s)
 {
@@ -435,13 +460,14 @@ Structure::var(const string &n, btp_stack &s)
 
     return m_leaf_match(name, &s);
 }
-
+#endif
+#if 0
 // Private method to find a variable using the shorthand name. This
 // should be moved to Constructor.
 BaseType *
 Structure::m_leaf_match(const string &name, btp_stack *s)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         if ((*i)->name() == name) {
             if (s) {
                 DBG(cerr << "Pushing " << this->name() << endl);
@@ -465,23 +491,23 @@ Structure::m_leaf_match(const string &name, btp_stack *s)
 }
 
 // Breadth-first search for NAME. If NAME contains one or more dots (.)
+// TODO The btp_stack is not needed since there are 'back pointers' in
+// BaseType.
 BaseType *
 Structure::m_exact_match(const string &name, btp_stack *s)
 {
-    for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
-        DBG(cerr << "Looking at " << (*i)->name() << " in: " << *i
-            << endl);
+    // Look for name at the top level first.
+    for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
         if ((*i)->name() == name) {
-            DBG(cerr << "Found " << (*i)->name() << " in: "
-                << *i << endl);
-            if (s) {
-                DBG(cerr << "Pushing " << this->name() << endl);
+            if (s)
                 s->push(static_cast<BaseType *>(this));
-            }
+
             return *i;
         }
     }
 
+    // If it was not found using the simple search, look for a dot and
+    // search the hierarchy.
     string::size_type dot_pos = name.find("."); // zero-based index of `.'
     if (dot_pos != string::npos) {
         string aggregate = name.substr(0, dot_pos);
@@ -489,11 +515,9 @@ Structure::m_exact_match(const string &name, btp_stack *s)
 
         BaseType *agg_ptr = var(aggregate);
         if (agg_ptr) {
-            DBG(cerr << "Descending into " << agg_ptr->name() << endl);
-            if (s) {
-                DBG(cerr << "Pushing " << this->name() << endl);
+            if (s)
                 s->push(static_cast<BaseType *>(this));
-            }
+
             return agg_ptr->var(field, true, s); // recurse
         }
         else
@@ -502,28 +526,17 @@ Structure::m_exact_match(const string &name, btp_stack *s)
 
     return 0;
 }
-
-#if FILE_METHODS
+#endif
+// TODO Can these be removed and the versions in Constructor used instead?
+// Yes.
+#if 0
 void
 Structure::print_val(FILE *out, string space, bool print_decl_p)
 {
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = ") ;
-    }
-
-    fprintf(out, "{ ") ;
-    for (Vars_citer i = _vars.begin(); i != _vars.end();
-         i++, (void)(i != _vars.end() && fprintf(out, ", "))) {
-        (*i)->print_val(out, "", false);
-    }
-
-    fprintf(out, " }") ;
-
-    if (print_decl_p)
-        fprintf(out, ";\n") ;
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 Structure::print_val(ostream &out, string space, bool print_decl_p)
@@ -534,8 +547,8 @@ Structure::print_val(ostream &out, string space, bool print_decl_p)
     }
 
     out << "{ " ;
-    for (Vars_citer i = _vars.begin(); i != _vars.end();
-         i++, (void)(i != _vars.end() && out << ", ")) {
+    for (Vars_citer i = d_vars.begin(); i != d_vars.end();
+         i++, (void)(i != d_vars.end() && out << ", ")) {
         (*i)->print_val(out, "", false);
     }
 
@@ -544,7 +557,9 @@ Structure::print_val(ostream &out, string space, bool print_decl_p)
     if (print_decl_p)
 	out << ";\n" ;
 }
+#endif
 
+#if 0
 bool
 Structure::check_semantics(string &msg, bool all)
 {
@@ -553,11 +568,11 @@ Structure::check_semantics(string &msg, bool all)
 
     bool status = true;
 
-    if (!unique_names(_vars, name(), type_name(), msg))
+    if (!unique_names(d_vars, name(), type_name(), msg))
         return false;
 
     if (all) {
-        for (Vars_iter i = _vars.begin(); i != _vars.end(); i++) {
+        for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
             //assert(*i);
             if (!(*i)->check_semantics(msg, true)) {
                 status = false;
@@ -569,6 +584,7 @@ Structure::check_semantics(string &msg, bool all)
 exit:
     return status;
 }
+#endif
 
 /** @brief dumps information about this object
  *
diff --git a/Structure.h b/Structure.h
index bbad992..ba67a90 100644
--- a/Structure.h
+++ b/Structure.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -44,27 +44,14 @@
 
 #include <vector>
 
-#ifndef _basetype_h
-#include "BaseType.h"
-#endif
-
-#ifndef _constructor_h
 #include "Constructor.h"
-#endif
-
-#ifndef _dds_h
-#include "DDS.h"
-#endif
-
-#ifndef constraint_evaluator_h
-#include "ConstraintEvaluator.h"
-#endif
-
-#define FILE_METHODS 1
 
 namespace libdap
 {
 
+class DDS;
+class ConstraintEvaluator;
+
 /** This data type is used to hold a collection of related data types,
     in a manner roughly corresponding to a C structure.  The member
     types can be simple or compound types, and can include other
@@ -92,19 +79,21 @@ namespace libdap
     ``shoe_size'', then you can refer to Tom's shoe size as
     ``Tom.shoe_size''.
 
-    @todo Refactor with Sequence moving methods up into Constructor.
-
     @brief Holds a structure (aggregate) type.
 */
 
 class Structure: public Constructor
 {
 private:
+#if 0
     BaseType *m_leaf_match(const string &name, btp_stack *s = 0);
     BaseType *m_exact_match(const string &name, btp_stack *s = 0);
+#endif
 
 protected:
-    void _duplicate(const Structure &s);
+#if 0
+    void m_duplicate(const Structure &s);
+#endif
 
 public:
     Structure(const string &n);
@@ -116,48 +105,59 @@ public:
     Structure &operator=(const Structure &rhs);
     virtual BaseType *ptr_duplicate();
 
+#if 0
     virtual int element_count(bool leaves = false);
+#endif
     virtual bool is_linear();
 
+#if 0
     virtual void set_send_p(bool state);
     virtual void set_read_p(bool state);
+#endif
+#if 0
     virtual void set_in_selection(bool state);
+#endif
     virtual void set_leaf_sequence(int level = 1);
-
-    virtual unsigned int width();
+#if 0
+    virtual unsigned int width(bool constrained = false);
     virtual unsigned int width(bool constrained);
-
+#endif
+#if 0
     virtual void intern_data(ConstraintEvaluator &eval, DDS &dds);
     virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
 			   Marshaller &m, bool ce_eval = true);
     virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse = false);
-
+#endif
+#if 0
     // Do not store values in memory as for C; force users to work with the
     // C++ objects as defined by the DAP.
 
     virtual unsigned int val2buf(void *val, bool reuse = false);
     virtual unsigned int buf2val(void **val);
+#endif
 
-    virtual BaseType *var(const string &name, bool exact_match = true,
-                          btp_stack *s = 0);
-
+#if 0
+    virtual BaseType *var(const string &name, bool exact_match = true, btp_stack *s = 0);
     virtual BaseType *var(const string &n, btp_stack &s);
-
+#endif
+#if 0
     virtual void add_var(BaseType *bt, Part part = nil);
     virtual void add_var_nocopy(BaseType *bt, Part part = nil);
 
     virtual void del_var(const string &name);
-
+#endif
+#if 0
     virtual bool read() ;
-#if FILE_METHODS
+#endif
+#if 0
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
-
+#endif
+#if 0
     virtual bool check_semantics(string &msg, bool all = false);
-
+#endif
     virtual void dump(ostream &strm) const ;
 };
 
diff --git a/UInt16.cc b/UInt16.cc
index c08cf1a..e8938dc 100644
--- a/UInt16.cc
+++ b/UInt16.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,23 +36,23 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: UInt16.cc 21699 2009-11-05 00:06:01Z jimg $"
-    };
+#include <sstream>
 
-#include "Byte.h"
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
 #include "Int16.h"
 #include "UInt16.h"
 #include "Int32.h"
 #include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
 #include "Float32.h"
 #include "Float64.h"
 #include "Str.h"
 #include "Url.h"
-#include "Array.h"
-#include "Structure.h"
-#include "Sequence.h"
-#include "Grid.h"
+
+#include "Marshaller.h"
+#include "UnMarshaller.h"
 
 #include "DDS.h"
 #include "util.h"
@@ -88,7 +88,7 @@ UInt16::UInt16(const string &n, const string &d)
 
 UInt16::UInt16(const UInt16 &copy_from) : BaseType(copy_from)
 {
-    _buf = copy_from._buf;
+    d_buf = copy_from.d_buf;
 }
 
 BaseType *
@@ -105,13 +105,13 @@ UInt16::operator=(const UInt16 &rhs)
 
     dynamic_cast<BaseType &>(*this) = rhs;
 
-    _buf = rhs._buf;
+    d_buf = rhs.d_buf;
 
     return *this;
 }
 
 unsigned int
-UInt16::width()
+UInt16::width(bool)
 {
     return sizeof(dods_uint16);
 }
@@ -132,7 +132,7 @@ UInt16::serialize(ConstraintEvaluator &eval, DDS &dds,
 
     dds.timeout_off();
 
-    m.put_uint16( _buf ) ;
+    m.put_uint16( d_buf ) ;
 
     return true;
 }
@@ -140,7 +140,7 @@ UInt16::serialize(ConstraintEvaluator &eval, DDS &dds,
 bool
 UInt16::deserialize(UnMarshaller &um, DDS *, bool)
 {
-    um.get_uint16( _buf ) ;
+    um.get_uint16( d_buf ) ;
 
     return false;
 }
@@ -156,7 +156,7 @@ UInt16::val2buf(void *val, bool)
         throw InternalErr(__FILE__, __LINE__,
                           "The incoming pointer does not contain any data.");
 
-    _buf = *(dods_uint16 *)val;
+    d_buf = *(dods_uint16 *)val;
 
     return width();
 }
@@ -172,7 +172,7 @@ UInt16::buf2val(void **val)
     if (!*val)
         *val = new dods_uint16;
 
-    *(dods_uint16 *)*val = _buf;
+    *(dods_uint16 *)*val = d_buf;
 
     return width();
 }
@@ -180,40 +180,35 @@ UInt16::buf2val(void **val)
 dods_uint16
 UInt16::value() const
 {
-    return _buf;
+    return d_buf;
 }
 
 bool
 UInt16::set_value(dods_uint16 i)
 {
-    _buf = i;
+    d_buf = i;
     set_read_p(true);
 
     return true;
 }
 
-#if FILE_METHODS
 void
 UInt16::print_val(FILE *out, string space, bool print_decl_p)
 {
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = %u;\n", (unsigned int)_buf) ;
-    }
-    else
-        fprintf(out, "%u", (unsigned int)_buf) ;
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 UInt16::print_val(ostream &out, string space, bool print_decl_p)
 {
     if (print_decl_p) {
         print_decl(out, space, false);
-	out << " = " << (unsigned int)_buf << ";\n" ;
+	out << " = " << (unsigned int)d_buf << ";\n" ;
     }
     else
-	out << (unsigned int)_buf ;
+	out << (unsigned int)d_buf ;
 }
 
 bool
@@ -240,29 +235,28 @@ UInt16::ops(BaseType *b, int op)
     }
 
     switch (b->type()) {
-    case dods_byte_c:
-        return rops<dods_uint16, dods_byte, Cmp<dods_uint16, dods_byte> >
-               (_buf, dynamic_cast<Byte *>(b)->_buf, op);
-    case dods_int16_c:
-        return rops<dods_uint16, dods_int16, USCmp<dods_uint16, dods_int16> >
-               (_buf, dynamic_cast<Int16 *>(b)->_buf, op);
-    case dods_uint16_c:
-        return rops<dods_uint16, dods_uint16, Cmp<dods_uint16, dods_uint16> >
-               (_buf, dynamic_cast<UInt16 *>(b)->_buf, op);
-    case dods_int32_c:
-        return rops<dods_uint16, dods_int32, USCmp<dods_uint16, dods_int32> >
-               (_buf, dynamic_cast<Int32 *>(b)->_buf, op);
-    case dods_uint32_c:
-        return rops<dods_uint16, dods_uint32, Cmp<dods_uint16, dods_uint32> >
-               (_buf, dynamic_cast<UInt32 *>(b)->_buf, op);
-    case dods_float32_c:
-        return rops<dods_uint16, dods_float32, Cmp<dods_uint16, dods_float32> >
-               (_buf, dynamic_cast<Float32 *>(b)->_buf, op);
-    case dods_float64_c:
-        return rops<dods_uint16, dods_float64, Cmp<dods_uint16, dods_float64> >
-               (_buf, dynamic_cast<Float64 *>(b)->_buf, op);
-    default:
-        return false;
+        case dods_int8_c:
+            return USCmp<dods_uint16, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return Cmp<dods_uint16, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return USCmp<dods_uint16, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return Cmp<dods_uint16, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return USCmp<dods_uint16, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return Cmp<dods_uint16, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return USCmp<dods_uint16, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return Cmp<dods_uint16, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return USCmp<dods_uint16, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return USCmp<dods_uint16, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
     }
 }
 
@@ -281,7 +275,7 @@ UInt16::dump(ostream &strm) const
     << (void *)this << ")" << endl ;
     DapIndent::Indent() ;
     BaseType::dump(strm) ;
-    strm << DapIndent::LMarg << "value: " << _buf << endl ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
     DapIndent::UnIndent() ;
 }
 
diff --git a/UInt16.h b/UInt16.h
index 56c1525..6587856 100644
--- a/UInt16.h
+++ b/UInt16.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -49,8 +49,6 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -58,20 +56,8 @@ namespace libdap
 
 class UInt16: public BaseType
 {
-    /** This class allows Byte, ..., Float64 access to <tt>_buf</tt> to
-    simplify and speed up the relational operators.
-
-    NB: According to Stroustrup it does not matter where (public, private
-    or protected) friend classes are declared. */
-    friend class Byte;
-    friend class Int16;
-    friend class Int32;
-    friend class UInt32;
-    friend class Float32;
-    friend class Float64;
-
 protected:
-    dods_uint16 _buf;
+    dods_uint16 d_buf;
 
 public:
     UInt16(const string &n);
@@ -85,7 +71,7 @@ public:
 
     virtual BaseType *ptr_duplicate();
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
 			   Marshaller &m, bool ce_eval = true);
@@ -96,10 +82,9 @@ public:
 
     virtual dods_uint16 value() const;
     virtual bool set_value(dods_uint16 val);
-#if FILE_METHODS
+
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
diff --git a/UInt32.cc b/UInt32.cc
index 8a90420..b202920 100644
--- a/UInt32.cc
+++ b/UInt32.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,23 +36,23 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: UInt32.cc 21699 2009-11-05 00:06:01Z jimg $"
-    };
+#include <sstream>
 
-#include "Byte.h"
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
 #include "Int16.h"
 #include "UInt16.h"
 #include "Int32.h"
 #include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
 #include "Float32.h"
 #include "Float64.h"
 #include "Str.h"
 #include "Url.h"
-#include "Array.h"
-#include "Structure.h"
-#include "Sequence.h"
-#include "Grid.h"
+
+#include "Marshaller.h"
+#include "UnMarshaller.h"
 
 #include "DDS.h"
 #include "util.h"
@@ -89,7 +89,7 @@ UInt32::UInt32(const string &n, const string &d)
 
 UInt32::UInt32(const UInt32 &copy_from) : BaseType(copy_from)
 {
-    _buf = copy_from._buf;
+    d_buf = copy_from.d_buf;
 }
 
 BaseType *
@@ -106,13 +106,13 @@ UInt32::operator=(const UInt32 &rhs)
 
     dynamic_cast<BaseType &>(*this) = rhs;
 
-    _buf = rhs._buf;
+    d_buf = rhs.d_buf;
 
     return *this;
 }
 
 unsigned int
-UInt32::width()
+UInt32::width(bool)
 {
     return sizeof(dods_uint32);
 }
@@ -133,7 +133,7 @@ UInt32::serialize(ConstraintEvaluator &eval, DDS &dds,
 
     dds.timeout_off();
 
-    m.put_uint32( _buf ) ;
+    m.put_uint32( d_buf ) ;
 
     return true;
 }
@@ -141,7 +141,7 @@ UInt32::serialize(ConstraintEvaluator &eval, DDS &dds,
 bool
 UInt32::deserialize(UnMarshaller &um, DDS *, bool)
 {
-    um.get_uint32( _buf ) ;
+    um.get_uint32( d_buf ) ;
 
     return false;
 }
@@ -158,7 +158,7 @@ UInt32::val2buf(void *val, bool)
         throw InternalErr(__FILE__, __LINE__,
                           "The incoming pointer does not contain any data.");
 
-    _buf = *(dods_uint32 *)val;
+    d_buf = *(dods_uint32 *)val;
 
     return width();
 }
@@ -174,7 +174,7 @@ UInt32::buf2val(void **val)
     if (!*val)
         *val = new dods_uint32;
 
-    *(dods_uint32 *)*val = _buf;
+    *(dods_uint32 *)*val = d_buf;
 
     return width();
 }
@@ -182,40 +182,35 @@ UInt32::buf2val(void **val)
 dods_uint32
 UInt32::value() const
 {
-    return _buf;
+    return d_buf;
 }
 
 bool
 UInt32::set_value(dods_uint32 i)
 {
-    _buf = i;
+    d_buf = i;
     set_read_p(true);
 
     return true;
 }
 
-#if FILE_METHODS
 void
 UInt32::print_val(FILE *out, string space, bool print_decl_p)
 {
-    if (print_decl_p) {
-        print_decl(out, space, false);
-        fprintf(out, " = %u;\n", (unsigned int)_buf) ;
-    }
-    else
-        fprintf(out, "%u", (unsigned int)_buf) ;
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
 }
-#endif
 
 void
 UInt32::print_val(ostream &out, string space, bool print_decl_p)
 {
     if (print_decl_p) {
         print_decl(out, space, false);
-	out << " = " << (unsigned int)_buf << ";\n" ;
+	out << " = " << (unsigned int)d_buf << ";\n" ;
     }
     else
-	out << (unsigned int)_buf ;
+	out << (unsigned int)d_buf ;
 }
 
 bool
@@ -242,29 +237,28 @@ UInt32::ops(BaseType *b, int op)
     }
 
     switch (b->type()) {
-    case dods_byte_c:
-        return rops<dods_uint32, dods_byte, Cmp<dods_uint32, dods_byte> >
-               (_buf, dynamic_cast<Byte *>(b)->_buf, op);
-    case dods_int16_c:
-        return rops<dods_uint32, dods_int16, USCmp<dods_uint32, dods_int16> >
-               (_buf, dynamic_cast<Int16 *>(b)->_buf, op);
-    case dods_uint16_c:
-        return rops<dods_uint32, dods_uint16, Cmp<dods_uint32, dods_uint16> >
-               (_buf, dynamic_cast<UInt16 *>(b)->_buf, op);
-    case dods_int32_c:
-        return rops<dods_uint32, dods_int32, USCmp<dods_uint32, dods_int32> >
-               (_buf, dynamic_cast<Int32 *>(b)->_buf, op);
-    case dods_uint32_c:
-        return rops<dods_uint32, dods_uint32, Cmp<dods_uint32, dods_uint32> >
-               (_buf, dynamic_cast<UInt32 *>(b)->_buf, op);
-    case dods_float32_c:
-        return rops<dods_uint32, dods_float32, Cmp<dods_uint32, dods_float32> >
-               (_buf, dynamic_cast<Float32 *>(b)->_buf, op);
-    case dods_float64_c:
-        return rops<dods_uint32, dods_float64, Cmp<dods_uint32, dods_float64> >
-               (_buf, dynamic_cast<Float64 *>(b)->_buf, op);
-    default:
-        return false;
+        case dods_int8_c:
+            return USCmp<dods_uint32, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return Cmp<dods_uint32, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return USCmp<dods_uint32, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return Cmp<dods_uint32, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return USCmp<dods_uint32, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return Cmp<dods_uint32, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return USCmp<dods_uint32, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return Cmp<dods_uint32, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return USCmp<dods_uint32, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return USCmp<dods_uint32, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
     }
 }
 
@@ -283,7 +277,7 @@ UInt32::dump(ostream &strm) const
     << (void *)this << ")" << endl ;
     DapIndent::Indent() ;
     BaseType::dump(strm) ;
-    strm << DapIndent::LMarg << "value: " << _buf << endl ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
     DapIndent::UnIndent() ;
 }
 
diff --git a/UInt32.h b/UInt32.h
index 9949b0d..15d2222 100644
--- a/UInt32.h
+++ b/UInt32.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -49,8 +49,6 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
@@ -60,20 +58,8 @@ namespace libdap
 
 class UInt32: public BaseType
 {
-    /** This class allows Byte, ..., Float64 access to <tt>_buf</tt> to
-    simplify and speed up the relational operators.
-
-    NB: According to Stroustrup it does not matter where (public, private
-    or protected) friend classes are declared. */
-    friend class Byte;
-    friend class Int16;
-    friend class UInt16;
-    friend class Int32;
-    friend class Float32;
-    friend class Float64;
-
 protected:
-    dods_uint32 _buf;
+    dods_uint32 d_buf;
 
 public:
     UInt32(const string &n);
@@ -87,7 +73,7 @@ public:
 
     virtual BaseType *ptr_duplicate() ;
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
 			   Marshaller &m, bool ce_eval = true);
@@ -98,10 +84,9 @@ public:
 
     virtual dods_uint32 value() const;
     virtual bool set_value(dods_uint32 val);
-#if FILE_METHODS
+
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
diff --git a/UInt64.cc b/UInt64.cc
new file mode 100644
index 0000000..c622ad3
--- /dev/null
+++ b/UInt64.cc
@@ -0,0 +1,230 @@
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2012 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#include "config.h"
+
+#include <sstream>
+
+#include "Byte.h"           // synonymous with UInt8 and Char
+#include "Int8.h"
+#include "Int16.h"
+#include "UInt16.h"
+#include "Int32.h"
+#include "UInt32.h"
+#include "Int64.h"
+#include "UInt64.h"
+#include "Float32.h"
+#include "Float64.h"
+#include "Str.h"
+#include "Url.h"
+
+#include "DAP4StreamMarshaller.h"
+#include "DAP4StreamUnMarshaller.h"
+
+#include "DDS.h"
+#include "util.h"
+#include "parser.h"
+#include "Operators.h"
+#include "dods-limits.h"
+#include "debug.h"
+#include "InternalErr.h"
+
+using std::cerr;
+using std::endl;
+
+namespace libdap {
+
+/** The UInt64 constructor accepts the name of the variable to be created.
+
+    @param n A string containing the name of the variable to be created.
+    variable is created
+*/
+UInt64::UInt64(const string &n)
+        : BaseType(n, dods_uint64_c)
+{}
+
+/** The UInt64 server-side constructor accepts the name of the variable and
+    the dataset name from which this instance is created.
+
+    @param n A string containing the name of the variable to be created.
+    @param d A string containing the name of the dataset from which this
+    variable is created
+*/
+UInt64::UInt64(const string &n, const string &d)
+        : BaseType(n, d, dods_uint64_c)
+{}
+
+UInt64::UInt64(const UInt64 &copy_from) : BaseType(copy_from)
+{
+    d_buf = copy_from.d_buf;
+}
+
+BaseType *
+UInt64::ptr_duplicate()
+{
+    return new UInt64(*this);
+}
+
+UInt64 &
+UInt64::operator=(const UInt64 &rhs)
+{
+    if (this == &rhs)
+        return *this;
+
+    dynamic_cast<BaseType &>(*this) = rhs;
+
+    d_buf = rhs.d_buf;
+
+    return *this;
+}
+
+unsigned int
+UInt64::width(bool)
+{
+    return sizeof(dods_uint64);
+}
+
+bool
+UInt64::serialize(ConstraintEvaluator &eval, DDS &dds,
+                  Marshaller &m, bool ce_eval)
+{
+    dds.timeout_on();
+
+    if (!read_p())
+        read();  // read() throws Error and InternalErr
+
+#if EVAL
+    if (ce_eval && !eval.eval_selection(dds, dataset()))
+        return true;
+#endif
+
+    dds.timeout_off();
+
+    static_cast<DAP4StreamMarshaller*>(&m)->put_uint64( d_buf ) ;
+
+    return true;
+}
+
+bool
+UInt64::deserialize(UnMarshaller &um, DDS *, bool)
+{
+    // TODO assert
+    static_cast<DAP4StreamUnMarshaller*>(&um)->get_uint64( d_buf ) ;
+
+    return false;
+}
+
+dods_uint64
+UInt64::value() const
+{
+    return d_buf;
+}
+
+bool
+UInt64::set_value(dods_uint64 i)
+{
+    d_buf = i;
+    set_read_p(true);
+
+    return true;
+}
+
+void
+UInt64::print_val(FILE *out, string space, bool print_decl_p)
+{
+    ostringstream oss;
+    print_val(oss, space, print_decl_p);
+    fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
+}
+
+void
+UInt64::print_val(ostream &out, string space, bool print_decl_p)
+{
+    if (print_decl_p) {
+        print_decl(out, space, false);
+	out << " = " << (unsigned int)d_buf << ";\n" ;
+    }
+    else
+	out << (unsigned int)d_buf ;
+}
+
+bool
+UInt64::ops(BaseType *b, int op)
+{
+    // Extract the Byte arg's value.
+    if (!read_p() && !read())
+        throw InternalErr(__FILE__, __LINE__, "This value was not read!");
+
+    // Extract the second arg's value.
+    if (!b || !(b->read_p() || b->read()))
+        throw InternalErr(__FILE__, __LINE__, "This value was not read!");
+
+    switch (b->type()) {
+        case dods_int8_c:
+            return USCmp<dods_uint64, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
+        case dods_byte_c:
+            return Cmp<dods_uint64, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
+        case dods_int16_c:
+            return USCmp<dods_uint64, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
+        case dods_uint16_c:
+            return Cmp<dods_uint64, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
+        case dods_int32_c:
+            return USCmp<dods_uint64, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
+        case dods_uint32_c:
+            return Cmp<dods_uint64, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
+        case dods_int64_c:
+            return USCmp<dods_uint64, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
+        case dods_uint64_c:
+            return Cmp<dods_uint64, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
+        case dods_float32_c:
+            return USCmp<dods_uint64, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
+        case dods_float64_c:
+            return USCmp<dods_uint64, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
+        default:
+            return false;
+    }
+}
+
+/** @brief dumps information about this object
+ *
+ * Displays the pointer value of this instance and information about this
+ * instance.
+ *
+ * @param strm C++ i/o stream to dump the information to
+ * @return void
+ */
+void
+UInt64::dump(ostream &strm) const
+{
+    strm << DapIndent::LMarg << "UInt32::dump - ("
+    << (void *)this << ")" << endl ;
+    DapIndent::Indent() ;
+    BaseType::dump(strm) ;
+    strm << DapIndent::LMarg << "value: " << d_buf << endl ;
+    DapIndent::UnIndent() ;
+}
+
+} // namespace libdap
+
diff --git a/Float32.h b/UInt64.h
similarity index 56%
copy from Float32.h
copy to UInt64.h
index 737a099..ca66344 100644
--- a/Float32.h
+++ b/UInt64.h
@@ -4,7 +4,7 @@
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
 // Access Protocol.
 
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
+// Copyright (c) 2012 OPeNDAP, Inc.
 // Author: James Gallagher <jgallagher at opendap.org>
 //
 // This library is free software; you can redistribute it and/or
@@ -19,22 +19,12 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
-// (c) COPYRIGHT URI/MIT 1999
-// Please read the full copyright statement in the file COPYRIGHT_URI.
-//
-// Authors:
-//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
-
-// Interface for Float32 type.
-//
-// 3/22/99 jhrg
-
-#ifndef _float32_h
-#define _float32_h 1
+#ifndef _uint64_h
+#define _uint64_h 1
 
 
 #ifndef _dods_datatypes_h
@@ -49,58 +39,44 @@
 #include "ConstraintEvaluator.h"
 #endif
 
-#define FILE_METHODS 1
-
 namespace libdap
 {
 
-/** @brief Holds a 32-bit floating point value.
+/** @brief Holds a 64-bit unsigned integer.
 
-    @see BaseType
-    */
-class Float32: public BaseType
-{
-    /** This class allows Byte, ..., Float64 access to <tt>_buf</tt>
-	to simplify and speed up the relational operators. */
+    @see BaseType */
 
-    friend class Byte;
-    friend class Int16;
-    friend class UInt16;
-    friend class Int32;
-    friend class UInt32;
-    friend class Float64;
+class UInt64: public BaseType
+{
+    virtual unsigned int val2buf(void *, bool)  { throw InternalErr(__FILE__, __LINE__, "Not implemented for UInt64"); }
+    virtual unsigned int buf2val(void **)  { throw InternalErr(__FILE__, __LINE__, "Not implemented for UInt64"); }
 
 protected:
-    dods_float32 _buf;
+    dods_uint64 d_buf;
 
 public:
-    Float32(const string &n);
-    Float32(const string &n, const string &d);
+    UInt64(const string &n);
+    UInt64(const string &n, const string &d);
+    virtual ~UInt64()
+    {}
 
-    Float32(const Float32 &copy_from);
+    UInt64(const UInt64 &copy_from);
 
-    Float32 &operator=(const Float32 &rhs);
+    UInt64 &operator=(const UInt64 &rhs);
 
-    virtual ~Float32()
-    {}
+    virtual BaseType *ptr_duplicate() ;
 
-    virtual BaseType *ptr_duplicate();
-
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
 			   Marshaller &m, bool ce_eval = true);
     virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse = false);
 
-    virtual unsigned int val2buf(void *val, bool reuse = false);
-    virtual unsigned int buf2val(void **val);
+    virtual dods_uint64 value() const;
+    virtual bool set_value(dods_uint64 val);
 
-    virtual dods_float32 value() const;
-    virtual bool set_value(dods_float32 f);
-#if FILE_METHODS
     virtual void print_val(FILE *out, string space = "",
                            bool print_decl_p = true);
-#endif
     virtual void print_val(ostream &out, string space = "",
                            bool print_decl_p = true);
 
@@ -111,5 +87,5 @@ public:
 
 } // namespace libdap
 
-#endif // _float32_h
+#endif // _uint64_h
 
diff --git a/UnMarshaller.h b/UnMarshaller.h
index e575077..bde5817 100644
--- a/UnMarshaller.h
+++ b/UnMarshaller.h
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Url.cc b/Url.cc
index 70b5b73..e9ea1d3 100644
--- a/Url.cc
+++ b/Url.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/Url.h b/Url.h
index cdef63d..f1bbe9e 100644
--- a/Url.h
+++ b/Url.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -72,6 +72,8 @@ private:
 public:
     Url(const string &n);
     Url(const string &n, const string &d);
+    Url(const string &n, Type t);
+    Url(const string &n, const string &d, Type t);
     virtual ~Url()
     {}
 
diff --git a/VCPP/sample/getdap.cc b/VCPP/sample/getdap.cc
index 7e76391..75a6d58 100644
--- a/VCPP/sample/getdap.cc
+++ b/VCPP/sample/getdap.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,7 +36,7 @@
 #define not_used
 
 static char rcsid[] not_used =
-    { "$Id: getdap.cc 15497 2007-01-07 11:05:13Z jimg $" };
+    { "$Id: getdap.cc 27197 2013-10-01 21:29:54Z jimg $" };
 
 #include <stdio.h>
 #ifdef WIN32
@@ -54,7 +54,7 @@ static char rcsid[] not_used =
 using std::cerr;
 using std::endl;
 
-const char *version = "$Revision: 15497 $";
+const char *version = "$Revision: 27197 $";
 
 extern int dods_keep_temps;     // defined in HTTPResponse.h
 
diff --git a/Vector.cc b/Vector.cc
index 8c044c1..f7f6ae7 100644
--- a/Vector.cc
+++ b/Vector.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -39,14 +39,19 @@
 
 //#define DODS_DEBUG
 
+#include <sstream>
+#include <vector>
 #include <algorithm>
 
 #include "Vector.h"
+#include "Marshaller.h"
+#include "UnMarshaller.h"
+
+#include "dods-datatypes.h"
 #include "escaping.h"
 #include "util.h"
 #include "debug.h"
 #include "InternalErr.h"
-#include <sstream>
 
 using std::cerr;
 using std::endl;
@@ -55,7 +60,7 @@ namespace libdap {
 
 void Vector::_duplicate(const Vector & v)
 {
-    _length = v._length;
+    d_length = v.d_length;
 
     // _var holds the type of the elements. That is, it holds a BaseType
     // which acts as a template for the type of each element.
@@ -77,8 +82,8 @@ void Vector::_duplicate(const Vector & v)
     else {
         // Failure to set the size will make the [] operator barf on the LHS
         // of the assignment inside the loop.
-        _vec.resize(_length);
-        for (int i = 0; i < _length; ++i) {
+        _vec.resize(d_length);
+        for (int i = 0; i < d_length; ++i) {
             // There's no need to call set_parent() for each element; we
             // maintain the back pointer using the _var member. These
             // instances are used to hold _values_ only while the _var
@@ -102,7 +107,7 @@ void Vector::_duplicate(const Vector & v)
  * @return whether the type of this Vector is a cardinal type
  * (ie stored in _buf)
  */
-bool Vector::is_cardinal_type() const
+bool Vector::m_is_cardinal_type() const
 {
     // Not cardinal if no _var at all!
     if (!_var) {
@@ -149,7 +154,7 @@ bool Vector::is_cardinal_type() const
  * @return the size of the buffer created.
  * @exception if the Vector's type is not cardinal type.
  */
-unsigned int Vector::create_cardinal_data_buffer_for_type(unsigned int numEltsOfType)
+unsigned int Vector::m_create_cardinal_data_buffer_for_type(unsigned int numEltsOfType)
 {
     // Make sure we HAVE a _var, or we cannot continue.
     if (!_var) {
@@ -157,11 +162,11 @@ unsigned int Vector::create_cardinal_data_buffer_for_type(unsigned int numEltsOf
     }
 
     // Make sure we only do this for the correct data types.
-    if (!is_cardinal_type()) {
+    if (!m_is_cardinal_type()) {
         throw InternalErr(__FILE__, __LINE__, "create_cardinal_data_buffer_for_type: incorrectly used on Vector whose type was not a cardinal (simple data types).");
     }
 
-    delete_cardinal_data_buffer();
+    m_delete_cardinal_data_buffer();
 
     // Actually new up the array with enough bytes to hold numEltsOfType of the actual type.
     unsigned int bytesPerElt = _var->width();
@@ -177,7 +182,7 @@ unsigned int Vector::create_cardinal_data_buffer_for_type(unsigned int numEltsOf
 }
 
 /** Delete _buf and zero it and _capacity out */
-void Vector::delete_cardinal_data_buffer()
+void Vector::m_delete_cardinal_data_buffer()
 {
     if (_buf) {
         delete[] _buf;
@@ -199,7 +204,7 @@ void Vector::set_cardinal_values_internal(const CardType* fromArray, int numElts
         throw InternalErr(__FILE__, __LINE__, "Logic error: Vector::set_cardinal_values_internal() called with null fromArray!");
     }
     set_length(numElts);
-    create_cardinal_data_buffer_for_type(numElts);
+    m_create_cardinal_data_buffer_for_type(numElts);
     memcpy(_buf, fromArray, numElts * sizeof(CardType));
     set_read_p(true);
 }
@@ -221,7 +226,7 @@ void Vector::set_cardinal_values_internal(const CardType* fromArray, int numElts
  @see Type
  @brief The Vector constructor.  */
 Vector::Vector(const string & n, BaseType * v, const Type & t) :
-    BaseType(n, t), _length(-1), _var(0), _buf(0), _vec(0), _capacity(0)
+    BaseType(n, t), d_length(-1), _var(0), _buf(0), _vec(0), _capacity(0)
 {
     if (v)
         add_var(v);
@@ -251,7 +256,7 @@ Vector::Vector(const string & n, BaseType * v, const Type & t) :
  @see Type
  @brief The Vector constructor.  */
 Vector::Vector(const string & n, const string &d, BaseType * v, const Type & t) :
-    BaseType(n, d, t), _length(-1), _var(0), _buf(0), _vec(0), _capacity(0)
+    BaseType(n, d, t), d_length(-1), _var(0), _buf(0), _vec(0), _capacity(0)
 {
     if (v)
         add_var(v);
@@ -296,6 +301,15 @@ Vector & Vector::operator=(const Vector & rhs)
     return *this;
 }
 
+/**
+ * The Vector (and Array) classes are specific to DAP2. They do not support
+ * the semantics of DAP4 which allows varying dimensions.
+ */
+bool Vector::is_dap2_only_type()
+{
+    return true;
+}
+
 void Vector::set_name(const std::string& name)
 {
     BaseType::set_name(name);
@@ -363,11 +377,12 @@ void Vector::set_read_p(bool state)
 
  @return A pointer to the BaseType if found, otherwise null.
  @see Vector::var */
-BaseType *Vector::var(const string & n, bool exact, btp_stack * s)
+BaseType *Vector::var(const string &n, bool exact, btp_stack *s)
 {
     string name = www2id(n);
     DBG(cerr << "Vector::var: Looking for " << n << endl);
 
+    // If this is a Vector of constructor types, look for 'name' recursively.
     // Make sure to check for the case where name is the default (the empty
     // string). 9/1/98 jhrg
     if (_var->is_constructor_type()) {
@@ -384,7 +399,7 @@ BaseType *Vector::var(const string & n, bool exact, btp_stack * s)
         }
     }
     else {
-        return _var; // I don't see why this isn't return 0 *** jhrg 10/9/08
+        return _var;
     }
 }
 
@@ -464,7 +479,9 @@ BaseType *Vector::var(unsigned int i)
             break;
 
         default:
-            cerr << "Vector::var: Unrecognized type" << endl;
+            throw Error ("Vector::var: Unrecognized type");
+            //cerr << "Vector::var: Unrecognized type" << endl;
+            break;
     }
 
     return 0;
@@ -483,14 +500,14 @@ BaseType *Vector::var(unsigned int i)
  element.
 
  @brief Returns the width of the data, in bytes. */
-unsigned int Vector::width()
+unsigned int Vector::width(bool constrained)
 {
     // Jose Garcia
     if (!_var) {
         throw InternalErr(__FILE__, __LINE__, "Cannot get width since *this* object is not holding data.");
     }
 
-    return length() * _var->width();
+    return length() * _var->width(constrained);
 }
 
 // Returns: the number of elements in the vector.
@@ -501,7 +518,7 @@ unsigned int Vector::width()
  @see Vector::append_dim */
 int Vector::length() const
 {
-    return _length;
+    return d_length;
 }
 
 // set the number of elements in the vector.
@@ -512,7 +529,7 @@ int Vector::length() const
  any new space. */
 void Vector::set_length(int l)
 {
-    _length = l;
+    d_length = l;
 }
 
 // \e l is the number of elements the vector can hold (e.g., if l == 20, then
@@ -707,7 +724,7 @@ bool Vector::deserialize(UnMarshaller &um, DDS * dds, bool reuse)
         case dods_float32_c:
         case dods_float64_c:
             if (_buf && !reuse) {
-                delete_cardinal_data_buffer();
+                m_delete_cardinal_data_buffer();
             }
 
             um.get_int((int &) num);
@@ -723,7 +740,7 @@ bool Vector::deserialize(UnMarshaller &um, DDS * dds, bool reuse)
 
             if (!_buf) {
                 // Make _buf be large enough for length() elements of _var->type()
-                create_cardinal_data_buffer_for_type(length());
+                m_create_cardinal_data_buffer_for_type(length());
                 DBG(cerr << "Vector::deserialize: allocating "
                         << width() << " bytes for an array of "
                         << length() << " " << _var->type_name() << endl);
@@ -838,14 +855,14 @@ unsigned int Vector::val2buf(void *val, bool reuse)
         case dods_uint32_c:
         case dods_float32_c:
         case dods_float64_c: {
-            // width() returns the size given the constraint
-            unsigned int array_wid = width();
+            // width(true) returns the size given the constraint
+            unsigned int array_wid = width(true);
             if (_buf && !reuse) {
-                delete_cardinal_data_buffer();
+                m_delete_cardinal_data_buffer();
             }
 
             if (!_buf) { // First time or no reuse (free'd above)
-                create_cardinal_data_buffer_for_type(length());
+                m_create_cardinal_data_buffer_for_type(length());
             }
 
             memcpy(_buf, val, array_wid);
@@ -856,9 +873,9 @@ unsigned int Vector::val2buf(void *val, bool reuse)
         case dods_url_c: {
             // Assume val points to an array of C++ string objects. Copy
             // them into the vector<string> field of this object.
-            d_str.resize(_length);
-            _capacity = _length;
-            for (int i = 0; i < _length; ++i)
+            d_str.resize(d_length);
+            _capacity = d_length;
+            for (int i = 0; i < d_length; ++i)
                 d_str[i] = *(static_cast<string *> (val) + i);
 
             break;
@@ -869,7 +886,7 @@ unsigned int Vector::val2buf(void *val, bool reuse)
 
     }
 
-    return width();
+    return width(true);
 }
 
 /** Copies data from the Vector buffer.  This function assumes that
@@ -909,7 +926,7 @@ unsigned int Vector::buf2val(void **val)
     if (!val)
         throw InternalErr(__FILE__, __LINE__, "NULL pointer.");
 
-    unsigned int wid = static_cast<unsigned int> (width());
+    unsigned int wid = static_cast<unsigned int> (width(true /* constrained */));
     // This is the width computed using length(). The
     // length() property is changed when a projection
     // constraint is applied. Thus this is the number of
@@ -938,9 +955,9 @@ unsigned int Vector::buf2val(void **val)
         case dods_str_c:
         case dods_url_c: {
             if (!*val)
-                *val = new string[_length];
+                *val = new string[d_length];
 
-            for (int i = 0; i < _length; ++i)
+            for (int i = 0; i < d_length; ++i)
                 *(static_cast<string *> (*val) + i) = d_str[i];
 
             break;
@@ -980,7 +997,7 @@ void Vector::set_vec(unsigned int i, BaseType * val)
     // This is a public method which allows users to set the elements
     // of *this* vector. Passing an invalid index, a NULL pointer or
     // mismatching the vector type are internal errors.
-    if (i >= static_cast<unsigned int> (_length))
+    if (i >= static_cast<unsigned int> (d_length))
         throw InternalErr(__FILE__, __LINE__, "Invalid data: index too large.");
     if (!val)
         throw InternalErr(__FILE__, __LINE__, "Invalid data: null pointer to BaseType object.");
@@ -1057,7 +1074,7 @@ void Vector::reserve_value_capacity(unsigned int numElements)
         case dods_float32_c:
         case dods_float64_c: {
             // Make _buf be the right size and set _capacity
-            create_cardinal_data_buffer_for_type(numElements);
+            m_create_cardinal_data_buffer_for_type(numElements);
         }
             break;
 
@@ -1180,7 +1197,7 @@ unsigned int Vector::set_value_slice_from_row_major_vector(const Vector& rowMajo
             // memcpy the data into this, taking care to do ptr arithmetic on bytes and not sizeof(element)
             int varWidth = _var->width();
             char* pFromBuf = rowMajorData._buf;
-            int numBytesToCopy = rowMajorData.width();
+            int numBytesToCopy = rowMajorData.width(true);
             char* pIntoBuf = _buf + (startElement * varWidth);
             memcpy(pIntoBuf, pFromBuf, numBytesToCopy);
         }
@@ -1381,6 +1398,168 @@ bool Vector::set_value(vector<string> &val, int sz)
 //@}
 
 //@{
+
+/** @brief Get a copy of the data held by this variable using the passed subsetIndex vector to identify which values to return.
+ Read data from this variable's internal storage using the passed std::vector as an sub-setting index to the values to be returned. The
+ memory referenced by \c b must point to enough memory
+ to hold index.size() bytes.
+
+ @param index A std::vector<long> where each value in the vector is the location in the Vector's internal storage from which to read the returned value
+ @param b A pointer to the memory to hold the data; must be at least
+ length() * sizeof(dods_byte) in size.*/
+void Vector::value(vector<unsigned int> *subsetIndex, dods_byte *b) const
+{
+    unsigned long currentIndex;
+
+    for(unsigned long i=0; i<subsetIndex->size() ;++i){
+        currentIndex = (*subsetIndex)[i] ;
+        if(currentIndex> (unsigned int)length()){
+            stringstream s;
+            s << "Vector::value() - Subset index[" << i <<  "] = " << currentIndex << " references a value that is " <<
+                    "outside the bounds of the internal storage [ length()= " << length() << " ] name: '" << name() << "'. ";
+            throw Error(s.str());
+        }
+        b[i] = reinterpret_cast<dods_byte*>(_buf )[currentIndex]; // I like this version - and it works!
+    }
+}
+
+
+/** @brief Get a copy of the data held by this variable using the passed subsetIndex vector to identify which values to return. **/
+void Vector::value(vector<unsigned int> *subsetIndex, dods_uint16 *b) const
+{
+    unsigned long currentIndex;
+
+    for(unsigned long i=0; i<subsetIndex->size() ;++i){
+        currentIndex = (*subsetIndex)[i] ;
+        if(currentIndex> (unsigned int)length()){
+            stringstream s;
+            s << "Vector::value() - Subset index[" << i <<  "] = " << currentIndex << " references a value that is " <<
+                    "outside the bounds of the internal storage [ length()= " << length() << " ] name: '" << name() << "'. ";
+            throw Error(s.str());
+        }
+        b[i] = reinterpret_cast<dods_uint16*>(_buf )[currentIndex]; // I like this version - and it works!
+    }
+}
+
+
+/** @brief Get a copy of the data held by this variable using the passed subsetIndex vector to identify which values to return. **/
+void Vector::value(vector<unsigned int> *subsetIndex, dods_int16 *b) const
+{
+    unsigned long currentIndex;
+
+    for(unsigned long i=0; i<subsetIndex->size() ;++i){
+        currentIndex = (*subsetIndex)[i] ;
+        if(currentIndex> (unsigned int)length()){
+            stringstream s;
+            s << "Vector::value() - Subset index[" << i <<  "] = " << currentIndex << " references a value that is " <<
+                    "outside the bounds of the internal storage [ length()= " << length() << " ] name: '" << name() << "'. ";
+            throw Error(s.str());
+        }
+        b[i] = reinterpret_cast<dods_int16*>(_buf )[currentIndex]; // I like this version - and it works!
+    }
+}
+
+/** @brief Get a copy of the data held by this variable using the passed subsetIndex vector to identify which values to return. **/
+void Vector::value(vector<unsigned int> *subsetIndex, dods_uint32 *b) const
+{
+    unsigned long currentIndex;
+
+    for(unsigned long i=0; i<subsetIndex->size() ;++i){
+        currentIndex = (*subsetIndex)[i] ;
+        if(currentIndex> (unsigned int)length()){
+            stringstream s;
+            s << "Vector::value() - Subset index[" << i <<  "] = " << currentIndex << " references a value that is " <<
+                    "outside the bounds of the internal storage [ length()= " << length() << " ] name: '" << name() << "'. ";
+            throw Error(s.str());
+        }
+        b[i] = reinterpret_cast<dods_uint32*>(_buf )[currentIndex]; // I like this version - and it works!
+    }
+}
+
+/** @brief Get a copy of the data held by this variable using the passed subsetIndex vector to identify which values to return. **/
+void Vector::value(vector<unsigned int> *subsetIndex, dods_int32 *b) const
+{
+    unsigned long currentIndex;
+
+    for(unsigned long i=0; i<subsetIndex->size() ;++i){
+        currentIndex = (*subsetIndex)[i] ;
+        if(currentIndex> (unsigned int)length()){
+            stringstream s;
+            s << "Vector::value() - Subset index[" << i <<  "] = " << currentIndex << " references a value that is " <<
+                    "outside the bounds of the internal storage [ length()= " << length() << " ] name: '" << name() << "'. ";
+            throw Error(s.str());
+        }
+        b[i] = reinterpret_cast<dods_int32*>(_buf )[currentIndex]; // I like this version - and it works!
+    }
+}
+
+/** @brief Get a copy of the data held by this variable using the passed subsetIndex vector to identify which values to return. **/
+void Vector::value(vector<unsigned int> *subsetIndex, dods_float32 *b) const
+{
+    unsigned long currentIndex;
+
+    for(unsigned long i=0; i<subsetIndex->size() ;++i){
+        currentIndex = (*subsetIndex)[i] ;
+        //cerr << "currentIndex: " << currentIndex << endl;
+        if(currentIndex> (unsigned int)length()){
+            stringstream s;
+            s << "Vector::value() - Subset index[" << i <<  "] = " << currentIndex << " references a value that is " <<
+                    "outside the bounds of the internal storage [ length()= " << length() << " ] name: '" << name() << "'. ";
+            throw Error(s.str());
+        }
+        // b[i] = *reinterpret_cast<dods_float32*>(_buf ) + currentIndex; // BROKEN
+        // b[i] = *(reinterpret_cast<dods_float32*>(_buf ) + currentIndex); // Works but I like other forms
+        // b[i] = ((dods_float32*)_buf )[currentIndex]; // Works but isn't as 'safe'
+
+        b[i] = reinterpret_cast<dods_float32*>(_buf )[currentIndex]; // I like this version - and it works!
+
+        //cerr << "b[" << i << "]=" <<  b[i] << endl;
+    }
+}
+
+/** @brief Get a copy of the data held by this variable using the passed subsetIndex vector to identify which values to return. **/
+void Vector::value(vector<unsigned int> *subsetIndex, dods_float64 *b) const
+{
+    unsigned long currentIndex;
+
+    for(unsigned long i=0; i<subsetIndex->size() ;++i){
+        currentIndex = (*subsetIndex)[i] ;
+        if(currentIndex> (unsigned int)length()){
+            stringstream s;
+            s << "Vector::value() - Subset index[" << i <<  "] = " << currentIndex << " references a value that is " <<
+                    "outside the bounds of the internal storage [ length()= " << length() << " ] name: '" << name() << "'. ";
+            throw Error(s.str());
+        }
+        b[i] = reinterpret_cast<dods_float64*>(_buf )[currentIndex]; // I like this version - and it works!
+    }
+}
+
+
+/** @brief Get a copy of the data held by this variable using the passed subsetIndex vector to identify which values to return. **/
+void Vector::value(vector<unsigned int> *subsetIndex, vector<string> &b) const
+{
+    unsigned long currentIndex;
+
+    if (_var->type() == dods_str_c || _var->type() == dods_url_c){
+        for(unsigned long i=0; i<subsetIndex->size() ;++i){
+            currentIndex = (*subsetIndex)[i] ;
+            if(currentIndex > (unsigned int)length()){
+                stringstream s;
+                s << "Vector::value() - Subset index[" << i <<  "] = " << currentIndex << " references a value that is " <<
+                        "outside the bounds of the internal storage [ length()= " << length() << " ] name: '" << name() << "'. ";
+                throw Error(s.str());
+            }
+            b[i] = d_str[currentIndex];
+        }
+    }
+}
+
+
+
+
+
+
+
 /** @brief Get a copy of the data held by this variable.
  Read data from this variable's internal storage and load it into the
  memory referenced by \c b. The argument \c b must point to enough memory
@@ -1446,7 +1625,7 @@ void Vector::value(dods_float64 *b) const
 /** @brief Get a copy of the data held by this variable. */
 void Vector::value(vector<string> &b) const
 {
-    if (_var->type() == dods_byte_c || _var->type() == dods_url_c)
+    if (_var->type() == dods_str_c || _var->type() == dods_url_c)
         b = d_str;
 }
 
@@ -1454,9 +1633,9 @@ void Vector::value(vector<string> &b) const
  buffer's pointer. The caller must delete the storage. */
 void *Vector::value()
 {
-    void *buffer = new char[width()];
+    void *buffer = new char[width(true)];
 
-    memcpy(buffer, _buf, width());
+    memcpy(buffer, _buf, width(true));
 
     return buffer;
 }
@@ -1471,11 +1650,18 @@ void *Vector::value()
  <tt>v</tt>'s name is null, then assume that the array \e is named and
  don't overwrite it with <tt>v</tt>'s null name.
 
+ @note As is the case with Array, this method can be called with a null
+ BaseType pointer.
+
  @param v The template variable for the array
  @param p The Part parameter defaults to nil and is ignored by this method.
  */
 void Vector::add_var(BaseType * v, Part)
 {
+#if 0
+    if (v && v->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Vector.");
+#endif
     // Delete the current template variable
     if (_var) {
         delete _var;
@@ -1509,6 +1695,10 @@ void Vector::add_var(BaseType * v, Part)
 
 void Vector::add_var_nocopy(BaseType * v, Part)
 {
+#if 0
+    if (v && v->is_dap4_only_type())
+        throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Vector.");
+#endif
     // Delete the current template variable
     if (_var) {
         delete _var;
@@ -1537,6 +1727,39 @@ void Vector::add_var_nocopy(BaseType * v, Part)
     }
 }
 
+#if 0
+// branch version
+void Vector::add_var_nocopy(BaseType * v, Part)
+{
+    // Delete the current template variable
+    if (_var) {
+        delete _var;
+        _var = 0;
+    }
+
+    // if 'v' is null, just set _var to null and exit.
+    if (!v) {
+        _var = 0;
+    }
+    else {
+        _var = v;
+
+        // If 'v' has a name, use it as the name of the array. If it *is*
+        // empty, then make sure to copy the array's name to the template
+        // so that software which uses the template's name will still work.
+        if (!v->name().empty())
+            set_name(v->name());
+        else
+            _var->set_name(name());
+
+        _var->set_parent(this); // Vector --> child
+
+        DBG(cerr << "Vector::add_var: Added variable " << v << " ("
+                << v->name() << " " << v->type_name() << ")" << endl);
+    }
+}
+#endif
+
 bool Vector::check_semantics(string & msg, bool)
 {
     return BaseType::check_semantics(msg);
@@ -1555,7 +1778,7 @@ void Vector::dump(ostream &strm) const
     strm << DapIndent::LMarg << "Vector::dump - (" << (void *) this << ")" << endl;
     DapIndent::Indent();
     BaseType::dump(strm);
-    strm << DapIndent::LMarg << "# elements in vector: " << _length << endl;
+    strm << DapIndent::LMarg << "# elements in vector: " << d_length << endl;
     if (_var) {
         strm << DapIndent::LMarg << "base type:" << endl;
         DapIndent::Indent();
@@ -1584,7 +1807,7 @@ void Vector::dump(ostream &strm) const
         switch (_var->type()) {
             case dods_byte_c: {
                 strm << DapIndent::LMarg << "_buf: ";
-                strm.write(_buf, _length);
+                strm.write(_buf, d_length);
                 strm << endl;
             }
                 break;
diff --git a/Vector.h b/Vector.h
index be1ca92..329ac53 100644
--- a/Vector.h
+++ b/Vector.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -78,7 +78,7 @@ namespace libdap
 class Vector: public BaseType
 {
 private:
-    int _length;  // number of elements in the vector
+    int d_length;  // number of elements in the vector
     BaseType *_var;  // base type of the Vector
 
     // _buf was a pointer to void; delete[] complained. 6/4/2001 jhrg
@@ -87,7 +87,7 @@ private:
     vector<BaseType *> _vec; // array for other data
 
     // the number of elements we have allocated memory to store.
-    // This should be either the sizeof(buf)/width() for cardinal data
+    // This should be either the sizeof(buf)/width(bool constrained = false) for cardinal data
     // or the capacity of d_str for strings or capacity of _vec.
     unsigned int _capacity;
 
@@ -95,9 +95,9 @@ protected:
     // This function copies the private members of Vector.
     void _duplicate(const Vector &v);
 
-    bool is_cardinal_type() const;
-    unsigned int create_cardinal_data_buffer_for_type(unsigned int numEltsOfType);
-    void delete_cardinal_data_buffer();
+    bool m_is_cardinal_type() const;
+    unsigned int m_create_cardinal_data_buffer_for_type(unsigned int numEltsOfType);
+    void m_delete_cardinal_data_buffer();
 
     template <class CardType> void set_cardinal_values_internal(const CardType* fromArray, int numElts);
 
@@ -111,6 +111,8 @@ public:
     Vector &operator=(const Vector &rhs);
     virtual BaseType *ptr_duplicate() = 0;
 
+    virtual bool is_dap2_only_type();
+
     virtual void set_name(const std::string& name);
 
     virtual int element_count(bool leaves);
@@ -119,7 +121,7 @@ public:
 
     virtual void set_read_p(bool state);
 
-    virtual unsigned int width();
+    virtual unsigned int width(bool constrained = false);
 
     virtual int length() const;
 
@@ -172,6 +174,15 @@ public:
     virtual void value(dods_float64 *b) const;
     virtual void value(vector<string> &b) const;
 
+    void value(vector<unsigned int> *index, dods_byte *b) const;
+    void value(vector<unsigned int> *index, dods_int16 *b) const;
+    void value(vector<unsigned int> *index, dods_uint16 *b) const;
+    void value(vector<unsigned int> *index, dods_int32 *b) const;
+    void value(vector<unsigned int> *index, dods_uint32 *b) const;
+    void value(vector<unsigned int> *index, dods_float32 *b) const;
+    void value(vector<unsigned int> *index, dods_float64 *b) const;
+    void value(vector<unsigned int> *index, vector<string> &b) const;
+
     virtual void *value();
 
     virtual BaseType *var(const string &name = "", bool exact_match = true,
@@ -181,6 +192,7 @@ public:
 
     virtual void add_var(BaseType *v, Part p = nil);
     virtual void add_var_nocopy(BaseType *v, Part p = nil);
+
     virtual bool check_semantics(string &msg, bool all = false);
 
     virtual void dump(ostream &strm) const ;
diff --git a/XDRFileMarshaller.cc b/XDRFileMarshaller.cc
index cf8ec40..b810b0b 100644
--- a/XDRFileMarshaller.cc
+++ b/XDRFileMarshaller.cc
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/XDRFileMarshaller.h b/XDRFileMarshaller.h
index 0b8526f..decb240 100644
--- a/XDRFileMarshaller.h
+++ b/XDRFileMarshaller.h
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/XDRFileUnMarshaller.cc b/XDRFileUnMarshaller.cc
index c853489..7741fa7 100644
--- a/XDRFileUnMarshaller.cc
+++ b/XDRFileUnMarshaller.cc
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -60,15 +60,13 @@ XDRFileUnMarshaller::XDRFileUnMarshaller( FILE *out )
 }
 
 XDRFileUnMarshaller::XDRFileUnMarshaller()
-    : UnMarshaller(),
-      _source( 0 )
+    : UnMarshaller(), _source( 0 )
 {
     throw InternalErr( __FILE__, __LINE__, "Default constructor not implemented." ) ;
 }
 
 XDRFileUnMarshaller::XDRFileUnMarshaller( const XDRFileUnMarshaller &um )
-    : UnMarshaller( um ),
-      _source( 0 )
+    : UnMarshaller( um ), _source( 0 )
 {
     throw InternalErr( __FILE__, __LINE__, "Copy constructor not implemented." ) ;
 }
@@ -83,6 +81,10 @@ XDRFileUnMarshaller::operator=( const XDRFileUnMarshaller & )
 
 XDRFileUnMarshaller::~XDRFileUnMarshaller( )
 {
+    // Some static code analysis tools complain that delete_xdrstdio
+    // does not close the FILE* it holds, but that's not true with
+    // modern XDR libraries. Don't try to close that FILE*. jhrg 8/27/13
+
     delete_xdrstdio( _source ) ;
 }
 
diff --git a/XDRFileUnMarshaller.h b/XDRFileUnMarshaller.h
index 5d78d59..1ffd749 100644
--- a/XDRFileUnMarshaller.h
+++ b/XDRFileUnMarshaller.h
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -46,6 +46,7 @@ class XDRFileUnMarshaller : public UnMarshaller
 {
 private:
     XDR *			_source ;
+
     				XDRFileUnMarshaller() ;
     				XDRFileUnMarshaller( const XDRFileUnMarshaller &um ) ;
     XDRFileUnMarshaller &	operator=( const XDRFileUnMarshaller & ) ;
diff --git a/XDRStreamMarshaller.cc b/XDRStreamMarshaller.cc
index 89e3c99..af25e23 100644
--- a/XDRStreamMarshaller.cc
+++ b/XDRStreamMarshaller.cc
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -46,7 +46,7 @@ using namespace std;
 
 namespace libdap {
 
-char *XDRStreamMarshaller::_buf = 0;
+char *XDRStreamMarshaller::d_buf = 0;
 
 #define XDR_DAP_BUFF_SIZE 256
 
@@ -58,30 +58,32 @@ char *XDRStreamMarshaller::_buf = 0;
  * @param checksum If true, compute checksums. False by default
  * @param write_data If true, write data values. True by default
  */
-XDRStreamMarshaller::XDRStreamMarshaller(ostream &out, bool checksum, bool write_data) :
-    _sink(0), _out(out), _md5(0), _write_data(write_data), _checksum_ctx_valid(false)
+XDRStreamMarshaller::XDRStreamMarshaller(ostream &out) : // , bool checksum, bool write_data) :
+    /*&d_sink(0),*/ d_out(out)//, _MD_CTX(0), _write_data(write_data), _checksum_ctx_valid(false)
 {
-    if (!_buf)
-        _buf = (char *) malloc(XDR_DAP_BUFF_SIZE);
-    if (!_buf)
+    if (!d_buf)
+        d_buf = (char *) malloc(XDR_DAP_BUFF_SIZE);
+    if (!d_buf)
         throw Error("Failed to allocate memory for data serialization.");
 
-    _sink = new XDR;
-    xdrmem_create(_sink, _buf, XDR_DAP_BUFF_SIZE, XDR_ENCODE);
+    //&d_sink = new XDR;
+    xdrmem_create( &d_sink, d_buf, XDR_DAP_BUFF_SIZE, XDR_ENCODE);
 
+#if CHECKSUMS
     if (checksum) {
-        _md5 = reinterpret_cast<MD5_CTX*>(new char[sizeof(MD5_CTX)]);
+        _MD_CTX = EVP_MD_CTX_create();
     }
+#endif
 }
 
 XDRStreamMarshaller::XDRStreamMarshaller() :
-    Marshaller(), _sink(0), _out(cout)
+    Marshaller(), /*&d_sink(0),*/ d_out(cout)
 {
     throw InternalErr(__FILE__, __LINE__, "Default constructor not implemented.");
 }
 
 XDRStreamMarshaller::XDRStreamMarshaller(const XDRStreamMarshaller &m) :
-    Marshaller(m), _sink(0), _out(cout)
+    Marshaller(m), /*&d_sink(0),*/ d_out(cout)
 {
     throw InternalErr(__FILE__, __LINE__, "Copy constructor not implemented.");
 }
@@ -96,27 +98,32 @@ XDRStreamMarshaller::operator=(const XDRStreamMarshaller &)
 
 XDRStreamMarshaller::~XDRStreamMarshaller()
 {
-    if (_sink)
-        xdr_destroy(_sink); //delete_xdrstdio(_sink);
+    xdr_destroy(&d_sink); //delete_xdrstdio(&d_sink);
+    //delete(&d_sink);
+    //&d_sink = 0;
 
-    // xdr_destroy knows nothing about the memory we allocated
-    delete _sink;
-    _sink = 0;
+#if CHECKSUMS
+    if (_MD_CTX)
+        EVP_MD_CTX_destroy(_MD_CTX);
+#endif
 }
 
+#if 0
 /** Initialize the checksum buffer. This resets the checksum calculation.
  * @exception InternalErr if called when the object was created without
  * checksum support.
  */
 void XDRStreamMarshaller::reset_checksum()
 {
-    if (_md5 == 0)
-        throw InternalErr( __FILE__, __LINE__, "checksum_init() called by checksum is not enabled.");
+#if CHECKSUMS
+    if (_MD_CTX == 0)
+        throw InternalErr( __FILE__, __LINE__, "reset_checksum() called by checksum is not enabled.");
 
-    if (MD5_Init(_md5) == 0)
-        throw Error("Error initializing the checksum buffer.");
+    if (EVP_DigestInit_ex(_MD_CTX, EVP_sha1(), 0) == 0)
+        throw Error("Failed to initialize checksum object.");
 
     _checksum_ctx_valid = true;
+#endif
 }
 
 /** Get the current checksum. It is not possible to continue computing the
@@ -126,229 +133,244 @@ void XDRStreamMarshaller::reset_checksum()
  */
 string XDRStreamMarshaller::get_checksum()
 {
-    if (_md5 == 0)
-        throw InternalErr( __FILE__, __LINE__, "checksum_init() called by checksum is not enabled.");
+#if CHECKSUMS
+    if (_MD_CTX == 0)
+        throw InternalErr(__FILE__, __LINE__, "checksum_init() called by checksum is not enabled.");
 
-    if (!_checksum_ctx_valid)
-        throw InternalErr( __FILE__, __LINE__, "Invalid checksum context.");
+    if (_checksum_ctx_valid) {
+        // '...Final()' 'erases' the context so the next call without a reset
+        // returns a bogus value.
+        _checksum_ctx_valid = false;
 
-    // Setting this here ensures that we call get_checksum() only once for
-    // a context. The 'Final()' 'erases' the context so the next checksum is
-    // bogus.
-    _checksum_ctx_valid = false;
+        vector<unsigned char> md(EVP_MAX_MD_SIZE);
+        unsigned int md_len;
+        if (EVP_DigestFinal_ex(_MD_CTX, &md[0], &md_len) == 0)
+            throw Error("Error computing the checksum (checksum computation).");
 
-    vector<unsigned char> md(MD5_DIGEST_LENGTH);
-    if (MD5_Final(&md[0], _md5) == 0)
-        throw Error("Error computing the checksum.");
+        ostringstream oss;
+        oss.setf(ios::hex, ios::basefield);
+        for (unsigned int i = 0; i < md_len; ++i) {
+            oss << setfill('0') << setw(2) << (unsigned int) md[i];
+        }
 
-    ostringstream oss;
-    oss.setf ( ios::hex, ios::basefield );
-    for (int i = 0; i < MD5_DIGEST_LENGTH; ++i) {
-        oss << setfill('0') << setw(2) << (unsigned int)md[i];
+        _checksum = oss.str();
     }
 
-    return oss.str();
+    return _checksum;
+#else
+    return "";
+#endif
 }
 
 void XDRStreamMarshaller::checksum_update(const void *data, unsigned long len)
 {
-    if (_md5 == 0)
+#if CHECKSUMS
+    if (_MD_CTX == 0)
         throw InternalErr( __FILE__, __LINE__, "checksum_init() called by checksum is not enabled.");
 
     if (!_checksum_ctx_valid)
-        throw InternalErr( __FILE__, __LINE__, "Invalid checksum context.");
+        throw InternalErr( __FILE__, __LINE__, "Invalid checksum context (checksum update).");
 
-    if (MD5_Update(_md5, data, len) == 0) {
+    if (EVP_DigestUpdate(_MD_CTX, data, len) == 0) {
         _checksum_ctx_valid = false;
-        throw Error("Error computing the checksum.");
+        throw Error("Error computing the checksum (checksum update).");
     }
+#endif
 }
+#endif
 
 void XDRStreamMarshaller::put_byte(dods_byte val)
 {
-    if (_md5)
+#if CHECKSUM
+    if (_MD_CTX)
         checksum_update(&val, sizeof(dods_byte));
-
-    if (_write_data) {
+#endif
+//    if (_write_data) {
     DBG( std::cerr << "put_byte: " << val << std::endl );
 
-    if (!xdr_setpos( _sink, 0 ))
+    if (!xdr_setpos( &d_sink, 0 ))
         throw Error("Network I/O Error. Could not send byte data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    if (!xdr_char(_sink, (char *) &val))
+    if (!xdr_char(&d_sink, (char *) &val))
         throw Error("Network I/O Error. Could not send byte data.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    unsigned int bytes_written = xdr_getpos( _sink );
+    unsigned int bytes_written = xdr_getpos( &d_sink );
     if (!bytes_written)
         throw Error("Network I/O Error. Could not send byte data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    _out.write(_buf, bytes_written);
-    }
+    d_out.write(d_buf, bytes_written);
+//    }
 }
 
 void XDRStreamMarshaller::put_int16(dods_int16 val)
 {
-    if (_md5)
+#if 0
+    if (_MD_CTX)
         checksum_update(&val, sizeof(dods_int16));
-
-    if (_write_data) {
-    if (!xdr_setpos( _sink, 0 ))
+#endif
+//    if (_write_data) {
+    if (!xdr_setpos( &d_sink, 0 ))
         throw Error("Network I/O Error. Could not send int 16 data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    if (!XDR_INT16(_sink, &val))
+    if (!XDR_INT16(&d_sink, &val))
         throw Error("Network I/O Error. Could not send int 16 data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
 
-    unsigned int bytes_written = xdr_getpos( _sink );
+    unsigned int bytes_written = xdr_getpos( &d_sink );
     if (!bytes_written)
         throw Error("Network I/O Error. Could not send int 16 data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    _out.write(_buf, bytes_written);
-    }
+    d_out.write(d_buf, bytes_written);
+//    }
 }
 
 void XDRStreamMarshaller::put_int32(dods_int32 val)
 {
-    if (_md5)
+#if 0
+    if (_MD_CTX)
         checksum_update(&val, sizeof(dods_int32));
-
-    if (_write_data) {
-    if (!xdr_setpos( _sink, 0 ))
+#endif
+//    if (_write_data) {
+    if (!xdr_setpos( &d_sink, 0 ))
         throw Error("Network I/O Error. Could not send int 32 data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    if (!XDR_INT32(_sink, &val))
+    if (!XDR_INT32(&d_sink, &val))
         throw Error("Network I/O Error. Culd not read int 32 data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
 
-    unsigned int bytes_written = xdr_getpos( _sink );
+    unsigned int bytes_written = xdr_getpos( &d_sink );
     if (!bytes_written)
         throw Error("Network I/O Error. Could not send int 32 data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    _out.write(_buf, bytes_written);
-    }
+    d_out.write(d_buf, bytes_written);
+//    }
 }
 
 void XDRStreamMarshaller::put_float32(dods_float32 val)
 {
-    if (_md5)
+#if 0
+    if (_MD_CTX)
         checksum_update(&val, sizeof(dods_float32));
-
-    if (_write_data) {
-    if (!xdr_setpos( _sink, 0 ))
+#endif
+//    if (_write_data) {
+    if (!xdr_setpos( &d_sink, 0 ))
         throw Error("Network I/O Error. Could not send float 32 data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    if (!xdr_float(_sink, &val))
+    if (!xdr_float(&d_sink, &val))
         throw Error("Network I/O Error. Could not send float 32 data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
 
-    unsigned int bytes_written = xdr_getpos( _sink );
+    unsigned int bytes_written = xdr_getpos( &d_sink );
     if (!bytes_written)
         throw Error("Network I/O Error. Could not send float 32 data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    _out.write(_buf, bytes_written);
-    }
+    d_out.write(d_buf, bytes_written);
+//    }
 }
 
 void XDRStreamMarshaller::put_float64(dods_float64 val)
 {
-    if (_md5)
+#if 0
+    if (_MD_CTX)
         checksum_update(&val, sizeof(dods_float64));
-
-    if (_write_data) {
-    if (!xdr_setpos( _sink, 0 ))
+#endif
+//    if (_write_data) {
+    if (!xdr_setpos( &d_sink, 0 ))
         throw Error("Network I/O Error. Could not send float 64 data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    if (!xdr_double(_sink, &val))
+    if (!xdr_double(&d_sink, &val))
         throw Error("Network I/O Error. Could not send float 64 data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
 
-    unsigned int bytes_written = xdr_getpos( _sink );
+    unsigned int bytes_written = xdr_getpos( &d_sink );
     if (!bytes_written)
         throw Error("Network I/O Error. Could not send float 64 data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    _out.write(_buf, bytes_written);
-    }
+    d_out.write(d_buf, bytes_written);
+//    }
 }
 
 void XDRStreamMarshaller::put_uint16(dods_uint16 val)
 {
-    if (_md5)
+#if 0
+    if (_MD_CTX)
         checksum_update(&val, sizeof(dods_uint16));
-
-    if (_write_data) {
-    if (!xdr_setpos( _sink, 0 ))
+#endif
+//    if (_write_data) {
+    if (!xdr_setpos( &d_sink, 0 ))
         throw Error("Network I/O Error. Could not send uint 16 data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    if (!XDR_UINT16(_sink, &val))
+    if (!XDR_UINT16(&d_sink, &val))
         throw Error("Network I/O Error. Could not send uint 16 data. This may be due to a\nbug in libdap or a problem with the network connection.");
 
-    unsigned int bytes_written = xdr_getpos( _sink );
+    unsigned int bytes_written = xdr_getpos( &d_sink );
     if (!bytes_written)
         throw Error("Network I/O Error. Could not send uint 16 data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    _out.write(_buf, bytes_written);
-    }
+    d_out.write(d_buf, bytes_written);
+//    }
 }
 
 void XDRStreamMarshaller::put_uint32(dods_uint32 val)
 {
-    if (_md5)
+#if 0
+    if (_MD_CTX)
         checksum_update(&val, sizeof(dods_uint32));
-
-    if (_write_data) {
-    if (!xdr_setpos( _sink, 0 ))
+#endif
+//    if (_write_data) {
+    if (!xdr_setpos( &d_sink, 0 ))
         throw Error("Network I/O Error. Could not send uint 32 data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    if (!XDR_UINT32(_sink, &val))
+    if (!XDR_UINT32(&d_sink, &val))
         throw Error("Network I/O Error. Could not send uint 32 data. This may be due to a\nbug in libdap or a problem with the network connection.");
 
-    unsigned int bytes_written = xdr_getpos( _sink );
+    unsigned int bytes_written = xdr_getpos( &d_sink );
     if (!bytes_written)
         throw Error("Network I/O Error. Could not send uint 32 data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    _out.write(_buf, bytes_written);
-    }
+    d_out.write(d_buf, bytes_written);
+//    }
 }
 
 void XDRStreamMarshaller::put_str(const string &val)
 {
-    if (_md5)
-        checksum_update(val.c_str(), val.length());
-
-    if (_write_data) {
-    int size = val.length() + 8;
-    // Replace this malloc with a vector<char>.
-    // ...and maybe elsewhere in this class... jhrg 3/9/12
-    char *str_buf = (char *) malloc(size);
-
-    if (!str_buf) {
-        throw Error("Failed to allocate memory for string data serialization.");
-    }
-
-    XDR *str_sink = new XDR;
-    xdrmem_create(str_sink, str_buf, size, XDR_ENCODE);
-
-    if (!xdr_setpos( str_sink, 0 )) {
-        delete_xdrstdio(str_sink);
-        free(str_buf);
-        throw Error("Network I/O Error. Could not send string data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
-    }
-
-    const char *out_tmp = val.c_str();
-    if (!xdr_string(str_sink, (char **) &out_tmp, size)) {
-        delete_xdrstdio(str_sink);
-        free(str_buf);
-        throw Error("Network I/O Error. Could not send string data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
-    }
-
-    unsigned int bytes_written = xdr_getpos( str_sink );
-    if (!bytes_written) {
-        delete_xdrstdio(str_sink);
-        free(str_buf);
-        throw Error("Network I/O Error. Could not send string data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
-    }
+#if 0
+	if (_MD_CTX)
+	checksum_update(val.c_str(), val.length());
+#endif
+	int size = val.length() + 8;
+#if 0
+	char *str_buf = (char *) malloc(size);
 
-    _out.write(str_buf, bytes_written);
+	if (!str_buf) {
+		throw Error("Failed to allocate memory for string data serialization.");
+	}
+#endif
 
-    delete_xdrstdio(str_sink);
-    free(str_buf);
-    }
+	XDR str_sink;
+	vector<char> str_buf(size);
+	//XDR *str_sink = new XDR;
+	try {
+		xdrmem_create(&str_sink, &str_buf[0], size, XDR_ENCODE);
+
+		if (!xdr_setpos( &str_sink, 0 ))
+			throw Error(
+					"Network I/O Error. Could not send string data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
+
+		const char *out_tmp = val.c_str();
+		if (!xdr_string(&str_sink, (char **) &out_tmp, size))
+			throw Error(
+					"Network I/O Error. Could not send string data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
+
+		unsigned int bytes_written = xdr_getpos( &str_sink );
+		if (!bytes_written)
+			throw Error(
+					"Network I/O Error. Could not send string data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
+
+		d_out.write(&str_buf[0], bytes_written);
+
+		xdr_destroy(&str_sink);
+	}
+	catch (...) {
+		xdr_destroy(&str_sink);
+		throw;
+	}
 }
 
 void XDRStreamMarshaller::put_url(const string &val)
@@ -358,157 +380,150 @@ void XDRStreamMarshaller::put_url(const string &val)
 
 void XDRStreamMarshaller::put_opaque(char *val, unsigned int len)
 {
-    if (_md5)
+#if 0
+    if (_MD_CTX)
         checksum_update(&val, len);
-
-    if (_write_data) {
+#endif
+//    if (_write_data) {
     if (len > XDR_DAP_BUFF_SIZE)
         throw Error("Network I/O Error. Could not send opaque data - length of opaque data larger than allowed");
 
-    if (!xdr_setpos( _sink, 0 ))
+    if (!xdr_setpos( &d_sink, 0 ))
         throw Error("Network I/O Error. Could not send opaque data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    if (!xdr_opaque(_sink, val, len))
+    if (!xdr_opaque(&d_sink, val, len))
         throw Error("Network I/O Error. Could not send opaque data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection.");
 
-    unsigned int bytes_written = xdr_getpos( _sink );
+    unsigned int bytes_written = xdr_getpos( &d_sink );
     if (!bytes_written)
         throw Error("Network I/O Error. Could not send opaque data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    _out.write(_buf, bytes_written);
-    }
+    d_out.write(d_buf, bytes_written);
+//    }
 }
 
-void XDRStreamMarshaller::put_int(int val)
+void XDRStreamMarshaller::put_int( int val )
 {
 #if 0
-    if (_md5)
+    if (_MD_CTX)
         checksum_update(&val, sizeof(int));
 #endif
-    if (_write_data) {
-    if (!xdr_setpos( _sink, 0 ))
+//    if (_write_data) {
+    if (!xdr_setpos( &d_sink, 0 ))
         throw Error("Network I/O Error. Could not send int data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    if (!xdr_int(_sink, &val))
+    if (!xdr_int(&d_sink, &val))
         throw Error("Network I/O Error(1). Could not send int data.\nThis may be due to a bug in libdap or a\nproblem with the network connection.");
 
-    unsigned int bytes_written = xdr_getpos( _sink );
+    unsigned int bytes_written = xdr_getpos( &d_sink );
     if (!bytes_written)
         throw Error("Network I/O Error. Could not send int data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
 
-    _out.write(_buf, bytes_written);
-    }
+    d_out.write(d_buf, bytes_written);
+//    }
 }
 
 void XDRStreamMarshaller::put_vector(char *val, int num, Vector &)
 {
-    if (!val)
-        throw InternalErr(__FILE__, __LINE__, "Could not send byte vector data. Buffer pointer is not set.");
-
-    if (_md5)
-        checksum_update(val, num);
-
-    if (_write_data) {
-    // write the number of members of the array being written and then set the position to 0
-    put_int(num);
-
-    // this is the word boundary for writing xdr bytes in a vector.
-    unsigned int add_to = 8;
-
-    char *byte_buf = (char *) malloc(num + add_to);
-    if (!byte_buf) {
-        throw Error("Failed to allocate memory for byte vector data serialization.");
-    }
-
-    XDR *byte_sink = new XDR;
-    xdrmem_create(byte_sink, byte_buf, num + add_to, XDR_ENCODE);
-
-    if (!xdr_setpos( byte_sink, 0 )) {
-        delete_xdrstdio(byte_sink);
-        free(byte_buf);
-        throw Error("Network I/O Error. Could not send byte vector data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
-    }
-
-    if (!xdr_bytes(byte_sink, (char **) &val, (unsigned int *) &num, num + add_to)) {
-        delete_xdrstdio(byte_sink);
-        free(byte_buf);
-        throw Error("Network I/O Error(2). Could not send byte vector data.\nThis may be due to a bug in libdap or a\nproblem with the network connection.");
-    }
-
-    unsigned int bytes_written = xdr_getpos( byte_sink );
-    if (!bytes_written) {
-        delete_xdrstdio(byte_sink);
-        free(byte_buf);
-        throw Error("Network I/O Error. Could not send byte vector data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
-    }
-
-    _out.write(byte_buf, bytes_written);
+	if (!val) throw InternalErr(__FILE__, __LINE__, "Could not send byte vector data. Buffer pointer is not set.");
+#if 0
+	if (_MD_CTX)
+	checksum_update(val, num);
+#endif
+	put_int(num);
 
-    delete_xdrstdio(byte_sink);
-    free(byte_buf);
-    }
+	// this is the word boundary for writing xdr bytes in a vector.
+	const unsigned int add_to = 8;
+#if 0
+	char *byte_buf = (char *) malloc(num + add_to);
+	if (!byte_buf) throw Error("Failed to allocate memory for byte vector data serialization.");
+#endif
+	vector<char> byte_buf(num + add_to);
+	XDR byte_sink;
+	try {
+		xdrmem_create(&byte_sink, &byte_buf[0], num + add_to, XDR_ENCODE);
+		if (!xdr_setpos( &byte_sink, 0 ))
+			throw Error(
+					"Network I/O Error. Could not send byte vector data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
+
+		if (!xdr_bytes(&byte_sink, (char **) &val, (unsigned int *) &num, num + add_to))
+			throw Error(
+					"Network I/O Error(2). Could not send byte vector data.\nThis may be due to a bug in libdap or a\nproblem with the network connection.");
+
+		unsigned int bytes_written = xdr_getpos( &byte_sink );
+		if (!bytes_written)
+			throw Error(
+					"Network I/O Error. Could not send byte vector data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
+
+		d_out.write(&byte_buf[0], bytes_written);
+
+		xdr_destroy(&byte_sink);
+	}
+	catch (...) {
+		xdr_destroy(&byte_sink);
+		throw;
+	}
 }
 
-void XDRStreamMarshaller::put_vector(char *val, int num, int width, Vector &vec)
+void
+XDRStreamMarshaller::put_vector( char *val, int num, int width, Vector &vec )
 {
-    if (!val)
-        throw InternalErr(__FILE__, __LINE__, "Buffer pointer is not set.");
-
-    if (_md5)
-        checksum_update(val, num * width);
-
-    if (_write_data) {
-    // write the number of array members being written, then set the position back to 0
-    put_int(num);
-
-    int use_width = width;
-    if (use_width < 4)
-        use_width = 4;
-
-    // the size is the number of elements num times the width of each
-    // element, then add 4 bytes for the number of elements
-    int size = (num * use_width) + 4;
-
-    // allocate enough memory for the elements
-    char *vec_buf = (char *) malloc(size);
-    if (!vec_buf) {
-        free(vec_buf);
-        throw Error("Failed to allocate memory for vector data serialization.");
-    }
-
-    XDR *vec_sink = new XDR;
-    xdrmem_create(vec_sink, vec_buf, size, XDR_ENCODE);
-
-    // set the position of the sink to 0, we're starting at the beginning
-    if (!xdr_setpos( vec_sink, 0 )) {
-        delete_xdrstdio(vec_sink);
-        free(vec_buf);
-        throw Error("Network I/O Error. Could not send vector data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
-    }
+    put_vector(val, num, width, vec.var()->type());
+}
 
-    BaseType *var = vec.var();
 
-    // write the array to the buffer
-    if (!xdr_array(vec_sink, (char **) &val, (unsigned int *) &num, size, width, XDRUtils::xdr_coder(var->type()))) {
-        delete_xdrstdio(vec_sink);
-        free(vec_buf);
-        throw Error("Network I/O Error(2). Could not send vector data.\nThis may be due to a bug in libdap or a\nproblem with the network connection.");
-    }
+void XDRStreamMarshaller::put_vector(char *val, unsigned int num, int width, Type type)
+{
+	if (!val) throw InternalErr(__FILE__, __LINE__, "Buffer pointer is not set.");
+#if CHECKSUM
+	if (_MD_CTX)
+	checksum_update(val, num * width);
+#endif
+	put_int(num);
 
-    // how much was written to the buffer
-    unsigned int bytes_written = xdr_getpos( vec_sink );
-    if (!bytes_written) {
-        delete_xdrstdio(vec_sink);
-        free(vec_buf);
-        throw Error("Network I/O Error. Could not send vector data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
-    }
+	int use_width = width;
+	if (use_width < 4) use_width = 4;
 
-    // write that much out to the output stream
-    _out.write(vec_buf, bytes_written);
+	// the size is the number of elements num times the width of each
+	// element, then add 4 bytes for the number of elements
+	int size = (num * use_width) + 4;
 
-    delete_xdrstdio(vec_sink);
-    free(vec_buf);
-    }
+	// allocate enough memory for the elements
+#if 0
+	char *vec_buf = (char *) malloc(size);
+	if (!vec_buf)
+	throw Error("Failed to allocate memory for vector data serialization.");
+#endif
+	vector<char> vec_buf(size);
+	XDR vec_sink;
+	try {
+		xdrmem_create(&vec_sink, &vec_buf[0], size, XDR_ENCODE);
+
+		// set the position of the sink to 0, we're starting at the beginning
+		if (!xdr_setpos( &vec_sink, 0 ))
+			throw Error(
+					"Network I/O Error. Could not send vector data - unable to set stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
+
+		// write the array to the buffer
+		if (!xdr_array(&vec_sink, (char **) &val, (unsigned int *) &num, size, width, XDRUtils::xdr_coder(type)))
+			throw Error(
+					"Network I/O Error(2). Could not send vector data.\nThis may be due to a bug in libdap or a\nproblem with the network connection.");
+
+		// how much was written to the buffer
+		unsigned int bytes_written = xdr_getpos( &vec_sink );
+		if (!bytes_written)
+			throw Error(
+					"Network I/O Error. Could not send vector data - unable to get stream position.\nThis may be due to a bug in DODS, on the server or a\nproblem with the network connection.");
+
+		// write that much out to the output stream
+		d_out.write(&vec_buf[0], bytes_written);
+
+		xdr_destroy(&vec_sink);
+	}
+	catch (...) {
+		xdr_destroy(&vec_sink);
+		throw;
+	}
 }
 
 void XDRStreamMarshaller::dump(ostream &strm) const
diff --git a/XDRStreamMarshaller.h b/XDRStreamMarshaller.h
index 9366d78..036887c 100644
--- a/XDRStreamMarshaller.h
+++ b/XDRStreamMarshaller.h
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -35,25 +35,14 @@
 
 #include <iostream>
 
-#include <openssl/md5.h>
+// #include <openssl/evp.h>
 
 using std::ostream ;
 using std::cout ;
 
 #include "Marshaller.h"
 #include "XDRUtils.h"
-
-#if 0
-#include <openssl/md5.h>
-
-unsigned char *MD5(const unsigned char *d, unsigned long n,
-                 unsigned char *md);
-
-int MD5_Init(MD5_CTX *c);
-int MD5_Update(MD5_CTX *c, const void *data,
-                 unsigned long len);
-int MD5_Final(unsigned char *md, MD5_CTX *c);
-#endif
+#include "BaseType.h"
 
 namespace libdap
 {
@@ -67,25 +56,29 @@ namespace libdap
 class XDRStreamMarshaller : public Marshaller
 {
 private:
-    static char *	_buf ;
-    XDR *			_sink ;
-    ostream &		_out ;
-    MD5_CTX *       _md5 ;  // jhrg 1/18/12
+    static char *	d_buf ;
+    XDR 			d_sink ;
+    ostream &		d_out ;
+#if 0
+    EVP_MD_CTX *    _MD_CTX;    // jhrg 4/24/12
     bool            _write_data ; // jhrg 1/27/12
     bool            _checksum_ctx_valid ;
-
+    string          _checksum ; // jhrg 4/24/12
+#endif
     				XDRStreamMarshaller() ;
     				XDRStreamMarshaller( const XDRStreamMarshaller &m ) ;
     XDRStreamMarshaller &operator=( const XDRStreamMarshaller & ) ;
 
 public:
-    				/* XDRStreamMarshaller( ostream &out ) ; */
-    				XDRStreamMarshaller( ostream &out, bool checksum = false, bool write_data = true) ;
+    				XDRStreamMarshaller( ostream &out) ; //, bool checksum = false, bool write_data = true) ;
     virtual			~XDRStreamMarshaller() ;
 
+#if 0
+    virtual bool    checksums() { return _MD_CTX != 0; }
     virtual void    reset_checksum() ;
     virtual string  get_checksum() ;
     virtual void    checksum_update(const void *data, unsigned long len) ;
+#endif
 
     virtual void	put_byte( dods_byte val ) ;
 
@@ -105,7 +98,9 @@ public:
     virtual void	put_int( int val ) ;
 
     virtual void	put_vector( char *val, int num, Vector &vec ) ;
-    virtual void	put_vector( char *val, int num, int width, Vector &vec ) ;
+    virtual void    put_vector( char *val, int num, int width, Vector &vec) ;
+
+    virtual void put_vector(char *val, unsigned int num, int width, Type type);
 
     virtual void	dump(ostream &strm) const ;
 } ;
diff --git a/XDRStreamUnMarshaller.cc b/XDRStreamUnMarshaller.cc
index 17ba5cd..7e94e64 100644
--- a/XDRStreamUnMarshaller.cc
+++ b/XDRStreamUnMarshaller.cc
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -40,7 +40,7 @@
 //#define DODS_DEBUG 1
 
 #include "Str.h"
-#include "Vector.h"
+// #include "Vector.h"
 #include "Array.h"
 #include "util.h"
 #include "InternalErr.h"
@@ -48,310 +48,292 @@
 
 namespace libdap {
 
-char *XDRStreamUnMarshaller::_buf = 0 ;
+char *XDRStreamUnMarshaller::d_buf = 0;
 
-XDRStreamUnMarshaller::XDRStreamUnMarshaller( istream &in )
-    : _source( 0 ), _in( in )
+XDRStreamUnMarshaller::XDRStreamUnMarshaller(istream &in) : /*&d_source( 0 ),*/
+        d_in(in)
 {
-    if (!_buf)
-	_buf = (char *) malloc(XDR_DAP_BUFF_SIZE);
-    if (!_buf)
-	throw Error("Failed to allocate memory for data serialization.");
+    if (!d_buf)
+        d_buf = (char *) malloc(XDR_DAP_BUFF_SIZE);
+    if (!d_buf)
+        throw Error("Failed to allocate memory for data serialization.");
 
-    _source = new XDR;
-    xdrmem_create(_source, _buf, XDR_DAP_BUFF_SIZE, XDR_DECODE);
+    //&d_source = new XDR;
+    xdrmem_create(&d_source, d_buf, XDR_DAP_BUFF_SIZE, XDR_DECODE);
 }
 
-XDRStreamUnMarshaller::XDRStreamUnMarshaller()
-    : UnMarshaller(), _source( 0 ), _in( cin )
+XDRStreamUnMarshaller::XDRStreamUnMarshaller() :
+        UnMarshaller(), /*&d_source( 0 ),*/d_in(cin)
 {
-    throw InternalErr( __FILE__, __LINE__, "Default constructor not implemented." ) ;
+    throw InternalErr(__FILE__, __LINE__, "Default constructor not implemented.");
 }
 
-XDRStreamUnMarshaller::XDRStreamUnMarshaller( const XDRStreamUnMarshaller &um )
-    : UnMarshaller( um ), _source( 0 ), _in( cin )
+XDRStreamUnMarshaller::XDRStreamUnMarshaller(const XDRStreamUnMarshaller &um) :
+        UnMarshaller(um), /*&d_source( 0 ),*/d_in(cin)
 {
-    throw InternalErr( __FILE__, __LINE__, "Copy constructor not implemented." ) ;
+    throw InternalErr(__FILE__, __LINE__, "Copy constructor not implemented.");
 }
 
 XDRStreamUnMarshaller &
-XDRStreamUnMarshaller::operator=( const XDRStreamUnMarshaller & )
+XDRStreamUnMarshaller::operator=(const XDRStreamUnMarshaller &)
 {
-    throw InternalErr( __FILE__, __LINE__, "Copy operator not implemented." ) ;
+    throw InternalErr(__FILE__, __LINE__, "Copy operator not implemented.");
 
-    return *this ;
+    return *this;
 }
 
-XDRStreamUnMarshaller::~XDRStreamUnMarshaller( )
+XDRStreamUnMarshaller::~XDRStreamUnMarshaller()
 {
-    if ( _source )
-	delete_xdrstdio( _source ) ;
-    _source = 0;
+    xdr_destroy( &d_source );
+    //&d_source = 0;
 }
 
-void
-XDRStreamUnMarshaller::get_byte( dods_byte &val )
+void XDRStreamUnMarshaller::get_byte(dods_byte &val)
 {
-    if (xdr_setpos( _source, 0 ) < 0)
-	throw Error("Failed to reposition input stream");
-    if (!(_in.read( _buf, 4 ))) {
-	if (_in.eof())
-	    throw Error("Premature EOF in input stream");
-	else {
-	    ostringstream ss("Error reading from input stream: ");
-	    ss << _in.rdstate();
-	    throw Error(ss.str());
-	}
+    if (xdr_setpos( &d_source, 0 ) < 0)
+        throw Error("Failed to reposition input stream");
+    if (!(d_in.read(d_buf, 4))) {
+        if (d_in.eof())
+            throw Error("Premature EOF in input stream");
+        else {
+            ostringstream ss("Error reading from input stream: ");
+            ss << d_in.rdstate();
+            throw Error(ss.str());
+        }
     }
 
-    DBG2( std::cerr << "_in.gcount(): " << _in.gcount() << std::endl );
-    DBG2( std::cerr << "_in.tellg(): " << _in.tellg() << std::endl );
-    DBG2( std::cerr << "_buf[0]: " << hex << _buf[0] << "; _buf[1]: " << _buf[1]
-             << "; _buf[2]: " << _buf[2] << "; _buf[3]: " << _buf[3]
-             << dec << std::endl );
+    DBG2( std::cerr << "_in.gcount(): " << d_in.gcount() << std::endl ); DBG2( std::cerr << "_in.tellg(): " << d_in.tellg() << std::endl ); DBG2( std::cerr << "_buf[0]: " << hex << d_buf[0] << "; _buf[1]: " << d_buf[1]
+            << "; _buf[2]: " << d_buf[2] << "; _buf[3]: " << d_buf[3]
+            << dec << std::endl );
 
-    if( !xdr_char( _source, (char *)&val ) )
+    if (!xdr_char(&d_source, (char *) &val))
         throw Error("Network I/O Error. Could not read byte data.");
 
     DBG2(std::cerr << "get_byte: " << val << std::endl );
 }
 
-void
-XDRStreamUnMarshaller::get_int16( dods_int16 &val )
+void XDRStreamUnMarshaller::get_int16(dods_int16 &val)
 {
-    xdr_setpos( _source, 0 );
-    _in.read( _buf, 4 );
+    xdr_setpos( &d_source, 0);
+    d_in.read(d_buf, 4);
 
-    if( !XDR_INT16( _source, &val ) )
+    if (!XDR_INT16(&d_source, &val))
         throw Error("Network I/O Error. Could not read int 16 data.");
 }
 
-void
-XDRStreamUnMarshaller::get_int32( dods_int32 &val )
+void XDRStreamUnMarshaller::get_int32(dods_int32 &val)
 {
-    xdr_setpos( _source, 0 );
-    _in.read( _buf, 4 );
+    xdr_setpos( &d_source, 0);
+    d_in.read(d_buf, 4);
 
-    if( !XDR_INT32( _source, &val ) )
+    if (!XDR_INT32(&d_source, &val))
         throw Error("Network I/O Error. Could not read int 32 data.");
 }
 
-void
-XDRStreamUnMarshaller::get_float32( dods_float32 &val )
+void XDRStreamUnMarshaller::get_float32(dods_float32 &val)
 {
-    xdr_setpos( _source, 0 );
-    _in.read( _buf, 4 );
+    xdr_setpos( &d_source, 0);
+    d_in.read(d_buf, 4);
 
-    if( !xdr_float( _source, &val ) )
+    if (!xdr_float(&d_source, &val))
         throw Error("Network I/O Error. Could not read float 32 data.");
 }
 
-void
-XDRStreamUnMarshaller::get_float64( dods_float64 &val )
+void XDRStreamUnMarshaller::get_float64(dods_float64 &val)
 {
-    xdr_setpos( _source, 0 );
-    _in.read( _buf, 8 );
+    xdr_setpos( &d_source, 0);
+    d_in.read(d_buf, 8);
 
-    if( !xdr_double( _source, &val ) )
+    if (!xdr_double(&d_source, &val))
         throw Error("Network I/O Error. Could not read float 64 data.");
 }
 
-void
-XDRStreamUnMarshaller::get_uint16( dods_uint16 &val )
+void XDRStreamUnMarshaller::get_uint16(dods_uint16 &val)
 {
-    xdr_setpos( _source, 0 );
-    _in.read( _buf, 4 );
+    xdr_setpos( &d_source, 0);
+    d_in.read(d_buf, 4);
 
-    if( !XDR_UINT16( _source, &val ) )
+    if (!XDR_UINT16(&d_source, &val))
         throw Error("Network I/O Error. Could not read uint 16 data.");
 }
 
-void
-XDRStreamUnMarshaller::get_uint32( dods_uint32 &val )
+void XDRStreamUnMarshaller::get_uint32(dods_uint32 &val)
 {
-    xdr_setpos( _source, 0 );
-    _in.read( _buf, 4 );
+    xdr_setpos( &d_source, 0);
+    d_in.read(d_buf, 4);
 
-    if( !XDR_UINT32( _source, &val ) )
+    if (!XDR_UINT32(&d_source, &val))
         throw Error("Network I/O Error. Could not read uint 32 data.");
 }
 
-void
-XDRStreamUnMarshaller::get_str( string &val )
+void XDRStreamUnMarshaller::get_str(string &val)
 {
     int i;
-    get_int( i ) ;
+    get_int(i);
     DBG(std::cerr << "i: " << i << std::endl);
 
     // Must round up string size to next 4
-    i = ( ( i + 3 ) / 4 ) * 4;
+    i = ((i + 3) / 4) * 4;
     DBG(std::cerr << "i: " << i << std::endl);
 
     char *in_tmp = 0;
     //char *buf = 0;
     //XDR *source = 0;
     // Must address the case where the string is larger than the buffer
-    if ( i + 4 > XDR_DAP_BUFF_SIZE ) {
-	char *buf = (char *) malloc( i + 4 );
-	if (!buf)
-		throw InternalErr(__FILE__, __LINE__, "Error allocating memory");
-	XDR *source = new XDR;	
-	xdrmem_create(source, buf, i + 4, XDR_DECODE);
-	memcpy( buf, _buf, 4 );
-
-	_in.read( buf + 4, i );
-
-	xdr_setpos( source, 0 );
-	if( !xdr_string( source, &in_tmp, max_str_len ) ) {
-	    delete_xdrstdio( source );
-	    throw Error("Network I/O Error. Could not read string data.");
-	}
-
-	delete_xdrstdio( source );
+    if (i + 4 > XDR_DAP_BUFF_SIZE) {
+#if 0
+        char *buf = (char *) malloc(i + 4);
+        if (!buf)
+            throw InternalErr(__FILE__, __LINE__, "Error allocating memory");
+#endif
+        vector<char> buf(i+4);
+
+        XDR source;// = new XDR;
+        xdrmem_create(&source, &buf[0], i + 4, XDR_DECODE);
+        memcpy(&buf[0], d_buf, 4);
+
+        d_in.read(&buf[0] + 4, i);
+
+        xdr_setpos( &source, 0);
+        if (!xdr_string( &source, &in_tmp, max_str_len)) {
+            xdr_destroy( &source );
+            throw Error("Network I/O Error. Could not read string data.");
+        }
+
+        xdr_destroy( &source );
     }
     else {
-	_in.read( _buf + 4, i );
+        d_in.read(d_buf + 4, i);
 
-	xdr_setpos( _source, 0 );
-	if( !xdr_string( _source, &in_tmp, max_str_len ) )
-	    throw Error("Network I/O Error. Could not read string data.");
+        xdr_setpos( &d_source, 0);
+        if (!xdr_string(&d_source, &in_tmp, max_str_len))
+            throw Error("Network I/O Error. Could not read string data.");
     }
 
-    val = in_tmp ;
+    val = in_tmp;
 
-    free( in_tmp ) ;
+    free(in_tmp);
 }
 
-void
-XDRStreamUnMarshaller::get_url( string &val )
+void XDRStreamUnMarshaller::get_url(string &val)
 {
-    get_str( val ) ;
+    get_str(val);
 }
 
-void
-XDRStreamUnMarshaller::get_opaque( char *val, unsigned int len )
+void XDRStreamUnMarshaller::get_opaque(char *val, unsigned int len)
 {
-    xdr_setpos( _source, 0 );
+    xdr_setpos( &d_source, 0);
 
     // Round len up to the next multiple of 4. There is also the RNDUP()
     // macro in xdr.h, at least on OS/X.
-    len += len&3;
-    if ( static_cast<int>(len) > XDR_DAP_BUFF_SIZE )
-	throw Error("Network I/O Error. Length of opaque data larger than allowed");
+    len += len & 3;
+    if (static_cast<int>(len) > XDR_DAP_BUFF_SIZE)
+        throw Error("Network I/O Error. Length of opaque data larger than allowed");
 
-    _in.read( _buf, len );
+    d_in.read(d_buf, len);
 
-     xdr_opaque( _source, val, len ) ;
+    xdr_opaque(&d_source, val, len);
 }
 
-void
-XDRStreamUnMarshaller::get_int( int &val )
+void XDRStreamUnMarshaller::get_int(int &val)
 {
-    xdr_setpos( _source, 0 );
-    _in.read( _buf, 4 );
+    xdr_setpos( &d_source, 0);
+    d_in.read(d_buf, 4);
 
-    if( !xdr_int( _source, &val ) )
-	throw Error("Network I/O Error(1).");
+    if (!xdr_int(&d_source, &val))
+        throw Error("Network I/O Error(1).");
 
     DBG(std::cerr << "get_int: " << val << std::endl);
 }
 
-void
-XDRStreamUnMarshaller::get_vector( char **val, unsigned int &num, Vector & )
+void XDRStreamUnMarshaller::get_vector(char **val, unsigned int &num, Vector &)
 {
     int i;
-    get_int( i ) ;  // This leaves the XDR encoded value in _buf; used later
+    get_int(i); // This leaves the XDR encoded value in d_buf; used later
     DBG(std::cerr << "i: " << i << std::endl);
 
     // Must round up string size to next 4
-    i += i&3;
+    i += i & 3;
     DBG(std::cerr << "i: " << i << std::endl);
 
     //char *buf = 0;
     //XDR *source = 0;
     // Must address the case where the string is larger than the buffer
-    if ( i + 4 > XDR_DAP_BUFF_SIZE ) {
-	char *buf = (char *) malloc( i + 4 );
-	if (!buf)
-		throw InternalErr(__FILE__, __LINE__, "Error allocating memory");
-	XDR *source = new XDR;	
-	xdrmem_create(source, buf, i + 4, XDR_DECODE);
-	memcpy( buf, _buf, 4 );
-
-	_in.read( buf + 4, i );
-	DBG2(cerr << "bytes read: " << _in.gcount() << endl);
-
-	xdr_setpos( source, 0 );
-	if( !xdr_bytes( _source, val, &num, DODS_MAX_ARRAY) ) {
-	    delete_xdrstdio( source );
-	    throw Error("Network I/O Error. Could not read byte array data.");
-	}
-
-	delete_xdrstdio( source );
+    if (i + 4 > XDR_DAP_BUFF_SIZE) {
+    	vector<char> buf(i+4);
+        XDR source;
+        xdrmem_create(&source, &buf[0], i + 4, XDR_DECODE);
+        memcpy(&buf[0], d_buf, 4);
+
+        d_in.read(&buf[0] + 4, i);
+        DBG2(cerr << "bytes read: " << d_in.gcount() << endl);
+
+        xdr_setpos(&source, 0);
+        if (!xdr_bytes(&d_source, val, &num, DODS_MAX_ARRAY)) {
+            xdr_destroy(&source);
+            throw Error("Network I/O Error. Could not read byte array data.");
+        }
+
+        xdr_destroy( &source );
     }
     else {
-	_in.read( _buf + 4, i );
-	DBG2(cerr << "bytes read: " << _in.gcount() << endl);
+        d_in.read(d_buf + 4, i);
+        DBG2(cerr << "bytes read: " << d_in.gcount() << endl);
 
-	xdr_setpos( _source, 0 );
-	if( !xdr_bytes( _source, val, &num, DODS_MAX_ARRAY) )
-	    throw Error("Network I/O Error. Could not read byte array data.");
+        xdr_setpos(&d_source, 0);
+        if (!xdr_bytes(&d_source, val, &num, DODS_MAX_ARRAY))
+            throw Error("Network I/O Error. Could not read byte array data.");
     }
 }
 
-void
-XDRStreamUnMarshaller::get_vector( char **val, unsigned int &num, int width, Vector &vec )
+void XDRStreamUnMarshaller::get_vector(char **val, unsigned int &num, int width, Vector &vec)
+{
+    get_vector(val, num, width, vec.var()->type());
+}
+
+void XDRStreamUnMarshaller::get_vector(char **val, unsigned int &num, int width, Type type)
 {
     int i;
-    get_int( i ) ; // This leaves the XDR encoded value in _buf; used later
+    get_int(i); // This leaves the XDR encoded value in d_buf; used later
     DBG(std::cerr << "i: " << i << std::endl);
 
-    width += width&3;
+    width += width & 3;
     DBG(std::cerr << "width: " << width << std::endl);
 
-    //char *buf = 0;
-    //XDR *source = 0;
     int size = i * width; // + 4; // '+ 4' to hold the int already read
-    BaseType *var = vec.var();
 
     // Must address the case where the string is larger than the buffer
     if (size > XDR_DAP_BUFF_SIZE) {
-	char *buf = (char *) malloc( size + 4 );
-	if (!buf)
-		throw InternalErr(__FILE__, __LINE__, "Error allocating memory");
-	XDR *source = new XDR;	
-	xdrmem_create(source, buf, size + 4, XDR_DECODE);
-	DBG2(cerr << "size: " << size << endl);
-	memcpy(buf, _buf, 4);
-
-	_in.read(buf + 4, size); // +4 for the int already read
-	DBG2(cerr << "bytes read: " << _in.gcount() << endl);
-
-	xdr_setpos( source, 0 );
-	if (!xdr_array( source, val, &num, DODS_MAX_ARRAY, width,
-		        XDRUtils::xdr_coder( var->type() ) ) ) {
-	    delete_xdrstdio( source );
-	    throw Error("Network I/O Error. Could not read array data.");
-	}
-
-	delete_xdrstdio(source);
+    	vector<char> buf(size+4);
+        XDR source;
+        xdrmem_create(&source, &buf[0], size + 4, XDR_DECODE);
+        DBG(cerr << "size: " << size << endl);
+        memcpy(&buf[0], d_buf, 4);
+
+        d_in.read(&buf[0] + 4, size); // +4 for the int already read
+        DBG(cerr << "bytes read: " << d_in.gcount() << endl);
+
+        xdr_setpos(&source, 0);
+        if (!xdr_array(&source, val, &num, DODS_MAX_ARRAY, width, XDRUtils::xdr_coder(type))) {
+            xdr_destroy( &source );
+            throw Error("Network I/O Error. Could not read array data.");
+        }
+
+        xdr_destroy( &source );
     }
     else {
-	_in.read(_buf + 4, size);
-	DBG2(cerr << "bytes read: " << _in.gcount() << endl);
+        d_in.read(d_buf + 4, size);
+        DBG(cerr << "bytes read (2): " << d_in.gcount() << endl);
 
-	xdr_setpos( _source, 0 );
-	if (!xdr_array( _source, val, &num, DODS_MAX_ARRAY, width,
-		        XDRUtils::xdr_coder( var->type() ) ) )
-	    throw Error("Network I/O Error. Could not read array data.");
+        xdr_setpos( &d_source, 0);
+        if (!xdr_array(&d_source, val, &num, DODS_MAX_ARRAY, width, XDRUtils::xdr_coder(type)))
+            throw Error("Network I/O Error. Could not read array data.");
     }
 }
 
-void
-XDRStreamUnMarshaller::dump(ostream &strm) const
+void XDRStreamUnMarshaller::dump(ostream &strm) const
 {
-    strm << DapIndent::LMarg << "XDRStreamUnMarshaller::dump - ("
-         << (void *)this << ")" << endl ;
+    strm << DapIndent::LMarg << "XDRStreamUnMarshaller::dump - (" << (void *) this << ")" << endl;
 }
 
 } // namespace libdap
diff --git a/XDRStreamUnMarshaller.h b/XDRStreamUnMarshaller.h
index ca26a77..575a445 100644
--- a/XDRStreamUnMarshaller.h
+++ b/XDRStreamUnMarshaller.h
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -52,40 +52,41 @@ const int XDR_DAP_BUFF_SIZE = 4096; // This will be compared to a signed int
 class XDRStreamUnMarshaller : public UnMarshaller
 {
 private:
-    XDR *			_source ;
-    istream &			_in;
-    static char *		_buf;
+    XDR 			d_source ;
+    istream &		d_in;
+    static char *	d_buf;
 
     				XDRStreamUnMarshaller() ;
     				XDRStreamUnMarshaller( const XDRStreamUnMarshaller &um ) ;
     XDRStreamUnMarshaller &	operator=( const XDRStreamUnMarshaller & ) ;
+
 public:
     				XDRStreamUnMarshaller( istream &in ) ;
     virtual			~XDRStreamUnMarshaller() ;
 
-    virtual void		get_byte( dods_byte &val ) ;
+    virtual void	get_byte( dods_byte &val ) ;
+
+    virtual void	get_int16( dods_int16 &val ) ;
+    virtual void	get_int32( dods_int32 &val ) ;
 
-    virtual void		get_int16( dods_int16 &val ) ;
-    virtual void		get_int32( dods_int32 &val ) ;
+    virtual void	get_float32( dods_float32 &val ) ;
+    virtual void	get_float64( dods_float64 &val ) ;
 
-    virtual void		get_float32( dods_float32 &val ) ;
-    virtual void		get_float64( dods_float64 &val ) ;
+    virtual void	get_uint16( dods_uint16 &val ) ;
+    virtual void	get_uint32( dods_uint32 &val ) ;
 
-    virtual void		get_uint16( dods_uint16 &val ) ;
-    virtual void		get_uint32( dods_uint32 &val ) ;
+    virtual void	get_str( string &val ) ;
+    virtual void	get_url( string &val ) ;
 
-    virtual void		get_str( string &val ) ;
-    virtual void		get_url( string &val ) ;
+    virtual void	get_opaque( char *val, unsigned int len ) ;
+    virtual void	get_int( int &val ) ;
 
-    virtual void		get_opaque( char *val, unsigned int len ) ;
-    virtual void		get_int( int &val ) ;
+    virtual void	get_vector( char **val, unsigned int &num, Vector &vec ) ;
+    virtual void	get_vector( char **val, unsigned int &num, int width, Vector &vec ) ;
 
-    virtual void		get_vector( char **val, unsigned int &num,
-					    Vector &vec ) ;
-    virtual void		get_vector( char **val, unsigned int &num,
-					    int width, Vector &vec ) ;
+    virtual void get_vector(char **val, unsigned int &num, int width, Type type);
 
-    virtual void		dump(ostream &strm) const ;
+    virtual void	dump(ostream &strm) const ;
 } ;
 
 } // namespace libdap
diff --git a/XDRUtils.cc b/XDRUtils.cc
index 33a49bb..867b6f3 100644
--- a/XDRUtils.cc
+++ b/XDRUtils.cc
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/XDRUtils.h b/XDRUtils.h
index 437fa96..cc57c21 100644
--- a/XDRUtils.h
+++ b/XDRUtils.h
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/XMLWriter.cc b/XMLWriter.cc
index 4477cb9..8e7e46a 100644
--- a/XMLWriter.cc
+++ b/XMLWriter.cc
@@ -1,3 +1,26 @@
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2010 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
 /*
  * XMLWriter.cpp
  *
@@ -100,3 +123,28 @@ const char *XMLWriter::get_doc() {
 
     return (const char *)d_doc_buf->content;
 }
+
+unsigned int XMLWriter::get_doc_size() {
+    if (d_writer && d_started) {
+        if (xmlTextWriterEndDocument(d_writer) < 0)
+            throw InternalErr(__FILE__, __LINE__, "Error ending the document");
+
+        d_ended = true;
+
+        // must call this before getting the buffer content. Odd, but appears to be true.
+        // jhrg
+        xmlFreeTextWriter(d_writer);
+        d_writer = 0;
+    }
+
+    if (!d_doc_buf->content)
+        throw InternalErr(__FILE__, __LINE__, "Error retrieving response document as string");
+#if 0
+    // This is not needed when the TextWriter is freed before getting buffer content.
+    if (xmlTextWriterFlush(d_writer) < 0)
+        throw InternalErr(__FILE__, __LINE__, "Error flushing the xml writer buffer");
+#endif
+
+    // how much of the buffer is in use?
+    return d_doc_buf->use;
+}
diff --git a/XMLWriter.h b/XMLWriter.h
index f64b76a..bf8baf5 100644
--- a/XMLWriter.h
+++ b/XMLWriter.h
@@ -1,3 +1,25 @@
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2010 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 /*
  * XMLWriter.h
  *
@@ -35,6 +57,7 @@ public:
 
     xmlTextWriterPtr get_writer() { return d_writer; }
     const char *get_doc();
+    unsigned int get_doc_size();
 };
 
 #endif /* XMLWRITER_H_ */
diff --git a/aclocal.m4 b/aclocal.m4
index 0d5703f..cc81072 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
+# generated automatically by aclocal 1.12 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,28 +14,30 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 8
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
+[am__api_version='1.12'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11], [],
+m4_if([$1], [1.12], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -50,22 +53,24 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
+[AM_AUTOMAKE_VERSION([1.12])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
 #
 # Of course, Automake must honor this variable whenever it calls a
 # tool from the auxiliary directory.  The problem is that $srcdir (and
@@ -84,7 +89,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 #
 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 # are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
+# harmless because $srcdir is '.', but things will broke when you
 # start a VPATH build or use an absolute $srcdir.
 #
 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -110,22 +115,21 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
+# serial 10
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
 AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
@@ -144,16 +148,15 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 10
+# serial 16
 
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
 # will think it sees a *use*, and therefore will trigger all it's
 # C support machinery.  Also note that it means that autoscan, seeing
@@ -176,12 +179,12 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 AC_REQUIRE([AM_DEP_TRACK])dnl
 
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
+m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
+      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
+      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
+      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                    [depcc="$$1"   am_compiler_list=])
 
 AC_CACHE_CHECK([dependency style of $depcc],
                [am_cv_$1_dependencies_compiler_type],
@@ -189,8 +192,9 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -229,16 +233,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -247,16 +251,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
 	continue
       else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -304,7 +308,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
 AC_DEFUN([AM_SET_DEPDIR],
 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -314,28 +318,34 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 # AM_DEP_TRACK
 # ------------
 AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+  [--enable-dependency-tracking],
+  [do not reject slow dependency extractors])
+AS_HELP_STRING(
+  [--disable-dependency-tracking],
+  [speeds up one-time build])])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 AC_SUBST([AMDEPBACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 5
+# serial 6
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
@@ -354,7 +364,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     # Strip MF so we end up with the name of the file.
     mf=`echo "$mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
+    # We used to match only the files named 'Makefile.in', but
     # some people rename them; so instead we look at the file content.
     # Grep'ing the first line is not enough: some people post-process
     # each Makefile.in and add a new line on top of each file to say so.
@@ -366,21 +376,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # from the Makefile without running 'make'.
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
     test -z "am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
     # simplest approach to changing $(DEPDIR) to its actual value in the
     # expansion.
     for file in `sed -n "
       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`AS_DIRNAME(["$file"])`
@@ -398,7 +406,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
 # This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
+# is enabled.  FIXME.  This creates each '.P' file that we will
 # need in order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
@@ -406,28 +414,15 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 16
+# serial 18
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -478,23 +473,25 @@ m4_ifval([$2],
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+m4_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
 _AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
 
 # Some tools Automake needs.
 AC_REQUIRE([AM_SANITY_CHECK])dnl
 AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
@@ -508,28 +505,28 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 			     [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-		  [_AM_DEPENDENCIES(CC)],
+		  [_AM_DEPENDENCIES([CC])],
 		  [define([AC_PROG_CC],
-			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-		  [_AM_DEPENDENCIES(CXX)],
+		  [_AM_DEPENDENCIES([CXX])],
 		  [define([AC_PROG_CXX],
-			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-		  [_AM_DEPENDENCIES(OBJC)],
+		  [_AM_DEPENDENCIES([OBJC])],
 		  [define([AC_PROG_OBJC],
-			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
 ])
 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 dnl mangled by Autoconf and run in a shell conditional statement.
 m4_define([_AC_COMPILER_EXEEXT],
@@ -557,12 +554,14 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 8
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -576,9 +575,9 @@ if test x"${install_sh}" != xset; then
     install_sh="\${SHELL} $am_aux_dir/install-sh"
   esac
 fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -599,21 +598,20 @@ fi
 rmdir .tst 2>/dev/null
 AC_SUBST([am__leading_dot])])
 
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 6
 
 # AM_PROG_LEX
 # -----------
 # Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
 # "missing" invocation, for better error output.
 AC_DEFUN([AM_PROG_LEX],
-[AC_PREREQ(2.50)dnl
+[AC_PREREQ([2.50])dnl
 AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
 AC_REQUIRE([AC_PROG_LEX])dnl
 if test "$LEX" = :; then
@@ -622,13 +620,13 @@ fi])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -647,7 +645,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
 case `$am_make -s -f confmf 2> /dev/null` in #(
 *the\ am__doit\ target*)
   am__include=include
@@ -674,14 +672,13 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
+# serial 7
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -711,19 +708,21 @@ if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+  AC_MSG_WARN(['missing' script is too old or missing])
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # AM_PROG_MKDIR_P
 # ---------------
-# Check for `mkdir -p'.
+# Check for 'mkdir -p'.
 AC_DEFUN([AM_PROG_MKDIR_P],
 [AC_PREREQ([2.60])dnl
 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
@@ -743,13 +742,13 @@ esac
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 6
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -757,13 +756,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
 # _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 
 # _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -776,22 +775,18 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 9
 
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
 [AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -802,32 +797,40 @@ case `pwd` in
 esac
 case $srcdir in
   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 esac
 
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$[*]" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$[*]" != "X $srcdir/configure conftest.file" \
+	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment])
+     fi
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$[2]" = conftest.file
    )
 then
@@ -837,43 +840,61 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # AM_PROG_INSTALL_STRIP
 # ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# One issue with vendor 'install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
 # annoying in cross-compiling environments, where the build's strip
 # is unlikely to handle the host's binaries.
 # Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
+# always use install-sh in "make install-strip", and initialize
 # STRIPPROG with the value of the STRIP variable (set by the user).
 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
+# serial 3
 
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
@@ -882,24 +903,24 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
 # AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
 # Public sister of _AM_SUBST_NOTMAKE.
 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
+# serial 3
 
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
 #
 # Substitute a variable $(am__tar) that is a command
 # writing to stdout a FORMAT-tarball containing the directory
@@ -910,10 +931,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
 m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
      [m4_case([$1], [ustar],, [pax],,
               [m4_fatal([Unknown tar format])])
 AC_MSG_CHECKING([how to create a $1 tar archive])
@@ -921,7 +943,7 @@ AC_MSG_CHECKING([how to create a $1 tar archive])
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 # Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
+# Solaris sh will not grok spaces in the rhs of '-'.
 for _am_tool in $_am_tools
 do
   case $_am_tool in
@@ -985,6 +1007,7 @@ AC_SUBST([am__untar])
 m4_include([gl/m4/00gnulib.m4])
 m4_include([gl/m4/alloca.m4])
 m4_include([gl/m4/btowc.m4])
+m4_include([gl/m4/byteswap.m4])
 m4_include([gl/m4/codeset.m4])
 m4_include([gl/m4/configmake.m4])
 m4_include([gl/m4/extensions.m4])
@@ -999,19 +1022,26 @@ m4_include([gl/m4/localcharset.m4])
 m4_include([gl/m4/locale-fr.m4])
 m4_include([gl/m4/locale-ja.m4])
 m4_include([gl/m4/locale-zh.m4])
+m4_include([gl/m4/locale_h.m4])
+m4_include([gl/m4/localeconv.m4])
 m4_include([gl/m4/longlong.m4])
 m4_include([gl/m4/malloc.m4])
 m4_include([gl/m4/mbrtowc.m4])
 m4_include([gl/m4/mbsinit.m4])
 m4_include([gl/m4/mbstate_t.m4])
+m4_include([gl/m4/mbtowc.m4])
 m4_include([gl/m4/multiarch.m4])
 m4_include([gl/m4/nl_langinfo.m4])
+m4_include([gl/m4/off_t.m4])
 m4_include([gl/m4/regex.m4])
 m4_include([gl/m4/ssize_t.m4])
 m4_include([gl/m4/stdbool.m4])
 m4_include([gl/m4/stddef_h.m4])
 m4_include([gl/m4/stdint.m4])
 m4_include([gl/m4/stdlib_h.m4])
+m4_include([gl/m4/strcase.m4])
+m4_include([gl/m4/strings_h.m4])
+m4_include([gl/m4/sys_types_h.m4])
 m4_include([gl/m4/unistd_h.m4])
 m4_include([gl/m4/warn-on-use.m4])
 m4_include([gl/m4/wchar_h.m4])
diff --git a/ce_expr.lex b/ce_expr.lex
index c66ae0a..8fc9d1a 100644
--- a/ce_expr.lex
+++ b/ce_expr.lex
@@ -48,7 +48,7 @@
 
 #include "config.h"
 
-static char rcsid[] not_used = {"$Id: ce_expr.lex 25112 2011-12-29 21:44:54Z jimg $"};
+static char rcsid[] not_used = {"$Id: ce_expr.lex 27157 2013-09-28 21:22:52Z jimg $"};
 
 #include <cstdio>
 #include <string>
@@ -61,6 +61,7 @@ static char rcsid[] not_used = {"$Id: ce_expr.lex 25112 2011-12-29 21:44:54Z jim
 #define YY_DECL int ce_exprlex YY_PROTO(( void ))
 #define YY_FATAL_ERROR(msg) {\
     throw(Error(string("Error scanning constraint expression text: ") + string(msg))); \
+    yy_fatal_error(msg); /* see das.lex */ \
 }
 
 #include "Error.h"
@@ -80,6 +81,8 @@ static void store_op(int op);
 
 %option noyywrap
 %option nounput
+%option noinput
+%option 8bit
 %option prefix="ce_expr"
 %option outfile="lex.ce_expr.cc"
 
@@ -106,21 +109,31 @@ INF		[Ii][Nn][Ff]
 
 SCAN_WORD       [-+a-zA-Z0-9_/%.\\][-+a-zA-Z0-9_/%.\\#]*
 
-SCAN_EQUAL	=
+SCAN_EQUAL	    =
 SCAN_NOT_EQUAL	!=
 SCAN_GREATER	>
 SCAN_GREATER_EQL >=
-SCAN_LESS	<
+SCAN_LESS	    <
 SCAN_LESS_EQL	<=
-SCAN_REGEXP	=~
+SCAN_REGEXP	    =~
 
-NEVER		[^\-+a-zA-Z0-9_/%.\\#:,(){}[\]&<>=~]
+SCAN_HASH_BYTE    $Byte
+SCAN_HASH_INT16   $Int16
+SCAN_HASH_UINT16  $UInt16
+SCAN_HASH_INT32   $Int32
+SCAN_HASH_UINT32  $UInt32
+SCAN_HASH_FLOAT32 $Float32
+SCAN_HASH_FLOAT64 $Float64
+
+SCAN_STAR       \*
+
+NEVER		[^\-+a-zA-Z0-9_/%.\\:,(){}[\]&<>=~]
 
 %%
 
-"["    	    	return (int)*yytext;
-"]"    	    	return (int)*yytext;
-":"    	    	return (int)*yytext;
+"["    	return (int)*yytext;
+"]"    	return (int)*yytext;
+":"    	return (int)*yytext;
 ","		return (int)*yytext;
 "&"		return (int)*yytext;
 "("		return (int)*yytext;
@@ -128,39 +141,54 @@ NEVER		[^\-+a-zA-Z0-9_/%.\\#:,(){}[\]&<>=~]
 "{"		return (int)*yytext;
 "}"		return (int)*yytext;
 
-{SCAN_WORD}	store_id(); return SCAN_WORD;
+{SCAN_WORD}	        store_id(); return SCAN_WORD;
+
+{SCAN_EQUAL}	    store_op(SCAN_EQUAL); return SCAN_EQUAL;
+{SCAN_NOT_EQUAL}    store_op(SCAN_NOT_EQUAL); return SCAN_NOT_EQUAL;
+{SCAN_GREATER}	    store_op(SCAN_GREATER); return SCAN_GREATER;
+{SCAN_GREATER_EQL}  store_op(SCAN_GREATER_EQL); return SCAN_GREATER_EQL;
+{SCAN_LESS}	        store_op(SCAN_LESS); return SCAN_LESS;
+{SCAN_LESS_EQL}	    store_op(SCAN_LESS_EQL); return SCAN_LESS_EQL;
+{SCAN_REGEXP}	    store_op(SCAN_REGEXP); return SCAN_REGEXP;
 
-{SCAN_EQUAL}	store_op(SCAN_EQUAL); return SCAN_EQUAL;
-{SCAN_NOT_EQUAL} store_op(SCAN_NOT_EQUAL); return SCAN_NOT_EQUAL;
-{SCAN_GREATER}	store_op(SCAN_GREATER); return SCAN_GREATER;
-{SCAN_GREATER_EQL} store_op(SCAN_GREATER_EQL); return SCAN_GREATER_EQL;
-{SCAN_LESS}	store_op(SCAN_LESS); return SCAN_LESS;
-{SCAN_LESS_EQL}	store_op(SCAN_LESS_EQL); return SCAN_LESS_EQL;
-{SCAN_REGEXP}	store_op(SCAN_REGEXP); return SCAN_REGEXP;
+{SCAN_STAR}         store_op(SCAN_STAR); return SCAN_STAR;
+
+{SCAN_HASH_BYTE}      return SCAN_HASH_BYTE;
+{SCAN_HASH_INT16}     return SCAN_HASH_INT16;
+{SCAN_HASH_UINT16}    return SCAN_HASH_UINT16;
+{SCAN_HASH_INT32}     return SCAN_HASH_INT32;
+{SCAN_HASH_UINT32}    return SCAN_HASH_UINT32;
+{SCAN_HASH_FLOAT32}   return SCAN_HASH_FLOAT32;
+{SCAN_HASH_FLOAT64}   return SCAN_HASH_FLOAT64;
 
 [ \t\r\n]+
 <INITIAL><<EOF>> yy_init = 1; yyterminate();
 
 \"		BEGIN(quote); yymore();
+
 <quote>[^"\\]*  yymore(); /*"*/
+
 <quote>\\.	yymore();
+
 <quote>\"	{ 
     		  BEGIN(INITIAL); 
-                  store_str();
-		  return SCAN_STR;
-                }
+              store_str();
+              return SCAN_STR;
+            }
+
 <quote><<EOF>>	{
+                  BEGIN(INITIAL);   /* resetting the state is needed for reentrant parsers */
                   char msg[256];
-		  sprintf(msg, "Unterminated quote\n");
-		  YY_FATAL_ERROR(msg);
+                  sprintf(msg, "Unterminated quote\n");
+                  YY_FATAL_ERROR(msg);
                 }
 
 {NEVER}         {
                   if (yytext) {	/* suppress msgs about `' chars */
                     fprintf(stderr, "Character `%c' is not", *yytext);
                     fprintf(stderr, " allowed and has been ignored\n");
-		  }
-		}
+                  }
+		        }
 %%
 
 // Three glue routines for string scanning. These are not declared in the
@@ -192,7 +220,7 @@ ce_expr_delete_buffer(void *buf)
 static void
 store_id()
 {
-    strncpy(ce_exprlval.id, www2id(string(yytext)).c_str(), ID_MAX-1);
+    strncpy(ce_exprlval.id, yytext, ID_MAX-1);
     ce_exprlval.id[ID_MAX-1] = '\0';
 }
 
@@ -200,7 +228,7 @@ static void
 store_str()
 {
     // transform %20 to a space. 7/11/2001 jhrg
-    string *s = new string(www2id(string(yytext)));  // XXX memory leak?
+    string *s = new string(yytext); // move all calls of www2id into the parser. jhrg 7/5/13 www2id(string(yytext)));
 
     if (*s->begin() == '\"' && *(s->end()-1) == '\"') {
 	s->erase(s->begin());
diff --git a/ce_expr.tab.cc b/ce_expr.tab.cc
index 2943682..8a8f0dc 100644
--- a/ce_expr.tab.cc
+++ b/ce_expr.tab.cc
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   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
@@ -29,7 +28,7 @@
    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.  */
 
@@ -47,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -55,63 +54,63 @@
 /* Pure parsers.  */
 #define YYPURE 0
 
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
 /* Substitute the variable and function names.  */
-#define yyparse ce_exprparse
-#define yylex   ce_exprlex
-#define yyerror ce_exprerror
-#define yylval  ce_exprlval
-#define yychar  ce_exprchar
-#define yydebug ce_exprdebug
-#define yynerrs ce_exprnerrs
+#define yyparse         ce_exprparse
+#define yylex           ce_exprlex
+#define yyerror         ce_exprerror
+#define yylval          ce_exprlval
+#define yychar          ce_exprchar
+#define yydebug         ce_exprdebug
+#define yynerrs         ce_exprnerrs
 
 
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     SCAN_STR = 258,
-     SCAN_WORD = 259,
-     SCAN_EQUAL = 260,
-     SCAN_NOT_EQUAL = 261,
-     SCAN_GREATER = 262,
-     SCAN_GREATER_EQL = 263,
-     SCAN_LESS = 264,
-     SCAN_LESS_EQL = 265,
-     SCAN_REGEXP = 266
-   };
+/* Copy the first part of user declarations.  */
+
+
+/* Line 189 of yacc.c  */
+#line 81 "ce_expr.tab.cc"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
 #endif
-/* Tokens.  */
-#define SCAN_STR 258
-#define SCAN_WORD 259
-#define SCAN_EQUAL 260
-#define SCAN_NOT_EQUAL 261
-#define SCAN_GREATER 262
-#define SCAN_GREATER_EQL 263
-#define SCAN_LESS 264
-#define SCAN_LESS_EQL 265
-#define SCAN_REGEXP 266
 
+/* 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
 
+/* "%code requires" blocks.  */
 
-/* Copy the first part of user declarations.  */
-#line 41 "ce_expr.y"
+/* Line 209 of yacc.c  */
+#line 41 "ce_expr.yy"
 
 
 #include "config.h"
 
-static char rcsid[] not_used = {"$Id: ce_expr.y 25915 2012-10-24 00:14:58Z jimg $"};
-
 #include <cassert>
 #include <cstdlib>
 #include <cstring>
 
 #include <iostream>
+#include <sstream>
 #include <iterator>
 #include <string>
 #include <stack>
@@ -155,19 +154,14 @@ using namespace libdap ;
 #define EVALUATOR(arg) (static_cast<ce_parser_arg*>(arg)->get_eval())
 #define DDS(arg) (static_cast<ce_parser_arg*>(arg)->get_dds())
 
-#define YYPARSE_PARAM arg
+// #define YYPARSE_PARAM arg
 
 int ce_exprlex(void);		/* the scanner; see expr.lex */
 
-void ce_exprerror(const char *s);	/* easier to overload than to use stdarg... */
-void ce_exprerror(const char *s, const char *s2);
-void no_such_func(char *name);
-void no_such_ident(char *name, char *word);
-
-void ce_exprerror(const string &s); 
-void ce_exprerror(const string &s, const string &s2);
-void no_such_func(const string &name);
-void no_such_ident(const string &name, const string &word);
+void ce_exprerror(ce_parser_arg *arg, const string &s); 
+void ce_exprerror(ce_parser_arg *arg, const string &s, const string &s2);
+void no_such_func(ce_parser_arg *arg, const string &name);
+void no_such_ident(ce_parser_arg *arg, const string &name, const string &word);
 
 int_list *make_array_index(value &i1, value &i2, value &i3);
 int_list *make_array_index(value &i1, value &i2);
@@ -176,8 +170,7 @@ int_list_list *make_array_indices(int_list *index);
 int_list_list *append_array_index(int_list_list *indices, int_list *index);
 
 void delete_array_indices(int_list_list *indices);
-bool bracket_projection(DDS &table, const char *name, 
-			int_list_list *indices);
+bool bracket_projection(DDS &table, const char *name, int_list_list *indices);
 
 void process_array_indices(BaseType *variable, int_list_list *indices); 
 void process_grid_indices(BaseType *variable, int_list_list *indices); 
@@ -193,34 +186,76 @@ bool_func get_function(const ConstraintEvaluator &eval, const char *name);
 btp_func get_btp_function(const ConstraintEvaluator &eval, const char *name);
 proj_func get_proj_function(const ConstraintEvaluator &eval, const char *name);
 
+template<class arg_list, class arg_type>
+arg_list make_fast_arg_list(unsigned long vector_size_hint, arg_type arg_value);
 
+template<class arg_list, class arg_type>
+arg_list make_fast_arg_list(arg_list int_values, arg_type arg_value);
 
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+template<class t, class T>
+rvalue *build_constant_array(vector<t> *values, DDS *dds);
 
-/* 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
+
+
+/* Line 209 of yacc.c  */
+#line 203 "ce_expr.tab.cc"
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     SCAN_STR = 258,
+     SCAN_WORD = 259,
+     SCAN_EQUAL = 260,
+     SCAN_NOT_EQUAL = 261,
+     SCAN_GREATER = 262,
+     SCAN_GREATER_EQL = 263,
+     SCAN_LESS = 264,
+     SCAN_LESS_EQL = 265,
+     SCAN_REGEXP = 266,
+     SCAN_STAR = 267,
+     SCAN_HASH_BYTE = 268,
+     SCAN_HASH_INT16 = 269,
+     SCAN_HASH_UINT16 = 270,
+     SCAN_HASH_INT32 = 271,
+     SCAN_HASH_UINT32 = 272,
+     SCAN_HASH_FLOAT32 = 273,
+     SCAN_HASH_FLOAT64 = 274
+   };
 #endif
 
+
+
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 135 "ce_expr.y"
 {
+
+/* Line 214 of yacc.c  */
+#line 145 "ce_expr.yy"
+
     bool boolean;
     int op;
     char id[ID_MAX];
-
+    
+    libdap::dods_byte byte_value;
+    libdap::dods_int16 int16_value;
+    libdap::dods_uint16 uint16_value;
+    libdap::dods_int32 int32_value;
+    libdap::dods_uint32 uint32_value;
+    libdap::dods_float32 float32_value;
+    libdap::dods_float64 float64_value;
+    
+    libdap::byte_arg_list byte_values;
+    libdap::int16_arg_list int16_values;
+    libdap::uint16_arg_list uint16_values;
+    libdap::int32_arg_list int32_values;
+    libdap::uint32_arg_list uint32_values;
+    libdap::float32_arg_list float32_values;
+    libdap::float64_arg_list float64_values;
+    
     libdap::value val;               // value is defined in expr.h
 
     libdap::bool_func b_func;
@@ -231,22 +266,36 @@ typedef union YYSTYPE
     
     libdap::rvalue *rval_ptr;
     libdap::rvalue_list *r_val_l_ptr;
-}
-/* Line 193 of yacc.c.  */
-#line 237 "ce_expr.tab.cc"
-	YYSTYPE;
+
+
+
+/* Line 214 of yacc.c  */
+#line 274 "ce_expr.tab.cc"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 
-
 /* Copy the second part of user declarations.  */
 
 
-/* Line 216 of yacc.c.  */
-#line 250 "ce_expr.tab.cc"
+/* Line 264 of yacc.c  */
+#line 286 "ce_expr.tab.cc"
+/* Unqualified %code blocks.  */
+
+/* Line 265 of yacc.c  */
+#line 232 "ce_expr.yy"
+
+/* This global is used by the rule 'arg_length_hint' so that the hint can 
+   be used during the paraent rule's parse. See fast_int32_arg_list. */
+unsigned long arg_length_hint_value = 0;
+
+
+
+/* Line 265 of yacc.c  */
+#line 299 "ce_expr.tab.cc"
 
 #ifdef short
 # undef short
@@ -296,7 +345,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -321,14 +370,14 @@ typedef short int yytype_int16;
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int i)
+YYID (int yyi)
 #else
 static int
-YYID (i)
-    int i;
+YYID (yyi)
+    int yyi;
 #endif
 {
-  return i;
+  return yyi;
 }
 #endif
 
@@ -409,9 +458,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-  };
+  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)
@@ -445,12 +494,12 @@ union yyalloc
    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)					\
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
@@ -459,22 +508,22 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  13
+#define YYFINAL  28
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   60
+#define YYLAST   157
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  21
+#define YYNTOKENS  29
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  19
+#define YYNNTS  35
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  44
+#define YYNRULES  78
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  67
+#define YYNSTATES  146
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   266
+#define YYMAXUTOK   274
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -485,16 +534,16 @@ 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,    12,     2,
-      14,    15,     2,     2,    13,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,    20,     2,
+      22,    24,     2,     2,    21,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    23,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,    18,     2,    19,     2,     2,     2,     2,     2,     2,
+       2,    27,     2,    28,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    16,     2,    17,     2,     2,     2,     2,
+       2,     2,     2,    25,     2,    26,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -508,7 +557,8 @@ static const yytype_uint8 yytranslate[] =
        2,     2,     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
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19
 };
 
 #if YYDEBUG
@@ -517,38 +567,57 @@ static const yytype_uint8 yytranslate[] =
 static const yytype_uint8 yyprhs[] =
 {
        0,     0,     3,     4,     6,     7,    11,    15,    17,    21,
-      23,    25,    27,    32,    34,    38,    44,    48,    50,    55,
-      57,    62,    64,    68,    70,    71,    73,    75,    77,    80,
-      83,    87,    89,    91,    93,    96,   100,   106,   114,   116,
-     118,   120,   122,   124,   126
+      23,    25,    27,    29,    36,    43,    50,    57,    64,    71,
+      78,    80,    82,    86,    88,    90,    94,    96,    98,   102,
+     104,   106,   110,   112,   114,   118,   120,   122,   126,   128,
+     130,   134,   136,   141,   143,   147,   153,   157,   159,   164,
+     166,   171,   173,   175,   179,   181,   182,   184,   186,   188,
+     191,   194,   198,   200,   202,   204,   207,   211,   215,   221,
+     227,   235,   243,   245,   247,   249,   251,   253,   255
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int8 yyrhs[] =
 {
-      22,     0,    -1,    -1,    24,    -1,    -1,    12,    23,    27,
-      -1,    24,    12,    27,    -1,    25,    -1,    25,    13,    24,
-      -1,    36,    -1,    26,    -1,    34,    -1,     4,    14,    32,
-      15,    -1,    28,    -1,    27,    12,    28,    -1,    30,    39,
-      16,    31,    17,    -1,    30,    39,    30,    -1,    29,    -1,
-       4,    14,    32,    15,    -1,    33,    -1,     4,    14,    32,
-      15,    -1,    30,    -1,    31,    13,    30,    -1,    31,    -1,
-      -1,     4,    -1,     3,    -1,    35,    -1,    36,    37,    -1,
-      35,    36,    -1,    35,    36,    37,    -1,     4,    -1,     3,
-      -1,    38,    -1,    37,    38,    -1,    18,     4,    19,    -1,
-      18,     4,    20,     4,    19,    -1,    18,     4,    20,     4,
-      20,     4,    19,    -1,     5,    -1,     6,    -1,     7,    -1,
-       8,    -1,     9,    -1,    10,    -1,    11,    -1
+      30,     0,    -1,    -1,    32,    -1,    -1,    20,    31,    51,
+      -1,    32,    20,    51,    -1,    33,    -1,    33,    21,    32,
+      -1,    60,    -1,    50,    -1,    58,    -1,    34,    -1,    13,
+      22,    35,    23,    36,    24,    -1,    14,    22,    35,    23,
+      38,    24,    -1,    15,    22,    35,    23,    40,    24,    -1,
+      16,    22,    35,    23,    42,    24,    -1,    17,    22,    35,
+      23,    44,    24,    -1,    18,    22,    35,    23,    46,    24,
+      -1,    19,    22,    35,    23,    48,    24,    -1,     4,    -1,
+      37,    -1,    36,    21,    37,    -1,     4,    -1,    39,    -1,
+      38,    21,    39,    -1,     4,    -1,    41,    -1,    40,    21,
+      41,    -1,     4,    -1,    43,    -1,    42,    21,    43,    -1,
+       4,    -1,    45,    -1,    44,    21,    45,    -1,     4,    -1,
+      47,    -1,    46,    21,    47,    -1,     4,    -1,    49,    -1,
+      48,    21,    49,    -1,     4,    -1,     4,    22,    56,    24,
+      -1,    52,    -1,    51,    20,    52,    -1,    54,    63,    25,
+      55,    26,    -1,    54,    63,    54,    -1,    53,    -1,     4,
+      22,    56,    24,    -1,    57,    -1,     4,    22,    56,    24,
+      -1,    34,    -1,    54,    -1,    55,    21,    54,    -1,    55,
+      -1,    -1,     4,    -1,     3,    -1,    59,    -1,    60,    61,
+      -1,    59,    60,    -1,    59,    60,    61,    -1,     4,    -1,
+       3,    -1,    62,    -1,    61,    62,    -1,    27,     4,    28,
+      -1,    27,    12,    28,    -1,    27,     4,    23,     4,    28,
+      -1,    27,     4,    23,    12,    28,    -1,    27,     4,    23,
+       4,    23,     4,    28,    -1,    27,     4,    23,     4,    23,
+      12,    28,    -1,     5,    -1,     6,    -1,     7,    -1,     8,
+      -1,     9,    -1,    10,    -1,    11,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   176,   176,   182,   184,   184,   188,   194,   195,   201,
-     229,   233,   239,   261,   262,   268,   277,   288,   294,   307,
-     308,   320,   327,   336,   341,   346,   377,   393,   398,   406,
-     412,   423,   424,   446,   450,   456,   468,   486,   512,   513,
-     514,   515,   516,   517,   518
+       0,   241,   241,   247,   249,   249,   253,   259,   260,   266,
+     278,   282,   286,   310,   316,   322,   328,   334,   340,   346,
+     355,   366,   370,   377,   384,   388,   395,   402,   406,   413,
+     420,   424,   431,   438,   442,   449,   456,   460,   467,   474,
+     478,   485,   492,   514,   515,   521,   530,   541,   548,   562,
+     563,   573,   579,   586,   595,   600,   605,   634,   650,   655,
+     664,   670,   681,   686,   697,   701,   713,   722,   729,   741,
+     752,   767,   783,   784,   785,   786,   787,   788,   789
 };
 #endif
 
@@ -559,11 +628,20 @@ static const char *const yytname[] =
 {
   "$end", "error", "$undefined", "SCAN_STR", "SCAN_WORD", "SCAN_EQUAL",
   "SCAN_NOT_EQUAL", "SCAN_GREATER", "SCAN_GREATER_EQL", "SCAN_LESS",
-  "SCAN_LESS_EQL", "SCAN_REGEXP", "'&'", "','", "'('", "')'", "'{'", "'}'",
-  "'['", "']'", "':'", "$accept", "constraint_expr", "@1", "projection",
-  "proj_clause", "proj_function", "selection", "clause", "bool_function",
-  "r_value", "r_value_list", "arg_list", "id_or_const", "array_projection",
-  "array_proj_clause", "name", "array_indices", "array_index", "rel_op", 0
+  "SCAN_LESS_EQL", "SCAN_REGEXP", "SCAN_STAR", "SCAN_HASH_BYTE",
+  "SCAN_HASH_INT16", "SCAN_HASH_UINT16", "SCAN_HASH_INT32",
+  "SCAN_HASH_UINT32", "SCAN_HASH_FLOAT32", "SCAN_HASH_FLOAT64", "'&'",
+  "','", "'('", "':'", "')'", "'{'", "'}'", "'['", "']'", "$accept",
+  "constraint_expr", "$@1", "projection", "proj_clause",
+  "array_const_special_form", "arg_length_hint", "fast_byte_arg_list",
+  "fast_byte_arg", "fast_int16_arg_list", "fast_int16_arg",
+  "fast_uint16_arg_list", "fast_uint16_arg", "fast_int32_arg_list",
+  "fast_int32_arg", "fast_uint32_arg_list", "fast_uint32_arg",
+  "fast_float32_arg_list", "fast_float32_arg", "fast_float64_arg_list",
+  "fast_float64_arg", "proj_function", "selection", "clause",
+  "bool_function", "r_value", "r_value_list", "arg_list", "id_or_const",
+  "array_projection", "array_proj_clause", "name", "array_indices",
+  "array_index", "rel_op", 0
 };
 #endif
 
@@ -573,29 +651,35 @@ static const char *const yytname[] =
 static const yytype_uint16 yytoknum[] =
 {
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,    38,    44,    40,    41,   123,   125,    91,    93,
-      58
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+      38,    44,    40,    58,    41,   123,   125,    91,    93
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    21,    22,    22,    23,    22,    22,    24,    24,    25,
-      25,    25,    26,    27,    27,    28,    28,    28,    29,    30,
-      30,    31,    31,    32,    32,    33,    33,    34,    35,    35,
-      35,    36,    36,    37,    37,    38,    38,    38,    39,    39,
-      39,    39,    39,    39,    39
+       0,    29,    30,    30,    31,    30,    30,    32,    32,    33,
+      33,    33,    33,    34,    34,    34,    34,    34,    34,    34,
+      35,    36,    36,    37,    38,    38,    39,    40,    40,    41,
+      42,    42,    43,    44,    44,    45,    46,    46,    47,    48,
+      48,    49,    50,    51,    51,    52,    52,    52,    53,    54,
+      54,    54,    55,    55,    56,    56,    57,    57,    58,    59,
+      59,    59,    60,    60,    61,    61,    62,    62,    62,    62,
+      62,    62,    63,    63,    63,    63,    63,    63,    63
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 static const yytype_uint8 yyr2[] =
 {
        0,     2,     0,     1,     0,     3,     3,     1,     3,     1,
-       1,     1,     4,     1,     3,     5,     3,     1,     4,     1,
-       4,     1,     3,     1,     0,     1,     1,     1,     2,     2,
-       3,     1,     1,     1,     2,     3,     5,     7,     1,     1,
-       1,     1,     1,     1,     1
+       1,     1,     1,     6,     6,     6,     6,     6,     6,     6,
+       1,     1,     3,     1,     1,     3,     1,     1,     3,     1,
+       1,     3,     1,     1,     3,     1,     1,     3,     1,     1,
+       3,     1,     4,     1,     3,     5,     3,     1,     4,     1,
+       4,     1,     1,     3,     1,     0,     1,     1,     1,     2,
+       2,     3,     1,     1,     1,     2,     3,     3,     5,     5,
+       7,     7,     1,     1,     1,     1,     1,     1,     1
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -603,81 +687,127 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       2,    32,    31,     4,     0,     3,     7,    10,    11,    27,
-       9,    24,     0,     1,     0,     0,    31,    29,     0,    28,
-      33,    26,    25,    21,    23,     0,    19,    25,     5,    13,
-      17,     0,     6,     8,    30,     0,    34,    24,     0,    12,
-      24,     0,    38,    39,    40,    41,    42,    43,    44,     0,
-      35,     0,     0,    22,     0,    14,     0,    16,     0,    20,
-      20,     0,    36,     0,    15,     0,    37
+       2,    63,    62,     0,     0,     0,     0,     0,     0,     0,
+       4,     0,     3,     7,    12,    10,    11,    58,     9,    55,
+       0,     0,     0,     0,     0,     0,     0,     0,     1,     0,
+       0,    62,    60,     0,    59,    64,    57,    56,    51,    52,
+      54,     0,    49,    20,     0,     0,     0,     0,     0,     0,
+       0,    56,     5,    43,    47,     0,     6,     8,    61,     0,
+       0,    65,    55,     0,    42,     0,     0,     0,     0,     0,
+       0,     0,    55,     0,    72,    73,    74,    75,    76,    77,
+      78,     0,     0,    66,    67,     0,    53,    23,     0,    21,
+      26,     0,    24,    29,     0,    27,    32,     0,    30,    35,
+       0,    33,    38,     0,    36,    41,     0,    39,     0,    44,
+       0,    46,     0,     0,    50,     0,    13,     0,    14,     0,
+      15,     0,    16,     0,    17,     0,    18,     0,    19,    50,
+       0,     0,    68,    69,    22,    25,    28,    31,    34,    37,
+      40,    45,     0,     0,    70,    71
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int8 yydefgoto[] =
 {
-      -1,     4,    12,     5,     6,     7,    28,    29,    30,    23,
-      24,    25,    26,     8,     9,    10,    19,    20,    49
+      -1,    11,    27,    12,    13,    38,    44,    88,    89,    91,
+      92,    94,    95,    97,    98,   100,   101,   103,   104,   106,
+     107,    15,    52,    53,    54,    39,    40,    41,    42,    16,
+      17,    18,    34,    35,    81
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -19
-static const yytype_int8 yypact[] =
+#define YYPACT_NINF -58
+static const yytype_int16 yypact[] =
 {
-       6,   -19,    -8,   -19,     8,     2,    15,   -19,   -19,     9,
-      24,    28,    30,   -19,    30,    32,   -19,    24,    39,    24,
-     -19,   -19,    31,   -19,    33,    29,   -19,    34,    35,   -19,
-     -19,    14,    35,   -19,    24,    19,   -19,    28,    28,   -19,
-      28,    30,   -19,   -19,   -19,   -19,   -19,   -19,   -19,     1,
-     -19,    45,    36,   -19,    37,   -19,    28,   -19,    21,   -19,
-       3,    -6,   -19,    46,   -19,    38,   -19
+      44,   -58,    -8,    56,    83,    86,    87,    88,    89,    90,
+     -58,    23,    31,    92,   -58,   -58,   -58,    73,    71,    26,
+     103,   103,   103,   103,   103,   103,   103,    52,   -58,    52,
+      69,   -58,    71,    21,    71,   -58,   -58,    93,   -58,   -58,
+      95,    94,   -58,   -58,    91,    96,    97,    98,    99,   100,
+     101,   104,   105,   -58,   -58,    85,   105,   -58,    71,     9,
+     102,   -58,    26,    26,   -58,   113,   123,   124,   125,   127,
+     128,   129,    26,    52,   -58,   -58,   -58,   -58,   -58,   -58,
+     -58,     3,    22,   -58,   -58,   110,   -58,   -58,    14,   -58,
+     -58,    28,   -58,   -58,    29,   -58,   -58,    76,   -58,   -58,
+      78,   -58,   -58,    80,   -58,   -58,    82,   -58,   111,   -58,
+      26,   -58,    51,   108,   -58,   113,   -58,   123,   -58,   124,
+     -58,   125,   -58,   127,   -58,   128,   -58,   129,   -58,     4,
+      54,    77,   -58,   -58,   -58,   -58,   -58,   -58,   -58,   -58,
+     -58,   -58,   109,   112,   -58,   -58
 };
 
 /* YYPGOTO[NTERM-NUM].  */
-static const yytype_int8 yypgoto[] =
+static const yytype_int16 yypgoto[] =
 {
-     -19,   -19,   -19,    40,   -19,   -19,    42,    12,   -19,   -12,
-      -2,   -10,   -19,   -19,   -19,    49,    43,   -18,   -19
+     -58,   -58,   -58,   114,   -58,     1,   -13,   -58,    24,   -58,
+      25,   -58,    19,   -58,    20,   -58,    27,   -58,    18,   -58,
+      30,   -58,   116,    74,   -58,   -27,    36,   -57,   -58,   -58,
+     -58,   131,   117,   -31,   -58
 };
 
 /* 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 zero, do what YYDEFACT says.
    If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -19
-static const yytype_int8 yytable[] =
+#define YYTABLE_NINF -49
+static const yytype_int16 yytable[] =
 {
-      31,    36,    31,   -18,    21,    22,    11,    38,    13,     1,
-       2,    64,     1,    16,    14,   -18,    36,    56,     3,    42,
-      43,    44,    45,    46,    47,    48,    53,    52,    15,    31,
-      54,    21,    22,    21,    27,     1,     2,    57,    50,    51,
-      62,    63,    18,    35,    39,    37,    38,    41,    40,    58,
-      65,    59,    60,    55,    61,    33,    32,    66,    17,     0,
-      34
+      55,    14,    55,    61,   -48,    85,    36,    37,    45,    46,
+      47,    48,    49,    50,    19,   108,     3,     4,     5,     6,
+       7,     8,     9,    28,   -48,    59,   112,    61,   110,    36,
+      37,    14,    82,    60,   113,   115,    86,    83,   116,     3,
+       4,     5,     6,     7,     8,     9,    55,     1,     2,   117,
+     119,    29,   118,   120,   111,    36,    51,     3,     4,     5,
+       6,     7,     8,     9,    10,     3,     4,     5,     6,     7,
+       8,     9,     1,     2,   131,    63,     1,    31,    20,   132,
+     141,   142,     3,     4,     5,     6,     7,     8,     9,   143,
+      74,    75,    76,    77,    78,    79,    80,   121,    33,   123,
+     122,   125,   124,   127,   126,    21,   128,    43,    22,    23,
+      24,    25,    26,    30,    65,    62,    63,    87,    64,    66,
+      67,    68,    69,    70,    71,    73,    72,    90,    93,    96,
+      84,    99,   102,   105,   114,   129,   133,   144,   136,   134,
+     145,   137,   135,   139,    57,    56,   130,   109,    32,    58,
+     138,     0,     0,     0,     0,     0,     0,   140
 };
 
 static const yytype_int8 yycheck[] =
 {
-      12,    19,    14,     0,     3,     4,    14,    13,     0,     3,
-       4,    17,     3,     4,    12,    12,    34,    16,    12,     5,
-       6,     7,     8,     9,    10,    11,    38,    37,    13,    41,
-      40,     3,     4,     3,     4,     3,     4,    49,    19,    20,
-      19,    20,    18,     4,    15,    14,    13,    12,    14,     4,
-       4,    15,    15,    41,    56,    15,    14,    19,     9,    -1,
-      17
+      27,     0,    29,    34,     0,    62,     3,     4,    21,    22,
+      23,    24,    25,    26,    22,    72,    13,    14,    15,    16,
+      17,    18,    19,     0,    20,     4,     4,    58,    25,     3,
+       4,    30,    23,    12,    12,    21,    63,    28,    24,    13,
+      14,    15,    16,    17,    18,    19,    73,     3,     4,    21,
+      21,    20,    24,    24,    81,     3,     4,    13,    14,    15,
+      16,    17,    18,    19,    20,    13,    14,    15,    16,    17,
+      18,    19,     3,     4,    23,    21,     3,     4,    22,    28,
+      26,     4,    13,    14,    15,    16,    17,    18,    19,    12,
+       5,     6,     7,     8,     9,    10,    11,    21,    27,    21,
+      24,    21,    24,    21,    24,    22,    24,     4,    22,    22,
+      22,    22,    22,    21,    23,    22,    21,     4,    24,    23,
+      23,    23,    23,    23,    23,    20,    22,     4,     4,     4,
+      28,     4,     4,     4,    24,    24,    28,    28,   119,   115,
+      28,   121,   117,   125,    30,    29,   110,    73,    17,    32,
+     123,    -1,    -1,    -1,    -1,    -1,    -1,   127
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,     3,     4,    12,    22,    24,    25,    26,    34,    35,
-      36,    14,    23,     0,    12,    13,     4,    36,    18,    37,
-      38,     3,     4,    30,    31,    32,    33,     4,    27,    28,
-      29,    30,    27,    24,    37,     4,    38,    14,    13,    15,
-      14,    12,     5,     6,     7,     8,     9,    10,    11,    39,
-      19,    20,    32,    30,    32,    28,    16,    30,     4,    15,
-      15,    31,    19,    20,    17,     4,    19
+       0,     3,     4,    13,    14,    15,    16,    17,    18,    19,
+      20,    30,    32,    33,    34,    50,    58,    59,    60,    22,
+      22,    22,    22,    22,    22,    22,    22,    31,     0,    20,
+      21,     4,    60,    27,    61,    62,     3,     4,    34,    54,
+      55,    56,    57,     4,    35,    35,    35,    35,    35,    35,
+      35,     4,    51,    52,    53,    54,    51,    32,    61,     4,
+      12,    62,    22,    21,    24,    23,    23,    23,    23,    23,
+      23,    23,    22,    20,     5,     6,     7,     8,     9,    10,
+      11,    63,    23,    28,    28,    56,    54,     4,    36,    37,
+       4,    38,    39,     4,    40,    41,     4,    42,    43,     4,
+      44,    45,     4,    46,    47,     4,    48,    49,    56,    52,
+      25,    54,     4,    12,    24,    21,    24,    21,    24,    21,
+      24,    21,    24,    21,    24,    21,    24,    21,    24,    24,
+      55,    23,    28,    28,    37,    39,    41,    43,    45,    47,
+      49,    26,     4,    12,    28,    28
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -710,7 +840,7 @@ do								\
     }								\
   else								\
     {								\
-      yyerror (YY_("syntax error: cannot back up")); \
+      yyerror (arg, YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
 while (YYID (0))
@@ -751,7 +881,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -790,7 +920,7 @@ do {									  \
     {									  \
       YYFPRINTF (stderr, "%s ", Title);					  \
       yy_symbol_print (stderr,						  \
-		  Type, Value); \
+		  Type, Value, arg); \
       YYFPRINTF (stderr, "\n");						  \
     }									  \
 } while (YYID (0))
@@ -804,17 +934,19 @@ do {									  \
 #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)
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ce_parser_arg *arg)
 #else
 static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg)
     FILE *yyoutput;
     int yytype;
     YYSTYPE const * const yyvaluep;
+    ce_parser_arg *arg;
 #endif
 {
   if (!yyvaluep)
     return;
+  YYUSE (arg);
 # ifdef YYPRINT
   if (yytype < YYNTOKENS)
     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
@@ -836,13 +968,14 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ce_parser_arg *arg)
 #else
 static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
+yy_symbol_print (yyoutput, yytype, yyvaluep, arg)
     FILE *yyoutput;
     int yytype;
     YYSTYPE const * const yyvaluep;
+    ce_parser_arg *arg;
 #endif
 {
   if (yytype < YYNTOKENS)
@@ -850,7 +983,7 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
   else
     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg);
   YYFPRINTF (yyoutput, ")");
 }
 
@@ -862,17 +995,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 #else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
@@ -890,12 +1026,13 @@ do {								\
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, ce_parser_arg *arg)
 #else
 static void
-yy_reduce_print (yyvsp, yyrule)
+yy_reduce_print (yyvsp, yyrule, arg)
     YYSTYPE *yyvsp;
     int yyrule;
+    ce_parser_arg *arg;
 #endif
 {
   int yynrhs = yyr2[yyrule];
@@ -906,18 +1043,18 @@ yy_reduce_print (yyvsp, yyrule)
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       		       );
-      fprintf (stderr, "\n");
+		       		       , arg);
+      YYFPRINTF (stderr, "\n");
     }
 }
 
 # define YY_REDUCE_PRINT(Rule)		\
 do {					\
   if (yydebug)				\
-    yy_reduce_print (yyvsp, Rule); \
+    yy_reduce_print (yyvsp, Rule, arg); \
 } while (YYID (0))
 
 /* Nonzero means print parse trace.  It is left uninitialized so that
@@ -1168,16 +1305,18 @@ yysyntax_error (char *yyresult, int yystate, int yychar)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, ce_parser_arg *arg)
 #else
 static void
-yydestruct (yymsg, yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep, arg)
     const char *yymsg;
     int yytype;
     YYSTYPE *yyvaluep;
+    ce_parser_arg *arg;
 #endif
 {
   YYUSE (yyvaluep);
+  YYUSE (arg);
 
   if (!yymsg)
     yymsg = "Deleting";
@@ -1190,10 +1329,8 @@ yydestruct (yymsg, yytype, yyvaluep)
 	break;
     }
 }
-

 
 /* Prevent warnings from -Wmissing-prototypes.  */
-
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
 int yyparse (void *YYPARSE_PARAM);
@@ -1202,18 +1339,17 @@ int yyparse ();
 #endif
 #else /* ! YYPARSE_PARAM */
 #if defined __STDC__ || defined __cplusplus
-int yyparse (void);
+int yyparse (ce_parser_arg *arg);
 #else
 int yyparse ();
 #endif
 #endif /* ! YYPARSE_PARAM */
 
 
-
-/* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
+/* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
 
 /* Number of syntax errors so far.  */
@@ -1221,9 +1357,9 @@ int yynerrs;
 
 
 
-/*----------.
-| yyparse.  |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1239,74 +1375,76 @@ yyparse (YYPARSE_PARAM)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 int
-yyparse (void)
+yyparse (ce_parser_arg *arg)
 #else
 int
-yyparse ()
-
+yyparse (arg)
+    ce_parser_arg *arg;
 #endif
 #endif
 {
-  
-  int yystate;
-  int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
 
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
 
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
 
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
+    /* 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;
 
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
 
-  YYSIZE_T yystacksize = YYINITDEPTH;
+    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.  */
+  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;
 
@@ -1336,7 +1474,6 @@ yyparse ()
 	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
@@ -1344,7 +1481,6 @@ yyparse ()
 	yyoverflow (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
-
 		    &yystacksize);
 
 	yyss = yyss1;
@@ -1367,9 +1503,8 @@ yyparse ()
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 #  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
@@ -1380,7 +1515,6 @@ yyparse ()
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
-
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 		  (unsigned long int) yystacksize));
 
@@ -1390,6 +1524,9 @@ yyparse ()
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
@@ -1398,16 +1535,16 @@ yyparse ()
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
+     lookahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to look-ahead token.  */
+  /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
   if (yyn == YYPACT_NINF)
     goto yydefault;
 
-  /* Not known => get a look-ahead token if don't already have one.  */
+  /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -1439,20 +1576,16 @@ yybackup:
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
   *++yyvsp = yylval;
@@ -1492,7 +1625,9 @@ yyreduce:
   switch (yyn)
     {
         case 2:
-#line 176 "ce_expr.y"
+
+/* Line 1455 of yacc.c  */
+#line 241 "ce_expr.yy"
     {
              DBG(cerr << "Mark all variables" << endl);
 		     DDS(arg)->mark_all(true);
@@ -1501,34 +1636,44 @@ yyreduce:
     break;
 
   case 4:
-#line 184 "ce_expr.y"
+
+/* Line 1455 of yacc.c  */
+#line 249 "ce_expr.yy"
     { DDS(arg)->mark_all(true); ;}
     break;
 
   case 5:
-#line 185 "ce_expr.y"
+
+/* Line 1455 of yacc.c  */
+#line 250 "ce_expr.yy"
     { 
 		     (yyval.boolean) = (yyvsp[(3) - (3)].boolean);
 		 ;}
     break;
 
   case 6:
-#line 189 "ce_expr.y"
+
+/* Line 1455 of yacc.c  */
+#line 254 "ce_expr.yy"
     {
 		     (yyval.boolean) = (yyvsp[(1) - (3)].boolean) && (yyvsp[(3) - (3)].boolean);
 		 ;}
     break;
 
   case 8:
-#line 196 "ce_expr.y"
+
+/* Line 1455 of yacc.c  */
+#line 261 "ce_expr.yy"
     {
 		     (yyval.boolean) = (yyvsp[(1) - (3)].boolean) && (yyvsp[(3) - (3)].boolean);
 		 ;}
     break;
 
   case 9:
-#line 202 "ce_expr.y"
-    { 
+
+/* Line 1455 of yacc.c  */
+#line 267 "ce_expr.yy"
+    {
 		     BaseType *var = DDS(arg)->var((yyvsp[(1) - (1)].id));
 		     if (var) {
 			     DBG(cerr << "Marking " << (yyvsp[(1) - (1)].id) << endl);
@@ -1536,27 +1681,321 @@ yyreduce:
 			     DBG(cerr << "result: " << (yyval.boolean) << endl);
 		     }
 		     else {
-			     no_such_ident((yyvsp[(1) - (1)].id), "identifier");
+			     no_such_ident(arg, (yyvsp[(1) - (1)].id), "identifier");
 		     }
 		;}
     break;
 
   case 10:
-#line 230 "ce_expr.y"
+
+/* Line 1455 of yacc.c  */
+#line 279 "ce_expr.yy"
     {
 		    (yyval.boolean) = (yyvsp[(1) - (1)].boolean);
 		;}
     break;
 
   case 11:
-#line 234 "ce_expr.y"
+
+/* Line 1455 of yacc.c  */
+#line 283 "ce_expr.yy"
     {
 		    (yyval.boolean) = (yyvsp[(1) - (1)].boolean);
 		;}
     break;
 
   case 12:
-#line 240 "ce_expr.y"
+
+/* Line 1455 of yacc.c  */
+#line 287 "ce_expr.yy"
+    {
+            Array *array = dynamic_cast<Array*>((yyvsp[(1) - (1)].rval_ptr)->bvalue(*DDS(arg)));
+            if (array) { 
+                /* When the special form appears here (not as a function argument)
+                set send_p so the data will be sent and add it to the DDS. This 
+                streamlines testing (and is likely what is intended). */
+                
+                array->set_send_p(true);
+                DDS(arg)->add_var_nocopy(array);
+                
+                return true;
+            }
+            else {
+                ce_exprerror(arg, "Could not create the anonymous vector using the # special form");
+                return false;
+            }
+        ;}
+    break;
+
+  case 13:
+
+/* Line 1455 of yacc.c  */
+#line 311 "ce_expr.yy"
+    {
+            (yyval.rval_ptr) = build_constant_array<dods_byte, Byte>((yyvsp[(5) - (6)].byte_values), DDS(arg));
+        ;}
+    break;
+
+  case 14:
+
+/* Line 1455 of yacc.c  */
+#line 317 "ce_expr.yy"
+    {
+            (yyval.rval_ptr) = build_constant_array<dods_int16, Int16>((yyvsp[(5) - (6)].int16_values), DDS(arg));
+        ;}
+    break;
+
+  case 15:
+
+/* Line 1455 of yacc.c  */
+#line 323 "ce_expr.yy"
+    {
+            (yyval.rval_ptr) = build_constant_array<dods_uint16, UInt16>((yyvsp[(5) - (6)].uint16_values), DDS(arg));
+        ;}
+    break;
+
+  case 16:
+
+/* Line 1455 of yacc.c  */
+#line 329 "ce_expr.yy"
+    {
+            (yyval.rval_ptr) = build_constant_array<dods_int32, Int32>((yyvsp[(5) - (6)].int32_values), DDS(arg));
+        ;}
+    break;
+
+  case 17:
+
+/* Line 1455 of yacc.c  */
+#line 335 "ce_expr.yy"
+    {
+            (yyval.rval_ptr) = build_constant_array<dods_uint32, UInt32>((yyvsp[(5) - (6)].uint32_values), DDS(arg));
+        ;}
+    break;
+
+  case 18:
+
+/* Line 1455 of yacc.c  */
+#line 341 "ce_expr.yy"
+    {
+            (yyval.rval_ptr) = build_constant_array<dods_float32, Float32>((yyvsp[(5) - (6)].float32_values), DDS(arg));
+        ;}
+    break;
+
+  case 19:
+
+/* Line 1455 of yacc.c  */
+#line 347 "ce_expr.yy"
+    {
+            (yyval.rval_ptr) = build_constant_array<dods_float64, Float64>((yyvsp[(5) - (6)].float64_values), DDS(arg));
+        ;}
+    break;
+
+  case 20:
+
+/* Line 1455 of yacc.c  */
+#line 356 "ce_expr.yy"
+    {
+              if (!check_int32((yyvsp[(1) - (1)].id)))
+                  throw Error(malformed_expr, "#<type>(hint, value, ...) special form expected hint to be an integer");
+                   
+              arg_length_hint_value = atoi((yyvsp[(1) - (1)].id));
+              (yyval.boolean) = true;
+          ;}
+    break;
+
+  case 21:
+
+/* Line 1455 of yacc.c  */
+#line 367 "ce_expr.yy"
+    {
+              (yyval.byte_values) = make_fast_arg_list<byte_arg_list, dods_byte>(arg_length_hint_value, (yyvsp[(1) - (1)].byte_value));
+          ;}
+    break;
+
+  case 22:
+
+/* Line 1455 of yacc.c  */
+#line 371 "ce_expr.yy"
+    {
+              (yyval.byte_values) = make_fast_arg_list<byte_arg_list, dods_byte>((yyvsp[(1) - (3)].byte_values), (yyvsp[(3) - (3)].byte_value));
+          ;}
+    break;
+
+  case 23:
+
+/* Line 1455 of yacc.c  */
+#line 378 "ce_expr.yy"
+    {
+              (yyval.byte_value) = strtol((yyvsp[(1) - (1)].id), 0, 0);
+          ;}
+    break;
+
+  case 24:
+
+/* Line 1455 of yacc.c  */
+#line 385 "ce_expr.yy"
+    {
+              (yyval.int16_values) = make_fast_arg_list<int16_arg_list, dods_int16>(arg_length_hint_value, (yyvsp[(1) - (1)].int16_value));
+          ;}
+    break;
+
+  case 25:
+
+/* Line 1455 of yacc.c  */
+#line 389 "ce_expr.yy"
+    {
+              (yyval.int16_values) = make_fast_arg_list<int16_arg_list, dods_int16>((yyvsp[(1) - (3)].int16_values), (yyvsp[(3) - (3)].int16_value));
+          ;}
+    break;
+
+  case 26:
+
+/* Line 1455 of yacc.c  */
+#line 396 "ce_expr.yy"
+    {
+              (yyval.int16_value) = strtol((yyvsp[(1) - (1)].id), 0, 0);
+          ;}
+    break;
+
+  case 27:
+
+/* Line 1455 of yacc.c  */
+#line 403 "ce_expr.yy"
+    {
+              (yyval.uint16_values) = make_fast_arg_list<uint16_arg_list, dods_uint16>(arg_length_hint_value, (yyvsp[(1) - (1)].uint16_value));
+          ;}
+    break;
+
+  case 28:
+
+/* Line 1455 of yacc.c  */
+#line 407 "ce_expr.yy"
+    {
+              (yyval.uint16_values) = make_fast_arg_list<uint16_arg_list, dods_uint16>((yyvsp[(1) - (3)].uint16_values), (yyvsp[(3) - (3)].uint16_value));
+          ;}
+    break;
+
+  case 29:
+
+/* Line 1455 of yacc.c  */
+#line 414 "ce_expr.yy"
+    {
+              (yyval.uint16_value) = strtoul((yyvsp[(1) - (1)].id), 0, 0);
+          ;}
+    break;
+
+  case 30:
+
+/* Line 1455 of yacc.c  */
+#line 421 "ce_expr.yy"
+    {
+              (yyval.int32_values) = make_fast_arg_list<int32_arg_list, dods_int32>(arg_length_hint_value, (yyvsp[(1) - (1)].int32_value));
+          ;}
+    break;
+
+  case 31:
+
+/* Line 1455 of yacc.c  */
+#line 425 "ce_expr.yy"
+    {
+              (yyval.int32_values) = make_fast_arg_list<int32_arg_list, dods_int32>((yyvsp[(1) - (3)].int32_values), (yyvsp[(3) - (3)].int32_value));
+          ;}
+    break;
+
+  case 32:
+
+/* Line 1455 of yacc.c  */
+#line 432 "ce_expr.yy"
+    {
+              (yyval.int32_value) = strtol((yyvsp[(1) - (1)].id), 0, 0);
+          ;}
+    break;
+
+  case 33:
+
+/* Line 1455 of yacc.c  */
+#line 439 "ce_expr.yy"
+    {
+              (yyval.uint32_values) = make_fast_arg_list<uint32_arg_list, dods_uint32>(arg_length_hint_value, (yyvsp[(1) - (1)].uint32_value));
+          ;}
+    break;
+
+  case 34:
+
+/* Line 1455 of yacc.c  */
+#line 443 "ce_expr.yy"
+    {
+              (yyval.uint32_values) = make_fast_arg_list<uint32_arg_list, dods_uint32>((yyvsp[(1) - (3)].uint32_values), (yyvsp[(3) - (3)].uint32_value));
+          ;}
+    break;
+
+  case 35:
+
+/* Line 1455 of yacc.c  */
+#line 450 "ce_expr.yy"
+    {
+              (yyval.uint32_value) = strtoul((yyvsp[(1) - (1)].id), 0, 0);
+          ;}
+    break;
+
+  case 36:
+
+/* Line 1455 of yacc.c  */
+#line 457 "ce_expr.yy"
+    {
+              (yyval.float32_values) = make_fast_arg_list<float32_arg_list, dods_float32>(arg_length_hint_value, (yyvsp[(1) - (1)].float32_value));
+          ;}
+    break;
+
+  case 37:
+
+/* Line 1455 of yacc.c  */
+#line 461 "ce_expr.yy"
+    {
+              (yyval.float32_values) = make_fast_arg_list<float32_arg_list, dods_float32>((yyvsp[(1) - (3)].float32_values), (yyvsp[(3) - (3)].float32_value));
+          ;}
+    break;
+
+  case 38:
+
+/* Line 1455 of yacc.c  */
+#line 468 "ce_expr.yy"
+    {
+              (yyval.float32_value) = strtof((yyvsp[(1) - (1)].id), 0);
+          ;}
+    break;
+
+  case 39:
+
+/* Line 1455 of yacc.c  */
+#line 475 "ce_expr.yy"
+    {
+              (yyval.float64_values) = make_fast_arg_list<float64_arg_list, dods_float64>(arg_length_hint_value, (yyvsp[(1) - (1)].float64_value));
+          ;}
+    break;
+
+  case 40:
+
+/* Line 1455 of yacc.c  */
+#line 479 "ce_expr.yy"
+    {
+              (yyval.float64_values) = make_fast_arg_list<float64_arg_list, dods_float64>((yyvsp[(1) - (3)].float64_values), (yyvsp[(3) - (3)].float64_value));
+          ;}
+    break;
+
+  case 41:
+
+/* Line 1455 of yacc.c  */
+#line 486 "ce_expr.yy"
+    {
+              (yyval.float64_value) = strtod((yyvsp[(1) - (1)].id), 0);
+          ;}
+    break;
+
+  case 42:
+
+/* Line 1455 of yacc.c  */
+#line 493 "ce_expr.yy"
     {
 		    proj_func p_f = 0;
 		    btp_func f = 0;
@@ -1565,7 +2004,7 @@ yyreduce:
 			    EVALUATOR(arg)->append_clause(f, (yyvsp[(3) - (4)].r_val_l_ptr));
 			    (yyval.boolean) = true;
 		    }
-		    else if ((p_f = get_proj_function(*(EVALUATOR(arg)), (yyvsp[(1) - (4)].id)))) {
+		    else if ((p_f = get_proj_function(*(EVALUATOR(arg)), (yyvsp[(1) - (4)].id)))) { 
 		        DDS &dds = dynamic_cast<DDS&>(*(DDS(arg)));
 			    BaseType **args = build_btp_args( (yyvsp[(3) - (4)].r_val_l_ptr), dds );
 			    (*p_f)(((yyvsp[(3) - (4)].r_val_l_ptr)) ? (yyvsp[(3) - (4)].r_val_l_ptr)->size():0, args, dds, *(EVALUATOR(arg)));
@@ -1573,20 +2012,24 @@ yyreduce:
 			    (yyval.boolean) = true;
 		    }
 		    else {
-			    no_such_func((yyvsp[(1) - (4)].id));
+			    no_such_func(arg, (yyvsp[(1) - (4)].id));
 		    }
 		;}
     break;
 
-  case 14:
-#line 263 "ce_expr.y"
+  case 44:
+
+/* Line 1455 of yacc.c  */
+#line 516 "ce_expr.yy"
     {
 		    (yyval.boolean) = (yyvsp[(1) - (3)].boolean) && (yyvsp[(3) - (3)].boolean);
 		;}
     break;
 
-  case 15:
-#line 269 "ce_expr.y"
+  case 45:
+
+/* Line 1455 of yacc.c  */
+#line 522 "ce_expr.yy"
     {
 		    if ((yyvsp[(1) - (5)].rval_ptr)) {
 			EVALUATOR(arg)->append_clause((yyvsp[(2) - (5)].op), (yyvsp[(1) - (5)].rval_ptr), (yyvsp[(4) - (5)].r_val_l_ptr));
@@ -1597,8 +2040,10 @@ yyreduce:
 		;}
     break;
 
-  case 16:
-#line 278 "ce_expr.y"
+  case 46:
+
+/* Line 1455 of yacc.c  */
+#line 531 "ce_expr.yy"
     {
 		    if ((yyvsp[(1) - (3)].rval_ptr)) {
 			rvalue_list *rv = new rvalue_list;
@@ -1611,19 +2056,23 @@ yyreduce:
 		;}
     break;
 
-  case 17:
-#line 289 "ce_expr.y"
+  case 47:
+
+/* Line 1455 of yacc.c  */
+#line 542 "ce_expr.yy"
     {
 		    (yyval.boolean) = (yyvsp[(1) - (1)].boolean);
 		;}
     break;
 
-  case 18:
-#line 295 "ce_expr.y"
+  case 48:
+
+/* Line 1455 of yacc.c  */
+#line 549 "ce_expr.yy"
     {
 		   bool_func b_func = get_function((*EVALUATOR(arg)), (yyvsp[(1) - (4)].id));
 		   if (!b_func) {
-		       no_such_func((yyvsp[(1) - (4)].id));
+		       no_such_func(arg, (yyvsp[(1) - (4)].id));
 		   }
 		   else {
 		       EVALUATOR(arg)->append_clause(b_func, (yyvsp[(3) - (4)].r_val_l_ptr));
@@ -1632,94 +2081,115 @@ yyreduce:
 	       ;}
     break;
 
-  case 20:
-#line 309 "ce_expr.y"
+  case 50:
+
+/* Line 1455 of yacc.c  */
+#line 564 "ce_expr.yy"
     {
 		    btp_func func = get_btp_function((*EVALUATOR(arg)), (yyvsp[(1) - (4)].id));
 		    if (func) {
-			(yyval.rval_ptr) = new rvalue(func, (yyvsp[(3) - (4)].r_val_l_ptr));
+			    (yyval.rval_ptr) = new rvalue(func, (yyvsp[(3) - (4)].r_val_l_ptr));
 		    } 
-		    else {  		
-			no_such_func((yyvsp[(1) - (4)].id));
+		    else { 
+			    no_such_func(arg, (yyvsp[(1) - (4)].id));
 		    }
 		;}
     break;
 
-  case 21:
-#line 321 "ce_expr.y"
+  case 51:
+
+/* Line 1455 of yacc.c  */
+#line 574 "ce_expr.yy"
+    {
+            (yyval.rval_ptr) = (yyvsp[(1) - (1)].rval_ptr);
+        ;}
+    break;
+
+  case 52:
+
+/* Line 1455 of yacc.c  */
+#line 580 "ce_expr.yy"
     {
 		    if ((yyvsp[(1) - (1)].rval_ptr))
-			(yyval.r_val_l_ptr) = make_rvalue_list((yyvsp[(1) - (1)].rval_ptr));
+			    (yyval.r_val_l_ptr) = make_rvalue_list((yyvsp[(1) - (1)].rval_ptr));
 		    else
-			(yyval.r_val_l_ptr) = 0;
+			    (yyval.r_val_l_ptr) = 0;
 		;}
     break;
 
-  case 22:
-#line 328 "ce_expr.y"
+  case 53:
+
+/* Line 1455 of yacc.c  */
+#line 587 "ce_expr.yy"
     {
 		    if ((yyvsp[(1) - (3)].r_val_l_ptr) && (yyvsp[(3) - (3)].rval_ptr))
-			(yyval.r_val_l_ptr) = append_rvalue_list((yyvsp[(1) - (3)].r_val_l_ptr), (yyvsp[(3) - (3)].rval_ptr));
+			    (yyval.r_val_l_ptr) = append_rvalue_list((yyvsp[(1) - (3)].r_val_l_ptr), (yyvsp[(3) - (3)].rval_ptr));
 		    else
-			(yyval.r_val_l_ptr) = 0;
+			    (yyval.r_val_l_ptr) = 0;
 		;}
     break;
 
-  case 23:
-#line 337 "ce_expr.y"
+  case 54:
+
+/* Line 1455 of yacc.c  */
+#line 596 "ce_expr.yy"
     {  
-		  (yyval.r_val_l_ptr) = (yyvsp[(1) - (1)].r_val_l_ptr);
+		      (yyval.r_val_l_ptr) = (yyvsp[(1) - (1)].r_val_l_ptr);
 	      ;}
     break;
 
-  case 24:
-#line 341 "ce_expr.y"
+  case 55:
+
+/* Line 1455 of yacc.c  */
+#line 600 "ce_expr.yy"
     { 
-		  (yyval.r_val_l_ptr) = 0; 
+		      (yyval.r_val_l_ptr) = 0; 
 	      ;}
     break;
 
-  case 25:
-#line 347 "ce_expr.y"
+  case 56:
+
+/* Line 1455 of yacc.c  */
+#line 606 "ce_expr.yy"
     { 
-		    BaseType *btp = DDS(arg)->var(www2id(string((yyvsp[(1) - (1)].id))));
+		    BaseType *btp = DDS(arg)->var(www2id((yyvsp[(1) - (1)].id)));
 		    if (btp) {
-                        btp->set_in_selection(true);
-                        (yyval.rval_ptr) = new rvalue(btp);
+                btp->set_in_selection(true);
+                (yyval.rval_ptr) = new rvalue(btp);
 		    }
 		    else {
-			value new_val;
-			if (check_int32((yyvsp[(1) - (1)].id))) {
-			    new_val.type = dods_int32_c;
-			    new_val.v.i = atoi((yyvsp[(1) - (1)].id));
-			}
-			else if (check_uint32((yyvsp[(1) - (1)].id))) {
-			    new_val.type = dods_uint32_c;
-			    new_val.v.ui = atoi((yyvsp[(1) - (1)].id));
-			}
-			else if (check_float64((yyvsp[(1) - (1)].id))) {
-			    new_val.type = dods_float64_c;
-			    new_val.v.f = atof((yyvsp[(1) - (1)].id));
-			}
-			else {
-			    new_val.type = dods_str_c;
-			    new_val.v.s = new string((yyvsp[(1) - (1)].id));
-			}
-			BaseType *btp = make_variable((*EVALUATOR(arg)), new_val); 
-			// *** test for btp == null
-			// delete new_val.v.s; // Str::val2buf copies the value.
-			(yyval.rval_ptr) = new rvalue(btp);
+			    value new_val;
+			    if (check_int32((yyvsp[(1) - (1)].id))) {
+			        new_val.type = dods_int32_c;
+			        new_val.v.i = atoi((yyvsp[(1) - (1)].id));
+			    }
+			    else if (check_uint32((yyvsp[(1) - (1)].id))) {
+			        new_val.type = dods_uint32_c;
+			        new_val.v.ui = atoi((yyvsp[(1) - (1)].id));
+			    }
+			    else if (check_float64((yyvsp[(1) - (1)].id))) {
+			        new_val.type = dods_float64_c;
+			        new_val.v.f = atof((yyvsp[(1) - (1)].id));
+			    }
+			    else {
+			        new_val.type = dods_str_c;
+			        new_val.v.s = new string(www2id((yyvsp[(1) - (1)].id)));
+			    }
+			    BaseType *btp = make_variable((*EVALUATOR(arg)), new_val);
+			    (yyval.rval_ptr) = new rvalue(btp);
 		    }
 		;}
     break;
 
-  case 26:
-#line 378 "ce_expr.y"
+  case 57:
+
+/* Line 1455 of yacc.c  */
+#line 635 "ce_expr.yy"
     {
                     if ((yyvsp[(1) - (1)].val).type != dods_str_c || (yyvsp[(1) - (1)].val).v.s == 0 || (yyvsp[(1) - (1)].val).v.s->empty())
-                        ce_exprerror("Malformed string", "");
+                        ce_exprerror(arg, "Malformed string", "");
                         
-                    BaseType *var = DDS(arg)->var(*((yyvsp[(1) - (1)].val).v.s));
+                    BaseType *var = DDS(arg)->var(www2id(*((yyvsp[(1) - (1)].val).v.s)));
                     if (var) {
                         (yyval.rval_ptr) = new rvalue(var);
                     }
@@ -1730,148 +2200,198 @@ yyreduce:
                 ;}
     break;
 
-  case 27:
-#line 394 "ce_expr.y"
+  case 58:
+
+/* Line 1455 of yacc.c  */
+#line 651 "ce_expr.yy"
     {
                     (yyval.boolean) = (*DDS(arg)).mark((yyvsp[(1) - (1)].id), true);
                 ;}
     break;
 
-  case 28:
-#line 399 "ce_expr.y"
+  case 59:
+
+/* Line 1455 of yacc.c  */
+#line 656 "ce_expr.yy"
     {
+                    //string name = www2id($1);
                     if (!bracket_projection((*DDS(arg)), (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].int_ll_ptr)))
-                      no_such_ident((yyvsp[(1) - (2)].id), "array, grid or sequence");
-
+                      no_such_ident(arg, (yyvsp[(1) - (2)].id), "array, grid or sequence");
+                    
                     strncpy((yyval.id), (yyvsp[(1) - (2)].id), ID_MAX-1);
                     (yyval.id)[ID_MAX-1] = '\0';
                 ;}
     break;
 
-  case 29:
-#line 407 "ce_expr.y"
+  case 60:
+
+/* Line 1455 of yacc.c  */
+#line 665 "ce_expr.yy"
     {
-                    string name = string((yyvsp[(1) - (2)].id)) + string ((yyvsp[(2) - (2)].id));
+                    string name = string((yyvsp[(1) - (2)].id)) + string((yyvsp[(2) - (2)].id));
                     strncpy((yyval.id), name.c_str(), ID_MAX-1);
                     (yyval.id)[ID_MAX-1] = '\0';
                 ;}
     break;
 
-  case 30:
-#line 413 "ce_expr.y"
+  case 61:
+
+/* Line 1455 of yacc.c  */
+#line 671 "ce_expr.yy"
     {
-                    string name = string((yyvsp[(1) - (3)].id)) + string ((yyvsp[(2) - (3)].id));
+                    string name = string((yyvsp[(1) - (3)].id)) + string((yyvsp[(2) - (3)].id));
                     if (!bracket_projection((*DDS(arg)), name.c_str(), (yyvsp[(3) - (3)].int_ll_ptr)))
-                      no_such_ident(name.c_str(), "array, grid or sequence");
+                      no_such_ident(arg, name.c_str(), "array, grid or sequence");
 
                     strncpy((yyval.id), name.c_str(), ID_MAX-1);
                     (yyval.id)[ID_MAX-1] = '\0';
                 ;}
     break;
 
-  case 32:
-#line 425 "ce_expr.y"
+  case 62:
+
+/* Line 1455 of yacc.c  */
+#line 682 "ce_expr.yy"
+    { 
+                    strncpy((yyval.id), www2id((yyvsp[(1) - (1)].id)).c_str(), ID_MAX-1);
+                    (yyval.id)[ID_MAX-1] = '\0';
+                ;}
+    break;
+
+  case 63:
+
+/* Line 1455 of yacc.c  */
+#line 687 "ce_expr.yy"
     {
                     if ((yyvsp[(1) - (1)].val).type != dods_str_c || (yyvsp[(1) - (1)].val).v.s == 0 || (yyvsp[(1) - (1)].val).v.s->empty())
-                        ce_exprerror("Malformed string", "");
+                        ce_exprerror(arg, "Malformed string", "");
                         
                     strncpy((yyval.id), www2id(*((yyvsp[(1) - (1)].val).v.s)).c_str(), ID_MAX-1);
-                    // delete the string? ***
+                    
                     (yyval.id)[ID_MAX-1] = '\0';
-/*
-                    BaseType *var = DDS(arg)->var(*($1.v.s));
-                    if (var) {
-                        DBG(cerr << "Marking " << $1 << endl);
-                        $$ = DDS(arg)->mark(*($1.v.s), true);
-                        DBG(cerr << "result: " << $$ << endl);
-                    }
-                    else {
-                        no_such_ident(*($1.v.s), "identifier");
-                    }
-*/
                 ;}
     break;
 
-  case 33:
-#line 447 "ce_expr.y"
+  case 64:
+
+/* Line 1455 of yacc.c  */
+#line 698 "ce_expr.yy"
     {
 		    (yyval.int_ll_ptr) = make_array_indices((yyvsp[(1) - (1)].int_l_ptr));
 		;}
     break;
 
-  case 34:
-#line 451 "ce_expr.y"
+  case 65:
+
+/* Line 1455 of yacc.c  */
+#line 702 "ce_expr.yy"
     {
 		    (yyval.int_ll_ptr) = append_array_index((yyvsp[(1) - (2)].int_ll_ptr), (yyvsp[(2) - (2)].int_l_ptr));
 		;}
     break;
 
-  case 35:
-#line 457 "ce_expr.y"
+  case 66:
+
+/* Line 1455 of yacc.c  */
+#line 714 "ce_expr.yy"
     {
-		    if (!check_uint32((yyvsp[(2) - (3)].id))) {
-			string msg = "The word `";
-			msg += string((yyvsp[(2) - (3)].id)) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    value i;
-		    i.type = dods_uint32_c;
-		    i.v.i = atoi((yyvsp[(2) - (3)].id));
-		    (yyval.int_l_ptr) = make_array_index(i);
-		;}
+    if (!check_uint32((yyvsp[(2) - (3)].id)))
+        throw Error(malformed_expr, "The word `" + string((yyvsp[(2) - (3)].id)) + "' is not a valid array index.");
+    value i;
+    i.type = dods_uint32_c;
+    i.v.i = atoi((yyvsp[(2) - (3)].id));
+    (yyval.int_l_ptr) = make_array_index(i);
+;}
     break;
 
-  case 36:
-#line 469 "ce_expr.y"
+  case 67:
+
+/* Line 1455 of yacc.c  */
+#line 723 "ce_expr.yy"
     {
-		    if (!check_uint32((yyvsp[(2) - (5)].id))) {
-			string msg = "The word `";
-			msg += string((yyvsp[(2) - (5)].id)) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    if (!check_uint32((yyvsp[(4) - (5)].id))) {
-			string msg = "The word `";
-			msg += string((yyvsp[(4) - (5)].id)) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    value i,j;
-		    i.type = j.type = dods_uint32_c;
-		    i.v.i = atoi((yyvsp[(2) - (5)].id));
-		    j.v.i = atoi((yyvsp[(4) - (5)].id));
-		    (yyval.int_l_ptr) = make_array_index(i, j);
-		;}
+    value i;
+    i.type = dods_int32_c;
+    i.v.i =-1;
+    (yyval.int_l_ptr) = make_array_index(i);
+;}
     break;
 
-  case 37:
-#line 487 "ce_expr.y"
+  case 68:
+
+/* Line 1455 of yacc.c  */
+#line 730 "ce_expr.yy"
     {
-		    if (!check_uint32((yyvsp[(2) - (7)].id))) {
-			string msg = "The word `";
-			msg += string((yyvsp[(2) - (7)].id)) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    if (!check_uint32((yyvsp[(4) - (7)].id))) {
-			string msg = "The word `";
-			msg += string((yyvsp[(4) - (7)].id)) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    if (!check_uint32((yyvsp[(6) - (7)].id))) {
-			string msg = "The word `";
-			msg += string((yyvsp[(6) - (7)].id)) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    value i, j, k;
-		    i.type = j.type = k.type = dods_uint32_c;
-		    i.v.i = atoi((yyvsp[(2) - (7)].id));
-		    j.v.i = atoi((yyvsp[(4) - (7)].id));
-		    k.v.i = atoi((yyvsp[(6) - (7)].id));
-		    (yyval.int_l_ptr) = make_array_index(i, j, k);
-		;}
+    if (!check_uint32((yyvsp[(2) - (5)].id)))
+        throw Error(malformed_expr, "The word `" + string((yyvsp[(2) - (5)].id)) + "' is not a valid array index.");
+    if (!check_uint32((yyvsp[(4) - (5)].id)))
+        throw Error(malformed_expr, "The word `" + string((yyvsp[(4) - (5)].id)) + "' is not a valid array index.");
+    value i,j;
+    i.type = j.type = dods_uint32_c;
+    i.v.i = atoi((yyvsp[(2) - (5)].id));
+    j.v.i = atoi((yyvsp[(4) - (5)].id));
+    (yyval.int_l_ptr) = make_array_index(i, j);
+;}
     break;
 
+  case 69:
+
+/* Line 1455 of yacc.c  */
+#line 742 "ce_expr.yy"
+    {
+    if (!check_uint32((yyvsp[(2) - (5)].id)))
+        throw Error(malformed_expr, "The word `" + string((yyvsp[(2) - (5)].id)) + "' is not a valid array index.");
+    value i,j;
+    i.type = dods_uint32_c;
+    j.type = dods_int32_c;  /* signed */
+    i.v.i = atoi((yyvsp[(2) - (5)].id));
+    j.v.i = -1;
+    (yyval.int_l_ptr) = make_array_index(i, j);
+;}
+    break;
+
+  case 70:
+
+/* Line 1455 of yacc.c  */
+#line 753 "ce_expr.yy"
+    {
+    if (!check_uint32((yyvsp[(2) - (7)].id)))
+        throw Error(malformed_expr, "The word `" + string((yyvsp[(2) - (7)].id)) + "' is not a valid array index.");
+    if (!check_uint32((yyvsp[(4) - (7)].id)))
+        throw Error(malformed_expr, "The word `" + string((yyvsp[(4) - (7)].id)) + "' is not a valid array index.");
+    if (!check_uint32((yyvsp[(6) - (7)].id)))
+        throw Error(malformed_expr, "The word `" + string((yyvsp[(6) - (7)].id)) + "' is not a valid array index.");
+    value i, j, k;
+    i.type = j.type = k.type = dods_uint32_c;
+    i.v.i = atoi((yyvsp[(2) - (7)].id));
+    j.v.i = atoi((yyvsp[(4) - (7)].id));
+    k.v.i = atoi((yyvsp[(6) - (7)].id));
+    (yyval.int_l_ptr) = make_array_index(i, j, k);
+;}
+    break;
 
-/* Line 1267 of yacc.c.  */
-#line 1875 "ce_expr.tab.cc"
+  case 71:
+
+/* Line 1455 of yacc.c  */
+#line 768 "ce_expr.yy"
+    {
+    if (!check_uint32((yyvsp[(2) - (7)].id)))
+        throw Error(malformed_expr, "The word `" + string((yyvsp[(2) - (7)].id)) + "' is not a valid array index.");
+    if (!check_uint32((yyvsp[(4) - (7)].id)))
+        throw Error(malformed_expr, "The word `" + string((yyvsp[(4) - (7)].id)) + "' is not a valid array index.");
+    value i, j, k;
+    i.type = j.type = dods_uint32_c;
+    k.type = dods_int32_c;
+    i.v.i = atoi((yyvsp[(2) - (7)].id));
+    j.v.i = atoi((yyvsp[(4) - (7)].id));
+    k.v.i = -1;
+    (yyval.int_l_ptr) = make_array_index(i, j, k);
+;}
+    break;
+
+
+
+/* Line 1455 of yacc.c  */
+#line 2395 "ce_expr.tab.cc"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1882,7 +2402,6 @@ yyreduce:
 
   *++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.  */
@@ -1907,7 +2426,7 @@ yyerrlab:
     {
       ++yynerrs;
 #if ! YYERROR_VERBOSE
-      yyerror (YY_("syntax error"));
+      yyerror (arg, YY_("syntax error"));
 #else
       {
 	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
@@ -1931,11 +2450,11 @@ yyerrlab:
 	if (0 < yysize && yysize <= yymsg_alloc)
 	  {
 	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
+	    yyerror (arg, yymsg);
 	  }
 	else
 	  {
-	    yyerror (YY_("syntax error"));
+	    yyerror (arg, YY_("syntax error"));
 	    if (yysize != 0)
 	      goto yyexhaustedlab;
 	  }
@@ -1947,7 +2466,7 @@ yyerrlab:
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
+      /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
@@ -1959,12 +2478,12 @@ yyerrlab:
       else
 	{
 	  yydestruct ("Error: discarding",
-		      yytoken, &yylval);
+		      yytoken, &yylval, arg);
 	  yychar = YYEMPTY;
 	}
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -2015,15 +2534,12 @@ yyerrlab1:
 
 
       yydestruct ("Error: popping",
-		  yystos[yystate], yyvsp);
+		  yystos[yystate], yyvsp, arg);
       YYPOPSTACK (1);
       yystate = *yyssp;
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   *++yyvsp = yylval;
 
 
@@ -2048,20 +2564,20 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
 yyexhaustedlab:
-  yyerror (YY_("memory exhausted"));
+  yyerror (arg, YY_("memory exhausted"));
   yyresult = 2;
   /* Fall through.  */
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
+  if (yychar != YYEMPTY)
      yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
+		 yytoken, &yylval, arg);
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -2069,7 +2585,7 @@ yyreturn:
   while (yyssp != yyss)
     {
       yydestruct ("Cleanup: popping",
-		  yystos[*yyssp], yyvsp);
+		  yystos[*yyssp], yyvsp, arg);
       YYPOPSTACK (1);
     }
 #ifndef yyoverflow
@@ -2085,7 +2601,9 @@ yyreturn:
 }
 
 
-#line 521 "ce_expr.y"
+
+/* Line 1675 of yacc.c  */
+#line 792 "ce_expr.yy"
 
 
 // All these error reporting function now throw instances of Error. The expr
@@ -2093,49 +2611,30 @@ yyreturn:
 // jhrg.
 
 void
-ce_exprerror(const string &s)
-{
-    ce_exprerror(s.c_str());
-}
-
-void ce_exprerror(const char *s)
+ce_exprerror(ce_parser_arg *, const string &s)
 {
-    // cerr << "Expression parse error: " << s << endl;
+    //ce_exprerror(s.c_str());
     string msg = "Constraint expression parse error: " + (string) s;
     throw Error(malformed_expr, msg);
 }
 
-void ce_exprerror(const string &s, const string &s2)
-{
-    ce_exprerror(s.c_str(), s2.c_str());
-}
-
-void ce_exprerror(const char *s, const char *s2)
+void ce_exprerror(ce_parser_arg *, const string &s, const string &s2)
 {
+    //ce_exprerror(s.c_str(), s2.c_str());
     string msg = "Constraint expression parse error: " + (string) s + ": " + (string) s2;
-    throw Error(malformed_expr, msg);
+    throw Error(malformed_expr, msg);    
 }
 
-void no_such_ident(const string &name, const string &word)
+void no_such_ident(ce_parser_arg *arg, const string &name, const string &word)
 {
     string msg = "No such " + word + " in dataset";
-    ce_exprerror(msg.c_str(), name);
-}
-
-void no_such_ident(char *name, char *word)
-{
-    string msg = "No such " + (string) word + " in dataset";
-    ce_exprerror(msg.c_str(), name);
+    ce_exprerror(arg, msg /*.c_str()*/, name);
 }
 
-void no_such_func(const string &name)
+void no_such_func(ce_parser_arg *arg, const string &name)
 {
-    no_such_func(name.c_str());
-}
-
-void no_such_func(char *name)
-{
-    ce_exprerror("Not a registered function", name);
+    ce_exprerror(arg, "Not a registered function", name);
+    //no_such_func(name/*.c_str()*/);
 }
 
 /* If we're calling this, assume var is not a Sequence. But assume that the
@@ -2210,6 +2709,12 @@ bool bracket_projection(DDS &table, const char *name, int_list_list *indices)
 
 // Given three values (I1, I2, I3), all of which must be integers, build an
 // int_list which contains those values.
+// 
+// Note that we added support for * in the rightmost position of an index
+// (i.e., [*], [n:*], [n:m:*]) and indicate that star using -1 as an index value.
+// Bescause of this change, the test for the type of the rightmost value in
+// the index subexpr was changed to include signed int.
+// jhrg 12/20/12
 //
 // Returns: A pointer to an int_list of three integers or NULL if any of the
 // values are not integers.
@@ -2217,7 +2722,7 @@ bool bracket_projection(DDS &table, const char *name, int_list_list *indices)
 int_list *
 make_array_index(value &i1, value &i2, value &i3)
 {
-    if (i1.type != dods_uint32_c || i2.type != dods_uint32_c || i3.type != dods_uint32_c)
+    if (i1.type != dods_uint32_c || i2.type != dods_uint32_c || (i3.type != dods_uint32_c && i3.type != dods_int32_c))
         return (int_list *) 0;
 
     int_list *index = new int_list;
@@ -2236,7 +2741,7 @@ make_array_index(value &i1, value &i2, value &i3)
 int_list *
 make_array_index(value &i1, value &i2)
 {
-    if (i1.type != dods_uint32_c || i2.type != dods_uint32_c)
+    if (i1.type != dods_uint32_c || (i2.type != dods_uint32_c && i2.type != dods_int32_c))
 	return (int_list *) 0;
 
     int_list *index = new int_list;
@@ -2255,12 +2760,18 @@ make_array_index(value &i1, value &i2)
 int_list *
 make_array_index(value &i1)
 {
-    if (i1.type != dods_uint32_c)
+    if (i1.type != dods_uint32_c && i1.type != dods_int32_c)
 	return (int_list *) 0;
 
     int_list *index = new int_list;
 
-    index->push_back((int) i1.v.i);
+    // When the CE is Array[*] that means all of the elements, but the value
+    // of i1 will be -1. Make the projection triple be 0:1:-1 which is a 
+    // pattern that libdap::Array will recognize.
+    if (i1.v.i == -1)
+        index->push_back(0);
+    else
+        index->push_back((int) i1.v.i);
     index->push_back(1);
     index->push_back((int) i1.v.i);
 
@@ -2348,77 +2859,69 @@ void process_array_indices(BaseType *variable, int_list_list *indices)
 
     Array *a = dynamic_cast<Array *>(variable); // replace with dynamic cast
     if (!a)
-	throw Error(malformed_expr,
+        throw Error(malformed_expr,
 		    string("The constraint expression evaluator expected an array; ") + variable->name() + " is not an array.");
 
     if (a->dimensions(true) != (unsigned) indices->size())
-	throw Error(malformed_expr,
+        throw Error(malformed_expr,
 		    string("Error: The number of dimensions in the constraint for ") + variable->name()
                     + " must match the number in the array.");
 
-    DBG(cerr << "Before clear_constraint:" << endl);
-    DBG(a->print_decl(cerr, "", true, false, true));
-
-    // a->reset_constraint();	// each projection erases the previous one
-
-    DBG(cerr << "After clear_constraint:" << endl);
+    DBG(cerr << "Before applying projection to array:" << endl);
     DBG(a->print_decl(cerr, "", true, false, true));
 
     assert(indices);
+    
     int_list_citer p = indices->begin();
     Array::Dim_iter r = a->dim_begin();
     for (; p != indices->end() && r != a->dim_end(); p++, r++) {
-	int_list *index = *p;
-	assert(index);
-
-	int_citer q = index->begin();
-	assert(q != index->end());
-	int start = *q;
-
-	q++;
-	int stride = *q;
-
-	q++;
-	int stop = *q;
-
-	q++;
-	if (q != index->end()) {
-	    throw Error(malformed_expr, string("Too many values in index list for ") + a->name() + ".");
-	}
-
-	DBG(cerr << "process_array_indices: Setting constraint on " 
-	    << a->name() << "[" << start << ":" << stop << "]"
-	    << endl);
+        int_list *index = *p;
+        assert(index);
 
-	// It's possible that an array will appear more than once in a CE
-	// (for example, if an array of structures is constrained so that
-	// only two fields are projected and there's an associated hyperslab).
-	// However, in this case the two hyperslabs must be equal; test for
-	// that here. But see clear_constraint above... 10/28/08 jhrg
+        int_citer q = index->begin();
+        assert(q != index->end());
+        int start = *q;
 
-	if (a->send_p()
-	    && (a->dimension_start(r, true) != start || a->dimension_stop(r, true) != stop
-		|| a->dimension_stride(r, true) != stride))
-	    throw Error(malformed_expr,
-			string("The Array was already projected differently in the constraint expression: ") + a->name() + ".");
+        q++;
+        int stride = *q;
 
-	a->add_constraint(r, start, stride, stop);
+        q++;
+        int stop = *q;
 
-	DBG(cerr << "Set Constraint: " << a->dimension_size(r, true) << endl);
+        q++;
+        if (q != index->end())
+            throw Error(malformed_expr, string("Too many values in index list for ") + a->name() + ".");
+
+        DBG(cerr << "process_array_indices: Setting constraint on " 
+            << a->name() << "[" << start << ":" << stop << "]"
+            << endl);
+
+        // It's possible that an array will appear more than once in a CE
+        // (for example, if an array of structures is constrained so that
+        // only two fields are projected and there's an associated hyperslab).
+        // However, in this case the two hyperslabs must be equal; test for
+        // that here.
+        //
+        // We added '*' to mean 'the last element' in the array and use an index of -1
+        // to indicate that. If 'stop' is -1, don't test it here because dimension_stop()
+        // won't be -1 but the actual ending index of the array. jhrg 12/20/12
+
+        if (a->send_p() && (a->dimension_start(r, true) != start || (a->dimension_stop(r, true) != stop && stop != -1)
+                            || a->dimension_stride(r, true) != stride))
+            throw Error(malformed_expr,
+                    string("The Array was already projected differently in the constraint expression: ") + a->name() + ".");
+
+        a->add_constraint(r, start, stride, stop);
+
+        DBG(cerr << "Set Constraint: " << a->dimension_size(r, true) << endl);
     }
 
-    DBG(cerr << "After processing loop:" << endl);
+    DBG(cerr << "After applying projection to array:" << endl);
     DBG(a->print_decl(cerr, "", true, false, true));
 
-    DBG(cerr << "Array Constraint: ");
-    DBG(for (Array::Dim_iter dp = a->dim_begin(); dp != a->dim_end();
-	     dp++
-	     ) cout << a->dimension_size(dp, true) << " ");
-    DBG(cerr << endl);
 
-    if (p != indices->end() && r == a->dim_end()) {
-	throw Error(malformed_expr, string("Too many indices in constraint for ") + a->name() + ".");
-    }
+    if (p != indices->end() && r == a->dim_end())
+        throw Error(malformed_expr, string("Too many indices in constraint for ") + a->name() + ".");
 }
 
 void process_grid_indices(BaseType *variable, int_list_list *indices)
@@ -2444,7 +2947,7 @@ void process_grid_indices(BaseType *variable, int_list_list *indices)
 
     // Suppress all maps by default.
     for (; r != g->map_end(); r++) {
-	(*r)->set_send_p(false);
+        (*r)->set_send_p(false);
     }
 
     // Add specified maps to the current projection.
@@ -2452,53 +2955,49 @@ void process_grid_indices(BaseType *variable, int_list_list *indices)
     int_list_citer p = indices->begin();
     r = g->map_begin();
     for (; p != indices->end() && r != g->map_end(); p++, r++) {
-	int_list *index = *p;
-	assert(index);
-
-	int_citer q = index->begin();
-	assert(q != index->end());
-	int start = *q;
+        int_list *index = *p;
+        assert(index);
 
-	q++;
-	int stride = *q;
+        int_citer q = index->begin();
+        assert(q != index->end());
+        int start = *q;
 
-	q++;
-	int stop = *q;
+        q++;
+        int stride = *q;
 
-	BaseType *btp = *r;
-	assert(btp);
-	assert(btp->type() == dods_array_c);
-	Array *a = (Array *) btp;
-	a->set_send_p(true);
-	a->reset_constraint();
+        q++;
+        int stop = *q;
 
-	q++;
-	if (q != index->end()) {
-	    throw Error(malformed_expr, string("Too many values in index list for ") + a->name() + ".");
-	}
+        BaseType *btp = *r;
+        assert(btp);
+        assert(btp->type() == dods_array_c);
+        Array *a = (Array *) btp;
+        a->set_send_p(true);
+        a->reset_constraint();
 
-	DBG(
-	    cerr << "process_grid_indices: Setting constraint on "\
-	    << a->name() << "[" << start << ":"
-	    << stop << "]" << endl);
+        q++;
+        if (q != index->end()) {
+            throw Error(malformed_expr, string("Too many values in index list for ") + a->name() + ".");
+        }
 
-	Array::Dim_iter si = a->dim_begin();
-	a->add_constraint(si, start, stride, stop);
+        DBG(cerr << "process_grid_indices: Setting constraint on "
+            << a->name() << "[" << start << ":"
+            << stop << "]" << endl);
+    
+        Array::Dim_iter si = a->dim_begin();
+        a->add_constraint(si, start, stride, stop);
 
-	DBG (Array::Dim_iter aiter = a->dim_begin();
-	     cerr << "Set Constraint: " << a->dimension_size(aiter, true) << endl
-	     )                        ;
     }
 
     DBG(cout << "Grid Constraint: ";
 	for (Array::Dim_iter dp = ((Array *) g->array_var())->dim_begin();
 	     dp != ((Array *) g->array_var())->dim_end(); dp++)
 	    cout << ((Array *) g->array_var())->dimension_size(dp, true) << " ";
-	cout << endl
+	    cout << endl
 	);
 
     if (p != indices->end() && r == g->map_end()) {
-	throw Error(malformed_expr,
+        throw Error(malformed_expr,
 		    string("Too many indices in constraint for ") + (*r)->name() + ".");
     }
 }
@@ -2549,6 +3048,12 @@ make_variable(ConstraintEvaluator &eval, const value &val)
         break;
     }
 
+    case dods_uint32_c: {
+        var = new UInt32("dummy");
+        var->val2buf((void *) &val.v.i);
+        break;
+    }
+
     case dods_float64_c: {
         var = new Float64("dummy");
         var->val2buf((void *) &val.v.f);
@@ -2608,4 +3113,50 @@ proj_func get_proj_function(const ConstraintEvaluator &eval, const char *name)
         return 0;
 }
 
+template<class arg_type_list, class arg_type>
+arg_type_list
+make_fast_arg_list(unsigned long vector_size_hint, arg_type value)
+{
+    arg_type_list args = new std::vector<arg_type>;
+    
+    if (vector_size_hint > 0) args->reserve(vector_size_hint);
+    
+    args->push_back(value);
+    return args;
+}
+
+template<class arg_type_list, class arg_type>
+arg_type_list
+make_fast_arg_list(arg_type_list values, arg_type value)
+{
+    values->push_back(value);
+    return values;
+}
+
+template<class t, class T>
+rvalue *build_constant_array(vector<t> *values, DDS *dds)
+{
+    //vector<t> *values = $5;
+            
+    T i("");
+    Array *array = new Array("", &i);
+    array->append_dim(values->size());
+    
+    // TODO Make set_value_nocopy() methods so that values' pointers can be copied
+    // instead of allocating memory twice. jhrg 7/5/13
+            
+    array->set_value(*values, values->size());
+    delete values;
+    array->set_read_p(true);
+            
+    static unsigned long counter = 1;
+    string name;
+    do {
+        name = "g" + long_to_string(counter++);
+    } while (dds->var(name));
+    array->set_name(name);
+            
+    return new rvalue(array);
+}
+
 
diff --git a/ce_expr.tab.hh b/ce_expr.tab.hh
index 8db5ca0..3bbb2a2 100644
--- a/ce_expr.tab.hh
+++ b/ce_expr.tab.hh
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   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
@@ -29,10 +28,114 @@
    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.  */
 
+/* "%code requires" blocks.  */
+
+/* Line 1676 of yacc.c  */
+#line 41 "ce_expr.yy"
+
+
+#include "config.h"
+
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
+
+#include <iostream>
+#include <sstream>
+#include <iterator>
+#include <string>
+#include <stack>
+
+//#define DODS_DEBUG
+
+#include "debug.h"
+#include "escaping.h"
+
+#include "DDS.h"
+#include "ConstraintEvaluator.h"
+
+#include "BaseType.h"
+
+#include "Byte.h"
+#include "Int16.h"
+#include "UInt16.h"
+#include "Int32.h"
+#include "UInt32.h"
+#include "Float32.h"
+#include "Float64.h"
+#include "Str.h"
+#include "Url.h"
+#include "Array.h"
+#include "Structure.h"
+#include "Sequence.h"
+#include "Grid.h"
+
+#include "Error.h"
+
+#include "util.h"
+#include "parser.h"
+#include "ce_parser.h"
+#include "expr.h"
+#include "RValue.h"
+
+using std::cerr;
+using std::endl;
+using namespace libdap ;
+
+#define EVALUATOR(arg) (static_cast<ce_parser_arg*>(arg)->get_eval())
+#define DDS(arg) (static_cast<ce_parser_arg*>(arg)->get_dds())
+
+// #define YYPARSE_PARAM arg
+
+int ce_exprlex(void);		/* the scanner; see expr.lex */
+
+void ce_exprerror(ce_parser_arg *arg, const string &s); 
+void ce_exprerror(ce_parser_arg *arg, const string &s, const string &s2);
+void no_such_func(ce_parser_arg *arg, const string &name);
+void no_such_ident(ce_parser_arg *arg, const string &name, const string &word);
+
+int_list *make_array_index(value &i1, value &i2, value &i3);
+int_list *make_array_index(value &i1, value &i2);
+int_list *make_array_index(value &i1);
+int_list_list *make_array_indices(int_list *index);
+int_list_list *append_array_index(int_list_list *indices, int_list *index);
+
+void delete_array_indices(int_list_list *indices);
+bool bracket_projection(DDS &table, const char *name, int_list_list *indices);
+
+void process_array_indices(BaseType *variable, int_list_list *indices); 
+void process_grid_indices(BaseType *variable, int_list_list *indices); 
+void process_sequence_indices(BaseType *variable, int_list_list *indices);
+
+/* Replace these with method calls. jhrg 8/31/06 */
+bool is_array_t(BaseType *variable);
+bool is_grid_t(BaseType *variable);
+bool is_sequence_t(BaseType *variable);
+
+BaseType *make_variable(ConstraintEvaluator &eval, const value &val);
+bool_func get_function(const ConstraintEvaluator &eval, const char *name);
+btp_func get_btp_function(const ConstraintEvaluator &eval, const char *name);
+proj_func get_proj_function(const ConstraintEvaluator &eval, const char *name);
+
+template<class arg_list, class arg_type>
+arg_list make_fast_arg_list(unsigned long vector_size_hint, arg_type arg_value);
+
+template<class arg_list, class arg_type>
+arg_list make_fast_arg_list(arg_list int_values, arg_type arg_value);
+
+template<class t, class T>
+rvalue *build_constant_array(vector<t> *values, DDS *dds);
+
+
+
+
+/* Line 1676 of yacc.c  */
+#line 138 "ce_expr.tab.hh"
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -47,31 +150,47 @@
      SCAN_GREATER_EQL = 263,
      SCAN_LESS = 264,
      SCAN_LESS_EQL = 265,
-     SCAN_REGEXP = 266
+     SCAN_REGEXP = 266,
+     SCAN_STAR = 267,
+     SCAN_HASH_BYTE = 268,
+     SCAN_HASH_INT16 = 269,
+     SCAN_HASH_UINT16 = 270,
+     SCAN_HASH_INT32 = 271,
+     SCAN_HASH_UINT32 = 272,
+     SCAN_HASH_FLOAT32 = 273,
+     SCAN_HASH_FLOAT64 = 274
    };
 #endif
-/* Tokens.  */
-#define SCAN_STR 258
-#define SCAN_WORD 259
-#define SCAN_EQUAL 260
-#define SCAN_NOT_EQUAL 261
-#define SCAN_GREATER 262
-#define SCAN_GREATER_EQL 263
-#define SCAN_LESS 264
-#define SCAN_LESS_EQL 265
-#define SCAN_REGEXP 266
-
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 135 "ce_expr.y"
 {
+
+/* Line 1676 of yacc.c  */
+#line 145 "ce_expr.yy"
+
     bool boolean;
     int op;
     char id[ID_MAX];
-
+    
+    libdap::dods_byte byte_value;
+    libdap::dods_int16 int16_value;
+    libdap::dods_uint16 uint16_value;
+    libdap::dods_int32 int32_value;
+    libdap::dods_uint32 uint32_value;
+    libdap::dods_float32 float32_value;
+    libdap::dods_float64 float64_value;
+    
+    libdap::byte_arg_list byte_values;
+    libdap::int16_arg_list int16_values;
+    libdap::uint16_arg_list uint16_values;
+    libdap::int32_arg_list int32_values;
+    libdap::uint32_arg_list uint32_values;
+    libdap::float32_arg_list float32_values;
+    libdap::float64_arg_list float64_values;
+    
     libdap::value val;               // value is defined in expr.h
 
     libdap::bool_func b_func;
@@ -82,14 +201,17 @@ typedef union YYSTYPE
     
     libdap::rvalue *rval_ptr;
     libdap::rvalue_list *r_val_l_ptr;
-}
-/* Line 1529 of yacc.c.  */
-#line 88 "ce_expr.tab.hh"
-	YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c  */
+#line 209 "ce_expr.tab.hh"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 extern YYSTYPE ce_exprlval;
 
+
diff --git a/ce_expr.y b/ce_expr.y
deleted file mode 100644
index f473562..0000000
--- a/ce_expr.y
+++ /dev/null
@@ -1,1042 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-// 
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
- 
-// (c) COPYRIGHT URI/MIT 1995-1999
-// Please read the full copyright statement in the file COPYRIGHT_URI.
-//
-// Authors:
-//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
-
-/*
-  This is the parser for the DODS constraint expression grammar. The parser
-  calls various `helper' functions defined by the DAP classes which either
-  implement the operations (in the case of relational ops) or store
-  information (in the case of selection operations). 
-
-  jhrg 9/5/95
-*/
-
-%{
-
-#include "config.h"
-
-static char rcsid[] not_used = {"$Id: ce_expr.y 25915 2012-10-24 00:14:58Z jimg $"};
-
-#include <cassert>
-#include <cstdlib>
-#include <cstring>
-
-#include <iostream>
-#include <iterator>
-#include <string>
-#include <stack>
-
-//#define DODS_DEBUG
-
-#include "debug.h"
-#include "escaping.h"
-
-#include "DDS.h"
-#include "ConstraintEvaluator.h"
-
-#include "BaseType.h"
-
-#include "Byte.h"
-#include "Int16.h"
-#include "UInt16.h"
-#include "Int32.h"
-#include "UInt32.h"
-#include "Float32.h"
-#include "Float64.h"
-#include "Str.h"
-#include "Url.h"
-#include "Array.h"
-#include "Structure.h"
-#include "Sequence.h"
-#include "Grid.h"
-
-#include "Error.h"
-
-#include "util.h"
-#include "parser.h"
-#include "ce_parser.h"
-#include "expr.h"
-#include "RValue.h"
-
-using std::cerr;
-using std::endl;
-using namespace libdap ;
-
-#define EVALUATOR(arg) (static_cast<ce_parser_arg*>(arg)->get_eval())
-#define DDS(arg) (static_cast<ce_parser_arg*>(arg)->get_dds())
-
-#define YYPARSE_PARAM arg
-
-int ce_exprlex(void);		/* the scanner; see expr.lex */
-
-void ce_exprerror(const char *s);	/* easier to overload than to use stdarg... */
-void ce_exprerror(const char *s, const char *s2);
-void no_such_func(char *name);
-void no_such_ident(char *name, char *word);
-
-void ce_exprerror(const string &s); 
-void ce_exprerror(const string &s, const string &s2);
-void no_such_func(const string &name);
-void no_such_ident(const string &name, const string &word);
-
-int_list *make_array_index(value &i1, value &i2, value &i3);
-int_list *make_array_index(value &i1, value &i2);
-int_list *make_array_index(value &i1);
-int_list_list *make_array_indices(int_list *index);
-int_list_list *append_array_index(int_list_list *indices, int_list *index);
-
-void delete_array_indices(int_list_list *indices);
-bool bracket_projection(DDS &table, const char *name, 
-			int_list_list *indices);
-
-void process_array_indices(BaseType *variable, int_list_list *indices); 
-void process_grid_indices(BaseType *variable, int_list_list *indices); 
-void process_sequence_indices(BaseType *variable, int_list_list *indices);
-
-/* Replace these with method calls. jhrg 8/31/06 */
-bool is_array_t(BaseType *variable);
-bool is_grid_t(BaseType *variable);
-bool is_sequence_t(BaseType *variable);
-
-BaseType *make_variable(ConstraintEvaluator &eval, const value &val);
-bool_func get_function(const ConstraintEvaluator &eval, const char *name);
-btp_func get_btp_function(const ConstraintEvaluator &eval, const char *name);
-proj_func get_proj_function(const ConstraintEvaluator &eval, const char *name);
-
-%}
-
-%union {
-    bool boolean;
-    int op;
-    char id[ID_MAX];
-
-    libdap::value val;               // value is defined in expr.h
-
-    libdap::bool_func b_func;
-    libdap::btp_func bt_func;
-
-    libdap::int_list *int_l_ptr;
-    libdap::int_list_list *int_ll_ptr;
-    
-    libdap::rvalue *rval_ptr;
-    libdap::rvalue_list *r_val_l_ptr;
-}
-
-%token <val> SCAN_STR
-
-%token <id> SCAN_WORD
-
-%token <op> SCAN_EQUAL
-%token <op> SCAN_NOT_EQUAL
-%token <op> SCAN_GREATER
-%token <op> SCAN_GREATER_EQL
-%token <op> SCAN_LESS
-%token <op> SCAN_LESS_EQL
-%token <op> SCAN_REGEXP
-
-%type <boolean> constraint_expr projection proj_clause proj_function
-%type <boolean> array_projection selection clause bool_function
-%type <id> array_proj_clause name
-%type <op> rel_op
-%type <int_l_ptr> array_index
-%type <int_ll_ptr> array_indices
-%type <rval_ptr> r_value id_or_const
-%type <r_val_l_ptr> r_value_list arg_list
-
-%%
-
-constraint_expr: /* empty constraint --> send all */
-         {
-             DBG(cerr << "Mark all variables" << endl);
-		     DDS(arg)->mark_all(true);
-		     $$ = true;
-		 }
-         /* projection only */
-         | projection
-		 /* selection only --> project everything */
-         | '&' { DDS(arg)->mark_all(true); } selection
-         { 
-		     $$ = $3;
-		 }
-         | projection '&' selection
-         {
-		     $$ = $1 && $3;
-		 }
-;
-
-projection: proj_clause
-         | proj_clause ',' projection
-         {
-		     $$ = $1 && $3;
-		 }
-;
-
-proj_clause: name 
-         { 
-		     BaseType *var = DDS(arg)->var($1);
-		     if (var) {
-			     DBG(cerr << "Marking " << $1 << endl);
-			     $$ = DDS(arg)->mark($1, true);
-			     DBG(cerr << "result: " << $$ << endl);
-		     }
-		     else {
-			     no_such_ident($1, "identifier");
-		     }
-		}
-/*		| SCAN_STR
-                {
-                    if ($1.type != dods_str_c || $1.v.s == 0 || $1.v.s->empty())
-                        ce_exprerror("Malformed string", "");
-                        
-                    BaseType *var = DDS(arg)->var(*($1.v.s));
-                    if (var) {
-                        DBG(cerr << "Marking " << $1 << endl);
-                        $$ = DDS(arg)->mark(*($1.v.s), true);
-                        DBG(cerr << "result: " << $$ << endl);
-                    }
-                    else {
-                        no_such_ident(*($1.v.s), "identifier");
-                    }
-                }
-*/
-        | proj_function
-        {
-		    $$ = $1;
-		}
-		| array_projection
-        {
-		    $$ = $1;
-		}
-;
-
-proj_function:  SCAN_WORD '(' arg_list ')'
-	    {
-		    proj_func p_f = 0;
-		    btp_func f = 0;
-
-		    if ((f = get_btp_function(*(EVALUATOR(arg)), $1))) {
-			    EVALUATOR(arg)->append_clause(f, $3);
-			    $$ = true;
-		    }
-		    else if ((p_f = get_proj_function(*(EVALUATOR(arg)), $1))) {
-		        DDS &dds = dynamic_cast<DDS&>(*(DDS(arg)));
-			    BaseType **args = build_btp_args( $3, dds );
-			    (*p_f)(($3) ? $3->size():0, args, dds, *(EVALUATOR(arg)));
-			    delete[] args;
-			    $$ = true;
-		    }
-		    else {
-			    no_such_func($1);
-		    }
-		}
-;
-
-selection:	clause
-		| selection '&' clause
-                {
-		    $$ = $1 && $3;
-		}
-;
-
-clause:		r_value rel_op '{' r_value_list '}'
-                {
-		    if ($1) {
-			EVALUATOR(arg)->append_clause($2, $1, $4);
-			$$ = true;
-		    }
-		    else
-			$$ = false;
-		}
-		| r_value rel_op r_value
-                {
-		    if ($1) {
-			rvalue_list *rv = new rvalue_list;
-			rv->push_back($3);
-			EVALUATOR(arg)->append_clause($2, $1, rv);
-			$$ = true;
-		    }
-		    else
-			$$ = false;
-		}
-		| bool_function
-                {
-		    $$ = $1;
-		}
-;
-
-bool_function: SCAN_WORD '(' arg_list ')'
-	       {
-		   bool_func b_func = get_function((*EVALUATOR(arg)), $1);
-		   if (!b_func) {
-		       no_such_func($1);
-		   }
-		   else {
-		       EVALUATOR(arg)->append_clause(b_func, $3);
-		       $$ = true;
-		   }
-	       }
-;
-
-r_value:        id_or_const
-		| SCAN_WORD '(' arg_list ')'
-		{
-		    btp_func func = get_btp_function((*EVALUATOR(arg)), $1);
-		    if (func) {
-			$$ = new rvalue(func, $3);
-		    } 
-		    else {  		
-			no_such_func($1);
-		    }
-		}
-;
-
-r_value_list:	r_value
-		{
-		    if ($1)
-			$$ = make_rvalue_list($1);
-		    else
-			$$ = 0;
-		}
-		| r_value_list ',' r_value
-                {
-		    if ($1 && $3)
-			$$ = append_rvalue_list($1, $3);
-		    else
-			$$ = 0;
-		}
-;
-
-arg_list:     r_value_list
-              {  
-		  $$ = $1;
-	      }
-              | /* Null, argument lists may be empty */
-              { 
-		  $$ = 0; 
-	      }
-;
-
-id_or_const:    SCAN_WORD
-		{ 
-		    BaseType *btp = DDS(arg)->var(www2id(string($1)));
-		    if (btp) {
-                        btp->set_in_selection(true);
-                        $$ = new rvalue(btp);
-		    }
-		    else {
-			value new_val;
-			if (check_int32($1)) {
-			    new_val.type = dods_int32_c;
-			    new_val.v.i = atoi($1);
-			}
-			else if (check_uint32($1)) {
-			    new_val.type = dods_uint32_c;
-			    new_val.v.ui = atoi($1);
-			}
-			else if (check_float64($1)) {
-			    new_val.type = dods_float64_c;
-			    new_val.v.f = atof($1);
-			}
-			else {
-			    new_val.type = dods_str_c;
-			    new_val.v.s = new string($1);
-			}
-			BaseType *btp = make_variable((*EVALUATOR(arg)), new_val); 
-			// *** test for btp == null
-			// delete new_val.v.s; // Str::val2buf copies the value.
-			$$ = new rvalue(btp);
-		    }
-		}
-                | SCAN_STR
-                {
-                    if ($1.type != dods_str_c || $1.v.s == 0 || $1.v.s->empty())
-                        ce_exprerror("Malformed string", "");
-                        
-                    BaseType *var = DDS(arg)->var(*($1.v.s));
-                    if (var) {
-                        $$ = new rvalue(var);
-                    }
-                    else {
-                        var = make_variable((*EVALUATOR(arg)), $1); 
-                        $$ = new rvalue(var);
-                    }
-                }
-;
-
-array_projection : array_proj_clause
-                {
-                    $$ = (*DDS(arg)).mark($1, true);
-                }
-                
-array_proj_clause: name array_indices
-                {
-                    if (!bracket_projection((*DDS(arg)), $1, $2))
-                      no_such_ident($1, "array, grid or sequence");
-
-                    strncpy($$, $1, ID_MAX-1);
-                    $$[ID_MAX-1] = '\0';
-                }
-                | array_proj_clause name
-                {
-                    string name = string($1) + string ($2);
-                    strncpy($$, name.c_str(), ID_MAX-1);
-                    $$[ID_MAX-1] = '\0';
-                }
-                | array_proj_clause name array_indices
-                {
-                    string name = string($1) + string ($2);
-                    if (!bracket_projection((*DDS(arg)), name.c_str(), $3))
-                      no_such_ident(name.c_str(), "array, grid or sequence");
-
-                    strncpy($$, name.c_str(), ID_MAX-1);
-                    $$[ID_MAX-1] = '\0';
-                }
-;
-
-name:           SCAN_WORD
-                | SCAN_STR
-                {
-                    if ($1.type != dods_str_c || $1.v.s == 0 || $1.v.s->empty())
-                        ce_exprerror("Malformed string", "");
-                        
-                    strncpy($$, www2id(*($1.v.s)).c_str(), ID_MAX-1);
-                    // delete the string? ***
-                    $$[ID_MAX-1] = '\0';
-/*
-                    BaseType *var = DDS(arg)->var(*($1.v.s));
-                    if (var) {
-                        DBG(cerr << "Marking " << $1 << endl);
-                        $$ = DDS(arg)->mark(*($1.v.s), true);
-                        DBG(cerr << "result: " << $$ << endl);
-                    }
-                    else {
-                        no_such_ident(*($1.v.s), "identifier");
-                    }
-*/
-                }
-;
-
-array_indices:  array_index
-                {
-		    $$ = make_array_indices($1);
-		}
-                | array_indices array_index
-                {
-		    $$ = append_array_index($1, $2);
-		}
-;
-
-array_index: 	'[' SCAN_WORD ']'
-                {
-		    if (!check_uint32($2)) {
-			string msg = "The word `";
-			msg += string($2) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    value i;
-		    i.type = dods_uint32_c;
-		    i.v.i = atoi($2);
-		    $$ = make_array_index(i);
-		}
-		|'[' SCAN_WORD ':' SCAN_WORD ']'
-                {
-		    if (!check_uint32($2)) {
-			string msg = "The word `";
-			msg += string($2) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    if (!check_uint32($4)) {
-			string msg = "The word `";
-			msg += string($4) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    value i,j;
-		    i.type = j.type = dods_uint32_c;
-		    i.v.i = atoi($2);
-		    j.v.i = atoi($4);
-		    $$ = make_array_index(i, j);
-		}
-		| '[' SCAN_WORD ':' SCAN_WORD ':' SCAN_WORD ']'
-                {
-		    if (!check_uint32($2)) {
-			string msg = "The word `";
-			msg += string($2) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    if (!check_uint32($4)) {
-			string msg = "The word `";
-			msg += string($4) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    if (!check_uint32($6)) {
-			string msg = "The word `";
-			msg += string($6) + "' is not a valid array index.";
-			throw Error(malformed_expr, msg);
-		    }
-		    value i, j, k;
-		    i.type = j.type = k.type = dods_uint32_c;
-		    i.v.i = atoi($2);
-		    j.v.i = atoi($4);
-		    k.v.i = atoi($6);
-		    $$ = make_array_index(i, j, k);
-		}
-;
-
-rel_op:		SCAN_EQUAL
-		| SCAN_NOT_EQUAL
-		| SCAN_GREATER
-		| SCAN_GREATER_EQL
-		| SCAN_LESS
-		| SCAN_LESS_EQL
-		| SCAN_REGEXP
-;
-
-%%
-
-// All these error reporting function now throw instances of Error. The expr
-// parser no longer returns an error code to indicate and error. 2/16/2000
-// jhrg.
-
-void
-ce_exprerror(const string &s)
-{
-    ce_exprerror(s.c_str());
-}
-
-void ce_exprerror(const char *s)
-{
-    // cerr << "Expression parse error: " << s << endl;
-    string msg = "Constraint expression parse error: " + (string) s;
-    throw Error(malformed_expr, msg);
-}
-
-void ce_exprerror(const string &s, const string &s2)
-{
-    ce_exprerror(s.c_str(), s2.c_str());
-}
-
-void ce_exprerror(const char *s, const char *s2)
-{
-    string msg = "Constraint expression parse error: " + (string) s + ": " + (string) s2;
-    throw Error(malformed_expr, msg);
-}
-
-void no_such_ident(const string &name, const string &word)
-{
-    string msg = "No such " + word + " in dataset";
-    ce_exprerror(msg.c_str(), name);
-}
-
-void no_such_ident(char *name, char *word)
-{
-    string msg = "No such " + (string) word + " in dataset";
-    ce_exprerror(msg.c_str(), name);
-}
-
-void no_such_func(const string &name)
-{
-    no_such_func(name.c_str());
-}
-
-void no_such_func(char *name)
-{
-    ce_exprerror("Not a registered function", name);
-}
-
-/* If we're calling this, assume var is not a Sequence. But assume that the
- name contains a dot and it's a separator. Look for the rightmost dot and
- then look to see if the name to the left is a sequence. Return a pointer
- to the sequence if it is otherwise return null. Uses tail-recursion to
- 'walk' back from right to left looking at each dot. This way the sequence
- will be found even if there are structures between the field and the
- Sequence. */
-static Sequence *
-parent_is_sequence(DDS &table, const string &n)
-{
-    string::size_type dotpos = n.find_last_of('.');
-    if (dotpos == string::npos)
-        return 0;
-
-    string s = n.substr(0, dotpos);
-
-    // If the thing returned by table.var is not a Sequence, this cast
-    // will yield null.
-    Sequence *seq = dynamic_cast<Sequence*> (table.var(s));
-    if (seq)
-        return seq;
-    else
-        return parent_is_sequence(table, s);
-}
-
-bool bracket_projection(DDS &table, const char *name, int_list_list *indices)
-{
-    BaseType *var = table.var(name);
-    Sequence *seq; // used in last else-if clause
-#if 0
-    Array *array;
-#endif    
-    if (!var)
-        return false;
-
-    if (is_array_t(var)) {
-        /* calls to set_send_p should be replaced with
-         calls to DDS::mark so that arrays of Structures,
-         etc. will be processed correctly when individual
-         elements are projected using short names.
-         9/1/98 jhrg */
-        /* var->set_send_p(true); */
-        //table.mark(name, true);
-        // We don't call mark() here for an array. Instead it is called from
-        // within the parser. jhrg 10/10/08
-        process_array_indices(var, indices); // throws on error
-        delete_array_indices(indices);
-    }
-    else if (is_grid_t(var)) {
-        process_grid_indices(var, indices);
-        table.mark(name, true);
-        delete_array_indices(indices);
-    }
-    else if (is_sequence_t(var)) {
-        table.mark(name, true);
-        process_sequence_indices(var, indices);
-        delete_array_indices(indices);
-    }
-    else if ((seq = parent_is_sequence(table, name))) {
-        process_sequence_indices(seq, indices);
-        table.mark(name, true);
-        delete_array_indices(indices);
-    }
-    else {
-        return false;
-    }
-
-    return true;
-}
-
-// Given three values (I1, I2, I3), all of which must be integers, build an
-// int_list which contains those values.
-//
-// Returns: A pointer to an int_list of three integers or NULL if any of the
-// values are not integers.
-
-int_list *
-make_array_index(value &i1, value &i2, value &i3)
-{
-    if (i1.type != dods_uint32_c || i2.type != dods_uint32_c || i3.type != dods_uint32_c)
-        return (int_list *) 0;
-
-    int_list *index = new int_list;
-
-    index->push_back((int) i1.v.i);
-    index->push_back((int) i2.v.i);
-    index->push_back((int) i3.v.i);
-
-    DBG(cout << "index: ");
-    DBG(copy(index->begin(), index->end(), ostream_iterator<int>(cerr, " ")));
-    DBG(cerr << endl);
-
-    return index;
-}
-
-int_list *
-make_array_index(value &i1, value &i2)
-{
-    if (i1.type != dods_uint32_c || i2.type != dods_uint32_c)
-	return (int_list *) 0;
-
-    int_list *index = new int_list;
-
-    index->push_back((int) i1.v.i);
-    index->push_back(1);
-    index->push_back((int) i2.v.i);
-
-    DBG(cout << "index: ");
-    DBG(copy(index->begin(), index->end(), ostream_iterator<int>(cerr, " ")));
-    DBG(cerr << endl);
-
-    return index;
-}
-
-int_list *
-make_array_index(value &i1)
-{
-    if (i1.type != dods_uint32_c)
-	return (int_list *) 0;
-
-    int_list *index = new int_list;
-
-    index->push_back((int) i1.v.i);
-    index->push_back(1);
-    index->push_back((int) i1.v.i);
-
-    DBG(cout << "index: ");
-    DBG(copy(index->begin(), index->end(), ostream_iterator<int>(cerr, " ")));
-    DBG(cerr << endl);
-
-    return index;
-}
-
-int_list_list *
-make_array_indices(int_list *index)
-{
-    int_list_list *indices = new int_list_list;
-
-    DBG(cout << "index: ");
-    DBG(copy(index->begin(), index->end(), ostream_iterator<int>(cerr, " ")));
-    DBG(cerr << endl);
-
-    assert(index);
-    indices->push_back(index);
-
-    return indices;
-}
-
-int_list_list *
-append_array_index(int_list_list *indices, int_list *index)
-{
-    assert(indices);
-    assert(index);
-
-    indices->push_back(index);
-
-    return indices;
-}
-
-// Delete an array indices list. 
-
-void delete_array_indices(int_list_list *indices)
-{
-    assert(indices);
-
-    for (int_list_citer i = indices->begin(); i != indices->end(); i++) {
-	int_list *il = *i;
-	assert(il);
-	delete il;
-    }
-
-    delete indices;
-}
-
-bool is_array_t(BaseType *variable)
-{
-    assert(variable);
-
-    if (variable->type() != dods_array_c)
-	return false;
-    else
-	return true;
-}
-
-bool is_grid_t(BaseType *variable)
-{
-    assert(variable);
-
-    if (variable->type() != dods_grid_c)
-	return false;
-    else
-	return true;
-}
-
-bool is_sequence_t(BaseType *variable)
-{
-    assert(variable);
-
-    if (variable->type() != dods_sequence_c)
-	return false;
-    else
-	return true;
-}
-
-void process_array_indices(BaseType *variable, int_list_list *indices)
-{
-    assert(variable);
-
-    Array *a = dynamic_cast<Array *>(variable); // replace with dynamic cast
-    if (!a)
-	throw Error(malformed_expr,
-		    string("The constraint expression evaluator expected an array; ") + variable->name() + " is not an array.");
-
-    if (a->dimensions(true) != (unsigned) indices->size())
-	throw Error(malformed_expr,
-		    string("Error: The number of dimensions in the constraint for ") + variable->name()
-                    + " must match the number in the array.");
-
-    DBG(cerr << "Before clear_constraint:" << endl);
-    DBG(a->print_decl(cerr, "", true, false, true));
-
-    // a->reset_constraint();	// each projection erases the previous one
-
-    DBG(cerr << "After clear_constraint:" << endl);
-    DBG(a->print_decl(cerr, "", true, false, true));
-
-    assert(indices);
-    int_list_citer p = indices->begin();
-    Array::Dim_iter r = a->dim_begin();
-    for (; p != indices->end() && r != a->dim_end(); p++, r++) {
-	int_list *index = *p;
-	assert(index);
-
-	int_citer q = index->begin();
-	assert(q != index->end());
-	int start = *q;
-
-	q++;
-	int stride = *q;
-
-	q++;
-	int stop = *q;
-
-	q++;
-	if (q != index->end()) {
-	    throw Error(malformed_expr, string("Too many values in index list for ") + a->name() + ".");
-	}
-
-	DBG(cerr << "process_array_indices: Setting constraint on " 
-	    << a->name() << "[" << start << ":" << stop << "]"
-	    << endl);
-
-	// It's possible that an array will appear more than once in a CE
-	// (for example, if an array of structures is constrained so that
-	// only two fields are projected and there's an associated hyperslab).
-	// However, in this case the two hyperslabs must be equal; test for
-	// that here. But see clear_constraint above... 10/28/08 jhrg
-
-	if (a->send_p()
-	    && (a->dimension_start(r, true) != start || a->dimension_stop(r, true) != stop
-		|| a->dimension_stride(r, true) != stride))
-	    throw Error(malformed_expr,
-			string("The Array was already projected differently in the constraint expression: ") + a->name() + ".");
-
-	a->add_constraint(r, start, stride, stop);
-
-	DBG(cerr << "Set Constraint: " << a->dimension_size(r, true) << endl);
-    }
-
-    DBG(cerr << "After processing loop:" << endl);
-    DBG(a->print_decl(cerr, "", true, false, true));
-
-    DBG(cerr << "Array Constraint: ");
-    DBG(for (Array::Dim_iter dp = a->dim_begin(); dp != a->dim_end();
-	     dp++
-	     ) cout << a->dimension_size(dp, true) << " ");
-    DBG(cerr << endl);
-
-    if (p != indices->end() && r == a->dim_end()) {
-	throw Error(malformed_expr, string("Too many indices in constraint for ") + a->name() + ".");
-    }
-}
-
-void process_grid_indices(BaseType *variable, int_list_list *indices)
-{
-    assert(variable);
-    assert(variable->type() == dods_grid_c);
-    Grid *g = dynamic_cast<Grid *>(variable);
-    if (!g)
-        throw Error(unknown_error, "Expected a Grid variable");
-
-    Array *a = g->get_array();
-
-    if (a->dimensions(true) != (unsigned) indices->size())
-        throw Error(malformed_expr,
-		    string("Error: The number of dimensions in the constraint for ") + variable->name()
-		    + " must match the number in the grid.");
-
-    // First do the constraints on the ARRAY in the grid.
-    process_array_indices(g->array_var(), indices);
-
-    // Now process the maps.
-    Grid::Map_iter r = g->map_begin();
-
-    // Suppress all maps by default.
-    for (; r != g->map_end(); r++) {
-	(*r)->set_send_p(false);
-    }
-
-    // Add specified maps to the current projection.
-    assert(indices);
-    int_list_citer p = indices->begin();
-    r = g->map_begin();
-    for (; p != indices->end() && r != g->map_end(); p++, r++) {
-	int_list *index = *p;
-	assert(index);
-
-	int_citer q = index->begin();
-	assert(q != index->end());
-	int start = *q;
-
-	q++;
-	int stride = *q;
-
-	q++;
-	int stop = *q;
-
-	BaseType *btp = *r;
-	assert(btp);
-	assert(btp->type() == dods_array_c);
-	Array *a = (Array *) btp;
-	a->set_send_p(true);
-	a->reset_constraint();
-
-	q++;
-	if (q != index->end()) {
-	    throw Error(malformed_expr, string("Too many values in index list for ") + a->name() + ".");
-	}
-
-	DBG(
-	    cerr << "process_grid_indices: Setting constraint on "\
-	    << a->name() << "[" << start << ":"
-	    << stop << "]" << endl);
-
-	Array::Dim_iter si = a->dim_begin();
-	a->add_constraint(si, start, stride, stop);
-
-	DBG (Array::Dim_iter aiter = a->dim_begin();
-	     cerr << "Set Constraint: " << a->dimension_size(aiter, true) << endl
-	     )                        ;
-    }
-
-    DBG(cout << "Grid Constraint: ";
-	for (Array::Dim_iter dp = ((Array *) g->array_var())->dim_begin();
-	     dp != ((Array *) g->array_var())->dim_end(); dp++)
-	    cout << ((Array *) g->array_var())->dimension_size(dp, true) << " ";
-	cout << endl
-	);
-
-    if (p != indices->end() && r == g->map_end()) {
-	throw Error(malformed_expr,
-		    string("Too many indices in constraint for ") + (*r)->name() + ".");
-    }
-}
-
-void process_sequence_indices(BaseType *variable, int_list_list *indices)
-{
-    assert(variable);
-    assert(variable->type() == dods_sequence_c);
-    Sequence *s = dynamic_cast<Sequence *> (variable);
-    if (!s)
-        throw Error(malformed_expr, "Expected a Sequence variable");
-
-    // Add specified maps to the current projection.
-    assert(indices);
-    for (int_list_citer p = indices->begin(); p != indices->end(); p++) {
-        int_list *index = *p;
-        assert(index);
-
-        int_citer q = index->begin();
-        assert(q != index->end());
-        int start = *q;
-
-        q++;
-        int stride = *q;
-
-        q++;
-        int stop = *q;
-
-        q++;
-        if (q != index->end()) {
-            throw Error(malformed_expr, string("Too many values in index list for ") + s->name() + ".");
-        }
-
-        s->set_row_number_constraint(start, stop, stride);
-    }
-}
-
-// Given a value, wrap it up in a BaseType and return a pointer to the same.
-
-BaseType *
-make_variable(ConstraintEvaluator &eval, const value &val)
-{
-    BaseType *var;
-    switch (val.type) {
-    case dods_int32_c: {
-        var = new Int32("dummy");
-        var->val2buf((void *) &val.v.i);
-        break;
-    }
-
-    case dods_float64_c: {
-        var = new Float64("dummy");
-        var->val2buf((void *) &val.v.f);
-        break;
-    }
-
-    case dods_str_c: {
-        var = new Str("dummy");
-        var->val2buf((void *) val.v.s);
-        break;
-    }
-
-    default:
-        var = (BaseType *) 0;
-        return var;
-    }
-
-    var->set_read_p(true); // ...so the evaluator will know it has data
-    eval.append_constant(var);
-
-    return var;
-}
-
-// Given a string (passed in VAL), consult the DDS CE function lookup table
-// to see if a function by that name exists. 
-// NB: function arguments are type-checked at run-time.
-//
-// Returns: A pointer to the function or NULL if not such function exists.
-
-bool_func get_function(const ConstraintEvaluator &eval, const char *name)
-{
-    bool_func f;
-
-    if (eval.find_function(name, &f))
-        return f;
-    else
-        return 0;
-}
-
-btp_func get_btp_function(const ConstraintEvaluator &eval, const char *name)
-{
-    btp_func f;
-
-    if (eval.find_function(name, &f))
-        return f;
-    else
-        return 0;
-}
-
-proj_func get_proj_function(const ConstraintEvaluator &eval, const char *name)
-{
-    proj_func f;
-
-    if (eval.find_function(name, &f))
-        return f;
-    else
-        return 0;
-}
-
diff --git a/ce_expr.yy b/ce_expr.yy
new file mode 100644
index 0000000..92f48f5
--- /dev/null
+++ b/ce_expr.yy
@@ -0,0 +1,1346 @@
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2002,2003 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+// 
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+ 
+// (c) COPYRIGHT URI/MIT 1995-1999
+// Please read the full copyright statement in the file COPYRIGHT_URI.
+//
+// Authors:
+//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
+
+/*
+  This is the parser for the DODS constraint expression grammar. The parser
+  calls various `helper' functions defined by the DAP classes which either
+  implement the operations (in the case of relational ops) or store
+  information (in the case of selection operations). 
+
+  jhrg 9/5/95
+*/
+
+%code requires {
+
+#include "config.h"
+
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
+
+#include <iostream>
+#include <sstream>
+#include <iterator>
+#include <string>
+#include <stack>
+
+//#define DODS_DEBUG
+
+#include "debug.h"
+#include "escaping.h"
+
+#include "DDS.h"
+#include "ConstraintEvaluator.h"
+
+#include "BaseType.h"
+
+#include "Byte.h"
+#include "Int16.h"
+#include "UInt16.h"
+#include "Int32.h"
+#include "UInt32.h"
+#include "Float32.h"
+#include "Float64.h"
+#include "Str.h"
+#include "Url.h"
+#include "Array.h"
+#include "Structure.h"
+#include "Sequence.h"
+#include "Grid.h"
+
+#include "Error.h"
+
+#include "util.h"
+#include "parser.h"
+#include "ce_parser.h"
+#include "expr.h"
+#include "RValue.h"
+
+using std::cerr;
+using std::endl;
+using namespace libdap ;
+
+#define EVALUATOR(arg) (static_cast<ce_parser_arg*>(arg)->get_eval())
+#define DDS(arg) (static_cast<ce_parser_arg*>(arg)->get_dds())
+
+// #define YYPARSE_PARAM arg
+
+int ce_exprlex(void);		/* the scanner; see expr.lex */
+
+void ce_exprerror(ce_parser_arg *arg, const string &s); 
+void ce_exprerror(ce_parser_arg *arg, const string &s, const string &s2);
+void no_such_func(ce_parser_arg *arg, const string &name);
+void no_such_ident(ce_parser_arg *arg, const string &name, const string &word);
+
+int_list *make_array_index(value &i1, value &i2, value &i3);
+int_list *make_array_index(value &i1, value &i2);
+int_list *make_array_index(value &i1);
+int_list_list *make_array_indices(int_list *index);
+int_list_list *append_array_index(int_list_list *indices, int_list *index);
+
+void delete_array_indices(int_list_list *indices);
+bool bracket_projection(DDS &table, const char *name, int_list_list *indices);
+
+void process_array_indices(BaseType *variable, int_list_list *indices); 
+void process_grid_indices(BaseType *variable, int_list_list *indices); 
+void process_sequence_indices(BaseType *variable, int_list_list *indices);
+
+/* Replace these with method calls. jhrg 8/31/06 */
+bool is_array_t(BaseType *variable);
+bool is_grid_t(BaseType *variable);
+bool is_sequence_t(BaseType *variable);
+
+BaseType *make_variable(ConstraintEvaluator &eval, const value &val);
+bool_func get_function(const ConstraintEvaluator &eval, const char *name);
+btp_func get_btp_function(const ConstraintEvaluator &eval, const char *name);
+proj_func get_proj_function(const ConstraintEvaluator &eval, const char *name);
+
+template<class arg_list, class arg_type>
+arg_list make_fast_arg_list(unsigned long vector_size_hint, arg_type arg_value);
+
+template<class arg_list, class arg_type>
+arg_list make_fast_arg_list(arg_list int_values, arg_type arg_value);
+
+template<class t, class T>
+rvalue *build_constant_array(vector<t> *values, DDS *dds);
+
+}
+
+%require "2.4"
+
+%parse-param {ce_parser_arg *arg}
+%name-prefix "ce_expr"
+%defines
+%debug
+%verbose
+
+%union {
+    bool boolean;
+    int op;
+    char id[ID_MAX];
+    
+    libdap::dods_byte byte_value;
+    libdap::dods_int16 int16_value;
+    libdap::dods_uint16 uint16_value;
+    libdap::dods_int32 int32_value;
+    libdap::dods_uint32 uint32_value;
+    libdap::dods_float32 float32_value;
+    libdap::dods_float64 float64_value;
+    
+    libdap::byte_arg_list byte_values;
+    libdap::int16_arg_list int16_values;
+    libdap::uint16_arg_list uint16_values;
+    libdap::int32_arg_list int32_values;
+    libdap::uint32_arg_list uint32_values;
+    libdap::float32_arg_list float32_values;
+    libdap::float64_arg_list float64_values;
+    
+    libdap::value val;               // value is defined in expr.h
+
+    libdap::bool_func b_func;
+    libdap::btp_func bt_func;
+
+    libdap::int_list *int_l_ptr;
+    libdap::int_list_list *int_ll_ptr;
+    
+    libdap::rvalue *rval_ptr;
+    libdap::rvalue_list *r_val_l_ptr;
+}
+
+%token <val> SCAN_STR
+
+%token <id> SCAN_WORD
+
+%token <op> SCAN_EQUAL
+%token <op> SCAN_NOT_EQUAL
+%token <op> SCAN_GREATER
+%token <op> SCAN_GREATER_EQL
+%token <op> SCAN_LESS
+%token <op> SCAN_LESS_EQL
+%token <op> SCAN_REGEXP
+
+%token <op> SCAN_STAR
+
+%token <op> SCAN_HASH_BYTE
+%token <op> SCAN_HASH_INT16
+%token <op> SCAN_HASH_UINT16
+%token <op> SCAN_HASH_INT32
+%token <op> SCAN_HASH_UINT32
+%token <op> SCAN_HASH_FLOAT32
+%token <op> SCAN_HASH_FLOAT64
+
+%type <boolean> constraint_expr projection proj_clause proj_function
+%type <boolean> array_projection selection clause bool_function arg_length_hint
+%type <id> array_proj_clause name
+%type <op> rel_op
+
+%type <int_l_ptr> array_index
+%type <int_ll_ptr> array_indices
+
+%type <rval_ptr> r_value id_or_const array_const_special_form
+%type <r_val_l_ptr> r_value_list arg_list
+
+%type <byte_value> fast_byte_arg
+%type <byte_values> fast_byte_arg_list
+
+%type <int16_value> fast_int16_arg 
+%type <int16_values> fast_int16_arg_list
+
+%type <uint16_value> fast_uint16_arg 
+%type <uint16_values> fast_uint16_arg_list
+
+%type <int32_value> fast_int32_arg 
+%type <int32_values> fast_int32_arg_list
+
+%type <uint32_value> fast_uint32_arg 
+%type <uint32_values> fast_uint32_arg_list
+
+%type <float32_value> fast_float32_arg 
+%type <float32_values> fast_float32_arg_list
+
+%type <float64_value> fast_float64_arg 
+%type <float64_values> fast_float64_arg_list
+
+%code {
+/* This global is used by the rule 'arg_length_hint' so that the hint can 
+   be used during the paraent rule's parse. See fast_int32_arg_list. */
+unsigned long arg_length_hint_value = 0;
+}
+
+%%
+
+constraint_expr: /* empty constraint --> send all */
+         {
+             DBG(cerr << "Mark all variables" << endl);
+		     DDS(arg)->mark_all(true);
+		     $$ = true;
+		 }
+         /* projection only */
+         | projection
+		 /* selection only --> project everything */
+         | '&' { DDS(arg)->mark_all(true); } selection
+         { 
+		     $$ = $3;
+		 }
+         | projection '&' selection
+         {
+		     $$ = $1 && $3;
+		 }
+;
+
+projection: proj_clause
+         | proj_clause ',' projection
+         {
+		     $$ = $1 && $3;
+		 }
+;
+
+proj_clause: name 
+         {
+		     BaseType *var = DDS(arg)->var($1);
+		     if (var) {
+			     DBG(cerr << "Marking " << $1 << endl);
+			     $$ = DDS(arg)->mark($1, true);
+			     DBG(cerr << "result: " << $$ << endl);
+		     }
+		     else {
+			     no_such_ident(arg, $1, "identifier");
+		     }
+		}
+        | proj_function
+        {
+		    $$ = $1;
+		}
+		| array_projection
+        {
+		    $$ = $1;
+		}
+        | array_const_special_form
+        {
+            Array *array = dynamic_cast<Array*>($1->bvalue(*DDS(arg)));
+            if (array) { 
+                /* When the special form appears here (not as a function argument)
+                set send_p so the data will be sent and add it to the DDS. This 
+                streamlines testing (and is likely what is intended). */
+                
+                array->set_send_p(true);
+                DDS(arg)->add_var_nocopy(array);
+                
+                return true;
+            }
+            else {
+                ce_exprerror(arg, "Could not create the anonymous vector using the # special form");
+                return false;
+            }
+        }
+;
+
+/* The value parsed by arg_length_hint is stored in a global variable by that rule
+   so that it can be used during the parse of fast_byte_arg_list. */
+
+/* return a rvalue */
+array_const_special_form: SCAN_HASH_BYTE '(' arg_length_hint ':' fast_byte_arg_list ')'
+        {
+            $$ = build_constant_array<dods_byte, Byte>($5, DDS(arg));
+        }
+;
+
+array_const_special_form: SCAN_HASH_INT16 '(' arg_length_hint ':' fast_int16_arg_list ')'
+        {
+            $$ = build_constant_array<dods_int16, Int16>($5, DDS(arg));
+        }
+;
+
+array_const_special_form: SCAN_HASH_UINT16 '(' arg_length_hint ':' fast_uint16_arg_list ')'
+        {
+            $$ = build_constant_array<dods_uint16, UInt16>($5, DDS(arg));
+        }
+;
+
+array_const_special_form: SCAN_HASH_INT32 '(' arg_length_hint ':' fast_int32_arg_list ')'
+        {
+            $$ = build_constant_array<dods_int32, Int32>($5, DDS(arg));
+        }
+;
+
+array_const_special_form: SCAN_HASH_UINT32 '(' arg_length_hint ':' fast_uint32_arg_list ')'
+        {
+            $$ = build_constant_array<dods_uint32, UInt32>($5, DDS(arg));
+        }
+;
+
+array_const_special_form: SCAN_HASH_FLOAT32 '(' arg_length_hint ':' fast_float32_arg_list ')'
+        {
+            $$ = build_constant_array<dods_float32, Float32>($5, DDS(arg));
+        }
+;
+
+array_const_special_form: SCAN_HASH_FLOAT64 '(' arg_length_hint ':' fast_float64_arg_list ')'
+        {
+            $$ = build_constant_array<dods_float64, Float64>($5, DDS(arg));
+        }
+;
+
+/* Here the arg length hint is stored in a global so it can be used by the 
+   function that allocates the vector. The value is passed to vector::reserve(). */
+   
+arg_length_hint: SCAN_WORD
+          {
+              if (!check_int32($1))
+                  throw Error(malformed_expr, "#<type>(hint, value, ...) special form expected hint to be an integer");
+                   
+              arg_length_hint_value = atoi($1);
+              $$ = true;
+          }
+;
+
+/* return an int_arg_list (a std::vector<int>*) */
+fast_byte_arg_list: fast_byte_arg
+          {
+              $$ = make_fast_arg_list<byte_arg_list, dods_byte>(arg_length_hint_value, $1);
+          }
+          | fast_byte_arg_list ',' fast_byte_arg
+          {
+              $$ = make_fast_arg_list<byte_arg_list, dods_byte>($1, $3);
+          }
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+fast_byte_arg: SCAN_WORD
+          {
+              $$ = strtol($1, 0, 0);
+          }
+;
+
+/* return an int_arg_list (a std::vector<int>*) */
+fast_int16_arg_list: fast_int16_arg
+          {
+              $$ = make_fast_arg_list<int16_arg_list, dods_int16>(arg_length_hint_value, $1);
+          }
+          | fast_int16_arg_list ',' fast_int16_arg
+          {
+              $$ = make_fast_arg_list<int16_arg_list, dods_int16>($1, $3);
+          }
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+fast_int16_arg: SCAN_WORD
+          {
+              $$ = strtol($1, 0, 0);
+          }
+;
+
+/* return an int_arg_list (a std::vector<int>*) */
+fast_uint16_arg_list: fast_uint16_arg
+          {
+              $$ = make_fast_arg_list<uint16_arg_list, dods_uint16>(arg_length_hint_value, $1);
+          }
+          | fast_uint16_arg_list ',' fast_uint16_arg
+          {
+              $$ = make_fast_arg_list<uint16_arg_list, dods_uint16>($1, $3);
+          }
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+fast_uint16_arg: SCAN_WORD
+          {
+              $$ = strtoul($1, 0, 0);
+          }
+;
+
+/* return an int_arg_list (a std::vector<int>*) */
+fast_int32_arg_list: fast_int32_arg
+          {
+              $$ = make_fast_arg_list<int32_arg_list, dods_int32>(arg_length_hint_value, $1);
+          }
+          | fast_int32_arg_list ',' fast_int32_arg
+          {
+              $$ = make_fast_arg_list<int32_arg_list, dods_int32>($1, $3);
+          }
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+fast_int32_arg: SCAN_WORD
+          {
+              $$ = strtol($1, 0, 0);
+          }
+;
+
+/* return an int_arg_list (a std::vector<int>*) */
+fast_uint32_arg_list: fast_uint32_arg
+          {
+              $$ = make_fast_arg_list<uint32_arg_list, dods_uint32>(arg_length_hint_value, $1);
+          }
+          | fast_uint32_arg_list ',' fast_uint32_arg
+          {
+              $$ = make_fast_arg_list<uint32_arg_list, dods_uint32>($1, $3);
+          }
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+fast_uint32_arg: SCAN_WORD
+          {
+              $$ = strtoul($1, 0, 0);
+          }
+;
+
+/* return an int_arg_list (a std::vector<int>*) */
+fast_float32_arg_list: fast_float32_arg
+          {
+              $$ = make_fast_arg_list<float32_arg_list, dods_float32>(arg_length_hint_value, $1);
+          }
+          | fast_float32_arg_list ',' fast_float32_arg
+          {
+              $$ = make_fast_arg_list<float32_arg_list, dods_float32>($1, $3);
+          }
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+fast_float32_arg: SCAN_WORD
+          {
+              $$ = strtof($1, 0);
+          }
+;
+
+/* return an int_arg_list (a std::vector<int>*) */
+fast_float64_arg_list: fast_float64_arg
+          {
+              $$ = make_fast_arg_list<float64_arg_list, dods_float64>(arg_length_hint_value, $1);
+          }
+          | fast_float64_arg_list ',' fast_float64_arg
+          {
+              $$ = make_fast_arg_list<float64_arg_list, dods_float64>($1, $3);
+          }
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+fast_float64_arg: SCAN_WORD
+          {
+              $$ = strtod($1, 0);
+          }
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+proj_function:  SCAN_WORD '(' arg_list ')'
+	    {
+		    proj_func p_f = 0;
+		    btp_func f = 0;
+
+		    if ((f = get_btp_function(*(EVALUATOR(arg)), $1))) {
+			    EVALUATOR(arg)->append_clause(f, $3);
+			    $$ = true;
+		    }
+		    else if ((p_f = get_proj_function(*(EVALUATOR(arg)), $1))) { 
+		        DDS &dds = dynamic_cast<DDS&>(*(DDS(arg)));
+			    BaseType **args = build_btp_args( $3, dds );
+			    (*p_f)(($3) ? $3->size():0, args, dds, *(EVALUATOR(arg)));
+			    delete[] args;
+			    $$ = true;
+		    }
+		    else {
+			    no_such_func(arg, $1);
+		    }
+		}
+;
+
+selection:	clause
+		| selection '&' clause
+                {
+		    $$ = $1 && $3;
+		}
+;
+
+clause:		r_value rel_op '{' r_value_list '}'
+                {
+		    if ($1) {
+			EVALUATOR(arg)->append_clause($2, $1, $4);
+			$$ = true;
+		    }
+		    else
+			$$ = false;
+		}
+		| r_value rel_op r_value
+                {
+		    if ($1) {
+			rvalue_list *rv = new rvalue_list;
+			rv->push_back($3);
+			EVALUATOR(arg)->append_clause($2, $1, rv);
+			$$ = true;
+		    }
+		    else
+			$$ = false;
+		}
+		| bool_function
+                {
+		    $$ = $1;
+		}
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+bool_function: SCAN_WORD '(' arg_list ')'
+	       {
+		   bool_func b_func = get_function((*EVALUATOR(arg)), $1);
+		   if (!b_func) {
+		       no_such_func(arg, $1);
+		   }
+		   else {
+		       EVALUATOR(arg)->append_clause(b_func, $3);
+		       $$ = true;
+		   }
+	       }
+;
+
+/* This rule does not check SCAN_WORD nor does it perform www escaping */
+r_value: id_or_const
+		| SCAN_WORD '(' arg_list ')'
+		{
+		    btp_func func = get_btp_function((*EVALUATOR(arg)), $1);
+		    if (func) {
+			    $$ = new rvalue(func, $3);
+		    } 
+		    else { 
+			    no_such_func(arg, $1);
+		    }
+		}
+        | array_const_special_form
+        {
+            $$ = $1;
+        }
+;
+
+r_value_list:	r_value
+		{
+		    if ($1)
+			    $$ = make_rvalue_list($1);
+		    else
+			    $$ = 0;
+		}
+		| r_value_list ',' r_value
+        {
+		    if ($1 && $3)
+			    $$ = append_rvalue_list($1, $3);
+		    else
+			    $$ = 0;
+		}
+;
+
+arg_list: r_value_list
+          {  
+		      $$ = $1;
+	      }
+          | /* Null, argument lists may be empty */
+          { 
+		      $$ = 0; 
+	      }
+;
+
+id_or_const: SCAN_WORD
+		{ 
+		    BaseType *btp = DDS(arg)->var(www2id($1));
+		    if (btp) {
+                btp->set_in_selection(true);
+                $$ = new rvalue(btp);
+		    }
+		    else {
+			    value new_val;
+			    if (check_int32($1)) {
+			        new_val.type = dods_int32_c;
+			        new_val.v.i = atoi($1);
+			    }
+			    else if (check_uint32($1)) {
+			        new_val.type = dods_uint32_c;
+			        new_val.v.ui = atoi($1);
+			    }
+			    else if (check_float64($1)) {
+			        new_val.type = dods_float64_c;
+			        new_val.v.f = atof($1);
+			    }
+			    else {
+			        new_val.type = dods_str_c;
+			        new_val.v.s = new string(www2id($1));
+			    }
+			    BaseType *btp = make_variable((*EVALUATOR(arg)), new_val);
+			    $$ = new rvalue(btp);
+		    }
+		}
+        | SCAN_STR
+                {
+                    if ($1.type != dods_str_c || $1.v.s == 0 || $1.v.s->empty())
+                        ce_exprerror(arg, "Malformed string", "");
+                        
+                    BaseType *var = DDS(arg)->var(www2id(*($1.v.s)));
+                    if (var) {
+                        $$ = new rvalue(var);
+                    }
+                    else {
+                        var = make_variable((*EVALUATOR(arg)), $1); 
+                        $$ = new rvalue(var);
+                    }
+                }
+;
+
+array_projection : array_proj_clause
+                {
+                    $$ = (*DDS(arg)).mark($1, true);
+                }
+                
+array_proj_clause: name array_indices
+                {
+                    //string name = www2id($1);
+                    if (!bracket_projection((*DDS(arg)), $1, $2))
+                      no_such_ident(arg, $1, "array, grid or sequence");
+                    
+                    strncpy($$, $1, ID_MAX-1);
+                    $$[ID_MAX-1] = '\0';
+                }
+                | array_proj_clause name
+                {
+                    string name = string($1) + string($2);
+                    strncpy($$, name.c_str(), ID_MAX-1);
+                    $$[ID_MAX-1] = '\0';
+                }
+                | array_proj_clause name array_indices
+                {
+                    string name = string($1) + string($2);
+                    if (!bracket_projection((*DDS(arg)), name.c_str(), $3))
+                      no_such_ident(arg, name.c_str(), "array, grid or sequence");
+
+                    strncpy($$, name.c_str(), ID_MAX-1);
+                    $$[ID_MAX-1] = '\0';
+                }
+;
+
+name:           SCAN_WORD
+                { 
+                    strncpy($$, www2id($1).c_str(), ID_MAX-1);
+                    $$[ID_MAX-1] = '\0';
+                }
+                | SCAN_STR
+                {
+                    if ($1.type != dods_str_c || $1.v.s == 0 || $1.v.s->empty())
+                        ce_exprerror(arg, "Malformed string", "");
+                        
+                    strncpy($$, www2id(*($1.v.s)).c_str(), ID_MAX-1);
+                    
+                    $$[ID_MAX-1] = '\0';
+                }
+;
+
+array_indices:  array_index
+                {
+		    $$ = make_array_indices($1);
+		}
+                | array_indices array_index
+                {
+		    $$ = append_array_index($1, $2);
+		}
+;
+
+/*
+ * We added [*], [n:*] and [n:m:*] to the syntax for array projections.
+ * These mean, resp., all the elements, elements from n to the end, and
+ * from n to the end with a stride of m. To encode this with as little 
+ * disruption as possible, we represent the star with -1. jhrg 12/20/12
+ */ 
+array_index:    '[' SCAN_WORD ']'
+{
+    if (!check_uint32($2))
+        throw Error(malformed_expr, "The word `" + string($2) + "' is not a valid array index.");
+    value i;
+    i.type = dods_uint32_c;
+    i.v.i = atoi($2);
+    $$ = make_array_index(i);
+}
+|   '[' SCAN_STAR ']'
+{
+    value i;
+    i.type = dods_int32_c;
+    i.v.i =-1;
+    $$ = make_array_index(i);
+}
+|'[' SCAN_WORD ':' SCAN_WORD ']'
+{
+    if (!check_uint32($2))
+        throw Error(malformed_expr, "The word `" + string($2) + "' is not a valid array index.");
+    if (!check_uint32($4))
+        throw Error(malformed_expr, "The word `" + string($4) + "' is not a valid array index.");
+    value i,j;
+    i.type = j.type = dods_uint32_c;
+    i.v.i = atoi($2);
+    j.v.i = atoi($4);
+    $$ = make_array_index(i, j);
+}
+|'[' SCAN_WORD ':' SCAN_STAR ']'
+{
+    if (!check_uint32($2))
+        throw Error(malformed_expr, "The word `" + string($2) + "' is not a valid array index.");
+    value i,j;
+    i.type = dods_uint32_c;
+    j.type = dods_int32_c;  /* signed */
+    i.v.i = atoi($2);
+    j.v.i = -1;
+    $$ = make_array_index(i, j);
+}
+| '[' SCAN_WORD ':' SCAN_WORD ':' SCAN_WORD ']'
+{
+    if (!check_uint32($2))
+        throw Error(malformed_expr, "The word `" + string($2) + "' is not a valid array index.");
+    if (!check_uint32($4))
+        throw Error(malformed_expr, "The word `" + string($4) + "' is not a valid array index.");
+    if (!check_uint32($6))
+        throw Error(malformed_expr, "The word `" + string($6) + "' is not a valid array index.");
+    value i, j, k;
+    i.type = j.type = k.type = dods_uint32_c;
+    i.v.i = atoi($2);
+    j.v.i = atoi($4);
+    k.v.i = atoi($6);
+    $$ = make_array_index(i, j, k);
+}
+| '[' SCAN_WORD ':' SCAN_WORD ':' SCAN_STAR ']'
+{
+    if (!check_uint32($2))
+        throw Error(malformed_expr, "The word `" + string($2) + "' is not a valid array index.");
+    if (!check_uint32($4))
+        throw Error(malformed_expr, "The word `" + string($4) + "' is not a valid array index.");
+    value i, j, k;
+    i.type = j.type = dods_uint32_c;
+    k.type = dods_int32_c;
+    i.v.i = atoi($2);
+    j.v.i = atoi($4);
+    k.v.i = -1;
+    $$ = make_array_index(i, j, k);
+}
+;
+
+rel_op:		SCAN_EQUAL
+		| SCAN_NOT_EQUAL
+		| SCAN_GREATER
+		| SCAN_GREATER_EQL
+		| SCAN_LESS
+		| SCAN_LESS_EQL
+		| SCAN_REGEXP
+;
+
+%%
+
+// All these error reporting function now throw instances of Error. The expr
+// parser no longer returns an error code to indicate and error. 2/16/2000
+// jhrg.
+
+void
+ce_exprerror(ce_parser_arg *, const string &s)
+{
+    //ce_exprerror(s.c_str());
+    string msg = "Constraint expression parse error: " + (string) s;
+    throw Error(malformed_expr, msg);
+}
+
+void ce_exprerror(ce_parser_arg *, const string &s, const string &s2)
+{
+    //ce_exprerror(s.c_str(), s2.c_str());
+    string msg = "Constraint expression parse error: " + (string) s + ": " + (string) s2;
+    throw Error(malformed_expr, msg);    
+}
+
+void no_such_ident(ce_parser_arg *arg, const string &name, const string &word)
+{
+    string msg = "No such " + word + " in dataset";
+    ce_exprerror(arg, msg /*.c_str()*/, name);
+}
+
+void no_such_func(ce_parser_arg *arg, const string &name)
+{
+    ce_exprerror(arg, "Not a registered function", name);
+    //no_such_func(name/*.c_str()*/);
+}
+
+/* If we're calling this, assume var is not a Sequence. But assume that the
+ name contains a dot and it's a separator. Look for the rightmost dot and
+ then look to see if the name to the left is a sequence. Return a pointer
+ to the sequence if it is otherwise return null. Uses tail-recursion to
+ 'walk' back from right to left looking at each dot. This way the sequence
+ will be found even if there are structures between the field and the
+ Sequence. */
+static Sequence *
+parent_is_sequence(DDS &table, const string &n)
+{
+    string::size_type dotpos = n.find_last_of('.');
+    if (dotpos == string::npos)
+        return 0;
+
+    string s = n.substr(0, dotpos);
+
+    // If the thing returned by table.var is not a Sequence, this cast
+    // will yield null.
+    Sequence *seq = dynamic_cast<Sequence*> (table.var(s));
+    if (seq)
+        return seq;
+    else
+        return parent_is_sequence(table, s);
+}
+
+bool bracket_projection(DDS &table, const char *name, int_list_list *indices)
+{
+    BaseType *var = table.var(name);
+    Sequence *seq; // used in last else-if clause
+#if 0
+    Array *array;
+#endif    
+    if (!var)
+        return false;
+
+    if (is_array_t(var)) {
+        /* calls to set_send_p should be replaced with
+         calls to DDS::mark so that arrays of Structures,
+         etc. will be processed correctly when individual
+         elements are projected using short names.
+         9/1/98 jhrg */
+        /* var->set_send_p(true); */
+        //table.mark(name, true);
+        // We don't call mark() here for an array. Instead it is called from
+        // within the parser. jhrg 10/10/08
+        process_array_indices(var, indices); // throws on error
+        delete_array_indices(indices);
+    }
+    else if (is_grid_t(var)) {
+        process_grid_indices(var, indices);
+        table.mark(name, true);
+        delete_array_indices(indices);
+    }
+    else if (is_sequence_t(var)) {
+        table.mark(name, true);
+        process_sequence_indices(var, indices);
+        delete_array_indices(indices);
+    }
+    else if ((seq = parent_is_sequence(table, name))) {
+        process_sequence_indices(seq, indices);
+        table.mark(name, true);
+        delete_array_indices(indices);
+    }
+    else {
+        return false;
+    }
+
+    return true;
+}
+
+// Given three values (I1, I2, I3), all of which must be integers, build an
+// int_list which contains those values.
+// 
+// Note that we added support for * in the rightmost position of an index
+// (i.e., [*], [n:*], [n:m:*]) and indicate that star using -1 as an index value.
+// Bescause of this change, the test for the type of the rightmost value in
+// the index subexpr was changed to include signed int.
+// jhrg 12/20/12
+//
+// Returns: A pointer to an int_list of three integers or NULL if any of the
+// values are not integers.
+
+int_list *
+make_array_index(value &i1, value &i2, value &i3)
+{
+    if (i1.type != dods_uint32_c || i2.type != dods_uint32_c || (i3.type != dods_uint32_c && i3.type != dods_int32_c))
+        return (int_list *) 0;
+
+    int_list *index = new int_list;
+
+    index->push_back((int) i1.v.i);
+    index->push_back((int) i2.v.i);
+    index->push_back((int) i3.v.i);
+
+    DBG(cout << "index: ");
+    DBG(copy(index->begin(), index->end(), ostream_iterator<int>(cerr, " ")));
+    DBG(cerr << endl);
+
+    return index;
+}
+
+int_list *
+make_array_index(value &i1, value &i2)
+{
+    if (i1.type != dods_uint32_c || (i2.type != dods_uint32_c && i2.type != dods_int32_c))
+	return (int_list *) 0;
+
+    int_list *index = new int_list;
+
+    index->push_back((int) i1.v.i);
+    index->push_back(1);
+    index->push_back((int) i2.v.i);
+
+    DBG(cout << "index: ");
+    DBG(copy(index->begin(), index->end(), ostream_iterator<int>(cerr, " ")));
+    DBG(cerr << endl);
+
+    return index;
+}
+
+int_list *
+make_array_index(value &i1)
+{
+    if (i1.type != dods_uint32_c && i1.type != dods_int32_c)
+	return (int_list *) 0;
+
+    int_list *index = new int_list;
+
+    // When the CE is Array[*] that means all of the elements, but the value
+    // of i1 will be -1. Make the projection triple be 0:1:-1 which is a 
+    // pattern that libdap::Array will recognize.
+    if (i1.v.i == -1)
+        index->push_back(0);
+    else
+        index->push_back((int) i1.v.i);
+    index->push_back(1);
+    index->push_back((int) i1.v.i);
+
+    DBG(cout << "index: ");
+    DBG(copy(index->begin(), index->end(), ostream_iterator<int>(cerr, " ")));
+    DBG(cerr << endl);
+
+    return index;
+}
+
+int_list_list *
+make_array_indices(int_list *index)
+{
+    int_list_list *indices = new int_list_list;
+
+    DBG(cout << "index: ");
+    DBG(copy(index->begin(), index->end(), ostream_iterator<int>(cerr, " ")));
+    DBG(cerr << endl);
+
+    assert(index);
+    indices->push_back(index);
+
+    return indices;
+}
+
+int_list_list *
+append_array_index(int_list_list *indices, int_list *index)
+{
+    assert(indices);
+    assert(index);
+
+    indices->push_back(index);
+
+    return indices;
+}
+
+// Delete an array indices list. 
+
+void delete_array_indices(int_list_list *indices)
+{
+    assert(indices);
+
+    for (int_list_citer i = indices->begin(); i != indices->end(); i++) {
+	int_list *il = *i;
+	assert(il);
+	delete il;
+    }
+
+    delete indices;
+}
+
+bool is_array_t(BaseType *variable)
+{
+    assert(variable);
+
+    if (variable->type() != dods_array_c)
+	return false;
+    else
+	return true;
+}
+
+bool is_grid_t(BaseType *variable)
+{
+    assert(variable);
+
+    if (variable->type() != dods_grid_c)
+	return false;
+    else
+	return true;
+}
+
+bool is_sequence_t(BaseType *variable)
+{
+    assert(variable);
+
+    if (variable->type() != dods_sequence_c)
+	return false;
+    else
+	return true;
+}
+
+void process_array_indices(BaseType *variable, int_list_list *indices)
+{
+    assert(variable);
+
+    Array *a = dynamic_cast<Array *>(variable); // replace with dynamic cast
+    if (!a)
+        throw Error(malformed_expr,
+		    string("The constraint expression evaluator expected an array; ") + variable->name() + " is not an array.");
+
+    if (a->dimensions(true) != (unsigned) indices->size())
+        throw Error(malformed_expr,
+		    string("Error: The number of dimensions in the constraint for ") + variable->name()
+                    + " must match the number in the array.");
+
+    DBG(cerr << "Before applying projection to array:" << endl);
+    DBG(a->print_decl(cerr, "", true, false, true));
+
+    assert(indices);
+    
+    int_list_citer p = indices->begin();
+    Array::Dim_iter r = a->dim_begin();
+    for (; p != indices->end() && r != a->dim_end(); p++, r++) {
+        int_list *index = *p;
+        assert(index);
+
+        int_citer q = index->begin();
+        assert(q != index->end());
+        int start = *q;
+
+        q++;
+        int stride = *q;
+
+        q++;
+        int stop = *q;
+
+        q++;
+        if (q != index->end())
+            throw Error(malformed_expr, string("Too many values in index list for ") + a->name() + ".");
+
+        DBG(cerr << "process_array_indices: Setting constraint on " 
+            << a->name() << "[" << start << ":" << stop << "]"
+            << endl);
+
+        // It's possible that an array will appear more than once in a CE
+        // (for example, if an array of structures is constrained so that
+        // only two fields are projected and there's an associated hyperslab).
+        // However, in this case the two hyperslabs must be equal; test for
+        // that here.
+        //
+        // We added '*' to mean 'the last element' in the array and use an index of -1
+        // to indicate that. If 'stop' is -1, don't test it here because dimension_stop()
+        // won't be -1 but the actual ending index of the array. jhrg 12/20/12
+
+        if (a->send_p() && (a->dimension_start(r, true) != start || (a->dimension_stop(r, true) != stop && stop != -1)
+                            || a->dimension_stride(r, true) != stride))
+            throw Error(malformed_expr,
+                    string("The Array was already projected differently in the constraint expression: ") + a->name() + ".");
+
+        a->add_constraint(r, start, stride, stop);
+
+        DBG(cerr << "Set Constraint: " << a->dimension_size(r, true) << endl);
+    }
+
+    DBG(cerr << "After applying projection to array:" << endl);
+    DBG(a->print_decl(cerr, "", true, false, true));
+
+
+    if (p != indices->end() && r == a->dim_end())
+        throw Error(malformed_expr, string("Too many indices in constraint for ") + a->name() + ".");
+}
+
+void process_grid_indices(BaseType *variable, int_list_list *indices)
+{
+    assert(variable);
+    assert(variable->type() == dods_grid_c);
+    Grid *g = dynamic_cast<Grid *>(variable);
+    if (!g)
+        throw Error(unknown_error, "Expected a Grid variable");
+
+    Array *a = g->get_array();
+
+    if (a->dimensions(true) != (unsigned) indices->size())
+        throw Error(malformed_expr,
+		    string("Error: The number of dimensions in the constraint for ") + variable->name()
+		    + " must match the number in the grid.");
+
+    // First do the constraints on the ARRAY in the grid.
+    process_array_indices(g->array_var(), indices);
+
+    // Now process the maps.
+    Grid::Map_iter r = g->map_begin();
+
+    // Suppress all maps by default.
+    for (; r != g->map_end(); r++) {
+        (*r)->set_send_p(false);
+    }
+
+    // Add specified maps to the current projection.
+    assert(indices);
+    int_list_citer p = indices->begin();
+    r = g->map_begin();
+    for (; p != indices->end() && r != g->map_end(); p++, r++) {
+        int_list *index = *p;
+        assert(index);
+
+        int_citer q = index->begin();
+        assert(q != index->end());
+        int start = *q;
+
+        q++;
+        int stride = *q;
+
+        q++;
+        int stop = *q;
+
+        BaseType *btp = *r;
+        assert(btp);
+        assert(btp->type() == dods_array_c);
+        Array *a = (Array *) btp;
+        a->set_send_p(true);
+        a->reset_constraint();
+
+        q++;
+        if (q != index->end()) {
+            throw Error(malformed_expr, string("Too many values in index list for ") + a->name() + ".");
+        }
+
+        DBG(cerr << "process_grid_indices: Setting constraint on "
+            << a->name() << "[" << start << ":"
+            << stop << "]" << endl);
+    
+        Array::Dim_iter si = a->dim_begin();
+        a->add_constraint(si, start, stride, stop);
+
+    }
+
+    DBG(cout << "Grid Constraint: ";
+	for (Array::Dim_iter dp = ((Array *) g->array_var())->dim_begin();
+	     dp != ((Array *) g->array_var())->dim_end(); dp++)
+	    cout << ((Array *) g->array_var())->dimension_size(dp, true) << " ";
+	    cout << endl
+	);
+
+    if (p != indices->end() && r == g->map_end()) {
+        throw Error(malformed_expr,
+		    string("Too many indices in constraint for ") + (*r)->name() + ".");
+    }
+}
+
+void process_sequence_indices(BaseType *variable, int_list_list *indices)
+{
+    assert(variable);
+    assert(variable->type() == dods_sequence_c);
+    Sequence *s = dynamic_cast<Sequence *> (variable);
+    if (!s)
+        throw Error(malformed_expr, "Expected a Sequence variable");
+
+    // Add specified maps to the current projection.
+    assert(indices);
+    for (int_list_citer p = indices->begin(); p != indices->end(); p++) {
+        int_list *index = *p;
+        assert(index);
+
+        int_citer q = index->begin();
+        assert(q != index->end());
+        int start = *q;
+
+        q++;
+        int stride = *q;
+
+        q++;
+        int stop = *q;
+
+        q++;
+        if (q != index->end()) {
+            throw Error(malformed_expr, string("Too many values in index list for ") + s->name() + ".");
+        }
+
+        s->set_row_number_constraint(start, stop, stride);
+    }
+}
+
+// Given a value, wrap it up in a BaseType and return a pointer to the same.
+
+BaseType *
+make_variable(ConstraintEvaluator &eval, const value &val)
+{
+    BaseType *var;
+    switch (val.type) {
+    case dods_int32_c: {
+        var = new Int32("dummy");
+        var->val2buf((void *) &val.v.i);
+        break;
+    }
+
+    case dods_uint32_c: {
+        var = new UInt32("dummy");
+        var->val2buf((void *) &val.v.i);
+        break;
+    }
+
+    case dods_float64_c: {
+        var = new Float64("dummy");
+        var->val2buf((void *) &val.v.f);
+        break;
+    }
+
+    case dods_str_c: {
+        var = new Str("dummy");
+        var->val2buf((void *) val.v.s);
+        break;
+    }
+
+    default:
+        var = (BaseType *) 0;
+        return var;
+    }
+
+    var->set_read_p(true); // ...so the evaluator will know it has data
+    eval.append_constant(var);
+
+    return var;
+}
+
+// Given a string (passed in VAL), consult the DDS CE function lookup table
+// to see if a function by that name exists. 
+// NB: function arguments are type-checked at run-time.
+//
+// Returns: A pointer to the function or NULL if not such function exists.
+
+bool_func get_function(const ConstraintEvaluator &eval, const char *name)
+{
+    bool_func f;
+
+    if (eval.find_function(name, &f))
+        return f;
+    else
+        return 0;
+}
+
+btp_func get_btp_function(const ConstraintEvaluator &eval, const char *name)
+{
+    btp_func f;
+
+    if (eval.find_function(name, &f))
+        return f;
+    else
+        return 0;
+}
+
+proj_func get_proj_function(const ConstraintEvaluator &eval, const char *name)
+{
+    proj_func f;
+
+    if (eval.find_function(name, &f))
+        return f;
+    else
+        return 0;
+}
+
+template<class arg_type_list, class arg_type>
+arg_type_list
+make_fast_arg_list(unsigned long vector_size_hint, arg_type value)
+{
+    arg_type_list args = new std::vector<arg_type>;
+    
+    if (vector_size_hint > 0) args->reserve(vector_size_hint);
+    
+    args->push_back(value);
+    return args;
+}
+
+template<class arg_type_list, class arg_type>
+arg_type_list
+make_fast_arg_list(arg_type_list values, arg_type value)
+{
+    values->push_back(value);
+    return values;
+}
+
+template<class t, class T>
+rvalue *build_constant_array(vector<t> *values, DDS *dds)
+{
+    //vector<t> *values = $5;
+            
+    T i("");
+    Array *array = new Array("", &i);
+    array->append_dim(values->size());
+    
+    // TODO Make set_value_nocopy() methods so that values' pointers can be copied
+    // instead of allocating memory twice. jhrg 7/5/13
+            
+    array->set_value(*values, values->size());
+    delete values;
+    array->set_read_p(true);
+            
+    static unsigned long counter = 1;
+    string name;
+    do {
+        name = "g" + long_to_string(counter++);
+    } while (dds->var(name));
+    array->set_name(name);
+            
+    return new rvalue(array);
+}
+
diff --git a/ce_functions.cc b/ce_functions.cc
deleted file mode 100644
index 48798ff..0000000
--- a/ce_functions.cc
+++ /dev/null
@@ -1,1232 +0,0 @@
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// (c) COPYRIGHT URI/MIT 1999
-// Please read the full copyright statement in the file COPYRIGHT_URI.
-//
-// Authors:
-//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
-
-
-// These functions are used by the CE evaluator
-//
-// 1/15/99 jhrg
-
-#include "config.h"
-
-static char rcsid[]not_used = { "$Id: ce_functions.cc 25915 2012-10-24 00:14:58Z jimg $" };
-
-#include <limits.h>
-
-#include <cstdlib>      // used by strtod()
-#include <cerrno>
-#include <cmath>
-#include <iostream>
-#include <vector>
-#include <algorithm>
-
-//#define DODS_DEBUG
-
-#undef FUNCTION_DAP	// undef so the dap() function always returns an error;
-// use keywords instead.
-
-#include "BaseType.h"
-#include "Byte.h"
-#include "Int16.h"
-#include "UInt16.h"
-#include "Int32.h"
-#include "UInt32.h"
-#include "Float32.h"
-#include "Float64.h"
-#include "Str.h"
-#include "Url.h"
-#include "Array.h"
-#include "Structure.h"
-#include "Sequence.h"
-#include "Grid.h"
-#include "Error.h"
-#include "RValue.h"
-
-#include "GSEClause.h"
-#include "GridGeoConstraint.h"
-#include "ArrayGeoConstraint.h"
-
-#include "ce_functions.h"
-#include "gse_parser.h"
-#include "gse.tab.hh"
-#include "debug.h"
-#include "util.h"
-
-//  We wrapped VC++ 6.x strtod() to account for a short coming
-//  in that function in regards to "NaN".  I don't know if this
-//  still applies in more recent versions of that product.
-//  ROM - 12/2007
-#ifdef WIN32
-#include <limits>
-double w32strtod(const char *, char **);
-#endif
-
-using namespace std;
-
-int gse_parse(void *arg);
-void gse_restart(FILE * in);
-
-// Glue routines declared in gse.lex
-void gse_switch_to_buffer(void *new_buffer);
-void gse_delete_buffer(void *buffer);
-void *gse_string(const char *yy_str);
-
-namespace libdap {
-
-/** Is \e lhs equal to \e rhs? Use epsilon to determine equality. */
-inline bool double_eq(double lhs, double rhs, double epsilon = 1.0e-5)
-{
-    if (lhs > rhs)
-        return (lhs - rhs) < ((lhs + rhs) / epsilon);
-    else
-        return (rhs - lhs) < ((lhs + rhs) / epsilon);
-}
-
-/** Given a BaseType pointer, extract the string value it contains and return
- it.
-
- @param arg The BaseType pointer
- @return A C++ string
- @exception Error thrown if the referenced BaseType object does not contain
- a DAP String. */
-string extract_string_argument(BaseType * arg)
-{
-    if (arg->type() != dods_str_c)
-        throw Error(malformed_expr, "The function requires a DAP string argument.");
-
-    if (!arg->read_p())
-        throw InternalErr(__FILE__, __LINE__,
-                "The CE Evaluator built an argument list where some constants held no values.");
-
-    string s = dynamic_cast<Str&> (*arg).value();
-
-    DBG(cerr << "s: " << s << endl);
-
-    return s;
-}
-
-// @todo Replace new with vector<T> (vector<T> values(src_len);)
-template<class T> static void set_array_using_double_helper(Array * a, double *src, int src_len)
-{
-    T *values = new T[src_len];
-    for (int i = 0; i < src_len; ++i)
-        values[i] = (T) src[i];
-
-#ifdef VAL2BUF
-    a->val2buf(values, true);
-#else
-    a->set_value(values, src_len);
-#endif
-
-    delete[] values;
-}
-
-/** Given an array that holds some sort of numeric data, load it with values
- using an array of doubles. This function makes several assumptions. First,
- it assumes the caller really wants to put the doubles into whatever types
- the array holds! Caveat emptor. Second, it assumes that if the size of
- source (\e src) array is different than the destination (\e dest) the
- caller has made a mistake. In that case it will throw an Error object.
-
- After setting the values, this method sets the \c read_p property for
- \e dest.
-
- @param dest An Array. The values are written to this array, reusing
- its storage. Existing values are lost.
- @param src The source data.
- @param src_len The number of elements in the \e src array.
- @exception Error Thrown if \e dest is not a numeric-type array (Byte, ...,
- Float64) or if the number of elements in \e src does not match the number
- is \e dest. */
-void set_array_using_double(Array * dest, double *src, int src_len)
-{
-    // Simple types are Byte, ..., Float64, String and Url.
-    if ((dest->type() == dods_array_c && !dest->var()->is_simple_type()) || dest->var()->type() == dods_str_c
-            || dest->var()->type() == dods_url_c)
-        throw InternalErr(__FILE__, __LINE__, "The function requires a DAP numeric-type array argument.");
-
-    // Test sizes. Note that Array::length() takes any constraint into account
-    // when it returns the length. Even if this was removed, the 'helper'
-    // function this uses calls Vector::val2buf() which uses Vector::width()
-    // which in turn uses length().
-    if (dest->length() != src_len)
-        throw InternalErr(
-                __FILE__,
-                __LINE__,
-                "The source and destination array sizes don't match (" + long_to_string(src_len) + " versus "
-                        + long_to_string(dest->length()) + ").");
-
-    // The types of arguments that the CE Parser will build for numeric
-    // constants are limited to Uint32, Int32 and Float64. See ce_expr.y.
-    // Expanded to work for any numeric type so it can be used for more than
-    // just arguments.
-    switch (dest->var()->type()) {
-    case dods_byte_c:
-        set_array_using_double_helper<dods_byte> (dest, src, src_len);
-        break;
-    case dods_uint16_c:
-        set_array_using_double_helper<dods_uint16> (dest, src, src_len);
-        break;
-    case dods_int16_c:
-        set_array_using_double_helper<dods_int16> (dest, src, src_len);
-        break;
-    case dods_uint32_c:
-        set_array_using_double_helper<dods_uint32> (dest, src, src_len);
-        break;
-    case dods_int32_c:
-        set_array_using_double_helper<dods_int32> (dest, src, src_len);
-        break;
-    case dods_float32_c:
-        set_array_using_double_helper<dods_float32> (dest, src, src_len);
-        break;
-    case dods_float64_c:
-        set_array_using_double_helper<dods_float64> (dest, src, src_len);
-        break;
-    default:
-        throw InternalErr(__FILE__, __LINE__,
-                "The argument list built by the CE parser contained an unsupported numeric type.");
-    }
-
-    // Set the read_p property.
-    dest->set_read_p(true);
-}
-
-template<class T> static double *extract_double_array_helper(Array * a)
-{
-    int length = a->length();
-    // Could improve this using vector<T>. jhrg
-    T *b = new T[length];
-    a->value(b);
-
-    double *dest = new double[length];
-    for (int i = 0; i < length; ++i)
-        dest[i] = (double) b[i];
-    delete[] b;
-
-    return dest;
-}
-
-/** Given a pointer to an Array which holds a numeric type, extract the
- values and return in an array of doubles. This function allocates the
- array using 'new double[n]' so delete[] MUST be used when you are done
- the data. */
-double *extract_double_array(Array * a)
-{
-    // Simple types are Byte, ..., Float64, String and Url.
-    if ((a->type() == dods_array_c && !a->var()->is_simple_type()) || a->var()->type() == dods_str_c
-            || a->var()->type() == dods_url_c)
-        throw Error(malformed_expr, "The function requires a DAP numeric-type array argument.");
-
-    if (!a->read_p())
-        throw InternalErr(__FILE__, __LINE__, string("The Array '") + a->name() + "'does not contain values.");
-
-    // The types of arguments that the CE Parser will build for numeric
-    // constants are limited to Uint32, Int32 and Float64. See ce_expr.y.
-    // Expanded to work for any numeric type so it can be used for more than
-    // just arguments.
-    switch (a->var()->type()) {
-    case dods_byte_c:
-        return extract_double_array_helper<dods_byte> (a);
-    case dods_uint16_c:
-        return extract_double_array_helper<dods_uint16> (a);
-    case dods_int16_c:
-        return extract_double_array_helper<dods_int16> (a);
-    case dods_uint32_c:
-        return extract_double_array_helper<dods_uint32> (a);
-    case dods_int32_c:
-        return extract_double_array_helper<dods_int32> (a);
-    case dods_float32_c:
-        return extract_double_array_helper<dods_float32> (a);
-    case dods_float64_c:
-        return extract_double_array_helper<dods_float64> (a);
-    default:
-        throw InternalErr(__FILE__, __LINE__,
-                "The argument list built by the CE parser contained an unsupported numeric type.");
-    }
-}
-
-/** Given a BaseType pointer, extract the numeric value it contains and return
- it in a C++ double.
-
- @param arg The BaseType pointer
- @return A C++ double
- @exception Error thrown if the referenced BaseType object does not contain
- a DAP numeric value. */
-double extract_double_value(BaseType * arg)
-{
-    // Simple types are Byte, ..., Float64, String and Url.
-    if (!arg->is_simple_type() || arg->type() == dods_str_c || arg->type() == dods_url_c)
-        throw Error(malformed_expr, "The function requires a DAP numeric-type argument.");
-
-    if (!arg->read_p())
-        throw InternalErr(__FILE__, __LINE__,
-                "The CE Evaluator built an argument list where some constants held no values.");
-
-    // The types of arguments that the CE Parser will build for numeric
-    // constants are limited to Uint32, Int32 and Float64. See ce_expr.y.
-    // Expanded to work for any numeric type so it can be used for more than
-    // just arguments.
-    switch (arg->type()) {
-    case dods_byte_c:
-        return (double) (dynamic_cast<Byte&> (*arg).value());
-    case dods_uint16_c:
-        return (double) (dynamic_cast<UInt16&> (*arg).value());
-    case dods_int16_c:
-        return (double) (dynamic_cast<Int16&> (*arg).value());
-    case dods_uint32_c:
-        return (double) (dynamic_cast<UInt32&> (*arg).value());
-    case dods_int32_c:
-        return (double) (dynamic_cast<Int32&> (*arg).value());
-    case dods_float32_c:
-        return (double) (dynamic_cast<Float32&> (*arg).value());
-    case dods_float64_c:
-        return dynamic_cast<Float64&> (*arg).value();
-    default:
-        throw InternalErr(__FILE__, __LINE__,
-                "The argument list built by the CE parser contained an unsupported numeric type.");
-    }
-}
-
-/** This server-side function returns version information for the server-side
- functions. Note that this function takes no arguments and returns a
- String using the BaseType value/result parameter.
-
- @param btpp A pointer to the return value; caller must delete.
- */
-void function_version(int, BaseType *[], DDS &, BaseType **btpp)
-{
-    string
-            xml_value =
-                    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\
-                       <functions>\
-                       <function name=\"geogrid\" version=\"1.2\"/>\
-                       <function name=\"grid\" version=\"1.0\"/>\
-                       <function name=\"linear_scale\" version=\"1.0b1\"/>\
-                       <function name=\"version\" version=\"1.0\"/>\
-        	       <function name=\"dap\" version=\"1.0\"/>\
-                     </functions>";
-
-    //                        <function name=\"geoarray\" version=\"0.9b1\"/>
-
-    Str *response = new Str("version");
-
-    response->set_value(xml_value);
-    *btpp = response;
-    return;
-}
-
-void function_dap(int, BaseType *[], DDS &, ConstraintEvaluator &)
-{
-#ifdef FUNCTION_DAP
-    if (argc != 1) {
-        throw Error("The 'dap' function must be called with a version number.\n\
-	see http://docs.opendap.org/index.php/Server_Side_Processing_Functions#dap");
-    }
-
-    double pv = extract_double_value(argv[0]);
-    dds.set_dap_version(pv);
-#else
-    throw Error(
-            "The 'dap' function is not supported in lieu of Constraint expression 'keywords.'\n\
-see http://docs.opendap.org/index.php/Server_Side_Processing_Functions#keywords");
-#endif
-}
-
-static void parse_gse_expression(gse_arg * arg, BaseType * expr)
-{
-    gse_restart(0); // Restart the scanner.
-    void *cls = gse_string(extract_string_argument(expr).c_str());
-    // gse_switch_to_buffer(cls); // Get set to scan the string.
-    bool status = gse_parse((void *) arg) == 0;
-    gse_delete_buffer(cls);
-    if (!status)
-        throw Error(malformed_expr, "Error parsing grid selection.");
-}
-
-static void apply_grid_selection_expr(Grid * grid, GSEClause * clause)
-{
-    // Basic plan: For each map, look at each clause and set start and stop
-    // to be the intersection of the ranges in those clauses.
-    Grid::Map_iter map_i = grid->map_begin();
-    while (map_i != grid->map_end() && (*map_i)->name() != clause->get_map_name())
-        ++map_i;
-
-    if (map_i == grid->map_end())
-        throw Error(malformed_expr,
-                "The map vector '" + clause->get_map_name() + "' is not in the grid '" + grid->name() + "'.");
-
-    // Use pointer arith & the rule that map order must match array dim order
-    Array::Dim_iter grid_dim = (grid->get_array()->dim_begin() + (map_i - grid->map_begin()));
-
-    Array *map = dynamic_cast<Array *> ((*map_i));
-    if (!map)
-        throw InternalErr(__FILE__, __LINE__, "Expected an Array");
-    int start = max(map->dimension_start(map->dim_begin()), clause->get_start());
-    int stop = min(map->dimension_stop(map->dim_begin()), clause->get_stop());
-
-    if (start > stop) {
-        ostringstream msg;
-        msg << "The expressions passed to grid() do not result in an inclusive \n" << "subset of '"
-                << clause->get_map_name() << "'. The map's values range " << "from " << clause->get_map_min_value()
-                << " to " << clause->get_map_max_value() << ".";
-        throw Error(malformed_expr, msg.str());
-    }
-
-    DBG(cerr << "Setting constraint on " << map->name()
-            << "[" << start << ":" << stop << "]" << endl);
-
-    // Stride is always one.
-    map->add_constraint(map->dim_begin(), start, 1, stop);
-    grid->get_array()->add_constraint(grid_dim, start, 1, stop);
-}
-
-static void apply_grid_selection_expressions(Grid * grid, vector<GSEClause *> clauses)
-{
-    vector<GSEClause *>::iterator clause_i = clauses.begin();
-    while (clause_i != clauses.end())
-        apply_grid_selection_expr(grid, *clause_i++);
-
-    grid->set_read_p(false);
-}
-
-/** This is an example function for use by the MIIC project team. The first version
- * of this function simply looked for the Latitude and Longitude arrays of a MODIS
- * granule and returned them if found. This version, miic_ex2, takes two optional
- * arguments. If present, these two arguments are the names of the variables in the
- * dataset that should be used for the latitude and longitude data. If they are not
- * present, the function reverts to the old behavior. If only one argument is given,
- * an error is returned.
- *
- */
-void function_miic_ex2(int argc, BaseType * argv[], DDS &dds, BaseType **btpp)
-{
-    Array *l_lat = 0;
-    Array *l_lon = 0;
-    switch (argc) {
-    case 0: {
-        // First find the latitude and longitude variables. This assumes the file is
-        // CF. Note that the names of these are not passed into the function so it
-        // looks up the variables in the DDS. If the names were passed in, this step
-        // would be skipped.
-        if (!(l_lat = dynamic_cast<Array *>(dds.var("Latitude")))
-                || !(l_lon = dynamic_cast<Array *>(dds.var("Latitude"))))
-            throw Error(malformed_expr, "Could not find the Latitude or Longitude data!");
-        break;
-    }
-    case 2: {
-        l_lat = dynamic_cast<Array*>(argv[0]);
-        l_lon = dynamic_cast<Array*>(argv[1]);
-        if (!l_lat || !l_lon)
-            throw Error(malformed_expr, "Expected two Array variables as arguments.");
-        break;
-    }
-    default:
-        throw Error(malformed_expr, "Expected either zero or two arguments.");
-    }
-
-    // Now read the data values into C arrays the function can use. The length of the
-    // data is l_lat->length() and l_lon->length() resp. Use delete[] to release the
-    // storage. Also note that the Array* must be used to determine the number of
-    // dimensions of the arrays - extract_double_array() returns a simple vector.
-    l_lat->read();
-    double *lat = extract_double_array(l_lat);
-    l_lon->read();
-    double *lon = extract_double_array(l_lon);
-
-    // For this example, make a Structure, add two new variables to it and stuff
-    // these values in them. Make the new variable one-dimensional arrays (vectors)
-    // just to keep the code simple.
-    Structure *dest = new Structure("MODIS_Geo_information");
-
-    Array *new_lat = new Array("MODIS_Latitude", new Float64("MODIS_Latitude"));
-    new_lat->append_dim(l_lat->length());
-    new_lat->set_value(lat, l_lat->length());
-    dest->add_var(new_lat);
-
-    Array *new_lon = new Array("MODIS_Longtude", new Float64("MODIS_Longtude"));
-    new_lon->append_dim(l_lon->length());
-    new_lon->set_value(lon, l_lon->length());
-    dest->add_var(new_lon);
-
-    *btpp = dest;
-}
-
-/** The grid function uses a set of relational expressions to form a selection
- within a Grid variable based on the values in the Grid's map vectors.
- Thus, if a Grid has a 'temperature' map which ranges from 0.0 to 32.0
- degrees, it's possible to request the values of the Grid that fall between
- 10.5 and 12.5 degrees without knowing to which array indexes those values
- correspond. The function takes one or more arguments:<ul>
- <li>The name of a Grid.</li>
- <li>Zero or more strings which hold relational expressions of the form:<ul>
- <li><code><map var> <relop> <constant></code></li>
- <li><code><constant> <relop> <map var> <relop>
- <constant></code></li>
- </ul></li>
- </ul>
-
- Each of the relation expressions is applied to the Grid and the result is
- returned.
-
- @note Since this is a function and one of the arguments is the grid, the
- grid is read (using the Grid::read() method) at the time the argument list
- is built.
-
- @todo In order to be used by geogrid() , this code may have to be modified
- so that the maps and array are not re-read by the serialize() method. It
- might also be a good idea to change from the '?grid(SST,"10<time<20")'
- syntax in a URL to '?SST&grid(SST,"10<time<20")' even though it's more
- verbose in the URL, it would make the function a true 'selection operator'
- and allow several grids to be returned with selections in one request.
-
- @param argc The number of values in argv.
- @param argv An array of BaseType pointers which hold the arguments to be
- passed to geogrid. The arguments may be Strings, Integers, or Reals, subject
- to the above constraints.
- @param btpp A pointer to the return value; caller must delete.
-
- @see geogrid() (func_geogrid_select) A function which has logic specific
- to longitude/latitude selection. */
-void function_grid(int argc, BaseType * argv[], DDS &, BaseType **btpp)
-{
-    DBG(cerr << "Entering function_grid..." << endl);
-
-    string
-            info =
-                    string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
-                            + "<function name=\"grid\" version=\"1.0\" href=\"http://docs.opendap.org/index.php/Server_Side_Processing_Functions#grid\">\n"
-                            + "</function>\n";
-
-    if (argc == 0) {
-        Str *response = new Str("info");
-        response->set_value(info);
-        *btpp = response;
-        return;
-    }
-
-    Grid *original_grid = dynamic_cast<Grid *> (argv[0]);
-    if (!original_grid)
-        throw Error(malformed_expr, "The first argument to grid() must be a Grid variable!");
-
-    // Duplicate the grid; ResponseBuilder::send_data() will delete the variable
-    // after serializing it.
-    BaseType *btp = original_grid->ptr_duplicate();
-    Grid *l_grid = dynamic_cast<Grid *> (btp);
-    if (!l_grid) {
-        delete btp;
-        throw InternalErr(__FILE__, __LINE__, "Expected a Grid.");
-    }
-
-    DBG(cerr << "grid: past initialization code" << endl);
-
-    // Read the maps. Do this before calling parse_gse_expression(). Avoid
-    // reading the array until the constraints have been applied because it
-    // might be really large.
-
-    // This version makes sure to set the send_p flags which is needed for
-    // the hdf4 handler (and is what should be done in general).
-    Grid::Map_iter i = l_grid->map_begin();
-    while (i != l_grid->map_end())
-        (*i++)->set_send_p(true);
-
-    l_grid->read();
-
-    DBG(cerr << "grid: past map read" << endl);
-
-    // argv[1..n] holds strings; each are little expressions to be parsed.
-    // When each expression is parsed, the parser makes a new instance of
-    // GSEClause. GSEClause checks to make sure the named map really exists
-    // in the Grid and that the range of values given makes sense.
-    vector<GSEClause *> clauses;
-    gse_arg *arg = new gse_arg(l_grid);
-    for (int i = 1; i < argc; ++i) {
-        parse_gse_expression(arg, argv[i]);
-        clauses.push_back(arg->get_gsec());
-    }
-    delete arg;
-    arg = 0;
-
-    apply_grid_selection_expressions(l_grid, clauses);
-
-    DBG(cerr << "grid: past gse application" << endl);
-
-    l_grid->get_array()->set_send_p(true);
-
-    l_grid->read();
-
-    // Make a new grid here and copy just the parts of the Grid
-    // that are in the current projection - this means reading
-    // the array slicing information, extracting the correct
-    // values and building destination arrays with just those
-    // values.
-
-    *btpp = l_grid;
-    return;
-}
-
-/** The geogrid function returns the part of a Grid which includes a
- geographically specified rectangle. The arguments to the function are the
- name of a Grid, the left-top and right-bottom points of the rectangle and
- zero or more relational expressions of the sort that the grid function
- accepts. The constraints on the arguments are:<ul> <li>The Grid must have
- Latitude and Longitude map vectors. Those are discovered by looking for
- map vectors which satisfy enough of any one of a set of conventions to
- make the identification of those map vectors positive or by guessing
- which maps are which. The set of conventions supported is: COARDS, CF
- 1.0, GDT and CSC (see
- http://www.unidata.ucar.edu/software/netcdf/conventions.html). If the
- geogrid guesses at the maps, it adds an attribute (geogrid_warning) which
- says so. (in version 1.1)</li> <li>The rectangle corner points are in
- Longitude-Latitude. Longitude may be given using -180 to 180 or 0 to 360.
- For data sources with global coverage, geogrid assumes that the Longitude
- axis is circular. For requests made using 0/359 notation, it assumes it
- is modulus 360. Requests made using -180/179 notation cannot use values
- outside that range.</li> <li>The notation used to specify the rectangular
- region determines the notation used in the longitude/latitude map vectors
- of the Grid returned by the function.</li> <li>There are no restrictions
- on the relational expressions beyond those for the grid() (see
- func_grid_select()) function.</li> </ul>
-
- @note The geogrid() function is implemented as a 'BaseType function'
- which means that there can be only one function per request and no other
- variables may be named in the request.
-
- @param argc The number of values in argv.
- @param argv An array of BaseType pointers which hold the arguments to be
- passed to geogrid. The arguments may be Strings, Integers, or Reals,
- subject to the above constraints.
- @param btpp A pointer to the return value; caller must delete.
-
- @return The constrained and read Grid, ready to be sent. */
-void function_geogrid(int argc, BaseType * argv[], DDS &, BaseType **btpp)
-{
-    string
-            info =
-                    string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
-                            + "<function name=\"geogrid\" version=\"1.2\" href=\"http://docs.opendap.org/index.php/Server_Side_Processing_Functions#geogrid\">\n"
-                            + "</function>";
-
-    if (argc == 0) {
-        Str *response = new Str("version");
-        response->set_value(info);
-        *btpp = response;
-        return;
-    }
-
-    // There are two main forms of this function, one that takes a Grid and one
-    // that takes a Grid and two Arrays. The latter provides a way to explicitly
-    // tell the function which maps contain lat and lon data. The remaining
-    // arguments are the same for both versions, although that includes a
-    // varying argument list.
-
-    // Look at the types of the first three arguments to determine which of the
-    // two forms were used to call this function.
-    Grid *l_grid = 0;
-    if (argc < 1 || !(l_grid = dynamic_cast<Grid *> (argv[0]->ptr_duplicate())))
-        throw Error(malformed_expr, "The first argument to geogrid() must be a Grid variable!");
-
-    // Both forms require at least this many args
-    if (argc < 5)
-        throw Error(malformed_expr,
-                "Wrong number of arguments to geogrid() (expected at least 5 args). See geogrid() for more information.");
-
-    bool grid_lat_lon_form;
-    Array *l_lat = 0;
-    Array *l_lon = 0;
-    if (!(l_lat = dynamic_cast<Array *> (argv[1]))) //->ptr_duplicate())))
-        grid_lat_lon_form = false;
-    else if (!(l_lon = dynamic_cast<Array *> (argv[2]))) //->ptr_duplicate())))
-        throw Error(malformed_expr,
-                "When using the Grid, Lat, Lon form of geogrid() both the lat and lon maps must be given (lon map missing)!");
-    else
-        grid_lat_lon_form = true;
-
-    if (grid_lat_lon_form && argc < 7)
-        throw Error(malformed_expr,
-                "Wrong number of arguments to geogrid() (expected at least 7 args). See geogrid() for more information.");
-
-#if 0
-    Grid *l_grid = dynamic_cast < Grid * >(argv[0]->ptr_duplicate());
-    if (!l_grid)
-    throw Error(malformed_expr,"The first argument to geogrid() must be a Grid variable!");
-#endif
-    // Read the maps. Do this before calling parse_gse_expression(). Avoid
-    // reading the array until the constraints have been applied because it
-    // might be really large.
-    //
-    // Trick: Some handlers build Grids from a combination of Array
-    // variables and attributes. Those handlers (e.g., hdf4) use the send_p
-    // property to determine which parts of the Grid to read *but they can
-    // only read the maps from within Grid::read(), not the map's read()*.
-    // Since the Grid's array does not have send_p set, it will not be read
-    // by the call below to Grid::read().
-    Grid::Map_iter i = l_grid->map_begin();
-    while (i != l_grid->map_end())
-        (*i++)->set_send_p(true);
-
-    l_grid->read();
-    // Calling read() above sets the read_p flag for the entire grid; clear it
-    // for the grid's array so that later on the code will be sure to read it
-    // under all circumstances.
-    l_grid->get_array()->set_read_p(false);
-    DBG(cerr << "geogrid: past map read" << endl);
-
-    // Look for Grid Selection Expressions tacked onto the end of the BB
-    // specification. If there are any, evaluate them before evaluating the BB.
-    int min_arg_count = (grid_lat_lon_form) ? 7 : 5;
-    if (argc > min_arg_count) {
-        // argv[5..n] holds strings; each are little Grid Selection Expressions
-        // to be parsed and evaluated.
-        vector<GSEClause *> clauses;
-        gse_arg *arg = new gse_arg(l_grid);
-        for (int i = min_arg_count; i < argc; ++i) {
-            parse_gse_expression(arg, argv[i]);
-            clauses.push_back(arg->get_gsec());
-        }
-        delete arg;
-        arg = 0;
-
-        apply_grid_selection_expressions(l_grid, clauses);
-    }
-
-    try {
-        // Build a GeoConstraint object. If there are no longitude/latitude
-        // maps then this constructor throws Error.
-        GridGeoConstraint gc(l_grid);
-
-        // This sets the bounding box and modifies the maps to match the
-        // notation of the box (0/359 or -180/179)
-        int box_index_offset = (grid_lat_lon_form) ? 3 : 1;
-        double top = extract_double_value(argv[box_index_offset]);
-        double left = extract_double_value(argv[box_index_offset + 1]);
-        double bottom = extract_double_value(argv[box_index_offset + 2]);
-        double right = extract_double_value(argv[box_index_offset + 3]);
-        gc.set_bounding_box(top, left, bottom, right);
-        DBG(cerr << "geogrid: past bounding box set" << endl);
-
-        // This also reads all of the data into the grid variable
-        gc.apply_constraint_to_data();
-        DBG(cerr << "geogrid: past apply constraint" << endl);
-
-        // In this function the l_grid pointer is the same as the pointer returned
-        // by this call. The caller of the function must free the pointer.
-        *btpp = gc.get_constrained_grid();
-        return;
-    } catch (Error &e) {
-        throw e;
-    } catch (exception & e) {
-        throw InternalErr(string("A C++ exception was thrown from inside geogrid(): ") + e.what());
-    }
-}
-
-// These static functions could be moved to a class that provides a more
-// general interface for COARDS/CF someday. Assume each BaseType comes bundled
-// with an attribute table.
-
-// This was ripped from parser-util.cc
-static double string_to_double(const char *val)
-{
-    char *ptr;
-    errno = 0;
-    // Clear previous value. 5/21/2001 jhrg
-
-#ifdef WIN32
-    double v = w32strtod(val, &ptr);
-#else
-    double v = strtod(val, &ptr);
-#endif
-
-    if ((v == 0.0 && (val == ptr || errno == HUGE_VAL || errno == ERANGE)) || *ptr != '\0') {
-        throw Error(malformed_expr, string("Could not convert the string '") + val + "' to a double.");
-    }
-
-    double abs_val = fabs(v);
-    if (abs_val > DODS_DBL_MAX || (abs_val != 0.0 && abs_val < DODS_DBL_MIN))
-        throw Error(malformed_expr, string("Could not convert the string '") + val + "' to a double.");
-
-    return v;
-}
-
-/** Look for any one of a series of attribute values in the attribute table
- for \e var. This function treats the list of attributes as if they are ordered
- from most to least likely/important. It stops when the first of the vector of
- values is found. If the variable (var) is a Grid, this function also looks
- at the Grid's Array for the named attributes. In all cases it returns the
- first value found.
- @param var Look for attributes in this BaseType variable.
- @param attributes A vector of attributes; the first one found will be returned.
- @return The attribute value in a double. */
-static double get_attribute_double_value(BaseType *var, vector<string> &attributes)
-{
-    // This code also builds a list of the attribute values that have been
-    // passed in but not found so that an informative message can be returned.
-    AttrTable &attr = var->get_attr_table();
-    string attribute_value = "";
-    string values = "";
-    vector<string>::iterator i = attributes.begin();
-    while (attribute_value == "" && i != attributes.end()) {
-        values += *i;
-        if (!values.empty())
-            values += ", ";
-        attribute_value = attr.get_attr(*i++);
-    }
-
-    // If the value string is empty, then look at the grid's array (if it's a
-    // grid) or throw an Error.
-    if (attribute_value.empty()) {
-        if (var->type() == dods_grid_c)
-            return get_attribute_double_value(dynamic_cast<Grid&> (*var).get_array(), attributes);
-        else
-            throw Error(
-                    malformed_expr,
-                    string("No COARDS/CF '") + values.substr(0, values.length() - 2)
-                            + "' attribute was found for the variable '" + var->name() + "'.");
-    }
-
-    return string_to_double(remove_quotes(attribute_value).c_str());
-}
-
-static double get_attribute_double_value(BaseType *var, const string &attribute)
-{
-    AttrTable &attr = var->get_attr_table();
-    string attribute_value = attr.get_attr(attribute);
-
-    // If the value string is empty, then look at the grid's array (if it's a
-    // grid or throw an Error.
-    if (attribute_value.empty()) {
-        if (var->type() == dods_grid_c)
-            return get_attribute_double_value(dynamic_cast<Grid&> (*var).get_array(), attribute);
-        else
-            throw Error(malformed_expr,
-                    string("No COARDS '") + attribute + "' attribute was found for the variable '" + var->name() + "'.");
-    }
-
-    return string_to_double(remove_quotes(attribute_value).c_str());
-}
-
-static double get_y_intercept(BaseType *var)
-{
-    vector<string> attributes;
-    attributes.push_back("add_offset");
-    attributes.push_back("add_off");
-    return get_attribute_double_value(var, attributes);
-}
-
-static double get_slope(BaseType *var)
-{
-    return get_attribute_double_value(var, "scale_factor");
-}
-
-static double get_missing_value(BaseType *var)
-{
-    return get_attribute_double_value(var, "missing_value");
-}
-
-/** Given a BaseType, scale it using 'y = mx + b'. Either provide the
- constants 'm' and 'b' or the function will look for the COARDS attributes
- 'scale_factor' and 'add_offset'.
-
- @param argc A count of the arguments 
- @param argv An array of pointers to each argument, wrapped in a child of BaseType
- @param btpp A pointer to the return value; caller must delete.
-
- @return The scaled variable, represented using Float64
- @exception Error Thrown if scale_factor is not given and the COARDS
- attributes cannot be found OR if the source variable is not a
- numeric scalar, Array or Grid. */
-void function_linear_scale(int argc, BaseType * argv[], DDS &, BaseType **btpp)
-{
-    string
-            info =
-                    string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
-                            + "<function name=\"linear_scale\" version=\"1.0b1\" href=\"http://docs.opendap.org/index.php/Server_Side_Processing_Functions#linear_scale\">\n"
-                            + "</function>";
-
-    if (argc == 0) {
-        Str *response = new Str("info");
-        response->set_value(info);
-        *btpp = response;
-        return;
-    }
-
-    // Check for 1 or 3 arguments: 1 --> use attributes; 3 --> m & b supplied
-    DBG(cerr << "argc = " << argc << endl);
-    if (!(argc == 1 || argc == 3 || argc == 4))
-        throw Error(malformed_expr,
-                "Wrong number of arguments to linear_scale(). See linear_scale() for more information");
-
-    // Get m & b
-    bool use_missing = false;
-    double m, b, missing = 0.0;
-    if (argc == 4) {
-        m = extract_double_value(argv[1]);
-        b = extract_double_value(argv[2]);
-        missing = extract_double_value(argv[3]);
-        use_missing = true;
-    }
-    else if (argc == 3) {
-        m = extract_double_value(argv[1]);
-        b = extract_double_value(argv[2]);
-        use_missing = false;
-    }
-    else {
-        m = get_slope(argv[0]);
-
-        // This is really a hack; on a fair number of datasets, the y intercept
-        // is not given and is assumed to be 0. Here the function looks and
-        // catches the error if a y intercept is not found.
-        try {
-            b = get_y_intercept(argv[0]);
-        } catch (Error &e) {
-            b = 0.0;
-        }
-
-        // This is not the best plan; the get_missing_value() function should
-        // do something other than throw, but to do that would require mayor
-        // surgery on get_attribute_double_value().
-        try {
-            missing = get_missing_value(argv[0]);
-            use_missing = true;
-        } catch (Error &e) {
-            use_missing = false;
-        }
-    }
-
-    DBG(cerr << "m: " << m << ", b: " << b << endl);DBG(cerr << "use_missing: " << use_missing << ", missing: " << missing << endl);
-
-    // Read the data, scale and return the result. Must replace the new data
-    // in a constructor (i.e., Array part of a Grid).
-    BaseType *dest = 0;
-    double *data;
-    if (argv[0]->type() == dods_grid_c) {
-#if 0
-        // For a Grid, the function scales only the Array part.
-        Array *source = dynamic_cast<Grid*>(argv[0])->get_array();
-        //argv[0]->set_send_p(true);
-             //source->set_send_p(true);
-        source->read();
-        data = extract_double_array(source);
-        int length = source->length();
-        for (int i = 0; i < length; ++i)
-            data[i] = data[i] * m + b;
-#if 0
-        int i = 0;
-        while (i < length) {
-            DBG2(cerr << "data[" << i << "]: " << data[i] << endl);
-            if (!use_missing || !double_eq(data[i], missing))
-                data[i] = data[i] * m + b;
-            DBG2(cerr << " >> data[" << i << "]: " << data[i] << endl);
-            ++i;
-        }
-#endif
-        // Vector::add_var will delete the existing 'template' variable
-        Float64 *temp_f = new Float64(source->name());
-        source->add_var(temp_f);
-
-#ifdef VAL2BUF
-        source.val2buf(static_cast<void*>(data), false);
-#else
-        source->set_value(data, length);
-#endif
-        delete[] data; // val2buf copies.
-        delete temp_f; // add_var copies and then adds.
-        dest = argv[0];
-        dest->set_send_p(true);
-#endif
-        // Grab the whole Grid; note that the scaling is done only on the array part
-        Grid &source = dynamic_cast<Grid&>(*argv[0]);
-
-        DBG(cerr << "Grid send_p: " << source.send_p() << endl);
-        DBG(cerr << "Grid Array send_p: " << source.get_array()->send_p() << endl);
-
-        // Read the grid; set send_p since Grid is a kind of constructor and
-        // read will only be called on it's fields if their send_p flag is set
-        source.set_send_p(true);
-        source.read();
-
-        // Get the Array part and read the values
-        Array *a = source.get_array();
-        //a->read();
-        data = extract_double_array(a);
-
-        // Now scale the data.
-        int length = a->length();
-        for (int i = 0; i < length; ++i)
-            data[i] = data[i] * m + b;
-#if 0
-        // read the maps so that those values will be copied when the source Grid
-        // is copied to the dest Grid
-        Grid::Map_iter s = source.map_begin();
-        while (s != source.map_end()) {
-            static_cast<Array*>(*s)->read();
-            ++s;
-        }
-#endif
-        // Copy source Grid to result Grid. Could improve on this by not using this
-        // trick since it copies all of 'source' to 'dest', including the main Array.
-        // The next bit of code will replace those values with the newly scaled ones.
-        Grid *result = new Grid(source);
-
-        // Now load the transferred values; use Float64 as the new type of the result
-        // Grid Array.
-        result->get_array()->add_var_nocopy(new Float64(source.name()));
-        result->get_array()->set_value(data, length);
-        delete[] data;
-
-#if 0
-        // Now set the maps (NB: the copy constructor does not copy data)
-        Grid::Map_iter s = source.map_begin();
-        Grid::Map_iter d = result->map_begin();
-        while (s != source.map_end()) {
-            Array *a = static_cast<Array*>(*s);
-            a->read();
-            switch(a->var()->type()) {
-            case dods_byte_c: {
-                vector<dods_byte> v(a->length());
-                a->value(&v[0]);
-                static_cast<Array*>(*d)->set_value(v, v.size());
-                break;
-            }
-            case dods_float32_c: {
-                vector<dods_float32> v(a->length());
-                a->value(&v[0]);
-                static_cast<Array*>(*d)->set_value(v, a->length());
-                break;
-            }
-            default:
-                throw Error("Non-numeric Grid Map not supported by linear_scale().");
-            }
-            ++s; ++d;
-        }
-#endif
-
-        // FIXME result->set_send_p(true);
-        DBG(cerr << "Grid send_p: " << result->send_p() << endl);
-        DBG(cerr << "Grid Array send_p: " << result->get_array()->send_p() << endl);
-
-        dest = result;
-    }
-    else if (argv[0]->is_vector_type()) {
-#if 0
-        Array &source = dynamic_cast<Array&> (*argv[0]);
-        source.set_send_p(true);
-        // If the array is really a map, make sure to read using the Grid
-        // because of the HDF4 handler's odd behavior WRT dimensions.
-        if (source.get_parent() && source.get_parent()->type() == dods_grid_c)
-            source.get_parent()->read();
-        else
-            source.read();
-
-        data = extract_double_array(&source);
-        int length = source.length();
-        int i = 0;
-        while (i < length) {
-            if (!use_missing || !double_eq(data[i], missing))
-                data[i] = data[i] * m + b;
-            ++i;
-        }
-
-        Float64 *temp_f = new Float64(source.name());
-        source.add_var(temp_f);
-
-        source.val2buf(static_cast<void*> (data), false);
-
-        delete[] data; // val2buf copies.
-        delete temp_f; // add_var copies and then adds.
-
-        dest = argv[0];
-#endif
-        Array &source = dynamic_cast<Array&>(*argv[0]);
-        // If the array is really a map, make sure to read using the Grid
-        // because of the HDF4 handler's odd behavior WRT dimensions.
-        if (source.get_parent() && source.get_parent()->type() == dods_grid_c) {
-            source.get_parent()->set_send_p(true);
-            source.get_parent()->read();
-        }
-        else
-            source.read();
-
-        data = extract_double_array(&source);
-        int length = source.length();
-        for (int i = 0; i < length; ++i)
-            data[i] = data[i] * m + b;
-
-        Array *result = new Array(source);
-
-        result->add_var_nocopy(new Float64(source.name()));
-        result->set_value(data, length);
-
-        delete[] data; // val2buf copies.
-
-        dest = result;
-    }
-    else if (argv[0]->is_simple_type() && !(argv[0]->type() == dods_str_c || argv[0]->type() == dods_url_c)) {
-        double data = extract_double_value(argv[0]);
-        if (!use_missing || !double_eq(data, missing))
-            data = data * m + b;
-
-        Float64 *fdest = new Float64(argv[0]->name());
-
-        fdest->set_value(data);
-        // dest->val2buf(static_cast<void*> (&data));
-        dest = fdest;
-    }
-    else {
-        throw Error(malformed_expr, "The linear_scale() function works only for numeric Grids, Arrays and scalars.");
-    }
-
-    *btpp = dest;
-    return;
-}
-
-#if 0
-/** Perform a selection on the array using geographical coordinates. This
- function takes several groups of arguments.
- <ul>
- <li>geoarray(var, top, left, bottom, right)</li>
- <li>geoarray(var, top, left, bottom, right, var_top, v_left, v_bottom, v_right)</li>
- <li>geoarray(var, top, left, bottom, right, var_top, v_left, v_bottom, v_right, projection, datum)</li>
- </ul>
-
- @note Only the plat-carre projection and wgs84 datum are currently
- supported.
-
- @param argc A count of the arguments 
- @param argv An array of pointers to each argument, wrapped in a child of BaseType
- @param btpp A pointer to the return value; caller must delete.
-
- @return The Array, constrained by the selection
- @exception Error Thrown if thins go awry. */
-void
-function_geoarray(int argc, BaseType * argv[], DDS &, BaseType **btpp)
-{
-    string info =
-    string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") +
-    "<function name=\"geoarray\" version=\"0.9b1\" href=\"http://docs.opendap.org/index.php/Server_Side_Processing_Functions#geoarray\">\n" +
-    "</function>";
-
-    if (argc == 0) {
-        Str *response = new Str("version");
-        response->set_value(info);
-        *btpp = response;
-        return;
-    }
-
-    DBG(cerr << "argc = " << argc << endl);
-    if (!(argc == 5 || argc == 9 || argc == 11))
-    throw Error(malformed_expr,"Wrong number of arguments to geoarray(). See geoarray() for more information.");
-
-    // Check the Array (and dup because the caller will free the variable).
-    Array *l_array = dynamic_cast < Array * >(argv[0]->ptr_duplicate());
-    if (!l_array)
-    throw Error(malformed_expr,"The first argument to geoarray() must be an Array variable!");
-
-    try {
-
-        // Read the bounding box and variable extents from the params
-        double bb_top = extract_double_value(argv[1]);
-        double bb_left = extract_double_value(argv[2]);
-        double bb_bottom = extract_double_value(argv[3]);
-        double bb_right = extract_double_value(argv[4]);
-
-        switch (argc) {
-            case 5: {
-                ArrayGeoConstraint agc(l_array);
-
-                agc.set_bounding_box(bb_left, bb_top, bb_right, bb_bottom);
-                // This also reads all of the data into the grid variable
-                agc.apply_constraint_to_data();
-                *btpp = agc.get_constrained_array();
-                return;
-                break;
-            }
-            case 9: {
-                double var_top = extract_double_value(argv[5]);
-                double var_left = extract_double_value(argv[6]);
-                double var_bottom = extract_double_value(argv[7]);
-                double var_right = extract_double_value(argv[8]);
-                ArrayGeoConstraint agc (l_array, var_left, var_top, var_right, var_bottom);
-
-                agc.set_bounding_box(bb_left, bb_top, bb_right, bb_bottom);
-                // This also reads all of the data into the grid variable
-                agc.apply_constraint_to_data();
-                *btpp = agc.get_constrained_array();
-                return;
-                break;
-            }
-            case 11: {
-                double var_top = extract_double_value(argv[5]);
-                double var_left = extract_double_value(argv[6]);
-                double var_bottom = extract_double_value(argv[7]);
-                double var_right = extract_double_value(argv[8]);
-                string projection = extract_string_argument(argv[9]);
-                string datum = extract_string_argument(argv[10]);
-                ArrayGeoConstraint agc(l_array,
-                        var_left, var_top, var_right, var_bottom,
-                        projection, datum);
-
-                agc.set_bounding_box(bb_left, bb_top, bb_right, bb_bottom);
-                // This also reads all of the data into the grid variable
-                agc.apply_constraint_to_data();
-                *btpp = agc.get_constrained_array();
-                return;
-                break;
-            }
-            default:
-            throw InternalErr(__FILE__, __LINE__, "Wrong number of args to geoarray.");
-        }
-    }
-    catch (Error & e) {
-        throw e;
-    }
-    catch (exception & e) {
-        throw
-        InternalErr(string
-                ("A C++ exception was thrown from inside geoarray(): ")
-                + e.what());
-
-    }
-
-    throw InternalErr(__FILE__, __LINE__, "Impossible condition in geoarray.");
-}
-#endif
-
-void register_functions(ConstraintEvaluator & ce)
-{
-    ce.add_function("grid", function_grid);
-    ce.add_function("geogrid", function_geogrid);
-    ce.add_function("linear_scale", function_linear_scale);
-    ce.add_function("version", function_version);
-
-    ce.add_function("miic_ex2", function_miic_ex2);
-
-    ce.add_function("dap", function_dap);
-}
-
-} // namespace libdap
diff --git a/ce_functions.h b/ce_functions.h
deleted file mode 100644
index cf4dce8..0000000
--- a/ce_functions.h
+++ /dev/null
@@ -1,66 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// (c) COPYRIGHT URI/MIT 1999
-// Please read the full copyright statement in the file COPYRIGHT_URI.
-//
-// Authors:
-//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
-
-// Declarations for CE functions.
-//
-// 1/15/99 jhrg
-
-#ifndef _ce_functions_h
-#define _ce_functions_h
-
-#include "BaseType.h"
-#include "Array.h"
-#include "Error.h"
-#include "ConstraintEvaluator.h"
-
-namespace libdap
-{
-
-// These functions are use by the code in GeoConstraint
-string extract_string_argument(BaseType *arg) ;
-double extract_double_value(BaseType *arg) ;
-double *extract_double_array(Array *a) ;
-void set_array_using_double(Array *dest, double *src, int src_len) ;
-
-void func_version(int argc, BaseType *argv[], DDS &dds, BaseType **btpp) ;
-void function_grid(int argc, BaseType *argv[], DDS &dds, BaseType **btpp) ;
-void function_geogrid(int argc, BaseType *argv[], DDS &dds, BaseType **btpp) ;
-void function_linear_scale(int argc, BaseType *argv[], DDS &dds, BaseType **btpp) ;
-void function_geoarray(int argc, BaseType *argv[], DDS &dds, BaseType **btpp) ;
-
-// Projection function used to pass DAP version information
-void function_dap(int argc, BaseType *argv[], DDS &dds, ConstraintEvaluator &ce);
-
-void register_functions(ConstraintEvaluator &ce);
-
-} // namespace libdap
-
-#endif // _ce_functions_h
diff --git a/ce_parser.h b/ce_parser.h
index 4e0feff..592c223 100644
--- a/ce_parser.h
+++ b/ce_parser.h
@@ -1,3 +1,7 @@
+
+#ifndef CE_PARSER_H_
+#define CE_PARSER_H_
+
 namespace libdap
 {
 
@@ -34,3 +38,4 @@ struct ce_parser_arg
 
 } // namespace libdap
 
+#endif // CE_PARSER_H_
diff --git a/conf/._config.guess b/conf/._config.guess
deleted file mode 100755
index 868b165..0000000
Binary files a/conf/._config.guess and /dev/null differ
diff --git a/conf/._config.sub b/conf/._config.sub
deleted file mode 100755
index 868b165..0000000
Binary files a/conf/._config.sub and /dev/null differ
diff --git a/conf/._depcomp b/conf/._depcomp
deleted file mode 100755
index 868b165..0000000
Binary files a/conf/._depcomp and /dev/null differ
diff --git a/conf/._install-sh b/conf/._install-sh
deleted file mode 100755
index 868b165..0000000
Binary files a/conf/._install-sh and /dev/null differ
diff --git a/conf/._libtool.m4 b/conf/._libtool.m4
deleted file mode 100644
index e28c21b..0000000
Binary files a/conf/._libtool.m4 and /dev/null differ
diff --git a/conf/._ltmain.sh b/conf/._ltmain.sh
deleted file mode 100755
index e28c21b..0000000
Binary files a/conf/._ltmain.sh and /dev/null differ
diff --git a/conf/._ltoptions.m4 b/conf/._ltoptions.m4
deleted file mode 100644
index e28c21b..0000000
Binary files a/conf/._ltoptions.m4 and /dev/null differ
diff --git a/conf/._ltsugar.m4 b/conf/._ltsugar.m4
deleted file mode 100644
index e28c21b..0000000
Binary files a/conf/._ltsugar.m4 and /dev/null differ
diff --git a/conf/._ltversion.m4 b/conf/._ltversion.m4
deleted file mode 100644
index e28c21b..0000000
Binary files a/conf/._ltversion.m4 and /dev/null differ
diff --git a/conf/._lt~obsolete.m4 b/conf/._lt~obsolete.m4
deleted file mode 100644
index e28c21b..0000000
Binary files a/conf/._lt~obsolete.m4 and /dev/null differ
diff --git a/conf/._missing b/conf/._missing
deleted file mode 100755
index 868b165..0000000
Binary files a/conf/._missing and /dev/null differ
diff --git a/conf/acinclude.m4 b/conf/acinclude.m4
index d0ff1ae..dfe8197 100644
--- a/conf/acinclude.m4
+++ b/conf/acinclude.m4
@@ -18,7 +18,7 @@
 # 4. Macros for locating various systems (Matlab, etc.)
 # 5. Macros used to test things about the computer/OS/hardware
 #
-# $Id: acinclude.m4 18942 2008-06-25 21:27:05Z jimg $
+# $Id: acinclude.m4 25670 2012-06-29 20:26:48Z jimg $
 
 # 1. Unidata's macros
 #-------------------------------------------------------------------------
@@ -516,16 +516,22 @@ AC_DEFUN([DODS_CHECK_SIZES], [dnl
 
     # DMH: Divide into two sets of tests: one for DODS and one for XDR
     if test x"$dap_use_c99_types" = 'xyes'; then
+        DODS_INT64=int64_t
+        DODS_UINT64=uint64_t
         DODS_INT32=int32_t
         DODS_UINT32=uint32_t
         DODS_INT16=int16_t
         DODS_UINT16=uint16_t
+        DODS_INT8=int8_t
         DODS_BYTE=uint8_t
     else
+        DODS_INT64="long long"
+        DODS_UINT64="unsigned long long"
         DODS_INT16=short
         DODS_UINT16="unsigned short"
 	DODS_INT32=int
 	DODS_UINT32="unsigned int"
+	DODS_INT8=char
 	DODS_BYTE="unsigned char"
     fi
     DODS_FLOAT64=double
@@ -534,15 +540,22 @@ AC_DEFUN([DODS_CHECK_SIZES], [dnl
     # I'm using the three arg form of AC_DEFINE_UNQUOTED because autoheader
     # needs the third argument (although I don't quite get the specifics...
     # 2/15/2001 jhrg
-    AC_DEFINE_UNQUOTED(DINT32, $DODS_INT32, [int32])
-    AC_DEFINE_UNQUOTED(DUINT32, $DODS_UINT32, [uint32])
-    AC_DEFINE_UNQUOTED(DINT16, $DODS_INT16, [dint16])
-    AC_DEFINE_UNQUOTED(DUINT16, $DODS_UINT16, [uint16])
-    AC_DEFINE_UNQUOTED(DFLOAT64, $DODS_FLOAT64, [dfloat64])
-    AC_DEFINE_UNQUOTED(DFLOAT32, $DODS_FLOAT32, [dfloat32])
-    AC_DEFINE_UNQUOTED(DBYTE, $DODS_BYTE, [dbyte])
+    AC_DEFINE_UNQUOTED(DINT64, $DODS_INT64, [64-bit integer type])
+    AC_DEFINE_UNQUOTED(DUINT64, $DODS_UINT64, [64-bit unsigned integer type])
+    AC_DEFINE_UNQUOTED(DINT32, $DODS_INT32, [32-bit integer type])
+    AC_DEFINE_UNQUOTED(DUINT32, $DODS_UINT32, [32-bit unsigned integer type])
+    AC_DEFINE_UNQUOTED(DINT16, $DODS_INT16, [16-bit integer type])
+    AC_DEFINE_UNQUOTED(DUINT16, $DODS_UINT16, [16-bit unsigned integer type])
+    AC_DEFINE_UNQUOTED(DFLOAT64, $DODS_FLOAT64, [64-bit real type])
+    AC_DEFINE_UNQUOTED(DFLOAT32, $DODS_FLOAT32, [32-bit real type])
+    AC_DEFINE_UNQUOTED(DINT8, $DODS_INT8, [8-bit integer type])
+    AC_DEFINE_UNQUOTED(DBYTE, $DODS_BYTE, [unsigned bytes/chars])
 
     # XDR INTEGER TYPES
+    #
+    # Since DAP4 does not use XDR, there are no defines for the int8 or the
+    # 64-bit integer types used by DAP4. jhrg  6/26/12
+    #
     # Unfortunately, there is little commonality about xdr
 
     # First, we need to see if the xdr routines are in libc, librpc,
diff --git a/conf/config.guess b/conf/config.guess
index da83314..d622a44 100755
--- a/conf/config.guess
+++ b/conf/config.guess
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2009-04-27'
+timestamp='2012-02-10'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2009-04-27'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -27,16 +25,16 @@ timestamp='2009-04-27'
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per at bothner.com>.
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +54,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -144,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
@@ -170,7 +169,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
+			| grep -q __ELF__
 		then
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 		    # Return netbsd for either.  FIX?
@@ -180,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -223,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
 		;;
 	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 		;;
 	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -269,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
@@ -295,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo s390-ibm-zvmoe
 	exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
@@ -333,6 +335,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	eval $set_cc_for_build
 	SUN_ARCH="i386"
@@ -391,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
 	exit ;;
@@ -477,8 +482,8 @@ EOF
 	echo m88k-motorola-sysv3
 	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 	then
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -491,7 +496,7 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
 	exit ;;
@@ -548,7 +553,7 @@ EOF
 		echo rs6000-ibm-aix3.2
 	fi
 	exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
@@ -591,52 +596,52 @@ EOF
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -656,7 +661,7 @@ EOF
 	    # => hppa64-hp-hpux11.23
 
 	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
+		grep -q __LP64__
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -727,22 +732,22 @@ EOF
 	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
@@ -766,14 +771,14 @@ EOF
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -785,13 +790,12 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit ;;
     *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
 	    amd64)
 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	esac
 	exit ;;
     i*:CYGWIN*:*)
@@ -800,19 +804,22 @@ EOF
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
     i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
 	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit ;;
-    *:Interix*:[3456]*)
-    	case ${UNAME_MACHINE} in
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
-	    EM64T | authenticamd | genuineintel)
+	    authenticamd | genuineintel | EM64T)
 		echo x86_64-unknown-interix${UNAME_RELEASE}
 		exit ;;
 	    IA64)
@@ -822,6 +829,9 @@ EOF
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
 	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -851,6 +861,27 @@ EOF
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
     arm*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -858,20 +889,40 @@ EOF
 	then
 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
 	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     cris:Linux:*:*)
-	echo cris-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
 	exit ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -882,78 +933,34 @@ EOF
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
-    mips:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#undef CPU
-	#undef mips
-	#undef mipsel
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
+	CPU=${UNAME_MACHINE}el
 	#else
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
+	CPU=${UNAME_MACHINE}
 	#else
 	CPU=
 	#endif
 	#endif
 EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
     or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     padre:Linux:*:*)
 	echo sparc-unknown-linux-gnu
 	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -962,14 +969,17 @@ EOF
 	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
 	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -977,75 +987,18 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
@@ -1053,11 +1006,11 @@ EOF
 	echo i386-sequent-sysv4
 	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit ;;
     i*86:OS/2:*:*)
@@ -1074,7 +1027,7 @@ EOF
     i*86:syllable:*:*)
 	echo ${UNAME_MACHINE}-pc-syllable
 	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
 	echo i386-unknown-lynxos${UNAME_RELEASE}
 	exit ;;
     i*86:*DOS:*:*)
@@ -1089,7 +1042,7 @@ EOF
 	fi
 	exit ;;
     i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
@@ -1117,13 +1070,13 @@ EOF
 	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i586.
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
 	# Note: whatever this is, it MUST be the same as what config.sub
 	# prints for the "djgpp" host, or else GDB configury will decide that
 	# this is a cross-build.
 	echo i586-pc-msdosdjgpp
-        exit ;;
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit ;;
@@ -1158,8 +1111,8 @@ EOF
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
 	OS_REL='.3'
 	test -r /etc/.relid \
@@ -1182,7 +1135,7 @@ EOF
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
 	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
 	exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1202,10 +1155,10 @@ EOF
 		echo ns32k-sni-sysv
 	fi
 	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel at ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes at openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
@@ -1231,11 +1184,11 @@ EOF
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
 	exit ;;
@@ -1275,6 +1228,16 @@ EOF
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
 	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1290,6 +1253,9 @@ EOF
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
     NSE-?:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
@@ -1335,13 +1301,13 @@ EOF
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit ;;
     *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 	case "${UNAME_MACHINE}" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
@@ -1359,6 +1325,9 @@ EOF
     i*86:AROS:*:*)
 	echo ${UNAME_MACHINE}-pc-aros
 	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1381,11 +1350,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
diff --git a/conf/config.sub b/conf/config.sub
index a39437d..c894da4 100755
--- a/conf/config.sub
+++ b/conf/config.sub
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2009-04-17'
+timestamp='2012-02-10'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2009-04-17'
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -32,13 +30,16 @@ timestamp='2009-04-17'
 
 
 # Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +73,9 @@ Report bugs and patches to <config-patches at gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,13 +122,18 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -149,10 +156,13 @@ case $os in
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
+	-apple | -axis | -knuth | -cray | -microblaze)
 		os=
 		basic_machine=$1
 		;;
+	-bluegene*)
+		os=-cnk
+		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
 		basic_machine=$1
@@ -167,10 +177,10 @@ case $os in
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
@@ -239,17 +249,22 @@ case $basic_machine in
 	# Some are omitted here because they have special meanings below.
 	1750a | 580 \
 	| a29k \
+	| aarch64 | aarch64_be \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+        | be32 | be64 \
 	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
 	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
 	| maxq | mb | microblaze | mcore | mep | metag \
@@ -275,27 +290,39 @@ case $basic_machine in
 	| moxie \
 	| mt \
 	| msp430 \
+	| nds32 | nds32le | nds32be \
 	| nios | nios2 \
 	| ns16k | ns32k \
+	| open8 \
 	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
+	| rl78 | rx \
 	| score \
 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -305,6 +332,21 @@ case $basic_machine in
 		basic_machine=mt-unknown
 		;;
 
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
@@ -319,25 +361,29 @@ case $basic_machine in
 	# Recognize the basic CPU types with company name.
 	580-* \
 	| a29k-* \
+	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -359,24 +405,29 @@ case $basic_machine in
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
 	| nios-* | nios2-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| romp-* | rs6000-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
 	| tron-* \
-	| v850-* | v850e-* | vax-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-* | z80-*)
@@ -401,7 +452,7 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-    	abacus)
+	abacus)
 		basic_machine=abacus-unknown
 		;;
 	adobe68k)
@@ -467,11 +518,24 @@ case $basic_machine in
 		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
 		os=-linux
 		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
-        cegcc)
+	cegcc)
 		basic_machine=arm-unknown
 		os=-cegcc
 		;;
@@ -503,7 +567,7 @@ case $basic_machine in
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16)
+	cr16 | cr16-*)
 		basic_machine=cr16-unknown
 		os=-elf
 		;;
@@ -661,7 +725,6 @@ case $basic_machine in
 	i370-ibm* | ibm*)
 		basic_machine=i370-ibm
 		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
 	i*86v32)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv32
@@ -719,6 +782,9 @@ case $basic_machine in
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+	microblaze)
+		basic_machine=microblaze-xilinx
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
@@ -755,10 +821,18 @@ case $basic_machine in
 	ms1-*)
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
@@ -823,6 +897,12 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -905,9 +985,10 @@ case $basic_machine in
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -1001,6 +1082,9 @@ case $basic_machine in
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -1057,20 +1141,8 @@ case $basic_machine in
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
 	tile*)
-		basic_machine=tile-unknown
+		basic_machine=$basic_machine-unknown
 		os=-linux-gnu
 		;;
 	tx39)
@@ -1140,6 +1212,9 @@ case $basic_machine in
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1237,9 +1312,12 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
@@ -1260,9 +1338,9 @@ case $os in
 	# Each alternative MUST END IN A *, to match a version number.
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -kopensolaris* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
 	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1274,8 +1352,9 @@ case $os in
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1283,7 +1362,7 @@ case $os in
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1322,7 +1401,7 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
-        -os400*)
+	-os400*)
 		os=-os400
 		;;
 	-wince*)
@@ -1371,7 +1450,7 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
-        -tpf*)
+	-tpf*)
 		os=-tpf
 		;;
 	-triton*)
@@ -1416,6 +1495,8 @@ case $os in
 	-dicos*)
 		os=-dicos
 		;;
+	-nacl*)
+		;;
 	-none)
 		;;
 	*)
@@ -1438,10 +1519,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+	score-*)
 		os=-elf
 		;;
-        spu-*)
+	spu-*)
 		os=-elf
 		;;
 	*-acorn)
@@ -1453,8 +1534,17 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
 		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
@@ -1474,14 +1564,11 @@ case $basic_machine in
 		;;
 	m68000-sun)
 		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
 		;;
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
+	mep-*)
 		os=-elf
 		;;
 	mips*-cisco)
@@ -1508,7 +1595,7 @@ case $basic_machine in
 	*-ibm)
 		os=-aix
 		;;
-    	*-knuth)
+	*-knuth)
 		os=-mmixware
 		;;
 	*-wec)
@@ -1613,7 +1700,7 @@ case $basic_machine in
 			-sunos*)
 				vendor=sun
 				;;
-			-aix*)
+			-cnk*|-aix*)
 				vendor=ibm
 				;;
 			-beos*)
diff --git a/conf/depcomp b/conf/depcomp
index df8eea7..debb6ff 100755
--- a/conf/depcomp
+++ b/conf/depcomp
@@ -1,10 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-03-27.16; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999-2012 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
@@ -28,7 +27,7 @@ scriptversion=2009-04-28.21; # UTC
 
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
@@ -40,11 +39,11 @@ as side-effects.
 
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  source      Source file read by 'PROGRAMS ARGS'.
+  object      Object file output by 'PROGRAMS ARGS'.
   DEPDIR      directory where to store dependencies.
   depfile     Dependency file to output.
-  tmpdepfile  Temporary file to use when outputing dependencies.
+  tmpdepfile  Temporary file to use when outputting dependencies.
   libtool     Whether libtool is used (yes/no).
 
 Report bugs to <bug-automake at gnu.org>.
@@ -57,6 +56,12 @@ EOF
     ;;
 esac
 
+# A tabulation character.
+tab='	'
+# A newline character.
+nl='
+'
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
@@ -90,10 +95,24 @@ if test "$depmode" = msvcmsys; then
    # This is just like msvisualcpp but w/o cygpath translation.
    # Just convert the backslash-escaped backslashes to single forward
    # slashes to satisfy depend.m4
-   cygpath_u="sed s,\\\\\\\\,/,g"
+   cygpath_u='sed s,\\\\,/,g'
    depmode=msvisualcpp
 fi
 
+if test "$depmode" = msvc7msys; then
+   # This is just like msvc7 but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u='sed s,\\\\,/,g'
+   depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+   gccflag=-qmakedep=gcc,-MF
+   depmode=gcc
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -148,20 +167,21 @@ gcc)
 ## The second -e expression handles DOS-style file names with drive letters.
   sed -e 's/^[^:]*: / /' \
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
 ## The problem is that when a header file which appears in a .P file
 ## is deleted, the dependency causes make to die (because there is
 ## typically no way to rebuild the header).  We avoid this by adding
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
 ## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
+  tr ' ' "$nl" < "$tmpdepfile" |
+## Some versions of gcc put a space before the ':'.  On the theory
 ## that the space means something, we add a space to the output as
-## well.
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+      | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -193,18 +213,15 @@ sgi)
     # clever and replace this with sed code, as IRIX sed won't handle
     # lines with more than a fixed number of characters (4096 in
     # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
+    # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> "$depfile"
+    tr "$nl" ' ' >> "$depfile"
     echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
    >> "$depfile"
   else
@@ -216,10 +233,17 @@ sgi)
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
   # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # current directory.  Also, the AIX compiler puts '$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
@@ -249,12 +273,11 @@ aix)
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
+    # Each line is of the form 'foo.o: dependent.h'.
     # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
+    # '$object: dependent.h' and one to simply 'dependent.h:'.
     sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -265,23 +288,26 @@ aix)
   ;;
 
 icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+  # However on
+  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
   # ICC 7.0 will fill foo.d with something like
   #    foo.o: sub/foo.c
   #    foo.o: sub/foo.h
-  # which is wrong.  We want:
+  # which is wrong.  We want
   #    sub/foo.o: sub/foo.c
   #    sub/foo.o: sub/foo.h
   #    sub/foo.c:
   #    sub/foo.h:
   # ICC 7.1 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
+  # and will wrap long lines using '\':
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
-
+  # tcc 0.9.26 (FIXME still under development at the moment of writing)
+  # will emit a similar output, but also prepend the continuation lines
+  # with horizontal tabulation characters.
   "$@" -MD -MF "$tmpdepfile"
   stat=$?
   if test $stat -eq 0; then :
@@ -290,15 +316,21 @@ icc)
     exit $stat
   fi
   rm -f "$depfile"
-  # Each line is of the form `foo.o: dependent.h',
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Each line is of the form 'foo.o: dependent.h',
+  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
   # Do two passes, one to just change these to
-  # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
+  # '$object: dependent.h' and one to simply 'dependent.h:'.
+  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
+    < "$tmpdepfile" > "$depfile"
+  sed '
+    s/[ '"$tab"'][ '"$tab"']*/ /g
+    s/^ *//
+    s/ *\\*$//
+    s/^[^:]*: *//
+    /^$/d
+    /:$/d
+    s/$/ :/
+  ' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -334,7 +366,7 @@ hp2)
   done
   if test -f "$tmpdepfile"; then
     sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
+    # Add 'dependent.h:' lines.
     sed -ne '2,${
 	       s/^ *//
 	       s/ \\*$//
@@ -349,9 +381,9 @@ hp2)
 
 tru64)
    # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
    # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
+   # dependencies in 'foo.d' instead, so we check for that too.
    # Subdirectories are respected.
    dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
    test "x$dir" = "x$object" && dir=
@@ -397,14 +429,59 @@ tru64)
    done
    if test -f "$tmpdepfile"; then
       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
    else
       echo "#dummy" > "$depfile"
    fi
    rm -f "$tmpdepfile"
    ;;
 
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test "$stat" = 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/'"$tab"'/
+  G
+  p
+}' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 #nosideeffect)
   # This comment above is used by automake to tell side-effect
   # dependency tracking mechanisms from slower ones.
@@ -422,7 +499,7 @@ dashmstdout)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -442,15 +519,14 @@ dashmstdout)
   done
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # Require at least two characters before searching for ':'
   # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
+  tr ' ' "$nl" < "$tmpdepfile" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -503,9 +579,10 @@ makedepend)
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -525,7 +602,7 @@ cpp)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -594,8 +671,8 @@ msvisualcpp)
   sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
diff --git a/conf/install-sh b/conf/install-sh
index 6781b98..377bb86 100755
--- a/conf/install-sh
+++ b/conf/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-11-20.07; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2009-04-28.21; # UTC
 # FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
@@ -156,6 +156,10 @@ while test $# -ne 0; do
     -s) stripcmd=$stripprog;;
 
     -t) dst_arg=$2
+	# Protect names problematic for 'test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
 	shift;;
 
     -T) no_target_directory=true;;
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -194,13 +202,17 @@ if test $# -eq 0; then
     echo "$0: no input file specified." >&2
     exit 1
   fi
-  # It's OK to call `install-sh -d' without argument.
+  # It's OK to call 'install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
 fi
 
 if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
 
   # Set umask so as not to create temps with too-generous modes.
   # However, 'strip' requires both read and write access to temps.
@@ -228,9 +240,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for 'test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -252,12 +264,7 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
@@ -347,7 +354,7 @@ do
 	      if test -z "$dir_arg" || {
 		   # Check for POSIX incompatibilities with -m.
 		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writeable bit of parent directory when it shouldn't.
+		   # other-writable bit of parent directory when it shouldn't.
 		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
 		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
 		   case $ls_ld_tmpdir in
@@ -385,7 +392,7 @@ do
 
       case $dstdir in
 	/*) prefix='/';;
-	-*) prefix='./';;
+	[-=\(\)!]*) prefix='./';;
 	*)  prefix='';;
       esac
 
@@ -403,7 +410,7 @@ do
 
       for d
       do
-	test -z "$d" && continue
+	test X"$d" = X && continue
 
 	prefix=$prefix$d
 	if test -d "$prefix"; then
diff --git a/conf/libtool.m4 b/conf/libtool.m4
index d812584..44e0ecf 100644
--- a/conf/libtool.m4
+++ b/conf/libtool.m4
@@ -1,8 +1,8 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -11,8 +11,8 @@
 
 m4_define([_LT_COPYING], [dnl
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -146,6 +146,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
 
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
 _LT_DECL([], [host_alias], [0], [The host system])dnl
 _LT_DECL([], [host], [0])dnl
 _LT_DECL([], [host_os], [0])dnl
@@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING.
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
@@ -801,6 +803,7 @@ AC_DEFUN([LT_LANG],
 m4_case([$1],
   [C],			[_LT_LANG(C)],
   [C++],		[_LT_LANG(CXX)],
+  [Go],			[_LT_LANG(GO)],
   [Java],		[_LT_LANG(GCJ)],
   [Fortran 77],		[_LT_LANG(F77)],
   [Fortran],		[_LT_LANG(FC)],
@@ -822,6 +825,31 @@ m4_defun([_LT_LANG],
 ])# _LT_LANG
 
 
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC],     [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+  fi
+fi
+if test -z "$GOC"; then
+  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
 # _LT_LANG_DEFAULT_CONFIG
 # -----------------------
 m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -852,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
        m4_ifdef([LT_PROG_GCJ],
 	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+  [LT_LANG(GO)],
+  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
 AC_PROVIDE_IFELSE([LT_PROG_RC],
   [LT_LANG(RC)],
   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -954,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -962,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	rm -rf libconftest.dylib*
 	rm -f conftest.*
       fi])
+
     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
       [lt_cv_ld_exported_symbols_list],
       [lt_cv_ld_exported_symbols_list=no
@@ -973,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	[lt_cv_ld_exported_symbols_list=no])
 	LDFLAGS="$save_LDFLAGS"
     ])
+
     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
       [lt_cv_ld_force_load=no
       cat > conftest.c << _LT_EOF
@@ -990,7 +1030,9 @@ _LT_EOF
       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
       _lt_result=$?
-      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1035,8 +1077,8 @@ _LT_EOF
 ])
 
 
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
 # Checks for linker and compiler features on darwin
 m4_defun([_LT_DARWIN_LINKER_FEATURES],
 [
@@ -1047,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
   else
     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
   fi
@@ -1330,14 +1374,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*solaris*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD="${LD-ld}_sol2"
+        fi
+        ;;
       *)
 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
@@ -1414,13 +1471,13 @@ old_postuninstall_cmds=
 if test -n "$RANLIB"; then
   case $host_os in
   openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -1600,6 +1657,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -1639,7 +1701,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 	      test $i != 17 # 1/2 MB should be enough
       do
@@ -2185,7 +2247,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -2194,7 +2256,7 @@ aix3*)
   ;;
 
 aix[[4-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -2259,7 +2321,7 @@ beos*)
   ;;
 
 bsdi[[45]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
@@ -2398,7 +2460,7 @@ m4_if([$1], [],[
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -2406,10 +2468,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -2417,7 +2475,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
+    freebsd[[23]].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -2435,7 +2493,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2455,17 +2513,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -2526,7 +2585,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[[3-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -2542,7 +2601,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -2579,9 +2638,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2644,7 +2703,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
@@ -2713,7 +2772,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2738,7 +2797,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
@@ -2762,7 +2821,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
     soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
@@ -2793,7 +2852,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2803,7 +2862,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
@@ -3225,7 +3284,7 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3645,6 +3704,7 @@ for ac_symprfx in "" "_"; do
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -4229,7 +4289,9 @@ m4_if([$1], [CXX], [
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+      fi
       ;;
     esac
   else
@@ -4321,18 +4383,33 @@ m4_if([$1], [CXX], [
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	  ;;
+        *Intel*\ [[CF]]*Compiler*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	  ;;
+	*Portland\ Group*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -4492,7 +4569,9 @@ m4_if([$1], [CXX], [
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*) ;;
+    cl*)
+      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
     *)
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
@@ -4517,7 +4596,6 @@ m4_if([$1], [CXX], [
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
   _LT_TAGVAR(hardcode_libdir_separator, $1)=
   _LT_TAGVAR(hardcode_minus_L, $1)=no
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -4768,8 +4846,7 @@ _LT_EOF
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test "x$supports_anon_versioning" = xyes; then
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
@@ -5064,6 +5141,7 @@ _LT_EOF
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
 	# Don't use ranlib
 	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
@@ -5110,10 +5188,6 @@ _LT_EOF
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -5126,7 +5200,7 @@ _LT_EOF
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -5165,7 +5239,6 @@ _LT_EOF
       fi
       if test "$with_gnu_ld" = no; then
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 	_LT_TAGVAR(hardcode_direct, $1)=yes
 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
@@ -5607,9 +5680,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
     [Flag to hardcode $libdir into a binary during linking.
     This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
-    [[If ld is used when linking, flag to hardcode $libdir into a binary
-    during linking.  This must work even if $libdir does not exist]])
 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
     [Whether we need a single "-rpath" flag with a separated argument])
 _LT_TAGDECL([], [hardcode_direct], [0],
@@ -5767,7 +5837,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -6137,7 +6206,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         esac
         ;;
 
-      freebsd[[12]]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         _LT_TAGVAR(ld_shlibs, $1)=no
@@ -6898,12 +6967,18 @@ public class foo {
   }
 };
 _LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
 ])
 
 _lt_libdeps_save_CFLAGS=$CFLAGS
 case "$CC $CFLAGS " in #(
 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
 esac
 
 dnl Parse the compiler output and extract the necessary
@@ -7100,7 +7175,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7233,7 +7307,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7420,6 +7493,77 @@ CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_GCJ_CONFIG
 
 
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
 # _LT_LANG_RC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
@@ -7489,6 +7633,13 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
 
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
 # LT_PROG_RC
 # ----------
 AC_DEFUN([LT_PROG_RC],
diff --git a/conf/ltmain.sh b/conf/ltmain.sh
old mode 100755
new mode 100644
index 3061e3c..63ae69d
--- a/conf/ltmain.sh
+++ b/conf/ltmain.sh
@@ -1,9 +1,9 @@
 
-# libtool (GNU libtool) 2.4
+# libtool (GNU libtool) 2.4.2
 # Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -41,6 +41,7 @@
 #       --quiet, --silent    don't print informational messages
 #       --no-quiet, --no-silent
 #                            print informational messages (default)
+#       --no-warn            don't display warning messages
 #       --tag=TAG            use configuration variables from tag TAG
 #   -v, --verbose            print more informational messages than default
 #       --no-verbose         don't print the extra informational messages
@@ -69,7 +70,7 @@
 #         compiler:		$LTCC
 #         compiler flags:		$LTCFLAGS
 #         linker:		$LD (gnu? $with_gnu_ld)
-#         $progname:	(GNU libtool) 2.4
+#         $progname:	(GNU libtool) 2.4.2
 #         automake:	$automake_version
 #         autoconf:	$autoconf_version
 #
@@ -79,9 +80,9 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION=2.4
+VERSION=2.4.2
 TIMESTAMP=""
-package_revision=1.3293
+package_revision=1.3337
 
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -136,15 +137,10 @@ progpath="$0"
 
 : ${CP="cp -f"}
 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${EGREP="grep -E"}
-: ${FGREP="grep -F"}
-: ${GREP="grep"}
-: ${LN_S="ln -s"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="sed"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 : ${Xsed="$SED -e 1s/^X//"}
 
@@ -387,7 +383,7 @@ case $progpath in
      ;;
   *)
      save_IFS="$IFS"
-     IFS=:
+     IFS=${PATH_SEPARATOR-:}
      for progdir in $PATH; do
        IFS="$save_IFS"
        test -x "$progdir/$progname" && break
@@ -771,8 +767,8 @@ func_help ()
 	s*\$LTCFLAGS*'"$LTCFLAGS"'*
 	s*\$LD*'"$LD"'*
 	s/\$with_gnu_ld/'"$with_gnu_ld"'/
-	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
-	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+	s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
 	p
 	d
      }
@@ -1052,6 +1048,7 @@ opt_finish=false
 opt_help=false
 opt_help_all=false
 opt_silent=:
+opt_warning=:
 opt_verbose=:
 opt_silent=false
 opt_verbose=false
@@ -1120,6 +1117,10 @@ esac
 			opt_silent=false
 func_append preserve_args " $opt"
 			;;
+      --no-warning|--no-warn)
+			opt_warning=false
+func_append preserve_args " $opt"
+			;;
       --no-verbose)
 			opt_verbose=false
 func_append preserve_args " $opt"
@@ -2059,7 +2060,7 @@ func_mode_compile ()
     *.[cCFSifmso] | \
     *.ada | *.adb | *.ads | *.asm | \
     *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
       func_xform "$libobj"
       libobj=$func_xform_result
       ;;
@@ -3201,11 +3202,13 @@ func_mode_install ()
 
       # Set up the ranlib parameters.
       oldlib="$destdir/$name"
+      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+      tool_oldlib=$func_to_tool_file_result
 
       func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
 
       if test -n "$stripme" && test -n "$old_striplib"; then
-	func_show_eval "$old_striplib $oldlib" 'exit $?'
+	func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
       fi
 
       # Do each command in the postinstall commands.
@@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() {
 	  # linked before any other PIC object.  But we must not use
 	  # pic_flag when linking with -static.  The problem exists in
 	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	  *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
 	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
 	  *-*-hpux*)
 	    pic_flag_for_symtable=" $pic_flag"  ;;
@@ -3982,14 +3985,17 @@ func_exec_program_core ()
 # launches target application with the remaining arguments.
 func_exec_program ()
 {
-  for lt_wr_arg
-  do
-    case \$lt_wr_arg in
-    --lt-*) ;;
-    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
-    esac
-    shift
-  done
+  case \" \$* \" in
+  *\\ --lt-*)
+    for lt_wr_arg
+    do
+      case \$lt_wr_arg in
+      --lt-*) ;;
+      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+      esac
+      shift
+    done ;;
+  esac
   func_exec_program_core \${1+\"\$@\"}
 }
 
@@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f)
 {
 EOF
 	    func_emit_wrapper yes |
-              $SED -e 's/\([\\"]\)/\\\1/g' \
-	           -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
-
+	      $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/  fputs ("\1", f);/p
+g
+D'
             cat <<"EOF"
 }
 EOF
@@ -5643,7 +5655,8 @@ func_mode_link ()
 	continue
 	;;
 
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
 	func_append compiler_flags " $arg"
 	func_append compile_command " $arg"
 	func_append finalize_command " $arg"
@@ -6147,7 +6160,8 @@ func_mode_link ()
 	lib=
 	found=no
 	case $deplib in
-	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
 	  if test "$linkmode,$pass" = "prog,link"; then
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
@@ -6831,7 +6845,7 @@ func_mode_link ()
 	         test "$hardcode_direct_absolute" = no; then
 		add="$dir/$linklib"
 	      elif test "$hardcode_minus_L" = yes; then
-		add_dir="-L$dir"
+		add_dir="-L$absdir"
 		# Try looking first in the location we're being installed to.
 		if test -n "$inst_prefix_dir"; then
 		  case $libdir in
@@ -7316,6 +7330,7 @@ func_mode_link ()
 	  # which has an extra 1 added just for fun
 	  #
 	  case $version_type in
+	  # correct linux to gnu/linux during the next big refactor
 	  darwin|linux|osf|windows|none)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
@@ -7432,7 +7447,7 @@ func_mode_link ()
 	  versuffix="$major.$revision"
 	  ;;
 
-	linux)
+	linux) # correct to gnu/linux during the next big refactor
 	  func_arith $current - $age
 	  major=.$func_arith_result
 	  versuffix="$major.$age.$revision"
@@ -8020,6 +8035,11 @@ EOF
 
       # Test again, we may have decided not to build it any more
       if test "$build_libtool_libs" = yes; then
+	# Remove ${wl} instances when linking with ld.
+	# FIXME: should test the right _cmds variable.
+	case $archive_cmds in
+	  *\$LD\ *) wl= ;;
+        esac
 	if test "$hardcode_into_libs" = yes; then
 	  # Hardcode the library paths
 	  hardcode_libdirs=
@@ -8050,7 +8070,7 @@ EOF
 	    elif test -n "$runpath_var"; then
 	      case "$perm_rpath " in
 	      *" $libdir "*) ;;
-	      *) func_apped perm_rpath " $libdir" ;;
+	      *) func_append perm_rpath " $libdir" ;;
 	      esac
 	    fi
 	  done
@@ -8058,11 +8078,7 @@ EOF
 	  if test -n "$hardcode_libdir_separator" &&
 	     test -n "$hardcode_libdirs"; then
 	    libdir="$hardcode_libdirs"
-	    if test -n "$hardcode_libdir_flag_spec_ld"; then
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-	    else
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-	    fi
+	    eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
 	  fi
 	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
 	    # We should set the runpath_var.
@@ -9152,6 +9168,8 @@ EOF
 	    esac
 	  done
 	fi
+	func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+	tool_oldlib=$func_to_tool_file_result
 	eval cmds=\"$old_archive_cmds\"
 
 	func_len " $cmds"
@@ -9261,7 +9279,8 @@ EOF
 	      *.la)
 		func_basename "$deplib"
 		name="$func_basename_result"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		func_resolve_sysroot "$deplib"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
 		test -z "$libdir" && \
 		  func_fatal_error "\`$deplib' is not a valid libtool archive"
 		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
diff --git a/conf/ltoptions.m4 b/conf/ltoptions.m4
index 17cfd51..5d9acd8 100644
--- a/conf/ltoptions.m4
+++ b/conf/ltoptions.m4
@@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
 	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
+    [lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+	IFS="$lt_save_ifs"
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
     [pic_mode=default])
 
 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
diff --git a/conf/ltversion.m4 b/conf/ltversion.m4
index 9c7b5d4..07a8602 100644
--- a/conf/ltversion.m4
+++ b/conf/ltversion.m4
@@ -9,15 +9,15 @@
 
 # @configure_input@
 
-# serial 3293 ltversion.m4
+# serial 3337 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.4])
-m4_define([LT_PACKAGE_REVISION], [1.3293])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4'
-macro_revision='1.3293'
+[macro_version='2.4.2'
+macro_revision='1.3337'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
diff --git a/conf/missing b/conf/missing
index 28055d2..9a55648 100755
--- a/conf/missing
+++ b/conf/missing
@@ -1,10 +1,9 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-01-06.18; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -26,7 +25,7 @@ scriptversion=2009-04-28.21; # UTC
 # the same distribution terms that you use for the rest of that program.
 
 if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
+  echo 1>&2 "Try '$0 --help' for more information"
   exit 1
 fi
 
@@ -34,7 +33,7 @@ run=:
 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
-# In the cases where this matters, `missing' is being run in the
+# In the cases where this matters, 'missing' is being run in the
 # srcdir already.
 if test -f configure.ac; then
   configure_ac=configure.ac
@@ -65,7 +64,7 @@ case $1 in
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
 
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
 error status if there is no known handling for PROGRAM.
 
 Options:
@@ -74,21 +73,20 @@ Options:
   --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
+  aclocal      touch file 'aclocal.m4'
+  autoconf     touch file 'configure'
+  autoheader   touch file 'config.h.in'
   autom4te     touch the output file, or create a stub one
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
+  automake     touch all 'Makefile.in' files
+  bison        create 'y.tab.[ch]', if possible, from existing .[ch]
+  flex         create 'lex.yy.c', if possible, from existing .c
   help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
+  lex          create 'lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+  yacc         create 'y.tab.[ch]', if possible, from existing .[ch]
 
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
 
 Send bug reports to <bug-automake at gnu.org>."
     exit $?
@@ -100,8 +98,8 @@ Send bug reports to <bug-automake at gnu.org>."
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
+    echo 1>&2 "$0: Unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
     exit 1
     ;;
 
@@ -122,22 +120,13 @@ case $1 in
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
   *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
        exit 1
     elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
        # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # running '$TOOL --version' or '$TOOL --help' to check whether
        # $TOOL exists and not knowing $TOOL uses missing.
        exit 1
     fi
@@ -149,27 +138,27 @@ esac
 case $program in
   aclocal*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
+WARNING: '$1' is $msg.  You should only need it if
+         you modified 'acinclude.m4' or '${configure_ac}'.  You might want
+         to install the Automake and Perl packages.  Grab them from
          any GNU archive site."
     touch aclocal.m4
     ;;
 
   autoconf*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+WARNING: '$1' is $msg.  You should only need it if
+         you modified '${configure_ac}'.  You might want to install the
+         Autoconf and GNU m4 packages.  Grab them from any GNU
          archive site."
     touch configure
     ;;
 
   autoheader*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+WARNING: '$1' is $msg.  You should only need it if
+         you modified 'acconfig.h' or '${configure_ac}'.  You might want
+         to install the Autoconf and GNU m4 packages.  Grab them
          from any GNU archive site."
     files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
     test -z "$files" && files="config.h"
@@ -186,9 +175,9 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   automake*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
+WARNING: '$1' is $msg.  You should only need it if
+         you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
+         You might want to install the Automake and Perl packages.
          Grab them from any GNU archive site."
     find . -type f -name Makefile.am -print |
 	   sed 's/\.am$/.in/' |
@@ -197,10 +186,10 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   autom4te*)
     echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
+WARNING: '$1' is needed, but is $msg.
          You might have modified some files without having the
          proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
+         You can get '$1' as part of Autoconf from any GNU
          archive site."
 
     file=`echo "$*" | sed -n "$sed_output"`
@@ -220,13 +209,13 @@ WARNING: \`$1' is needed, but is $msg.
 
   bison*|yacc*)
     echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
+WARNING: '$1' $msg.  You should only need it if
+         you modified a '.y' file.  You may need the Bison package
          in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
+         Bison from any GNU archive site."
     rm -f y.tab.c y.tab.h
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
 	case $LASTARG in
 	*.y)
 	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -250,13 +239,13 @@ WARNING: \`$1' $msg.  You should only need it if
 
   lex*|flex*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
+WARNING: '$1' is $msg.  You should only need it if
+         you modified a '.l' file.  You may need the Flex package
          in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
+         Flex from any GNU archive site."
     rm -f lex.yy.c
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
 	case $LASTARG in
 	*.l)
 	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -273,10 +262,10 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   help2man*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
+WARNING: '$1' is $msg.  You should only need it if
 	 you modified a dependency of a manual page.  You may need the
-	 \`Help2man' package in order for those modifications to take
-	 effect.  You can get \`Help2man' from any GNU archive site."
+	 Help2man package in order for those modifications to take
+	 effect.  You can get Help2man from any GNU archive site."
 
     file=`echo "$*" | sed -n "$sed_output"`
     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@@ -291,12 +280,12 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   makeinfo*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
+WARNING: '$1' is $msg.  You should only need it if
+         you modified a '.texi' or '.texinfo' file, or any other file
          indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
+         call might also be the consequence of using a buggy 'make' (AIX,
+         DU, IRIX).  You might want to install the Texinfo package or
+         the GNU make package.  Grab either from any GNU archive site."
     # The file to touch is that specified with -o ...
     file=`echo "$*" | sed -n "$sed_output"`
     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@@ -318,49 +307,14 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar*)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-	case $firstarg in
-	*o*)
-	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-	case $firstarg in
-	*h*)
-	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
   *)
     echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
+WARNING: '$1' is needed, and is $msg.
          You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
+         proper tools for further handling them.  Check the 'README' file,
          it often tells you about the needed prerequisites for installing
          this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
+         some other package would contain this missing '$1' program."
     exit 1
     ;;
 esac
diff --git a/conf/snippet/_Noreturn.h b/conf/snippet/_Noreturn.h
new file mode 100644
index 0000000..c44ad89
--- /dev/null
+++ b/conf/snippet/_Noreturn.h
@@ -0,0 +1,10 @@
+#if !defined _Noreturn && __STDC_VERSION__ < 201112
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+      || 0x5110 <= __SUNPRO_C)
+#  define _Noreturn __attribute__ ((__noreturn__))
+# elif 1200 <= _MSC_VER
+#  define _Noreturn __declspec (noreturn)
+# else
+#  define _Noreturn
+# endif
+#endif
diff --git a/conf/arg-nonnull.h b/conf/snippet/arg-nonnull.h
similarity index 91%
rename from conf/arg-nonnull.h
rename to conf/snippet/arg-nonnull.h
index 226d1a8..3a9dd26 100644
--- a/conf/arg-nonnull.h
+++ b/conf/snippet/arg-nonnull.h
@@ -1,5 +1,5 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 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
@@ -9,7 +9,7 @@
    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.
+   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/>.  */
diff --git a/conf/c++defs.h b/conf/snippet/c++defs.h
similarity index 99%
rename from conf/c++defs.h
rename to conf/snippet/c++defs.h
index d521417..96da94b 100644
--- a/conf/c++defs.h
+++ b/conf/snippet/c++defs.h
@@ -1,5 +1,5 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   Copyright (C) 2010-2012 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
@@ -9,7 +9,7 @@
    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.
+   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/>.  */
diff --git a/conf/warn-on-use.h b/conf/snippet/warn-on-use.h
similarity index 97%
rename from conf/warn-on-use.h
rename to conf/snippet/warn-on-use.h
index fdf250e..d4cb94f 100644
--- a/conf/warn-on-use.h
+++ b/conf/snippet/warn-on-use.h
@@ -1,5 +1,5 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   Copyright (C) 2010-2012 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
@@ -9,7 +9,7 @@
    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.
+   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/>.  */
diff --git a/config.h.in b/config.h.in
index 2c466c1..3ac55a9 100644
--- a/config.h.in
+++ b/config.h.in
@@ -3,6 +3,9 @@
 #ifndef _config_h
 #define _config_h
 
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
 /* Define to the number of bits in type 'ptrdiff_t'. */
 #undef BITSIZEOF_PTRDIFF_T
 
@@ -18,12 +21,12 @@
 /* Define to the number of bits in type 'wint_t'. */
 #undef BITSIZEOF_WINT_T
 
-/* Should checksums be generated */
-#undef CHECKSUMS
-
 /* What sort of HTTP client is this? */
 #undef CNAME
 
+/* Should a function (run-time) be used to determine the byte order? */
+#undef COMPUTE_ENDIAN_AT_RUNTIME
+
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
    */
@@ -35,36 +38,48 @@
 /* Define to 1 if using `alloca.c'. */
 #undef C_ALLOCA
 
+/* Should DAP4 support be enabled? */
+#undef DAP4
+
 /* Highest DAP version implemented? */
 #undef DAP_PROTOCOL_VERSION
 
-/* dbyte */
+/* unsigned bytes/chars */
 #undef DBYTE
 
-/* dfloat32 */
+/* 32-bit real type */
 #undef DFLOAT32
 
-/* dfloat64 */
+/* 64-bit real type */
 #undef DFLOAT64
 
-/* dint16 */
+/* 16-bit integer type */
 #undef DINT16
 
-/* int32 */
+/* 32-bit integer type */
 #undef DINT32
 
+/* 64-bit integer type */
+#undef DINT64
+
+/* 8-bit integer type */
+#undef DINT8
+
 /* Set instrumentation to level 1 (see debug.h) */
 #undef DODS_DEBUG
 
 /* Set instrumentation to level 2 */
 #undef DODS_DEBUG2
 
-/* uint16 */
+/* 16-bit unsigned integer type */
 #undef DUINT16
 
-/* uint32 */
+/* 32-bit unsigned integer type */
 #undef DUINT32
 
+/* 64-bit unsigned integer type */
+#undef DUINT64
+
 /* Client name and version combined */
 #undef DVR
 
@@ -81,6 +96,9 @@
 /* Define to 1 when the gnulib module btowc should be tested. */
 #undef GNULIB_TEST_BTOWC
 
+/* Define to 1 when the gnulib module localeconv should be tested. */
+#undef GNULIB_TEST_LOCALECONV
+
 /* Define to 1 when the gnulib module malloc-posix should be tested. */
 #undef GNULIB_TEST_MALLOC_POSIX
 
@@ -90,6 +108,9 @@
 /* Define to 1 when the gnulib module mbsinit should be tested. */
 #undef GNULIB_TEST_MBSINIT
 
+/* Define to 1 when the gnulib module mbtowc should be tested. */
+#undef GNULIB_TEST_MBTOWC
+
 /* Define to 1 when the gnulib module nl_langinfo should be tested. */
 #undef GNULIB_TEST_NL_LANGINFO
 
@@ -113,6 +134,9 @@
 /* Define to 1 if you have the `btowc' function. */
 #undef HAVE_BTOWC
 
+/* Define to 1 if you have the <byteswap.h> header file. */
+#undef HAVE_BYTESWAP_H
+
 /* Define to 1 if you have the `bzero' function. */
 #undef HAVE_BZERO
 
@@ -124,9 +148,25 @@
    don't. */
 #undef HAVE_DECL_ISBLANK
 
-/* Define to 1 if you have the declaration of `iswblank', and to 0 if you
+/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you
+   don't. */
+#undef HAVE_DECL_MBRTOWC
+
+/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you
    don't. */
-#undef HAVE_DECL_ISWBLANK
+#undef HAVE_DECL_MBSINIT
+
+/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRNCASECMP
+
+/* Define to 1 if you have the declaration of `towlower', and to 0 if you
+   don't. */
+#undef HAVE_DECL_TOWLOWER
+
+/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you
+   don't. */
+#undef HAVE_DECL_WCRTOMB
 
 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
    */
@@ -156,9 +196,6 @@
 /* Define to 1 if you have the `isblank' function. */
 #undef HAVE_ISBLANK
 
-/* Define to 1 if you have the `iswblank' function. */
-#undef HAVE_ISWBLANK
-
 /* Define to 1 if you have the `iswcntrl' function. */
 #undef HAVE_ISWCNTRL
 
@@ -177,7 +214,7 @@
 /* Define to 1 if you have the `localtime_r' function. */
 #undef HAVE_LOCALTIME_R
 
-/* Define to 1 if the system has the type `long long int'. */
+/* Define to 1 if the system has the type 'long long int'. */
 #undef HAVE_LONG_LONG_INT
 
 /* Define to 1 if your system has a GNU libc compatible 'malloc' function, and
@@ -226,9 +263,6 @@
 /* Define to 1 if you have the `putenv' function. */
 #undef HAVE_PUTENV
 
-/* Define to 1 if you have the <random.h> header file. */
-#undef HAVE_RANDOM_H
-
 /* Define to 1 if atoll is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_ATOLL
 
@@ -239,15 +273,24 @@
    macros. */
 #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
 
+/* Define to 1 if chdir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CHDIR
+
 /* Define to 1 if chown is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_CHOWN
 
+/* Define to 1 if dup is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DUP
+
 /* Define to 1 if dup2 is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_DUP2
 
 /* Define to 1 if dup3 is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_DUP3
 
+/* Define to 1 if duplocale is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DUPLOCALE
+
 /* Define to 1 if endusershell is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_ENDUSERSHELL
 
@@ -266,6 +309,12 @@
 /* Define to 1 if fchownat is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FCHOWNAT
 
+/* Define to 1 if fdatasync is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FDATASYNC
+
+/* Define to 1 if ffs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FFS
+
 /* Define to 1 if fsync is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FSYNC
 
@@ -308,8 +357,20 @@
 /* Define to 1 if grantpt is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_GRANTPT
 
-/* Define to 1 if initstat_r is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_INITSTAT_R
+/* Define to 1 if group_member is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GROUP_MEMBER
+
+/* Define to 1 if initstate is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_INITSTATE
+
+/* Define to 1 if initstate_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_INITSTATE_R
+
+/* Define to 1 if isatty is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ISATTY
+
+/* Define to 1 if iswctype is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ISWCTYPE
 
 /* Define to 1 if lchown is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_LCHOWN
@@ -362,15 +423,24 @@
 /* Define to 1 if pipe2 is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_PIPE2
 
+/* Define to 1 if posix_openpt is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_OPENPT
+
 /* Define to 1 if pread is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_PREAD
 
 /* Define to 1 if ptsname is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_PTSNAME
 
+/* Define to 1 if ptsname_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PTSNAME_R
+
 /* Define to 1 if pwrite is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_PWRITE
 
+/* Define to 1 if random is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RANDOM
+
 /* Define to 1 if random_r is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_RANDOM_R
 
@@ -392,6 +462,15 @@
 /* Define to 1 if setenv is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SETENV
 
+/* Define to 1 if sethostname is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETHOSTNAME
+
+/* Define to 1 if setlocale is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETLOCALE
+
+/* Define to 1 if setstate is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETSTATE
+
 /* Define to 1 if setstate_r is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SETSTATE_R
 
@@ -401,9 +480,18 @@
 /* Define to 1 if sleep is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SLEEP
 
+/* Define to 1 if srandom is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SRANDOM
+
 /* Define to 1 if srandom_r is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SRANDOM_R
 
+/* Define to 1 if strcasecmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRCASECMP
+
+/* Define to 1 if strncasecmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRNCASECMP
+
 /* Define to 1 if strtod is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_STRTOD
 
@@ -419,6 +507,9 @@
 /* Define to 1 if symlinkat is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SYMLINKAT
 
+/* Define to 1 if towctrans is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TOWCTRANS
+
 /* Define to 1 if ttyname_r is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_TTYNAME_R
 
@@ -437,21 +528,111 @@
 /* Define to 1 if usleep is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_USLEEP
 
+/* Define to 1 if wcpcpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCPCPY
+
+/* Define to 1 if wcpncpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCPNCPY
+
 /* Define to 1 if wcrtomb is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_WCRTOMB
 
+/* Define to 1 if wcscasecmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCASECMP
+
+/* Define to 1 if wcscat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCAT
+
+/* Define to 1 if wcschr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCHR
+
+/* Define to 1 if wcscmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCMP
+
+/* Define to 1 if wcscoll is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCOLL
+
+/* Define to 1 if wcscpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCPY
+
+/* Define to 1 if wcscspn is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSCSPN
+
+/* Define to 1 if wcsdup is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSDUP
+
+/* Define to 1 if wcslen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSLEN
+
+/* Define to 1 if wcsncasecmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNCASECMP
+
+/* Define to 1 if wcsncat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNCAT
+
+/* Define to 1 if wcsncmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNCMP
+
+/* Define to 1 if wcsncpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNCPY
+
+/* Define to 1 if wcsnlen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNLEN
+
 /* Define to 1 if wcsnrtombs is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_WCSNRTOMBS
 
+/* Define to 1 if wcspbrk is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSPBRK
+
+/* Define to 1 if wcsrchr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSRCHR
+
 /* Define to 1 if wcsrtombs is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_WCSRTOMBS
 
+/* Define to 1 if wcsspn is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSSPN
+
+/* Define to 1 if wcsstr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSSTR
+
+/* Define to 1 if wcstok is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSTOK
+
+/* Define to 1 if wcswidth is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSWIDTH
+
+/* Define to 1 if wcsxfrm is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSXFRM
+
 /* Define to 1 if wctob is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_WCTOB
 
+/* Define to 1 if wctrans is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCTRANS
+
+/* Define to 1 if wctype is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCTYPE
+
 /* Define to 1 if wcwidth is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_WCWIDTH
 
+/* Define to 1 if wmemchr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMCHR
+
+/* Define to 1 if wmemcmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMCMP
+
+/* Define to 1 if wmemcpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMCPY
+
+/* Define to 1 if wmemmove is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMMOVE
+
+/* Define to 1 if wmemset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WMEMSET
+
 /* Define to 1 if _Exit is declared even after undefining macros. */
 #undef HAVE_RAW_DECL__EXIT
 
@@ -467,9 +648,6 @@
 /* Define to 1 if 'wint_t' is a signed integer type. */
 #undef HAVE_SIGNED_WINT_T
 
-/* Define to 1 if stdbool.h conforms to C99. */
-#undef HAVE_STDBOOL_H
-
 /* Define to 1 if you have the <stddef.h> header file. */
 #undef HAVE_STDDEF_H
 
@@ -479,6 +657,9 @@
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
 /* Define to 1 if you have the `strchr' function. */
 #undef HAVE_STRCHR
 
@@ -491,18 +672,24 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
 /* Define to 1 if you have the `strtol' function. */
 #undef HAVE_STRTOL
 
 /* Define to 1 if you have the `strtoul' function. */
 #undef HAVE_STRTOUL
 
-/* Define to 1 if the system has the type `struct random_data'. */
-#undef HAVE_STRUCT_RANDOM_DATA
+/* Define to 1 if `decimal_point' is a member of `struct lconv'. */
+#undef HAVE_STRUCT_LCONV_DECIMAL_POINT
 
 /* Define to 1 if `st_blksize' is a member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
+/* Define to 1 if you have the `symlink' function. */
+#undef HAVE_SYMLINK
+
 /* Define to 1 if you have the <sys/bitypes.h> header file. */
 #undef HAVE_SYS_BITYPES_H
 
@@ -535,10 +722,13 @@
 /* Define to 1 if you have the `timegm' function. */
 #undef HAVE_TIMEGM
 
+/* Define to 1 if you have the `towlower' function. */
+#undef HAVE_TOWLOWER
+
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define to 1 if the system has the type `unsigned long long int'. */
+/* Define to 1 if the system has the type 'unsigned long long int'. */
 #undef HAVE_UNSIGNED_LONG_LONG_INT
 
 /* Define to 1 if you have the <wchar.h> header file. */
@@ -565,6 +755,9 @@
 /* Define to 1 if O_NOFOLLOW works. */
 #undef HAVE_WORKING_O_NOFOLLOW
 
+/* Define to 1 if you have the <xlocale.h> header file. */
+#undef HAVE_XLOCALE_H
+
 /* Define to 1 if the system has the type `_Bool'. */
 #undef HAVE__BOOL
 
@@ -587,6 +780,9 @@
 /* Define if the mbrtowc function returns a wrong return value. */
 #undef MBRTOWC_RETVAL_BUG
 
+/* Remove this to activate assert() calls. */
+#undef NDEBUG
+
 /* Name of package */
 #undef PACKAGE
 
@@ -681,6 +877,18 @@
    'wint_t'. */
 #undef WINT_T_SUFFIX
 
+/* 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
+
 /* xdr float32 */
 #undef XDR_FLOAT32
 
@@ -703,16 +911,37 @@
    `char[]'. */
 #undef YYTEXT_POINTER
 
+/* Define to 1 on Solaris. */
+#undef _LCONV_C99
+
 /* Define to 1 if on MINIX. */
 #undef _MINIX
 
+/* The _Noreturn keyword of C11.  */
+#if ! (defined _Noreturn \
+       || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+      || 0x5110 <= __SUNPRO_C)
+#  define _Noreturn __attribute__ ((__noreturn__))
+# elif defined _MSC_VER && 1200 <= _MSC_VER
+#  define _Noreturn __declspec (noreturn)
+# else
+#  define _Noreturn
+# endif
+#endif
+
+
 /* Define to 2 if the system does not provide POSIX.1 features except with
    this defined. */
 #undef _POSIX_1_SOURCE
 
-/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* Define to 1 if you need to in order for 'stat' and other things to work. */
 #undef _POSIX_SOURCE
 
+/* Define if you want <regex.h> to include <limits.h>, so that it consistently
+   overrides <limits.h>'s RE_DUP_MAX. */
+#undef _REGEX_INCLUDE_LIMITS_H
+
 /* Define if you want regoff_t to be at least as wide POSIX requires. */
 #undef _REGEX_LARGE_OFFSETS
 
@@ -723,6 +952,10 @@
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
+/* Enable general extensions on Mac OS X.  */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
@@ -753,7 +986,7 @@
 /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
    the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
    earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
-   __APPLE__ && __MACH__ test for MacOS X.
+   __APPLE__ && __MACH__ test for Mac OS X.
    __APPLE_CC__ tests for the Apple compiler and its version.
    __STDC_VERSION__ tests for the C99 mode.  */
 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
@@ -763,6 +996,12 @@
 /* Define to a type if <wchar.h> does not define. */
 #undef mbstate_t
 
+/* Define to `int' if <sys/types.h> does not define. */
+#undef mode_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
 /* Define to rpl_re_comp if the replacement should be used. */
 #undef re_comp
 
@@ -840,6 +1079,20 @@
    is a misnomer outside of parameter lists.  */
 #define _UNUSED_PARAMETER_ _GL_UNUSED
 
+/* The __pure__ attribute was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The __const__ attribute was added in gcc 2.95.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
+
 
 /* Define to empty if the keyword `volatile' does not work. Warning: valid
    code using `volatile' can become incorrect without. Disable with care. */
diff --git a/configure b/configure
index e9e081e..4925cf5 100755
--- a/configure
+++ b/configure
@@ -1,13 +1,11 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for libdap 3.11.7.
+# Generated by GNU Autoconf 2.69 for libdap 3.12.0.
 #
 # Report bugs to <opendap-tech at opendap.org>.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -222,21 +246,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-	# neutralization value for shells without unset; and this also
-	# works around shells that cannot unset nonexistent variables.
-	# Preserve -v and -x to the replacement shell.
-	BASH_ENV=/dev/null
-	ENV=/dev/null
-	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-	export CONFIG_SHELL
-	case $- in # ((((
-	  *v*x* | *x*v* ) as_opts=-vx ;;
-	  *v* ) as_opts=-v ;;
-	  *x* ) as_opts=-x ;;
-	  * ) as_opts= ;;
-	esac
-	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -339,6 +367,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -460,6 +496,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -494,16 +534,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -515,28 +555,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -546,6 +566,66 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 SHELL=${CONFIG_SHELL-/bin/sh}
 
+as_awk_strverscmp='
+  # Use only awk features that work with 7th edition Unix awk (1978).
+  # My, what an old awk you have, Mr. Solaris!
+  END {
+    while (length(v1) && length(v2)) {
+      # Set d1 to be the next thing to compare from v1, and likewise for d2.
+      # Normally this is a single character, but if v1 and v2 contain digits,
+      # compare them as integers and fractions as strverscmp does.
+      if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
+	# Split v1 and v2 into their leading digit string components d1 and d2,
+	# and advance v1 and v2 past the leading digit strings.
+	for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
+	for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
+	d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
+	d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
+	if (d1 ~ /^0/) {
+	  if (d2 ~ /^0/) {
+	    # Compare two fractions.
+	    while (d1 ~ /^0/ && d2 ~ /^0/) {
+	      d1 = substr(d1, 2); len1--
+	      d2 = substr(d2, 2); len2--
+	    }
+	    if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
+	      # The two components differ in length, and the common prefix
+	      # contains only leading zeros.  Consider the longer to be less.
+	      d1 = -len1
+	      d2 = -len2
+	    } else {
+	      # Otherwise, compare as strings.
+	      d1 = "x" d1
+	      d2 = "x" d2
+	    }
+	  } else {
+	    # A fraction is less than an integer.
+	    exit 1
+	  }
+	} else {
+	  if (d2 ~ /^0/) {
+	    # An integer is greater than a fraction.
+	    exit 2
+	  } else {
+	    # Compare two integers.
+	    d1 += 0
+	    d2 += 0
+	  }
+	}
+      } else {
+	# The normal case, without worrying about digits.
+	d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
+	d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
+      }
+      if (d1 < d2) exit 1
+      if (d1 > d2) exit 2
+    }
+    # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
+    # which mishandles some comparisons of empty strings to integers.
+    if (length(v2)) exit 1
+    if (length(v1)) exit 2
+  }
+'
 
 test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
@@ -570,8 +650,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libdap'
 PACKAGE_TARNAME='libdap'
-PACKAGE_VERSION='3.11.7'
-PACKAGE_STRING='libdap 3.11.7'
+PACKAGE_VERSION='3.12.0'
+PACKAGE_STRING='libdap 3.12.0'
 PACKAGE_BUGREPORT='opendap-tech at opendap.org'
 PACKAGE_URL=''
 
@@ -622,6 +702,10 @@ am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+BUILD_DEVELOPER_FALSE
+BUILD_DEVELOPER_TRUE
+DAP4_DEFINED_FALSE
+DAP4_DEFINED_TRUE
 CPPUNIT_LIBS
 CPPUNIT_CFLAGS
 CPPUNIT_FALSE
@@ -629,7 +713,6 @@ CPPUNIT_TRUE
 CPPUNIT_CONFIG
 UUID_LIBS
 PTHREAD_LIBS
-XML2_STATIC_LIBS
 xmlprivatelibs
 xmlprivatereq
 XML2_LIBS
@@ -641,16 +724,23 @@ CURL_LIBS
 CURL_CFLAGS
 PKG_CONFIG
 gltests_WITNESS
+REPLACE_TOWLOWER
 REPLACE_ISWCNTRL
 HAVE_WCTYPE_H
 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
 NEXT_WCTYPE_H
+HAVE_ISWCNTRL
 REPLACE_ISWBLANK
+HAVE_WCTRANS_T
+HAVE_WCTYPE_T
 HAVE_ISWBLANK
-HAVE_ISWCNTRL
+GNULIB_TOWCTRANS
+GNULIB_WCTRANS
+GNULIB_ISWCTYPE
+GNULIB_WCTYPE
+GNULIB_ISWBLANK
 HAVE_WINT_T
 HAVE_FEATURES_H
-HAVE_WCHAR_H
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
 NEXT_WCHAR_H
 HAVE_UNISTD_H
@@ -667,17 +757,20 @@ REPLACE_SYMLINK
 REPLACE_SLEEP
 REPLACE_RMDIR
 REPLACE_READLINK
+REPLACE_READ
 REPLACE_PWRITE
 REPLACE_PREAD
 REPLACE_LSEEK
 REPLACE_LINKAT
 REPLACE_LINK
 REPLACE_LCHOWN
+REPLACE_ISATTY
 REPLACE_GETPAGESIZE
 REPLACE_GETGROUPS
 REPLACE_GETLOGIN_R
 REPLACE_GETDOMAINNAME
 REPLACE_GETCWD
+REPLACE_FTRUNCATE
 REPLACE_FCHOWNAT
 REPLACE_DUP2
 REPLACE_DUP
@@ -686,10 +779,12 @@ REPLACE_CHOWN
 HAVE_SYS_PARAM_H
 HAVE_OS_H
 HAVE_DECL_TTYNAME_R
+HAVE_DECL_SETHOSTNAME
 HAVE_DECL_GETUSERSHELL
 HAVE_DECL_GETPAGESIZE
 HAVE_DECL_GETLOGIN_R
 HAVE_DECL_GETDOMAINNAME
+HAVE_DECL_FDATASYNC
 HAVE_DECL_FCHDIR
 HAVE_DECL_ENVIRON
 HAVE_USLEEP
@@ -697,6 +792,7 @@ HAVE_UNLINKAT
 HAVE_SYMLINKAT
 HAVE_SYMLINK
 HAVE_SLEEP
+HAVE_SETHOSTNAME
 HAVE_READLINKAT
 HAVE_READLINK
 HAVE_PWRITE
@@ -706,6 +802,7 @@ HAVE_PIPE
 HAVE_LINKAT
 HAVE_LINK
 HAVE_LCHOWN
+HAVE_GROUP_MEMBER
 HAVE_GETPAGESIZE
 HAVE_GETLOGIN
 HAVE_GETHOSTNAME
@@ -713,6 +810,7 @@ HAVE_GETGROUPS
 HAVE_GETDTABLESIZE
 HAVE_FTRUNCATE
 HAVE_FSYNC
+HAVE_FDATASYNC
 HAVE_FCHOWNAT
 HAVE_FCHDIR
 HAVE_FACCESSAT
@@ -725,14 +823,16 @@ GNULIB_USLEEP
 GNULIB_UNLINKAT
 GNULIB_UNLINK
 GNULIB_UNISTD_H_SIGPIPE
-GNULIB_UNISTD_H_GETOPT
+GNULIB_UNISTD_H_NONBLOCKING
 GNULIB_TTYNAME_R
 GNULIB_SYMLINKAT
 GNULIB_SYMLINK
 GNULIB_SLEEP
+GNULIB_SETHOSTNAME
 GNULIB_RMDIR
 GNULIB_READLINKAT
 GNULIB_READLINK
+GNULIB_READ
 GNULIB_PWRITE
 GNULIB_PREAD
 GNULIB_PIPE2
@@ -741,6 +841,8 @@ GNULIB_LSEEK
 GNULIB_LINKAT
 GNULIB_LINK
 GNULIB_LCHOWN
+GNULIB_ISATTY
+GNULIB_GROUP_MEMBER
 GNULIB_GETUSERSHELL
 GNULIB_GETPAGESIZE
 GNULIB_GETLOGIN_R
@@ -752,6 +854,7 @@ GNULIB_GETDOMAINNAME
 GNULIB_GETCWD
 GNULIB_FTRUNCATE
 GNULIB_FSYNC
+GNULIB_FDATASYNC
 GNULIB_FCHOWNAT
 GNULIB_FCHDIR
 GNULIB_FACCESSAT
@@ -759,11 +862,24 @@ GNULIB_EUIDACCESS
 GNULIB_ENVIRON
 GNULIB_DUP3
 GNULIB_DUP2
+GNULIB_DUP
 GNULIB_CLOSE
 GNULIB_CHOWN
-HAVE_RANDOM_H
+GNULIB_CHDIR
+WINDOWS_64_BIT_OFF_T
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
+NEXT_SYS_TYPES_H
+HAVE_STRINGS_H
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
+NEXT_STRINGS_H
+HAVE_DECL_STRNCASECMP
+HAVE_STRCASECMP
+HAVE_FFS
+GNULIB_FFS
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
 NEXT_STDLIB_H
+GL_GENERATE_STDINT_H_FALSE
+GL_GENERATE_STDINT_H_TRUE
 STDINT_H
 WINT_T_SUFFIX
 WCHAR_T_SUFFIX
@@ -785,26 +901,28 @@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H
 NEXT_STDINT_H
 HAVE_SYS_TYPES_H
 HAVE_INTTYPES_H
+HAVE_WCHAR_H
 HAVE_UNSIGNED_LONG_LONG_INT
 HAVE_LONG_LONG_INT
-NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
-NEXT_STDDEF_H
-STDDEF_H
-HAVE_WCHAR_T
-REPLACE_NULL
 HAVE__BOOL
+GL_GENERATE_STDBOOL_H_FALSE
+GL_GENERATE_STDBOOL_H_TRUE
 STDBOOL_H
 APPLE_UNIVERSAL_BUILD
 LOCALE_FR_UTF8
 LOCALE_ZH_CN
 LOCALE_JA
+REPLACE_WCTOMB
 REPLACE_UNSETENV
 REPLACE_STRTOD
 REPLACE_SETENV
 REPLACE_REALPATH
 REPLACE_REALLOC
+REPLACE_RANDOM_R
 REPLACE_PUTENV
+REPLACE_PTSNAME_R
 REPLACE_MKSTEMP
+REPLACE_MBTOWC
 REPLACE_MALLOC
 REPLACE_CANONICALIZE_FILE_NAME
 REPLACE_CALLOC
@@ -820,7 +938,11 @@ HAVE_SETENV
 HAVE_RPMATCH
 HAVE_REALPATH
 HAVE_RANDOM_R
+HAVE_RANDOM_H
+HAVE_RANDOM
+HAVE_PTSNAME_R
 HAVE_PTSNAME
+HAVE_POSIX_OPENPT
 HAVE_MKSTEMPS
 HAVE_MKSTEMP
 HAVE_MKOSTEMPS
@@ -832,6 +954,7 @@ HAVE_DECL_GETLOADAVG
 HAVE_CANONICALIZE_FILE_NAME
 HAVE_ATOLL
 HAVE__EXIT
+GNULIB_WCTOMB
 GNULIB_UNSETENV
 GNULIB_UNLOCKPT
 GNULIB_SYSTEM_POSIX
@@ -843,13 +966,17 @@ GNULIB_RPMATCH
 GNULIB_REALPATH
 GNULIB_REALLOC_POSIX
 GNULIB_RANDOM_R
+GNULIB_RANDOM
 GNULIB_PUTENV
+GNULIB_PTSNAME_R
 GNULIB_PTSNAME
+GNULIB_POSIX_OPENPT
 GNULIB_MKSTEMPS
 GNULIB_MKSTEMP
 GNULIB_MKOSTEMPS
 GNULIB_MKOSTEMP
 GNULIB_MKDTEMP
+GNULIB_MBTOWC
 GNULIB_MALLOC_POSIX
 GNULIB_GRANTPT
 GNULIB_GETSUBOPT
@@ -858,6 +985,24 @@ GNULIB_CANONICALIZE_FILE_NAME
 GNULIB_CALLOC_POSIX
 GNULIB_ATOLL
 GNULIB__EXIT
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
+NEXT_LOCALE_H
+HAVE_XLOCALE_H
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
+NEXT_STDDEF_H
+GL_GENERATE_STDDEF_H_FALSE
+GL_GENERATE_STDDEF_H_TRUE
+STDDEF_H
+HAVE_WCHAR_T
+REPLACE_NULL
+REPLACE_STRUCT_LCONV
+REPLACE_DUPLOCALE
+REPLACE_SETLOCALE
+REPLACE_LOCALECONV
+HAVE_DUPLOCALE
+GNULIB_DUPLOCALE
+GNULIB_SETLOCALE
+GNULIB_LOCALECONV
 LOCALCHARSET_TESTS_ENVIRONMENT
 GLIBC21
 HAVE_LANGINFO_YESEXPR
@@ -878,7 +1023,11 @@ LTLIBINTL
 LIBINTL
 pkglibexecdir
 lispdir
+GL_GENERATE_BYTESWAP_H_FALSE
+GL_GENERATE_BYTESWAP_H_TRUE
+BYTESWAP_H
 LOCALE_FR
+REPLACE_WCSWIDTH
 REPLACE_WCWIDTH
 REPLACE_WCSNRTOMBS
 REPLACE_WCSRTOMBS
@@ -893,6 +1042,34 @@ REPLACE_BTOWC
 REPLACE_MBSTATE_T
 HAVE_DECL_WCWIDTH
 HAVE_DECL_WCTOB
+HAVE_WCSWIDTH
+HAVE_WCSTOK
+HAVE_WCSSTR
+HAVE_WCSPBRK
+HAVE_WCSSPN
+HAVE_WCSCSPN
+HAVE_WCSRCHR
+HAVE_WCSCHR
+HAVE_WCSDUP
+HAVE_WCSXFRM
+HAVE_WCSCOLL
+HAVE_WCSNCASECMP
+HAVE_WCSCASECMP
+HAVE_WCSNCMP
+HAVE_WCSCMP
+HAVE_WCSNCAT
+HAVE_WCSCAT
+HAVE_WCPNCPY
+HAVE_WCSNCPY
+HAVE_WCPCPY
+HAVE_WCSCPY
+HAVE_WCSNLEN
+HAVE_WCSLEN
+HAVE_WMEMSET
+HAVE_WMEMMOVE
+HAVE_WMEMCPY
+HAVE_WMEMCMP
+HAVE_WMEMCHR
 HAVE_WCSNRTOMBS
 HAVE_WCSRTOMBS
 HAVE_WCRTOMB
@@ -902,6 +1079,34 @@ HAVE_MBRLEN
 HAVE_MBRTOWC
 HAVE_MBSINIT
 HAVE_BTOWC
+GNULIB_WCSWIDTH
+GNULIB_WCSTOK
+GNULIB_WCSSTR
+GNULIB_WCSPBRK
+GNULIB_WCSSPN
+GNULIB_WCSCSPN
+GNULIB_WCSRCHR
+GNULIB_WCSCHR
+GNULIB_WCSDUP
+GNULIB_WCSXFRM
+GNULIB_WCSCOLL
+GNULIB_WCSNCASECMP
+GNULIB_WCSCASECMP
+GNULIB_WCSNCMP
+GNULIB_WCSCMP
+GNULIB_WCSNCAT
+GNULIB_WCSCAT
+GNULIB_WCPNCPY
+GNULIB_WCSNCPY
+GNULIB_WCPCPY
+GNULIB_WCSCPY
+GNULIB_WCSNLEN
+GNULIB_WCSLEN
+GNULIB_WMEMSET
+GNULIB_WMEMMOVE
+GNULIB_WMEMCPY
+GNULIB_WMEMCMP
+GNULIB_WMEMCHR
 GNULIB_WCWIDTH
 GNULIB_WCSNRTOMBS
 GNULIB_WCSRTOMBS
@@ -913,12 +1118,12 @@ GNULIB_MBRTOWC
 GNULIB_MBSINIT
 GNULIB_WCTOB
 GNULIB_BTOWC
+GL_GENERATE_ALLOCA_H_FALSE
+GL_GENERATE_ALLOCA_H_TRUE
 ALLOCA_H
 ALLOCA
 GL_COND_LIBTOOL_FALSE
 GL_COND_LIBTOOL_TRUE
-COMPILER_IS_GCC_FALSE
-COMPILER_IS_GCC_TRUE
 USE_C99_TYPES_FALSE
 USE_C99_TYPES_TRUE
 YACC
@@ -930,7 +1135,6 @@ NMEDIT
 DSYMUTIL
 MANIFEST_TOOL
 ac_ct_AR
-AR
 DLLTOOL
 OBJDUMP
 NM
@@ -944,10 +1148,14 @@ LN_S
 LEXLIB
 LEX_OUTPUT_ROOT
 LEX
+COMPILER_IS_GCC_FALSE
+COMPILER_IS_GCC_TRUE
+RANLIB
+ARFLAGS
+AR
 EGREP
 GREP
 CPP
-RANLIB
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
@@ -957,6 +1165,7 @@ CC
 am__fastdepCXX_FALSE
 am__fastdepCXX_TRUE
 CXXDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
@@ -1068,13 +1277,15 @@ enable_fast_install
 with_gnu_ld
 with_sysroot
 enable_libtool_lock
+enable_runtime_endian_check
 with_included_regex
 with_curl
 with_xml2
 with_cppunit_prefix
 with_cppunit_exec_prefix
 enable_debug
-enable_checksums
+enable_dap4
+enable_developer
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1549,8 +1760,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1636,7 +1845,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libdap 3.11.7 to adapt to many kinds of systems.
+\`configure' configures libdap 3.12.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1706,7 +1915,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libdap 3.11.7:";;
+     short | recursive ) echo "Configuration of libdap 3.12.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1714,20 +1923,28 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-runtime-endian-check
+                          Enable runtime tests for big- or little-endian byte
+                          order (default is NO)
+
   --enable-debug=ARG      Program instrumentation (1,2)
-  --enable-checksums      Enable MD5 checksums (default is NO)
+  --enable-dap4           Enable DAP4 types and responses (default is NO)
+  --enable-developer      Build a debug (-g3 -O0) version of this code and
+                          include assert() calls in the code (default is no)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pic              try to use only PIC/non-PIC objects [default=use
+  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-sysroot=DIR Search for dependent libraries within DIR
@@ -1825,10 +2042,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libdap configure 3.11.7
-generated by GNU Autoconf 2.68
+libdap configure 3.12.0
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -2143,7 +2360,7 @@ $as_echo "$ac_try_echo"; } >&5
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
 	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
+	 test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2293,7 +2510,7 @@ $as_echo "$ac_try_echo"; } >&5
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
 	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
+	 test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2440,7 +2657,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2456,7 +2674,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2482,7 +2701,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2498,7 +2718,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2532,7 +2753,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2650,8 +2872,8 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libdap $as_me 3.11.7, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+It was created by libdap $as_me 3.12.0, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2932,19 +3154,21 @@ fi
 
 as_fn_append ac_func_list " btowc"
 as_fn_append ac_header_list " langinfo.h"
+as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_func_list " symlink"
+as_fn_append ac_header_list " xlocale.h"
 as_fn_append ac_func_list " mbsinit"
 as_fn_append ac_func_list " mbrtowc"
 as_fn_append ac_func_list " nl_langinfo"
 as_fn_append ac_func_list " isblank"
 as_fn_append ac_func_list " iswctype"
 as_fn_append ac_func_list " wcscoll"
-as_fn_append ac_header_list " stdint.h"
 as_fn_append ac_header_list " wchar.h"
-as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_header_list " stdint.h"
+as_fn_append ac_header_list " strings.h"
 as_fn_append ac_header_list " features.h"
 as_fn_append ac_func_list " wcrtomb"
 as_fn_append ac_func_list " iswcntrl"
-as_fn_append ac_func_list " iswblank"
 as_fn_append ac_header_list " wctype.h"
 # Check that the precious variables saved in the cache have kept the same
 # value.
@@ -3053,7 +3277,7 @@ ac_config_headers="$ac_config_headers config.h dods-datatypes-config.h xdr-datat
 
 
 
-am__api_version='1.11'
+am__api_version='1.12'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -3092,7 +3316,7 @@ case $as_dir/ in #((
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -3150,9 +3374,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
 $as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -3163,32 +3384,40 @@ case `pwd` in
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
 esac
 
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" "$LINENO" 5
-   fi
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$*" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$*" != "X $srcdir/configure conftest.file" \
+	&& test "$*" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment" "$LINENO" 5
+     fi
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$2" = conftest.file
    )
 then
@@ -3200,6 +3429,16 @@ Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
@@ -3226,8 +3465,8 @@ if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
 if test x"${install_sh}" != xset; then
@@ -3239,10 +3478,10 @@ if test x"${install_sh}" != xset; then
   esac
 fi
 
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
+# will honor the 'STRIP' environment variable to overrule this program.
 if test "$cross_compiling" != no; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@@ -3261,7 +3500,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3301,7 +3540,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3352,7 +3591,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_prog in mkdir gmkdir; do
 	 for ac_exec_ext in '' $ac_executable_extensions; do
-	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
 	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
 	     'mkdir (GNU coreutils) '* | \
 	     'mkdir (coreutils) '* | \
@@ -3406,7 +3645,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3492,7 +3731,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libdap'
- VERSION='3.11.7'
+ VERSION='3.12.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3522,11 +3761,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
 
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
@@ -3536,7 +3775,6 @@ ac_config_commands="$ac_config_commands tests/atconfig"
 
 
 
-
 $as_echo "#define CNAME \"libdap\"" >>confdefs.h
 
 
@@ -3551,7 +3789,6 @@ _ACEOF
 
 
 
-
 PACKAGE_MAJOR_VERSION=`echo $PACKAGE_VERSION | sed 's@^\([0-9]\)*\.\([0-9]*\)\.\([0-9]*\)$@\1@'`
 PACKAGE_MINOR_VERSION=`echo $PACKAGE_VERSION | sed 's@^\([0-9]\)*\.\([0-9]*\)\.\([0-9]*\)$@\2@'`
 PACKAGE_SUBMINOR_VERSION=`echo $PACKAGE_VERSION | sed 's@^\([0-9]\)*\.\([0-9]*\)\.\([0-9]*\)$@\3@'`
@@ -3644,9 +3881,9 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 
-DAPLIB_CURRENT=15
-DAPLIB_AGE=4
-DAPLIB_REVISION=1
+DAPLIB_CURRENT=16
+DAPLIB_AGE=5
+DAPLIB_REVISION=0
 
 
 
@@ -3654,8 +3891,8 @@ DAPLIB_REVISION=1
 LIBDAP_VERSION="$DAPLIB_CURRENT:$DAPLIB_REVISION:$DAPLIB_AGE"
 
 
-CLIENTLIB_CURRENT=4
-CLIENTLIB_AGE=1
+CLIENTLIB_CURRENT=5
+CLIENTLIB_AGE=2
 CLIENTLIB_REVISION=0
 
 
@@ -3664,8 +3901,8 @@ CLIENTLIB_REVISION=0
 CLIENTLIB_VERSION="$CLIENTLIB_CURRENT:$CLIENTLIB_REVISION:$CLIENTLIB_AGE"
 
 
-SERVERLIB_CURRENT=11
-SERVERLIB_AGE=4
+SERVERLIB_CURRENT=12
+SERVERLIB_AGE=5
 SERVERLIB_REVISION=0
 
 
@@ -3692,7 +3929,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3744,7 +3981,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3788,7 +4025,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CXX="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4241,7 +4478,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
 case `$am_make -s -f confmf 2> /dev/null` in #(
 *the\ am__doit\ target*)
   am__include=include
@@ -4274,6 +4511,7 @@ fi
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
  if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
@@ -4296,8 +4534,9 @@ else
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4331,16 +4570,16 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -4349,16 +4588,16 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
 	continue
       else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -4434,7 +4673,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4474,7 +4713,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4527,7 +4766,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4568,7 +4807,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -4626,7 +4865,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4670,7 +4909,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4866,8 +5105,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4963,8 +5201,9 @@ else
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4998,16 +5237,16 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -5016,16 +5255,16 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
 	continue
       else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -5080,98 +5319,6 @@ fi
 
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -5327,7 +5474,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -5393,7 +5540,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -5441,84 +5588,322 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
  EGREP="$ac_cv_path_EGREP"
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
+$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
+if ${gl_cv_c_amsterdam_compiler+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <string.h>
+
+#ifdef __ACK__
+Amsterdam
+#endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
+  $EGREP "Amsterdam" >/dev/null 2>&1; then :
+  gl_cv_c_amsterdam_compiler=yes
 else
-  ac_cv_header_stdc=no
+  gl_cv_c_amsterdam_compiler=no
 fi
 rm -f conftest*
 
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
+$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
+  if test -z "$AR"; then
+    if test $gl_cv_c_amsterdam_compiler = yes; then
+      AR='cc -c.a'
+      if test -z "$ARFLAGS"; then
+        ARFLAGS='-o'
+      fi
+    else
+                  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
 else
-  ac_cv_header_stdc=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f conftest*
 
-fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR="ar"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+      if test -z "$ARFLAGS"; then
+        ARFLAGS='cru'
+      fi
+    fi
+  else
+    if test -z "$ARFLAGS"; then
+      ARFLAGS='cru'
+    fi
+  fi
+
+
+  if test -z "$RANLIB"; then
+    if test $gl_cv_c_amsterdam_compiler = yes; then
+      RANLIB=':'
+    else
+            if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+    fi
+  fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
 #endif
 
@@ -5634,6 +6019,8 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
 
   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
 
+  $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
 
   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
@@ -5650,9 +6037,8 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
 
 
   # Code from module alloca-opt:
-  # Code from module arg-nonnull:
   # Code from module btowc:
-  # Code from module c++defs:
+  # Code from module byteswap:
   # Code from module configmake:
   # Code from module extensions:
 
@@ -5660,26 +6046,56 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
   # Code from module include_next:
   # Code from module langinfo:
   # Code from module localcharset:
+  # Code from module locale:
+  # Code from module localeconv:
   # Code from module malloc-gnu:
   # Code from module malloc-posix:
   # Code from module mbrtowc:
   # Code from module mbsinit:
+  # Code from module mbtowc:
   # Code from module multiarch:
   # Code from module nl_langinfo:
   # Code from module regex:
+  # Code from module snippet/_Noreturn:
+  # Code from module snippet/arg-nonnull:
+  # Code from module snippet/c++defs:
+  # Code from module snippet/warn-on-use:
   # Code from module ssize_t:
   # Code from module stdbool:
   # Code from module stddef:
   # Code from module stdint:
   # Code from module stdlib:
+  # Code from module strcase:
   # Code from module streq:
+  # Code from module strings:
+  # Code from module sys_types:
   # Code from module unistd:
   # Code from module verify:
-  # Code from module warn-on-use:
   # Code from module wchar:
   # Code from module wcrtomb:
-  # Code from module wctype:
+  # Code from module wctype-h:
+
+
+if test "$CC" = "gcc"
+then
+     if true; then
+  COMPILER_IS_GCC_TRUE=
+  COMPILER_IS_GCC_FALSE='#'
+else
+  COMPILER_IS_GCC_TRUE='#'
+  COMPILER_IS_GCC_FALSE=
+fi
+
+else
+     if false; then
+  COMPILER_IS_GCC_TRUE=
+  COMPILER_IS_GCC_FALSE='#'
+else
+  COMPILER_IS_GCC_TRUE='#'
+  COMPILER_IS_GCC_FALSE=
+fi
 
+fi
 
 for ac_prog in flex lex
 do
@@ -5699,7 +6115,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_LEX="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5731,7 +6147,8 @@ a { ECHO; }
 b { REJECT; }
 c { yymore (); }
 d { yyless (1); }
-e { yyless (input () != 0); }
+e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
+    yyless ((input () != 0)); }
 f { unput (yytext[0]); }
 . { BEGIN INITIAL; }
 %%
@@ -5893,8 +6310,8 @@ esac
 
 
 
-macro_version='2.4'
-macro_revision='1.3293'
+macro_version='2.4.2'
+macro_revision='1.3337'
 
 
 
@@ -6001,7 +6418,7 @@ do
     for ac_prog in sed gsed; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+      as_fn_executable_p "$ac_path_SED" || continue
 # Check for GNU ac_path_SED and select it if it is found.
   # Check for GNU $ac_path_SED
 case `"$ac_path_SED" --version 2>&1` in
@@ -6080,7 +6497,7 @@ do
     for ac_prog in fgrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+      as_fn_executable_p "$ac_path_FGREP" || continue
 # Check for GNU ac_path_FGREP and select it if it is found.
   # Check for GNU $ac_path_FGREP
 case `"$ac_path_FGREP" --version 2>&1` in
@@ -6336,7 +6753,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6380,7 +6797,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6527,6 +6944,11 @@ else
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -6566,7 +6988,7 @@ else
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 	      test $i != 17 # 1/2 MB should be enough
       do
@@ -6788,7 +7210,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6828,7 +7250,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OBJDUMP="objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6995,7 +7417,7 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -7134,7 +7556,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7174,7 +7596,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7277,7 +7699,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7321,7 +7743,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7446,7 +7868,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7486,7 +7908,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7545,7 +7967,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7585,7 +8007,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7635,13 +8057,13 @@ old_postuninstall_cmds=
 if test -n "$RANLIB"; then
   case $host_os in
   openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -7788,6 +8210,7 @@ for ac_symprfx in "" "_"; do
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -8176,7 +8599,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*solaris*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -8187,7 +8610,20 @@ sparc*-*solaris*)
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD="${LD-ld}_sol2"
+        fi
+        ;;
       *)
 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
@@ -8220,7 +8656,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8260,7 +8696,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8340,7 +8776,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8380,7 +8816,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8432,7 +8868,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8472,7 +8908,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_NMEDIT="nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8524,7 +8960,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8564,7 +9000,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_LIPO="lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8616,7 +9052,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8656,7 +9092,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL="otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8708,7 +9144,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8748,7 +9184,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL64="otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8827,7 +9263,13 @@ else
 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&5
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&5
@@ -8838,6 +9280,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
 if ${lt_cv_ld_exported_symbols_list+:} false; then :
@@ -8870,6 +9313,7 @@ rm -f core conftest.err conftest.$ac_objext \
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
 $as_echo_n "checking for -force_load linker flag... " >&6; }
 if ${lt_cv_ld_force_load+:} false; then :
@@ -8891,7 +9335,9 @@ _LT_EOF
       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
       _lt_result=$?
-      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&5
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&5
@@ -9040,13 +9486,28 @@ fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
-else
-  pic_mode=default
-fi
-
-
-test -z "$pic_mode" && pic_mode=default
+  withval=$with_pic; lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+	IFS="$lt_save_ifs"
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
 
 
 
@@ -9118,6 +9579,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+
+
+
+
 test -z "$LN_S" && LN_S="ln -s"
 
 
@@ -9577,7 +10042,9 @@ lt_prog_compiler_static=
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       lt_prog_compiler_wl='-Xlinker '
-      lt_prog_compiler_pic='-Xcompiler -fPIC'
+      if test -n "$lt_prog_compiler_pic"; then
+        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+      fi
       ;;
     esac
   else
@@ -9668,18 +10135,33 @@ lt_prog_compiler_static=
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  lt_prog_compiler_pic='-KPIC'
 	  lt_prog_compiler_static='-Bstatic'
 	  lt_prog_compiler_wl=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  lt_prog_compiler_pic='-KPIC'
 	  lt_prog_compiler_static='-Bstatic'
 	  lt_prog_compiler_wl='-Wl,'
 	  ;;
+        *Intel*\ [CF]*Compiler*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fPIC'
+	  lt_prog_compiler_static='-static'
+	  ;;
+	*Portland\ Group*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fpic'
+	  lt_prog_compiler_static='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -10041,7 +10523,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   hardcode_direct=no
   hardcode_direct_absolute=no
   hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
   hardcode_libdir_separator=
   hardcode_minus_L=no
   hardcode_shlibpath_var=unsupported
@@ -10291,8 +10772,7 @@ _LT_EOF
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-	  hardcode_libdir_flag_spec=
-	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+	  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test "x$supports_anon_versioning" = xyes; then
 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
@@ -10671,6 +11151,7 @@ fi
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
 	enable_shared_with_static_runtimes=yes
+	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 	# Don't use ranlib
 	old_postinstall_cmds='chmod 644 $oldlib'
@@ -10716,6 +11197,7 @@ fi
   hardcode_shlibpath_var=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
   else
     whole_archive_flag_spec=''
   fi
@@ -10744,10 +11226,6 @@ fi
       hardcode_shlibpath_var=no
       ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -10760,7 +11238,7 @@ fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -10799,7 +11277,6 @@ fi
       fi
       if test "$with_gnu_ld" = no; then
 	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_flag_spec_ld='+b $libdir'
 	hardcode_libdir_separator=:
 	hardcode_direct=yes
 	hardcode_direct_absolute=yes
@@ -11423,11 +11900,6 @@ esac
 
 
 
-
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -11517,7 +11989,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -11526,7 +11998,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -11591,7 +12063,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
@@ -11730,7 +12202,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -11738,10 +12210,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -11749,7 +12217,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -11767,7 +12235,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -11787,17 +12255,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -11858,7 +12327,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -11874,7 +12343,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -11911,9 +12380,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -11995,7 +12464,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
@@ -12064,7 +12533,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -12089,7 +12558,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
@@ -12113,7 +12582,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
     soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
@@ -12144,7 +12613,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -12154,7 +12623,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
@@ -13079,7 +13548,6 @@ export_dynamic_flag_spec_CXX=
 hardcode_direct_CXX=no
 hardcode_direct_absolute_CXX=no
 hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
 hardcode_libdir_separator_CXX=
 hardcode_minus_L_CXX=no
 hardcode_shlibpath_var_CXX=unsupported
@@ -13663,6 +14131,7 @@ fi
   hardcode_shlibpath_var_CXX=unsupported
   if test "$lt_cv_ld_force_load" = "yes"; then
     whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
   else
     whole_archive_flag_spec_CXX=''
   fi
@@ -13707,7 +14176,7 @@ fi
         esac
         ;;
 
-      freebsd[12]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         ld_shlibs_CXX=no
@@ -14383,6 +14852,7 @@ _lt_libdeps_save_CFLAGS=$CFLAGS
 case "$CC $CFLAGS " in #(
 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
 esac
 
 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -15172,7 +15642,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*) ;;
+    cl*)
+      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
     *)
       export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
       exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
@@ -15325,8 +15797,6 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -15352,7 +15822,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -15361,7 +15831,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -15426,7 +15896,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
@@ -15563,7 +16033,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -15571,10 +16041,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -15582,7 +16048,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -15600,7 +16066,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -15620,17 +16086,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
@@ -15691,7 +16158,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -15707,7 +16174,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -15744,9 +16211,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15828,7 +16295,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
@@ -15897,7 +16364,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15922,7 +16389,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
@@ -15946,7 +16413,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
     soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
@@ -15977,7 +16444,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15987,7 +16454,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
@@ -16126,6 +16593,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+
         ac_config_commands="$ac_config_commands libtool"
 
 
@@ -16151,7 +16620,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_YACC="bison"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -16484,6 +16953,7 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
 
 fi
 
+
 for ac_header in fcntl.h malloc.h memory.h netinet/in.h stddef.h stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -16509,11 +16979,11 @@ else
 int
 main ()
 {
-/* FIXME: Include the comments suggested by Paul. */
+
 #ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
+  /* Ultrix mips cc rejects this sort of thing.  */
   typedef int charset[2];
-  const charset cs;
+  const charset cs = { 0, 0 };
   /* SunOS 4.1.1 cc rejects this.  */
   char const *const *pcpcc;
   char **ppc;
@@ -16530,8 +17000,9 @@ main ()
   ++pcpcc;
   ppc = (char**) pcpcc;
   pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
     char const *s = 0 ? (char *) 0 : (char const *) 0;
 
     *t++ = 0;
@@ -16547,10 +17018,10 @@ main ()
     iptr p = 0;
     ++p;
   }
-  { /* AIX XL C 1.02.0.0 rejects this saying
+  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
   }
   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
     const int foo = 10;
@@ -16745,6 +17216,231 @@ $as_echo "#define volatile /**/" >>confdefs.h
 
 fi
 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+	       not a universal capable compiler
+	     #endif
+	     typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+	# Check for potential -arch flags.  It is not universal unless
+	# there are at least two -arch flags with different values.
+	ac_arch=
+	ac_prev=
+	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+	 if test -n "$ac_prev"; then
+	   case $ac_word in
+	     i?86 | x86_64 | ppc | ppc64)
+	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+		 ac_arch=$ac_word
+	       else
+		 ac_cv_c_bigendian=universal
+		 break
+	       fi
+	       ;;
+	   esac
+	   ac_prev=
+	 elif test "x$ac_word" = "x-arch"; then
+	   ac_prev=arch
+	 fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+	     #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+		     && LITTLE_ENDIAN)
+	      bogus endian macros
+	     #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+		#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+		 not big endian
+		#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+	      bogus endian macros
+	     #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+		 not big endian
+		#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+		short int ascii_ii[] =
+		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+		int use_ascii (int i) {
+		  return ascii_mm[i] + ascii_ii[i];
+		}
+		short int ebcdic_ii[] =
+		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+		short int ebcdic_mm[] =
+		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+		int use_ebcdic (int i) {
+		  return ebcdic_mm[i] + ebcdic_ii[i];
+		}
+		extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+	      ac_cv_c_bigendian=yes
+	    fi
+	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+	      if test "$ac_cv_c_bigendian" = unknown; then
+		ac_cv_c_bigendian=no
+	      else
+		# finding both strings is unlikely to happen, but who knows?
+		ac_cv_c_bigendian=unknown
+	      fi
+	    fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+	     /* Are we little or big endian?  From Harbison&Steele.  */
+	     union
+	     {
+	       long int l;
+	       char c[sizeof (long int)];
+	     } u;
+	     u.l = 1;
+	     return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_bigendian=no
+else
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
     # Ignore the errors about AC_TRY_RUN missing an argument. jhrg 5/2/95
 
 
@@ -17120,16 +17816,22 @@ fi
 
     # DMH: Divide into two sets of tests: one for DODS and one for XDR
     if test x"$dap_use_c99_types" = 'xyes'; then
+        DODS_INT64=int64_t
+        DODS_UINT64=uint64_t
         DODS_INT32=int32_t
         DODS_UINT32=uint32_t
         DODS_INT16=int16_t
         DODS_UINT16=uint16_t
+        DODS_INT8=int8_t
         DODS_BYTE=uint8_t
     else
+        DODS_INT64="long long"
+        DODS_UINT64="unsigned long long"
         DODS_INT16=short
         DODS_UINT16="unsigned short"
 	DODS_INT32=int
 	DODS_UINT32="unsigned int"
+	DODS_INT8=char
 	DODS_BYTE="unsigned char"
     fi
     DODS_FLOAT64=double
@@ -17140,6 +17842,16 @@ fi
     # 2/15/2001 jhrg
 
 cat >>confdefs.h <<_ACEOF
+#define DINT64 $DODS_INT64
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define DUINT64 $DODS_UINT64
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
 #define DINT32 $DODS_INT32
 _ACEOF
 
@@ -17170,11 +17882,20 @@ _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
+#define DINT8 $DODS_INT8
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
 #define DBYTE $DODS_BYTE
 _ACEOF
 
 
     # XDR INTEGER TYPES
+    #
+    # Since DAP4 does not use XDR, there are no defines for the int8 or the
+    # 64-bit integer types used by DAP4. jhrg  6/26/12
+    #
     # Unfortunately, there is little commonality about xdr
 
     # First, we need to see if the xdr routines are in libc, librpc,
@@ -17535,35 +18256,21 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-if test "$CC" = "gcc"
-then
-     if true; then
-  COMPILER_IS_GCC_TRUE=
-  COMPILER_IS_GCC_FALSE='#'
-else
-  COMPILER_IS_GCC_TRUE='#'
-  COMPILER_IS_GCC_FALSE=
+# Check whether --enable-runtime-endian-check was given.
+if test "${enable_runtime_endian_check+set}" = set; then :
+  enableval=$enable_runtime_endian_check;
 fi
 
-else
-     if false; then
-  COMPILER_IS_GCC_TRUE=
-  COMPILER_IS_GCC_FALSE='#'
-else
-  COMPILER_IS_GCC_TRUE='#'
-  COMPILER_IS_GCC_FALSE=
-fi
 
-fi
+if test "x$enable_runtime_endian_check" = "xyes"; then :
+
+
+$as_echo "#define COMPUTE_ENDIAN_AT_RUNTIME 1" >>confdefs.h
 
-# Checks for library functions.
 
-# These, at least some of them, cannot be used along with gnulib without
-# breaking stuff. Since we are not bothering to handle the cases where these
-# functions break, there's not much point in testing for them. However, it
-# might be a good thing to use the gnulib versions since those fix various
-# common problems found in many distributions.
+fi
 
+# Checks for library functions.
 
 for ac_func in alarm atexit bzero dup2 getcwd getpagesize localtime_r memmove memset pow putenv setenv strchr strerror strtol strtoul timegm mktime
 do :
@@ -17586,6 +18293,7 @@ done
 
 
 
+
           LIBC_FATAL_STDERR_=1
   export LIBC_FATAL_STDERR_
 
@@ -17744,23 +18452,20 @@ else
 /* end confdefs.h.  */
 $ac_includes_default
 int
-find_stack_direction ()
+find_stack_direction (int *addr, int depth)
 {
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
-    }
-  else
-    return (&dummy > addr) ? 1 : -1;
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
 }
 
 int
-main ()
+main (int argc, char **argv)
 {
-  return find_stack_direction () < 0;
+  return find_stack_direction (0, argc + !argv + 20) < 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
@@ -17794,6 +18499,34 @@ fi
   GNULIB_WCSRTOMBS=0;
   GNULIB_WCSNRTOMBS=0;
   GNULIB_WCWIDTH=0;
+  GNULIB_WMEMCHR=0;
+  GNULIB_WMEMCMP=0;
+  GNULIB_WMEMCPY=0;
+  GNULIB_WMEMMOVE=0;
+  GNULIB_WMEMSET=0;
+  GNULIB_WCSLEN=0;
+  GNULIB_WCSNLEN=0;
+  GNULIB_WCSCPY=0;
+  GNULIB_WCPCPY=0;
+  GNULIB_WCSNCPY=0;
+  GNULIB_WCPNCPY=0;
+  GNULIB_WCSCAT=0;
+  GNULIB_WCSNCAT=0;
+  GNULIB_WCSCMP=0;
+  GNULIB_WCSNCMP=0;
+  GNULIB_WCSCASECMP=0;
+  GNULIB_WCSNCASECMP=0;
+  GNULIB_WCSCOLL=0;
+  GNULIB_WCSXFRM=0;
+  GNULIB_WCSDUP=0;
+  GNULIB_WCSCHR=0;
+  GNULIB_WCSRCHR=0;
+  GNULIB_WCSCSPN=0;
+  GNULIB_WCSSPN=0;
+  GNULIB_WCSPBRK=0;
+  GNULIB_WCSSTR=0;
+  GNULIB_WCSTOK=0;
+  GNULIB_WCSWIDTH=0;
     HAVE_BTOWC=1;
   HAVE_MBSINIT=1;
   HAVE_MBRTOWC=1;
@@ -17803,6 +18536,34 @@ fi
   HAVE_WCRTOMB=1;
   HAVE_WCSRTOMBS=1;
   HAVE_WCSNRTOMBS=1;
+  HAVE_WMEMCHR=1;
+  HAVE_WMEMCMP=1;
+  HAVE_WMEMCPY=1;
+  HAVE_WMEMMOVE=1;
+  HAVE_WMEMSET=1;
+  HAVE_WCSLEN=1;
+  HAVE_WCSNLEN=1;
+  HAVE_WCSCPY=1;
+  HAVE_WCPCPY=1;
+  HAVE_WCSNCPY=1;
+  HAVE_WCPNCPY=1;
+  HAVE_WCSCAT=1;
+  HAVE_WCSNCAT=1;
+  HAVE_WCSCMP=1;
+  HAVE_WCSNCMP=1;
+  HAVE_WCSCASECMP=1;
+  HAVE_WCSNCASECMP=1;
+  HAVE_WCSCOLL=1;
+  HAVE_WCSXFRM=1;
+  HAVE_WCSDUP=1;
+  HAVE_WCSCHR=1;
+  HAVE_WCSRCHR=1;
+  HAVE_WCSCSPN=1;
+  HAVE_WCSSPN=1;
+  HAVE_WCSPBRK=1;
+  HAVE_WCSSTR=1;
+  HAVE_WCSTOK=1;
+  HAVE_WCSWIDTH=1;
   HAVE_DECL_WCTOB=1;
   HAVE_DECL_WCWIDTH=1;
   REPLACE_MBSTATE_T=0;
@@ -17817,6 +18578,7 @@ fi
   REPLACE_WCSRTOMBS=0;
   REPLACE_WCSNRTOMBS=0;
   REPLACE_WCWIDTH=0;
+  REPLACE_WCSWIDTH=0;
 
 
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
@@ -17966,9 +18728,19 @@ struct tm t;
 char buf[16];
 int main () {
   /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
   if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -17994,10 +18766,12 @@ int main () {
      one byte long. This excludes the UTF-8 encoding.  */
   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
   /* Check whether the decimal separator is a comma.
      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
      are nl_langinfo(RADIXCHAR) are both ".".  */
   if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
   return 0;
 }
 
@@ -18007,37 +18781,56 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-      # configure script would override the LC_ALL setting. Likewise for
-      # LC_CTYPE, which is also set at the beginning of the configure script.
-      # Test for the usual locale name.
-      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-        gt_cv_locale_fr=fr_FR
-      else
-        # Test for the locale name with explicit encoding suffix.
-        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_fr=fr_FR.ISO-8859-1
-        else
-          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR.ISO8859-1
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Windows locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
           else
-            # Test for the HP-UX locale name.
-            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.iso88591
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
             else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
               else
-                # None found.
-                gt_cv_locale_fr=none
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
               fi
             fi
           fi
-        fi
-      fi
+          ;;
+      esac
     fi
     rm -fr conftest*
 
@@ -18187,6 +18980,13 @@ done
 
 
 
+
+
+
+
+
+
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
 $as_echo_n "checking for working fcntl.h... " >&6; }
 if ${gl_cv_header_working_fcntl_h+:} false; then :
@@ -18199,7 +18999,13 @@ else
 /* end confdefs.h.  */
 #include <sys/types.h>
            #include <sys/stat.h>
-           #include <unistd.h>
+           #if HAVE_UNISTD_H
+           # include <unistd.h>
+           #else /* on Windows with MSVC */
+           # include <io.h>
+           # include <stdlib.h>
+           # defined sleep(n) _sleep ((n) * 1000)
+           #endif
            #include <fcntl.h>
            #ifndef O_NOATIME
             #define O_NOATIME 0
@@ -18218,6 +19024,7 @@ main ()
 {
 
             int result = !constants;
+            #if HAVE_SYMLINK
             {
               static char const sym[] = "conftest.sym";
               if (symlink (".", sym) != 0)
@@ -18233,6 +19040,7 @@ main ()
                 }
               unlink (sym);
             }
+            #endif
             {
               static char const file[] = "confdefs.h";
               int fd = open (file, O_RDONLY | O_NOATIME);
@@ -18358,21 +19166,192 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; }
 
 
 
-  GNULIB__EXIT=0;
-  GNULIB_ATOLL=0;
-  GNULIB_CALLOC_POSIX=0;
-  GNULIB_CANONICALIZE_FILE_NAME=0;
-  GNULIB_GETLOADAVG=0;
-  GNULIB_GETSUBOPT=0;
-  GNULIB_GRANTPT=0;
-  GNULIB_MALLOC_POSIX=0;
-  GNULIB_MKDTEMP=0;
-  GNULIB_MKOSTEMP=0;
-  GNULIB_MKOSTEMPS=0;
+  GNULIB_LOCALECONV=0;
+  GNULIB_SETLOCALE=0;
+  GNULIB_DUPLOCALE=0;
+    HAVE_DUPLOCALE=1;
+  REPLACE_LOCALECONV=0;
+  REPLACE_SETLOCALE=0;
+  REPLACE_DUPLOCALE=0;
+  REPLACE_STRUCT_LCONV=0;
+
+
+    REPLACE_NULL=0;
+  HAVE_WCHAR_T=1;
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if ${gt_cv_c_wchar_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+            wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wchar_t=yes
+else
+  gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+  if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
+
+  fi
+
+
+
+
+  STDDEF_H=
+  if test $gt_cv_c_wchar_t = no; then
+    HAVE_WCHAR_T=0
+    STDDEF_H=stddef.h
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if ${gl_cv_decl_null_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+      int test[2 * (sizeof NULL == sizeof (void *)) -1];
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_decl_null_works=yes
+else
+  gl_cv_decl_null_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+$as_echo "$gl_cv_decl_null_works" >&6; }
+  if test $gl_cv_decl_null_works = no; then
+    REPLACE_NULL=1
+    STDDEF_H=stddef.h
+  fi
+
+   if test -n "$STDDEF_H"; then
+  GL_GENERATE_STDDEF_H_TRUE=
+  GL_GENERATE_STDDEF_H_FALSE='#'
+else
+  GL_GENERATE_STDDEF_H_TRUE='#'
+  GL_GENERATE_STDDEF_H_FALSE=
+fi
+
+  if test -n "$STDDEF_H"; then
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stddef_h='<'stddef.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
+if ${gl_cv_next_stddef_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'stddef.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+$as_echo "$gl_cv_next_stddef_h" >&6; }
+     fi
+     NEXT_STDDEF_H=$gl_cv_next_stddef_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stddef.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stddef_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
+
+
+
+
+  fi
+
+
+
+
+  GNULIB__EXIT=0;
+  GNULIB_ATOLL=0;
+  GNULIB_CALLOC_POSIX=0;
+  GNULIB_CANONICALIZE_FILE_NAME=0;
+  GNULIB_GETLOADAVG=0;
+  GNULIB_GETSUBOPT=0;
+  GNULIB_GRANTPT=0;
+  GNULIB_MALLOC_POSIX=0;
+  GNULIB_MBTOWC=0;
+  GNULIB_MKDTEMP=0;
+  GNULIB_MKOSTEMP=0;
+  GNULIB_MKOSTEMPS=0;
   GNULIB_MKSTEMP=0;
   GNULIB_MKSTEMPS=0;
+  GNULIB_POSIX_OPENPT=0;
   GNULIB_PTSNAME=0;
+  GNULIB_PTSNAME_R=0;
   GNULIB_PUTENV=0;
+  GNULIB_RANDOM=0;
   GNULIB_RANDOM_R=0;
   GNULIB_REALLOC_POSIX=0;
   GNULIB_REALPATH=0;
@@ -18384,6 +19363,7 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; }
   GNULIB_SYSTEM_POSIX=0;
   GNULIB_UNLOCKPT=0;
   GNULIB_UNSETENV=0;
+  GNULIB_WCTOMB=0;
     HAVE__EXIT=1;
   HAVE_ATOLL=1;
   HAVE_CANONICALIZE_FILE_NAME=1;
@@ -18395,7 +19375,11 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; }
   HAVE_MKOSTEMPS=1;
   HAVE_MKSTEMP=1;
   HAVE_MKSTEMPS=1;
+  HAVE_POSIX_OPENPT=1;
   HAVE_PTSNAME=1;
+  HAVE_PTSNAME_R=1;
+  HAVE_RANDOM=1;
+  HAVE_RANDOM_H=1;
   HAVE_RANDOM_R=1;
   HAVE_REALPATH=1;
   HAVE_RPMATCH=1;
@@ -18411,13 +19395,17 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; }
   REPLACE_CALLOC=0;
   REPLACE_CANONICALIZE_FILE_NAME=0;
   REPLACE_MALLOC=0;
+  REPLACE_MBTOWC=0;
   REPLACE_MKSTEMP=0;
+  REPLACE_PTSNAME_R=0;
   REPLACE_PUTENV=0;
+  REPLACE_RANDOM_R=0;
   REPLACE_REALLOC=0;
   REPLACE_REALPATH=0;
   REPLACE_SETENV=0;
   REPLACE_STRTOD=0;
   REPLACE_UNSETENV=0;
+  REPLACE_WCTOMB=0;
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
@@ -18525,9 +19513,19 @@ int main ()
 {
   const char *p;
   /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
   if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -18568,42 +19566,58 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-      # configure script would override the LC_ALL setting. Likewise for
-      # LC_CTYPE, which is also set at the beginning of the configure script.
-      # Test for the AIX locale name.
-      if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-        gt_cv_locale_ja=ja_JP
-      else
-        # Test for the locale name with explicit encoding suffix.
-        if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_ja=ja_JP.EUC-JP
-        else
-          # Test for the HP-UX, OSF/1, NetBSD locale name.
-          if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_ja=ja_JP.eucJP
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Note that on native Windows, the Japanese locale is
+          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+          # cannot use it here.
+          gt_cv_locale_ja=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the AIX locale name.
+          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP
           else
-            # Test for the IRIX, FreeBSD locale name.
-            if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_ja=ja_JP.EUC
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC-JP
             else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_ja=ja
+              # Test for the HP-UX, OSF/1, NetBSD locale name.
+              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja_JP.eucJP
               else
-                # Special test for NetBSD 1.6.
-                if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
-                  gt_cv_locale_ja=ja_JP.eucJP
+                # Test for the IRIX, FreeBSD locale name.
+                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_ja=ja_JP.EUC
                 else
-                  # None found.
-                  gt_cv_locale_ja=none
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_ja=ja
+                  else
+                    # Special test for NetBSD 1.6.
+                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                      gt_cv_locale_ja=ja_JP.eucJP
+                    else
+                      # None found.
+                      gt_cv_locale_ja=none
+                    fi
+                  fi
                 fi
               fi
             fi
           fi
-        fi
-      fi
+          ;;
+      esac
     fi
     rm -fr conftest*
 
@@ -18639,9 +19653,19 @@ int main ()
 {
   const char *p;
   /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
   if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -18682,22 +19706,47 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-      # configure script would override the LC_ALL setting. Likewise for
-      # LC_CTYPE, which is also set at the beginning of the configure script.
-      # Test for the locale name without encoding suffix.
-      if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-        gt_cv_locale_zh_CN=zh_CN
-      else
-        # Test for the locale name with explicit encoding suffix.
-        if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_zh_CN=zh_CN.GB18030
-        else
-          # None found.
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Windows locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        solaris2.8)
+          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
           gt_cv_locale_zh_CN=none
-        fi
-      fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
     else
       # If there was a link error, due to mblen(), the system is so old that
       # it certainly doesn't have a chinese locale.
@@ -18737,9 +19786,19 @@ int main () {
      variables, and all locales use the UTF-8 encoding.  */
 #if !(defined __BEOS__ || defined __HAIKU__)
   /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
   if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -18765,10 +19824,12 @@ int main () {
       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
     return 1;
 #endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
   /* Check whether the decimal separator is a comma.
      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
      are nl_langinfo(RADIXCHAR) are both ".".  */
   if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
   return 0;
 }
 
@@ -18778,27 +19839,46 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-      # configure script would override the LC_ALL setting. Likewise for
-      # LC_CTYPE, which is also set at the beginning of the configure script.
-      # Test for the usual locale name.
-      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-        gt_cv_locale_fr_utf8=fr_FR
-      else
-        # Test for the locale name with explicit encoding suffix.
-        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_fr_utf8=fr_FR.UTF-8
-        else
-          # Test for the Solaris 7 locale name.
-          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr.UTF-8
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Windows locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
           else
             # None found.
             gt_cv_locale_fr_utf8=none
           fi
-        fi
-      fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
     fi
     rm -fr conftest*
 
@@ -18990,56 +20070,16 @@ _ACEOF
 
 fi
 
-   if test $ac_cv_header_stdbool_h = yes; then
-
-$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
-
-   fi
-
-    REPLACE_NULL=0;
-  HAVE_WCHAR_T=1;
-  STDDEF_H='';
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
-$as_echo_n "checking for wchar_t... " >&6; }
-if ${gt_cv_c_wchar_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-            wchar_t foo = (wchar_t)'\0';
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gt_cv_c_wchar_t=yes
-else
-  gt_cv_c_wchar_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
-$as_echo "$gt_cv_c_wchar_t" >&6; }
-  if test $gt_cv_c_wchar_t = yes; then
-
-$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
-
-  fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-$as_echo_n "checking for long long int... " >&6; }
-if ${ac_cv_type_long_long_int+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
   /* For now, do not test the preprocessor; as of 2007 there are too many
@@ -19072,277 +20112,125 @@ main ()
 
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-                          if test "$cross_compiling" = yes; then :
-  ac_cv_type_long_long_int=yes
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
-               #ifndef LLONG_MAX
-               # define HALF \
-                        (1LL << (sizeof (long long int) * CHAR_BIT - 2))
-               # define LLONG_MAX (HALF - 1 + HALF)
-               #endif
-int
-main ()
-{
-long long int n = 1;
-               int i;
-               for (i = 0; ; i++)
-                 {
-                   long long int m = n << i;
-                   if (m >> i != n)
-                     return 1;
-                   if (LLONG_MAX / 2 < m)
-                     break;
-                 }
-               return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_type_long_long_int=yes
+
 else
-  ac_cv_type_long_long_int=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-else
-  ac_cv_type_long_long_int=no
+  ac_cv_type_unsigned_long_long_int=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+     fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
-$as_echo "$ac_cv_type_long_long_int" >&6; }
-  if test $ac_cv_type_long_long_int = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
 
-$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
 
   fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if ${ac_cv_type_unsigned_long_long_int+:} false; then :
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if ${ac_cv_type_long_long_int+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+  ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+                                        if test "$cross_compiling" = yes; then :
+  :
+else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-  /* For now, do not test the preprocessor; as of 2007 there are too many
-         implementations with broken preprocessors.  Perhaps this can
-         be revisited in 2012.  In the meantime, code should not expect
-         #if to work with literals wider than 32 bits.  */
-      /* Test literals.  */
-      long long int ll = 9223372036854775807ll;
-      long long int nll = -9223372036854775807LL;
-      unsigned long long int ull = 18446744073709551615ULL;
-      /* Test constant expressions.   */
-      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
-                     ? 1 : -1)];
-      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
-                     ? 1 : -1)];
-      int i = 63;
+#include <limits.h>
+                 #ifndef LLONG_MAX
+                 # define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 # define LLONG_MAX (HALF - 1 + HALF)
+                 #endif
 int
 main ()
 {
-/* Test availability of runtime routines for shift and division.  */
-      long long int llmax = 9223372036854775807ll;
-      unsigned long long int ullmax = 18446744073709551615ull;
-      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
-              | (llmax / ll) | (llmax % ll)
-              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
-              | (ullmax / ull) | (ullmax % ull));
+long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_type_unsigned_long_long_int=yes
+if ac_fn_c_try_run "$LINENO"; then :
+
 else
-  ac_cv_type_unsigned_long_long_int=no
+  ac_cv_type_long_long_int=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
 
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+        fi
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+  if test $ac_cv_type_long_long_int = yes; then
 
-  fi
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
 
+  fi
 
 
 
 
 
-  GNULIB_CHOWN=0;
-  GNULIB_CLOSE=0;
-  GNULIB_DUP2=0;
-  GNULIB_DUP3=0;
-  GNULIB_ENVIRON=0;
-  GNULIB_EUIDACCESS=0;
-  GNULIB_FACCESSAT=0;
-  GNULIB_FCHDIR=0;
-  GNULIB_FCHOWNAT=0;
-  GNULIB_FSYNC=0;
-  GNULIB_FTRUNCATE=0;
-  GNULIB_GETCWD=0;
-  GNULIB_GETDOMAINNAME=0;
-  GNULIB_GETDTABLESIZE=0;
-  GNULIB_GETGROUPS=0;
-  GNULIB_GETHOSTNAME=0;
-  GNULIB_GETLOGIN=0;
-  GNULIB_GETLOGIN_R=0;
-  GNULIB_GETPAGESIZE=0;
-  GNULIB_GETUSERSHELL=0;
-  GNULIB_LCHOWN=0;
-  GNULIB_LINK=0;
-  GNULIB_LINKAT=0;
-  GNULIB_LSEEK=0;
-  GNULIB_PIPE=0;
-  GNULIB_PIPE2=0;
-  GNULIB_PREAD=0;
-  GNULIB_PWRITE=0;
-  GNULIB_READLINK=0;
-  GNULIB_READLINKAT=0;
-  GNULIB_RMDIR=0;
-  GNULIB_SLEEP=0;
-  GNULIB_SYMLINK=0;
-  GNULIB_SYMLINKAT=0;
-  GNULIB_TTYNAME_R=0;
-  GNULIB_UNISTD_H_GETOPT=0;
-  GNULIB_UNISTD_H_SIGPIPE=0;
-  GNULIB_UNLINK=0;
-  GNULIB_UNLINKAT=0;
-  GNULIB_USLEEP=0;
-  GNULIB_WRITE=0;
-    HAVE_CHOWN=1;
-  HAVE_DUP2=1;
-  HAVE_DUP3=1;
-  HAVE_EUIDACCESS=1;
-  HAVE_FACCESSAT=1;
-  HAVE_FCHDIR=1;
-  HAVE_FCHOWNAT=1;
-  HAVE_FSYNC=1;
-  HAVE_FTRUNCATE=1;
-  HAVE_GETDTABLESIZE=1;
-  HAVE_GETGROUPS=1;
-  HAVE_GETHOSTNAME=1;
-  HAVE_GETLOGIN=1;
-  HAVE_GETPAGESIZE=1;
-  HAVE_LCHOWN=1;
-  HAVE_LINK=1;
-  HAVE_LINKAT=1;
-  HAVE_PIPE=1;
-  HAVE_PIPE2=1;
-  HAVE_PREAD=1;
-  HAVE_PWRITE=1;
-  HAVE_READLINK=1;
-  HAVE_READLINKAT=1;
-  HAVE_SLEEP=1;
-  HAVE_SYMLINK=1;
-  HAVE_SYMLINKAT=1;
-  HAVE_UNLINKAT=1;
-  HAVE_USLEEP=1;
-  HAVE_DECL_ENVIRON=1;
-  HAVE_DECL_FCHDIR=1;
-  HAVE_DECL_GETDOMAINNAME=1;
-  HAVE_DECL_GETLOGIN_R=1;
-  HAVE_DECL_GETPAGESIZE=1;
-  HAVE_DECL_GETUSERSHELL=1;
-  HAVE_DECL_TTYNAME_R=1;
-  HAVE_OS_H=0;
-  HAVE_SYS_PARAM_H=0;
-  REPLACE_CHOWN=0;
-  REPLACE_CLOSE=0;
-  REPLACE_DUP=0;
-  REPLACE_DUP2=0;
-  REPLACE_FCHOWNAT=0;
-  REPLACE_GETCWD=0;
-  REPLACE_GETDOMAINNAME=0;
-  REPLACE_GETLOGIN_R=0;
-  REPLACE_GETGROUPS=0;
-  REPLACE_GETPAGESIZE=0;
-  REPLACE_LCHOWN=0;
-  REPLACE_LINK=0;
-  REPLACE_LINKAT=0;
-  REPLACE_LSEEK=0;
-  REPLACE_PREAD=0;
-  REPLACE_PWRITE=0;
-  REPLACE_READLINK=0;
-  REPLACE_RMDIR=0;
-  REPLACE_SLEEP=0;
-  REPLACE_SYMLINK=0;
-  REPLACE_TTYNAME_R=0;
-  REPLACE_UNLINK=0;
-  REPLACE_UNLINKAT=0;
-  REPLACE_USLEEP=0;
-  REPLACE_WRITE=0;
-  UNISTD_H_HAVE_WINSOCK2_H=0;
-  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
 
 
 
+  if test $ac_cv_type_long_long_int = yes; then
+    HAVE_LONG_LONG_INT=1
+  else
+    HAVE_LONG_LONG_INT=0
+  fi
 
 
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    HAVE_UNSIGNED_LONG_LONG_INT=1
+  else
+    HAVE_UNSIGNED_LONG_LONG_INT=0
+  fi
 
 
 
-  if test $ac_cv_header_features_h = yes; then
-    HAVE_FEATURES_H=1
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
   else
-    HAVE_FEATURES_H=0
+    HAVE_WCHAR_H=0
   fi
 
 
+      if test $ac_cv_header_inttypes_h = yes; then
+    HAVE_INTTYPES_H=1
+  else
+    HAVE_INTTYPES_H=0
+  fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
-$as_echo_n "checking for wint_t... " >&6; }
-if ${gt_cv_c_wint_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-            wint_t foo = (wchar_t)'\0';
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gt_cv_c_wint_t=yes
-else
-  gt_cv_c_wint_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
-$as_echo "$gt_cv_c_wint_t" >&6; }
-  if test $gt_cv_c_wint_t = yes; then
+      if test $ac_cv_header_sys_types_h = yes; then
+    HAVE_SYS_TYPES_H=1
+  else
+    HAVE_SYS_TYPES_H=0
+  fi
 
-$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
 
-  fi
 
 
 
@@ -19350,142 +20238,332 @@ $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
 
 
 
-ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "$ac_includes_default"
-if test "x$ac_cv_have_decl_iswblank" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ISWBLANK $ac_have_decl
-_ACEOF
 
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdint_h='<'stdint.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if ${gl_cv_next_stdint_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+             if test $ac_cv_header_stdint_h = yes; then
 
 
-   if true; then
-  GL_COND_LIBTOOL_TRUE=
-  GL_COND_LIBTOOL_FALSE='#'
-else
-  GL_COND_LIBTOOL_TRUE='#'
-  GL_COND_LIBTOOL_FALSE=
-fi
-
-  gl_cond_libtool=true
-  gl_m4_base='gl/m4'
-
-
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdint.h>
 
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
 
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'stdint.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
+          else
+               gl_cv_next_stdint_h='<'stdint.h'>'
+             fi
 
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+     fi
+     NEXT_STDINT_H=$gl_cv_next_stdint_h
 
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stdint.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdint_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
 
 
-  gl_source_base='gl'
-  # Code from module alloca-opt:
 
 
-  if test $ac_cv_func_alloca_works = no; then
-    :
+  if test $ac_cv_header_stdint_h = yes; then
+    HAVE_STDINT_H=1
+  else
+    HAVE_STDINT_H=0
   fi
 
-  # Define an additional variable used in the Makefile substitution.
-  if test $ac_cv_working_alloca_h = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
-$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
-if ${gl_cv_rpl_alloca+:} false; then :
+
+    if test $ac_cv_header_stdint_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if ${gl_cv_header_working_stdint_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gl_cv_header_working_stdint_h=no
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#if defined __GNUC__ || defined _AIX || defined _MSC_VER
-        Need own alloca
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Need own alloca" >/dev/null 2>&1; then :
-  gl_cv_rpl_alloca=yes
-else
-  gl_cv_rpl_alloca=no
-fi
-rm -f conftest*
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
-$as_echo "$gl_cv_rpl_alloca" >&6; }
-    if test $gl_cv_rpl_alloca = yes; then
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
 
-$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
 
-      ALLOCA_H=alloca.h
-    else
-                  ALLOCA_H=
-    fi
-  else
-    ALLOCA_H=alloca.h
-  fi
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
 
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+  ((t) ((t) 0 < (t) -1 \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+struct s {
+  int check_PTRDIFF:
+      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+      ? 1 : -1;
+  /* Detect bug in FreeBSD 6.0 / ia64.  */
+  int check_SIG_ATOMIC:
+      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+      ? 1 : -1;
+  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+  int check_WCHAR:
+      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+      ? 1 : -1;
+  /* Detect bug in mingw.  */
+  int check_WINT:
+      WINT_MIN == TYPE_MINIMUM (wint_t)
+      && WINT_MAX == TYPE_MAXIMUM (wint_t)
+      ? 1 : -1;
 
-  # Code from module arg-nonnull:
-  # Code from module btowc:
+  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
+  int check_UINT8_C:
+        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+  int check_UINT16_C:
+        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
 
+  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
+#ifdef UINT8_MAX
+  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+                                                    if test "$cross_compiling" = yes; then :
+                 gl_cv_header_working_stdint_h=yes
 
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
-  if test $ac_cv_func_btowc = no; then
-    HAVE_BTOWC=0
-  else
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
 
 
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
 
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
-$as_echo_n "checking whether btowc(0) is correct... " >&6; }
-if ${gl_cv_func_btowc_nul+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        if test "$cross_compiling" = yes; then :
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+  {
+#ifdef INT8_MAX
+    MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+    MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+    MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+    MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+    MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+    MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+    MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+    MVAL (UINT64_MAX),
+#endif
+    NULL
+  };
 
-           case "$host_os" in
-                      # Guess no on Cygwin.
-             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
-                      # Guess yes otherwise.
-             *)       gl_cv_func_btowc_nul="guessing yes" ;;
-           esac
+int
+main ()
+{
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  const char **mv;
+  for (mv = macro_values; *mv != NULL; mv++)
+    {
+      const char *value = *mv;
+      /* Test whether it looks like a cast expression.  */
+      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+          || strncmp (value, "((int)"/*)*/, 6) == 0
+          || strncmp (value, "((signed short)"/*)*/, 15) == 0
+          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+        return mv - macro_values + 1;
+    }
+  return 0;
 
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  if (btowc ('\0') != 0)
-    return 1;
+  ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_btowc_nul=yes
-else
-  gl_cv_func_btowc_nul=no
+  gl_cv_header_working_stdint_h=yes
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -19493,147 +20571,358 @@ fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
-$as_echo "$gl_cv_func_btowc_nul" >&6; }
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
-$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
-if ${gl_cv_func_btowc_eof+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-                        case "$host_os" in
-                 # Guess no on IRIX.
-          irix*) gl_cv_func_btowc_eof="guessing no" ;;
-                 # Guess yes otherwise.
-          *)     gl_cv_func_btowc_eof="guessing yes" ;;
-        esac
-        if test $LOCALE_FR != none; then
-          if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
-    {
-      if (btowc (EOF) != WEOF)
-        return 1;
-    }
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_btowc_eof=yes
-else
-  gl_cv_func_btowc_eof=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+  fi
+  if test "$gl_cv_header_working_stdint_h" = yes; then
+    STDINT_H=
+  else
+            for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
 fi
 
-        fi
+done
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
-$as_echo "$gl_cv_func_btowc_eof" >&6; }
+    if test $ac_cv_header_sys_inttypes_h = yes; then
+      HAVE_SYS_INTTYPES_H=1
+    else
+      HAVE_SYS_INTTYPES_H=0
+    fi
 
-    case "$gl_cv_func_btowc_nul" in
-      *yes) ;;
-      *) REPLACE_BTOWC=1 ;;
-    esac
-    case "$gl_cv_func_btowc_eof" in
-      *yes) ;;
-      *) REPLACE_BTOWC=1 ;;
-    esac
-  fi
-  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+    if test $ac_cv_header_sys_bitypes_h = yes; then
+      HAVE_SYS_BITYPES_H=1
+    else
+      HAVE_SYS_BITYPES_H=0
+    fi
 
-    :
 
 
 
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
 
 
+  for gltype in ptrdiff_t size_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
 
+#include <limits.h>"; then :
 
+else
+  result=unknown
+fi
 
+       eval gl_cv_bitsizeof_${gltype}=\$result
 
-  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
 
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
 
-  :
 
   fi
 
 
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
 
+#include <limits.h>"; then :
 
-  GNULIB_BTOWC=1
+else
+  result=unknown
+fi
 
+       eval gl_cv_bitsizeof_${gltype}=\$result
 
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
 
-$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
 
 
 
-  # Code from module c++defs:
-  # Code from module configmake:
 
-          if test "x$datarootdir" = x; then
-    datarootdir='${datadir}'
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval \${gl_cv_type_${gltype}_signed+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  fi
-    if test "x$docdir" = x; then
-    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
 
-  fi
-    if test "x$htmldir" = x; then
-    htmldir='${docdir}'
+            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
 
-  fi
-  if test "x$dvidir" = x; then
-    dvidir='${docdir}'
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  result=yes
+else
+  result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       eval gl_cv_type_${gltype}_signed=\$result
 
-  fi
-  if test "x$pdfdir" = x; then
-    pdfdir='${docdir}'
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_type_${gltype}_signed
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    if test "$result" = yes; then
+      cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+      eval HAVE_SIGNED_${GLTYPE}=1
+    else
+      eval HAVE_SIGNED_${GLTYPE}=0
+    fi
+  done
+
+
+  gl_cv_type_ptrdiff_t_signed=yes
+  gl_cv_type_size_t_signed=no
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+  for gltype in ptrdiff_t size_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+  done
 
-  fi
-  if test "x$psdir" = x; then
-    psdir='${docdir}'
 
   fi
-  if test "x$lispdir" = x; then
-    lispdir='${datarootdir}/emacs/site-lisp'
 
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <stdio.h>
+  # include <time.h>
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+  done
+
+
+
+          if test $BITSIZEOF_WINT_T -lt 32; then
+    BITSIZEOF_WINT_T=32
   fi
-  if test "x$localedir" = x; then
-    localedir='${datarootdir}/locale'
 
+    STDINT_H=stdint.h
   fi
 
-      pkglibexecdir='${libexecdir}/${PACKAGE}'
+   if test -n "$STDINT_H"; then
+  GL_GENERATE_STDINT_H_TRUE=
+  GL_GENERATE_STDINT_H_FALSE='#'
+else
+  GL_GENERATE_STDINT_H_TRUE='#'
+  GL_GENERATE_STDINT_H_FALSE=
+fi
 
 
-  # Code from module extensions:
-  # Code from module gettext-h:
 
+  GNULIB_FFS=0;
+    HAVE_FFS=1;
+  HAVE_STRCASECMP=1;
+  HAVE_DECL_STRNCASECMP=1;
 
-  # Code from module include_next:
-  # Code from module langinfo:
 
 
 
@@ -19649,308 +20938,355 @@ $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_langinfo_h='<'langinfo.h'>'
+       gl_cv_next_strings_h='<'strings.h'>'
      else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
-$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
-if ${gl_cv_next_langinfo_h+:} false; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
+$as_echo_n "checking absolute name of <strings.h>... " >&6; }
+if ${gl_cv_next_strings_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-             if test $ac_cv_header_langinfo_h = yes; then
+             if test $ac_cv_header_strings_h = yes; then
 
 
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
+#include <strings.h>
 
 _ACEOF
                                                                                                                         case "$host_os" in
                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
                  *)    gl_absname_cpp="$ac_cpp" ;;
                esac
-                                                            gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                  sed -n '\#/langinfo.h#{
-                    s#.*"\(.*/langinfo.h\)".*#\1#
-                    s#^/[^/]#//&#
-                    p
-                    q
-                  }'`'"'
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'strings.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
           else
-               gl_cv_next_langinfo_h='<'langinfo.h'>'
+               gl_cv_next_strings_h='<'strings.h'>'
              fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
-$as_echo "$gl_cv_next_langinfo_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
+$as_echo "$gl_cv_next_strings_h" >&6; }
      fi
-     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
+     NEXT_STRINGS_H=$gl_cv_next_strings_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'langinfo.h'>'
+       gl_next_as_first_directive='<'strings.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_langinfo_h
+       gl_next_as_first_directive=$gl_cv_next_strings_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
 
 
 
 
+  if test $ac_cv_header_strings_h = yes; then
+    HAVE_STRINGS_H=1
+  else
+    HAVE_STRINGS_H=0
+  fi
 
-    HAVE_LANGINFO_CODESET=0
-  HAVE_LANGINFO_T_FMT_AMPM=0
-  HAVE_LANGINFO_ERA=0
-  HAVE_LANGINFO_YESEXPR=0
 
-  if test $ac_cv_header_langinfo_h = yes; then
-    HAVE_LANGINFO_H=1
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
-$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
-if ${gl_cv_header_langinfo_codeset+:} false; then :
+
+    for gl_func in ffs strcasecmp strncasecmp; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval \${$as_gl_Symbol+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
-int a = CODESET;
+
+    /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
+       <strings.h>.  */
+    #include <sys/types.h>
+    #include <strings.h>
 
 int
 main ()
 {
-
+#undef $gl_func
+  (void) $gl_func;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_langinfo_codeset=yes
+  eval "$as_gl_Symbol=yes"
 else
-  gl_cv_header_langinfo_codeset=no
+  eval "$as_gl_Symbol=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
-$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
-    if test $gl_cv_header_langinfo_codeset = yes; then
-      HAVE_LANGINFO_CODESET=1
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
-$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
-if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <langinfo.h>
-int a = T_FMT_AMPM;
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+eval ac_res=\$$as_gl_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_langinfo_t_fmt_ampm=yes
-else
-  gl_cv_header_langinfo_t_fmt_ampm=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+                     eval ac_cv_have_decl_$gl_func=yes
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
-$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
-    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
-      HAVE_LANGINFO_T_FMT_AMPM=1
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
-$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
-if ${gl_cv_header_langinfo_era+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <langinfo.h>
-int a = ERA;
+      done
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_langinfo_era=yes
+
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
 else
-  gl_cv_header_langinfo_era=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
-$as_echo "$gl_cv_header_langinfo_era" >&6; }
-    if test $gl_cv_header_langinfo_era = yes; then
-      HAVE_LANGINFO_ERA=1
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
-$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
-if ${gl_cv_header_langinfo_yesexpr+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <langinfo.h>
-int a = YESEXPR;
 
-int
-main ()
-{
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = xyes; then :
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_langinfo_yesexpr=yes
 else
-  gl_cv_header_langinfo_yesexpr=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
+_ACEOF
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
-$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
-    if test $gl_cv_header_langinfo_yesexpr = yes; then
-      HAVE_LANGINFO_YESEXPR=1
-    fi
-  else
-    HAVE_LANGINFO_H=0
-  fi
 
 
 
+    WINDOWS_64_BIT_OFF_T=0
 
 
 
 
-    for gl_func in nl_langinfo; do
-    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
+  GNULIB_CHDIR=0;
+  GNULIB_CHOWN=0;
+  GNULIB_CLOSE=0;
+  GNULIB_DUP=0;
+  GNULIB_DUP2=0;
+  GNULIB_DUP3=0;
+  GNULIB_ENVIRON=0;
+  GNULIB_EUIDACCESS=0;
+  GNULIB_FACCESSAT=0;
+  GNULIB_FCHDIR=0;
+  GNULIB_FCHOWNAT=0;
+  GNULIB_FDATASYNC=0;
+  GNULIB_FSYNC=0;
+  GNULIB_FTRUNCATE=0;
+  GNULIB_GETCWD=0;
+  GNULIB_GETDOMAINNAME=0;
+  GNULIB_GETDTABLESIZE=0;
+  GNULIB_GETGROUPS=0;
+  GNULIB_GETHOSTNAME=0;
+  GNULIB_GETLOGIN=0;
+  GNULIB_GETLOGIN_R=0;
+  GNULIB_GETPAGESIZE=0;
+  GNULIB_GETUSERSHELL=0;
+  GNULIB_GROUP_MEMBER=0;
+  GNULIB_ISATTY=0;
+  GNULIB_LCHOWN=0;
+  GNULIB_LINK=0;
+  GNULIB_LINKAT=0;
+  GNULIB_LSEEK=0;
+  GNULIB_PIPE=0;
+  GNULIB_PIPE2=0;
+  GNULIB_PREAD=0;
+  GNULIB_PWRITE=0;
+  GNULIB_READ=0;
+  GNULIB_READLINK=0;
+  GNULIB_READLINKAT=0;
+  GNULIB_RMDIR=0;
+  GNULIB_SETHOSTNAME=0;
+  GNULIB_SLEEP=0;
+  GNULIB_SYMLINK=0;
+  GNULIB_SYMLINKAT=0;
+  GNULIB_TTYNAME_R=0;
+  GNULIB_UNISTD_H_NONBLOCKING=0;
+  GNULIB_UNISTD_H_SIGPIPE=0;
+  GNULIB_UNLINK=0;
+  GNULIB_UNLINKAT=0;
+  GNULIB_USLEEP=0;
+  GNULIB_WRITE=0;
+    HAVE_CHOWN=1;
+  HAVE_DUP2=1;
+  HAVE_DUP3=1;
+  HAVE_EUIDACCESS=1;
+  HAVE_FACCESSAT=1;
+  HAVE_FCHDIR=1;
+  HAVE_FCHOWNAT=1;
+  HAVE_FDATASYNC=1;
+  HAVE_FSYNC=1;
+  HAVE_FTRUNCATE=1;
+  HAVE_GETDTABLESIZE=1;
+  HAVE_GETGROUPS=1;
+  HAVE_GETHOSTNAME=1;
+  HAVE_GETLOGIN=1;
+  HAVE_GETPAGESIZE=1;
+  HAVE_GROUP_MEMBER=1;
+  HAVE_LCHOWN=1;
+  HAVE_LINK=1;
+  HAVE_LINKAT=1;
+  HAVE_PIPE=1;
+  HAVE_PIPE2=1;
+  HAVE_PREAD=1;
+  HAVE_PWRITE=1;
+  HAVE_READLINK=1;
+  HAVE_READLINKAT=1;
+  HAVE_SETHOSTNAME=1;
+  HAVE_SLEEP=1;
+  HAVE_SYMLINK=1;
+  HAVE_SYMLINKAT=1;
+  HAVE_UNLINKAT=1;
+  HAVE_USLEEP=1;
+  HAVE_DECL_ENVIRON=1;
+  HAVE_DECL_FCHDIR=1;
+  HAVE_DECL_FDATASYNC=1;
+  HAVE_DECL_GETDOMAINNAME=1;
+  HAVE_DECL_GETLOGIN_R=1;
+  HAVE_DECL_GETPAGESIZE=1;
+  HAVE_DECL_GETUSERSHELL=1;
+  HAVE_DECL_SETHOSTNAME=1;
+  HAVE_DECL_TTYNAME_R=1;
+  HAVE_OS_H=0;
+  HAVE_SYS_PARAM_H=0;
+  REPLACE_CHOWN=0;
+  REPLACE_CLOSE=0;
+  REPLACE_DUP=0;
+  REPLACE_DUP2=0;
+  REPLACE_FCHOWNAT=0;
+  REPLACE_FTRUNCATE=0;
+  REPLACE_GETCWD=0;
+  REPLACE_GETDOMAINNAME=0;
+  REPLACE_GETLOGIN_R=0;
+  REPLACE_GETGROUPS=0;
+  REPLACE_GETPAGESIZE=0;
+  REPLACE_ISATTY=0;
+  REPLACE_LCHOWN=0;
+  REPLACE_LINK=0;
+  REPLACE_LINKAT=0;
+  REPLACE_LSEEK=0;
+  REPLACE_PREAD=0;
+  REPLACE_PWRITE=0;
+  REPLACE_READ=0;
+  REPLACE_READLINK=0;
+  REPLACE_RMDIR=0;
+  REPLACE_SLEEP=0;
+  REPLACE_SYMLINK=0;
+  REPLACE_TTYNAME_R=0;
+  REPLACE_UNLINK=0;
+  REPLACE_UNLINKAT=0;
+  REPLACE_USLEEP=0;
+  REPLACE_WRITE=0;
+  UNISTD_H_HAVE_WINSOCK2_H=0;
+  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+
+
+
+
+
+
+  if test $ac_cv_header_features_h = yes; then
+    HAVE_FEATURES_H=1
+  else
+    HAVE_FEATURES_H=0
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if ${gt_cv_c_wint_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
 
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+            wint_t foo = (wchar_t)'\0';
 int
 main ()
 {
-#undef $gl_func
-  (void) $gl_func;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$as_gl_Symbol=yes"
+  gt_cv_c_wint_t=yes
 else
-  eval "$as_gl_Symbol=no"
+  gt_cv_c_wint_t=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-eval ac_res=\$$as_gl_Symbol
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
-
-                     eval ac_cv_have_decl_$gl_func=yes
-fi
-      done
-
-
-  # Code from module localcharset:
-
-
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+  if test $gt_cv_c_wint_t = yes; then
 
+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
 
+  fi
 
 
 
-  LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
 
-  # Code from module malloc-gnu:
+  GNULIB_ISWBLANK=0;
+  GNULIB_WCTYPE=0;
+  GNULIB_ISWCTYPE=0;
+  GNULIB_WCTRANS=0;
+  GNULIB_TOWCTRANS=0;
+    HAVE_ISWBLANK=1;
+  HAVE_WCTYPE_T=1;
+  HAVE_WCTRANS_T=1;
+  REPLACE_ISWBLANK=0;
 
 
-    for ac_header in stdlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
 
-fi
 
-done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if ${ac_cv_func_malloc_0_nonnull+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_func_malloc_0_nonnull=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
 
-int
-main ()
-{
-return ! malloc (0);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_malloc_0_nonnull=yes
+   if true; then
+  GL_COND_LIBTOOL_TRUE=
+  GL_COND_LIBTOOL_FALSE='#'
 else
-  ac_cv_func_malloc_0_nonnull=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+  GL_COND_LIBTOOL_TRUE='#'
+  GL_COND_LIBTOOL_FALSE=
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
-
-$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
-
-else
-  $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
-
 
+  gl_cond_libtool=true
+  gl_m4_base='gl/m4'
 
 
 
@@ -19959,58 +21295,61 @@ else
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
 
-  REPLACE_MALLOC=1
+  gl_source_base='gl'
 
 
-fi
+  if test $ac_cv_func_alloca_works = no; then
+    :
+  fi
 
+  # Define an additional variable used in the Makefile substitution.
+  if test $ac_cv_working_alloca_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
+$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
+if ${gl_cv_rpl_alloca+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+        Need own alloca
+#endif
 
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_MALLOC_GNU 1
 _ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Need own alloca" >/dev/null 2>&1; then :
+  gl_cv_rpl_alloca=yes
+else
+  gl_cv_rpl_alloca=no
+fi
+rm -f conftest*
 
 
-  # Code from module malloc-posix:
-
-
-
-  if test $gl_cv_func_malloc_posix = yes; then
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
+$as_echo "$gl_cv_rpl_alloca" >&6; }
+    if test $gl_cv_rpl_alloca = yes; then
 
-$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
 
+      ALLOCA_H=alloca.h
+    else
+                  ALLOCA_H=
+    fi
   else
-
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
-
-  REPLACE_MALLOC=1
-
+    ALLOCA_H=alloca.h
   fi
 
-
-
-
-  GNULIB_MALLOC_POSIX=1
-
-
-
-$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
-
-
-
-  # Code from module mbrtowc:
-
+   if test -n "$ALLOCA_H"; then
+  GL_GENERATE_ALLOCA_H_TRUE=
+  GL_GENERATE_ALLOCA_H_FALSE='#'
+else
+  GL_GENERATE_ALLOCA_H_TRUE='#'
+  GL_GENERATE_ALLOCA_H_FALSE=
+fi
 
 
 
@@ -20019,31 +21358,32 @@ $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
 
 
 
+  if test $ac_cv_func_btowc = no; then
+    HAVE_BTOWC=0
+  else
 
-  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
 
 
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
+$as_echo_n "checking whether btowc(0) is correct... " >&6; }
+if ${gl_cv_func_btowc_nul+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-                  case "$host_os" in
-                     # Guess no on AIX and OSF/1.
-        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
-                     # Guess yes otherwise.
-        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
-      esac
-      if test $LOCALE_JA != none; then
         if test "$cross_compiling" = yes; then :
-  :
+
+           case "$host_os" in
+                      # Guess no on Cygwin.
+             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
+                      # Guess yes otherwise.
+             *)       gl_cv_func_btowc_nul="guessing yes" ;;
+           esac
+
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
 #include <string.h>
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
@@ -20055,59 +21395,45 @@ else
 #include <wchar.h>
 int main ()
 {
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 1;
-    }
+  if (btowc ('\0') != 0)
+    return 1;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
+  gl_cv_func_btowc_nul=yes
 else
-  gl_cv_func_mbrtowc_incomplete_state=no
+  gl_cv_func_btowc_nul=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-      fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
-
-
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
+$as_echo "$gl_cv_func_btowc_nul" >&6; }
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
+$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
+if ${gl_cv_func_btowc_eof+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-                  case "$host_os" in
-                    # Guess no on Solaris 8.
-        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
-                    # Guess yes otherwise.
-        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
-      esac
-      if test $LOCALE_ZH_CN != none; then
-        if test "$cross_compiling" = yes; then :
+                        case "$host_os" in
+                 # Guess no on IRIX.
+          irix*) gl_cv_func_btowc_eof="guessing no" ;;
+                 # Guess yes otherwise.
+          *)     gl_cv_func_btowc_eof="guessing yes" ;;
+        esac
+        if test $LOCALE_FR != none; then
+          if test "$cross_compiling" = yes; then :
   :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <locale.h>
-#include <stdlib.h>
 #include <string.h>
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
@@ -20119,418 +21445,407 @@ else
 #include <wchar.h>
 int main ()
 {
-  /* This fails on Solaris 8:
-     mbrtowc returns 2, and sets wc to 0x00F0.
-     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
     {
-      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 6, &state) != 4
-          && mbtowc (&wc, input + 3, 6) == 4)
+      if (btowc (EOF) != WEOF)
         return 1;
     }
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_mbrtowc_sanitycheck=yes
+  gl_cv_func_btowc_eof=yes
 else
-  gl_cv_func_mbrtowc_sanitycheck=no
+  gl_cv_func_btowc_eof=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-      fi
+        fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
+$as_echo "$gl_cv_func_btowc_eof" >&6; }
 
-    REPLACE_MBSTATE_T=0
-    case "$gl_cv_func_mbrtowc_incomplete_state" in
+    case "$gl_cv_func_btowc_nul" in
       *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
+      *) REPLACE_BTOWC=1 ;;
     esac
-    case "$gl_cv_func_mbrtowc_sanitycheck" in
+    case "$gl_cv_func_btowc_eof" in
       *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
+      *) REPLACE_BTOWC=1 ;;
     esac
-  else
-    REPLACE_MBSTATE_T=1
   fi
-  if test $REPLACE_MBSTATE_T = 1; then
 
-    :
+if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
 
-  fi
 
 
 
-  if test $ac_cv_func_mbrtowc = no; then
-    HAVE_MBRTOWC=0
-  else
-    if test $REPLACE_MBSTATE_T = 1; then
-      REPLACE_MBRTOWC=1
-    else
 
 
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
-$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
-if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-                  case "$host_os" in
-                  # Guess no on Solaris.
-        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
-                  # Guess yes otherwise.
-        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
-      esac
-      if test $LOCALE_FR_UTF8 != none; then
-        if test "$cross_compiling" = yes; then :
+  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
+
+
   :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  int result = 0;
+fi
 
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      char input[] = "\303\237er";
-      mbstate_t state;
-      wchar_t wc;
-      size_t ret;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      wc = (wchar_t) 0xBADFACE;
-      ret = mbrtowc (&wc, input, 5, &state);
-      if (ret != 2)
-        result |= 1;
-      if (!mbsinit (&state))
-        result |= 2;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      ret = mbrtowc (NULL, input, 5, &state);
-      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
-        result |= 4;
-      if (!mbsinit (&state))
-        result |= 8;
-    }
-  return result;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_mbrtowc_null_arg1=yes
-else
-  gl_cv_func_mbrtowc_null_arg1=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-      fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
-$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
+          GNULIB_BTOWC=1
 
 
 
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
-$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
-if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-                  case "$host_os" in
-              # Guess no on OSF/1.
-        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
-              # Guess yes otherwise.
-        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
-      esac
-      if test $LOCALE_FR_UTF8 != none; then
-        if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      mbstate_t state;
-      wchar_t wc;
-      int ret;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      wc = (wchar_t) 0xBADFACE;
-      mbrtowc (&wc, NULL, 5, &state);
-      /* Check that wc was not modified.  */
-      if (wc != (wchar_t) 0xBADFACE)
-        return 1;
-    }
-  return 0;
-}
+
+
+    for ac_header in byteswap.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
+if test "x$ac_cv_header_byteswap_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_BYTESWAP_H 1
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_mbrtowc_null_arg2=yes
+
+    BYTESWAP_H=''
+
 else
-  gl_cv_func_mbrtowc_null_arg2=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+    BYTESWAP_H='byteswap.h'
+
 fi
 
-      fi
+done
+
 
+   if test -n "$BYTESWAP_H"; then
+  GL_GENERATE_BYTESWAP_H_TRUE=
+  GL_GENERATE_BYTESWAP_H_FALSE='#'
+else
+  GL_GENERATE_BYTESWAP_H_TRUE='#'
+  GL_GENERATE_BYTESWAP_H_FALSE=
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
-$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
 
 
 
+          if test "x$datarootdir" = x; then
+    datarootdir='${datadir}'
+
+  fi
+    if test "x$docdir" = x; then
+    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+
+  fi
+    if test "x$htmldir" = x; then
+    htmldir='${docdir}'
+
+  fi
+  if test "x$dvidir" = x; then
+    dvidir='${docdir}'
 
+  fi
+  if test "x$pdfdir" = x; then
+    pdfdir='${docdir}'
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
-$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
-if ${gl_cv_func_mbrtowc_retval+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  fi
+  if test "x$psdir" = x; then
+    psdir='${docdir}'
 
-                  case "$host_os" in
-                          # Guess no on HP-UX and Solaris.
-        hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
-                          # Guess yes otherwise.
-        *)                gl_cv_func_mbrtowc_retval="guessing yes" ;;
-      esac
-      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
-        if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  fi
+  if test "x$lispdir" = x; then
+    lispdir='${datarootdir}/emacs/site-lisp'
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  int result = 0;
-  /* This fails on Solaris.  */
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      char input[] = "B\303\274\303\237er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
+  fi
+  if test "x$localedir" = x; then
+    localedir='${datarootdir}/locale'
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        {
-          input[1] = '\0';
-          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
-            result |= 1;
-        }
-    }
-  /* This fails on HP-UX 11.11.  */
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
+  fi
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        {
-          input[1] = '\0';
-          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
-            result |= 2;
-        }
-    }
-  return result;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_mbrtowc_retval=yes
-else
-  gl_cv_func_mbrtowc_retval=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+      pkglibexecdir='${libexecdir}/${PACKAGE}'
 
-      fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
-$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
 
 
 
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
-$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
-if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_langinfo_h='<'langinfo.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
+$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
+if ${gl_cv_next_langinfo_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-                  case "$host_os" in
-                       # Guess no on Solaris 8 and 9.
-        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
-                       # Guess yes otherwise.
-        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
-      esac
-      if test $LOCALE_ZH_CN != none; then
-        if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+             if test $ac_cv_header_langinfo_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <langinfo.h>
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'langinfo.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
+          else
+               gl_cv_next_langinfo_h='<'langinfo.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
+$as_echo "$gl_cv_next_langinfo_h" >&6; }
+     fi
+     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'langinfo.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_langinfo_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
+
+
+
+
+
+    HAVE_LANGINFO_CODESET=0
+  HAVE_LANGINFO_T_FMT_AMPM=0
+  HAVE_LANGINFO_ERA=0
+  HAVE_LANGINFO_YESEXPR=0
+
+  if test $ac_cv_header_langinfo_h = yes; then
+    HAVE_LANGINFO_H=1
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
+$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
+if ${gl_cv_header_langinfo_codeset+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = CODESET;
+
+int
+main ()
 {
-  /* This fails on Solaris 8 and 9.  */
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
-    {
-      mbstate_t state;
-      wchar_t wc;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, "", 1, &state) != 0)
-        return 1;
-    }
+  ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_mbrtowc_nul_retval=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_langinfo_codeset=yes
 else
-  gl_cv_func_mbrtowc_nul_retval=no
+  gl_cv_header_langinfo_codeset=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
+$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
+    if test $gl_cv_header_langinfo_codeset = yes; then
+      HAVE_LANGINFO_CODESET=1
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
+$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
+if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = T_FMT_AMPM;
 
-      fi
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_langinfo_t_fmt_ampm=yes
+else
+  gl_cv_header_langinfo_t_fmt_ampm=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
-$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
-
-      case "$gl_cv_func_mbrtowc_null_arg1" in
-        *yes) ;;
-        *)
-$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
-      case "$gl_cv_func_mbrtowc_null_arg2" in
-        *yes) ;;
-        *)
-$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
+$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
+    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
+      HAVE_LANGINFO_T_FMT_AMPM=1
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
+$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
+if ${gl_cv_header_langinfo_era+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = ERA;
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
-      case "$gl_cv_func_mbrtowc_retval" in
-        *yes) ;;
-        *)
-$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
+int
+main ()
+{
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
-      case "$gl_cv_func_mbrtowc_nul_retval" in
-        *yes) ;;
-        *)
-$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_langinfo_era=yes
+else
+  gl_cv_header_langinfo_era=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
+$as_echo "$gl_cv_header_langinfo_era" >&6; }
+    if test $gl_cv_header_langinfo_era = yes; then
+      HAVE_LANGINFO_ERA=1
     fi
-  fi
-  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
-
-    :
-
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
+$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
+if ${gl_cv_header_langinfo_yesexpr+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = YESEXPR;
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_langinfo_yesexpr=yes
+else
+  gl_cv_header_langinfo_yesexpr=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
+$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
+    if test $gl_cv_header_langinfo_yesexpr = yes; then
+      HAVE_LANGINFO_YESEXPR=1
+    fi
+  else
+    HAVE_LANGINFO_H=0
+  fi
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
 
 
-  :
+    for gl_func in nl_langinfo; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval \${$as_gl_Symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
 
-  fi
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
 
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
 
 
 
-  GNULIB_MBRTOWC=1
 
 
 
-$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
 
 
 
-  # Code from module mbsinit:
 
+LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
 
 
 
@@ -20540,167 +21855,115 @@ $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
 
 
 
-  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+  case "$host_os" in
+    solaris*)
 
+$as_echo "#define _LCONV_C99 1" >>confdefs.h
 
+      ;;
+  esac
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
+$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
+if ${gl_cv_header_locale_h_posix2001+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-                  case "$host_os" in
-                     # Guess no on AIX and OSF/1.
-        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
-                     # Guess yes otherwise.
-        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
-      esac
-      if test $LOCALE_JA != none; then
-        if test "$cross_compiling" = yes; then :
-  :
-else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
 #include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
+            int x = LC_MESSAGES;
+            int y = sizeof (((struct lconv *) 0)->decimal_point);
+int
+main ()
 {
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        if (mbsinit (&state))
-          return 1;
-    }
+  ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_locale_h_posix2001=yes
 else
-  gl_cv_func_mbrtowc_incomplete_state=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_header_locale_h_posix2001=no
 fi
-
-      fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
+$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
 
 
-
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
+  if test $ac_cv_header_xlocale_h = yes; then
+    HAVE_XLOCALE_H=1
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
+$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
+if ${gl_cv_header_locale_has_locale_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-                  case "$host_os" in
-                    # Guess no on Solaris 8.
-        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
-                    # Guess yes otherwise.
-        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
-      esac
-      if test $LOCALE_ZH_CN != none; then
-        if test "$cross_compiling" = yes; then :
-  :
-else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
 #include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
+              locale_t x;
+int
+main ()
 {
-  /* This fails on Solaris 8:
-     mbrtowc returns 2, and sets wc to 0x00F0.
-     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
-    {
-      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 6, &state) != 4
-          && mbtowc (&wc, input + 3, 6) == 4)
-        return 1;
-    }
+  ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_mbrtowc_sanitycheck=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_locale_has_locale_t=yes
 else
-  gl_cv_func_mbrtowc_sanitycheck=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_header_locale_has_locale_t=no
 fi
-
-      fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
-
-    REPLACE_MBSTATE_T=0
-    case "$gl_cv_func_mbrtowc_incomplete_state" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
-    case "$gl_cv_func_mbrtowc_sanitycheck" in
-      *yes) ;;
-      *) REPLACE_MBSTATE_T=1 ;;
-    esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
+$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      gl_cv_header_locale_h_needs_xlocale_h=no
+    else
+      gl_cv_header_locale_h_needs_xlocale_h=yes
+    fi
   else
-    REPLACE_MBSTATE_T=1
+    HAVE_XLOCALE_H=0
+    gl_cv_header_locale_h_needs_xlocale_h=no
   fi
-  if test $REPLACE_MBSTATE_T = 1; then
 
-    :
-
-  fi
 
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
+$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
+if ${gl_cv_sys_struct_lconv_ok+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+            struct lconv l;
+            int x = sizeof (l.decimal_point);
+            int y = sizeof (l.int_p_cs_precedes);
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_lconv_ok=yes
+else
+  gl_cv_sys_struct_lconv_ok=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-  if test $ac_cv_func_mbsinit = no; then
-    HAVE_MBSINIT=0
-  else
-    if test $REPLACE_MBSTATE_T = 1; then
-      REPLACE_MBSINIT=1
-    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
+$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
+  if test $gl_cv_sys_struct_lconv_ok = no; then
+    REPLACE_STRUCT_LCONV=1
   fi
-  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
-
-    :
 
 
 
@@ -20710,1216 +21973,1598 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
-
-
-  :
-
-  fi
-
-
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_locale_h='<'locale.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
+$as_echo_n "checking absolute name of <locale.h>... " >&6; }
+if ${gl_cv_next_locale_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
 
-  GNULIB_MBSINIT=1
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
 
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
+               gl_header_literal_regex=`echo 'locale.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
 
-$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
+$as_echo "$gl_cv_next_locale_h" >&6; }
+     fi
+     NEXT_LOCALE_H=$gl_cv_next_locale_h
 
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'locale.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_locale_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
 
-  # Code from module multiarch:
 
-  # Code from module nl_langinfo:
 
 
 
 
-     if test $ac_cv_func_nl_langinfo = yes; then
-    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
-$as_echo_n "checking whether YESEXPR works... " >&6; }
-if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
+    for gl_func in setlocale duplocale; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval \${$as_gl_Symbol+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then :
-
-         case "$host_os" in
-                   # Guess no on irix systems.
-           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
-                   # Guess yes elsewhere.
-           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
-         esac
-
-else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
+#include <locale.h>
+/* Some systems provide declarations in a non-standard header.  */
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
 
 int
 main ()
 {
-return !*nl_langinfo(YESEXPR);
-
+#undef $gl_func
+  (void) $gl_func;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_nl_langinfo_yesexpr_works=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
 else
-  gl_cv_func_nl_langinfo_yesexpr_works=no
+  eval "$as_gl_Symbol=no"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+eval ac_res=\$$as_gl_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
 
-
+                     eval ac_cv_have_decl_$gl_func=yes
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
-$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
-    case $gl_cv_func_nl_langinfo_yesexpr_works in
-      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
-      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
-    esac
+      done
 
-cat >>confdefs.h <<_ACEOF
-#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
-_ACEOF
 
-    if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
-        && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
-      :
-    else
-      REPLACE_NL_LANGINFO=1
 
-$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
 
 
 
+  if test $REPLACE_STRUCT_LCONV = 1; then
+    REPLACE_LOCALECONV=1
+  fi
 
+if test $REPLACE_LOCALECONV = 1; then
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
 
-    fi
-  else
-    HAVE_NL_LANGINFO=0
 
 
+  gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
 
 
+  ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
+"
+if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
+_ACEOF
 
 
+fi
 
-  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
 
-  fi
+fi
 
 
 
 
-  GNULIB_NL_LANGINFO=1
 
+          GNULIB_LOCALECONV=1
 
 
-$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
 
 
 
-  # Code from module regex:
+$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
 
 
-# Check whether --with-included-regex was given.
-if test "${with_included_regex+set}" = set; then :
-  withval=$with_included_regex;
-fi
 
 
-  case $with_included_regex in #(
-  yes|no) ac_use_included_regex=$with_included_regex
-        ;;
-  '')
-    # If the system regex support is good enough that it passes the
-    # following run test, then default to *not* using the included regex.c.
-    # If cross compiling, assume the test would fail and use the included
-    # regex.c.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
-$as_echo_n "checking for working re_compile_pattern... " >&6; }
-if ${gl_cv_func_re_compile_pattern_working+:} false; then :
+
+
+      for ac_header in stdlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if ${ac_cv_func_malloc_0_nonnull+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
-         gl_cv_func_re_compile_pattern_working=no
+  case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* \
+          | hpux* | solaris* | cygwin* | mingw*)
+            ac_cv_func_malloc_0_nonnull=yes ;;
+          # If we don't know, assume the worst.
+          *) ac_cv_func_malloc_0_nonnull=no ;;
+        esac
+
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-           #include <locale.h>
-           #include <limits.h>
-           #include <regex.h>
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+            # include <stdlib.h>
+            #else
+            char *malloc ();
+            #endif
 
 int
 main ()
 {
-int result = 0;
-            static struct re_pattern_buffer regex;
-            unsigned char folded_chars[UCHAR_MAX + 1];
-            int i;
-            const char *s;
-            struct re_registers regs;
-
-            /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
-               This test needs valgrind to catch the bug on Debian
-               GNU/Linux 3.1 x86, but it might catch the bug better
-               on other platforms and it shouldn't hurt to try the
-               test here.  */
-            if (setlocale (LC_ALL, "en_US.UTF-8"))
-              {
-                static char const pat[] = "insert into";
-                static char const data[] =
-                  "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
-                re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
-                               | RE_ICASE);
-                memset (&regex, 0, sizeof regex);
-                s = re_compile_pattern (pat, sizeof pat - 1, &regex);
-                if (s)
-                  result |= 1;
-                else if (re_search (&regex, data, sizeof data - 1,
-                                    0, sizeof data - 1, &regs)
-                         != -1)
-                  result |= 1;
-                if (! setlocale (LC_ALL, "C"))
-                  return 1;
-              }
-
-            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
-            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("a[^x]b", 6, &regex);
-            if (s)
-              result |= 2;
-            /* This should fail, but succeeds for glibc-2.5.  */
-            else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
-              result |= 2;
-
-            /* This regular expression is from Spencer ere test number 75
-               in grep-2.3.  */
-            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
-            memset (&regex, 0, sizeof regex);
-            for (i = 0; i <= UCHAR_MAX; i++)
-              folded_chars[i] = i;
-            regex.translate = folded_chars;
-            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
-            /* This should fail with _Invalid character class name_ error.  */
-            if (!s)
-              result |= 4;
-
-            /* Ensure that [b-a] is diagnosed as invalid, when
-               using RE_NO_EMPTY_RANGES. */
-            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("a[b-a]", 6, &regex);
-            if (s == 0)
-              result |= 8;
-
-            /* This should succeed, but does not for glibc-2.1.3.  */
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("{1", 2, &regex);
-            if (s)
-              result |= 8;
-
-            /* The following example is derived from a problem report
-               against gawk from Jorge Stolfi <stolfi at ic.unicamp.br>.  */
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("[an\371]*n", 7, &regex);
-            if (s)
-              result |= 8;
-            /* This should match, but does not for glibc-2.2.1.  */
-            else if (re_match (&regex, "an", 2, 0, &regs) != 2)
-              result |= 8;
-
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("x", 1, &regex);
-            if (s)
-              result |= 8;
-            /* glibc-2.2.93 does not work with a negative RANGE argument.  */
-            else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
-              result |= 8;
-
-            /* The version of regex.c in older versions of gnulib
-               ignored RE_ICASE.  Detect that problem too.  */
-            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("x", 1, &regex);
-            if (s)
-              result |= 16;
-            else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
-              result |= 16;
-
-            /* Catch a bug reported by Vin Shelton in
-               http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
-               */
-            re_set_syntax (RE_SYNTAX_POSIX_BASIC
-                           & ~RE_CONTEXT_INVALID_DUP
-                           & ~RE_NO_EMPTY_RANGES);
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
-            if (s)
-              result |= 32;
-
-            /* REG_STARTEND was added to glibc on 2004-01-15.
-               Reject older versions.  */
-            if (! REG_STARTEND)
-              result |= 64;
-
-#if 0
-            /* It would be nice to reject hosts whose regoff_t values are too
-               narrow (including glibc on hosts with 64-bit ptrdiff_t and
-               32-bit int), but we should wait until glibc implements this
-               feature.  Otherwise, support for equivalence classes and
-               multibyte collation symbols would always be broken except
-               when compiling --without-included-regex.   */
-            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
-                || sizeof (regoff_t) < sizeof (ssize_t))
-              result |= 64;
-#endif
-
-            return result;
-
+return ! malloc (0);
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_re_compile_pattern_working=yes
+  ac_cv_func_malloc_0_nonnull=yes
 else
-  gl_cv_func_re_compile_pattern_working=no
+  ac_cv_func_malloc_0_nonnull=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
-$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
-    case $gl_cv_func_re_compile_pattern_working in #(
-    yes) ac_use_included_regex=no;; #(
-    no) ac_use_included_regex=yes;;
-    esac
-    ;;
-  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
-    ;;
-  esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+  if test $ac_cv_func_malloc_0_nonnull = yes; then :
 
-  if test $ac_use_included_regex = yes; then
+$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
 
-$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
+else
+  $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
 
+     REPLACE_MALLOC=1
 
-$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
+fi
 
 
-$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
+if test $REPLACE_MALLOC = 1; then
 
 
-$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
 
 
-$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
 
 
-$as_echo "#define re_search rpl_re_search" >>confdefs.h
 
 
-$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
+  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
+
+fi
 
 
-$as_echo "#define re_match rpl_re_match" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_MALLOC_GNU 1
+_ACEOF
 
 
-$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
 
 
-$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
 
+  if test $gl_cv_func_malloc_posix = yes; then
 
-$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
+$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
 
+  else
+    REPLACE_MALLOC=1
+  fi
 
-$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
+if test $REPLACE_MALLOC = 1; then
 
 
-$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
 
 
-$as_echo "#define regexec rpl_regexec" >>confdefs.h
 
 
-$as_echo "#define regerror rpl_regerror" >>confdefs.h
 
 
-$as_echo "#define regfree rpl_regfree" >>confdefs.h
+  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
 
+fi
 
 
 
 
 
+          GNULIB_MALLOC_POSIX=1
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
 
 
+$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
 
 
 
 
-  for ac_header in libintl.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
-if test "x$ac_cv_header_libintl_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBINTL_H 1
-_ACEOF
 
-fi
 
-done
 
 
-  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
-"
-if test "x$ac_cv_have_decl_isblank" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ISBLANK $ac_have_decl
-_ACEOF
 
 
-  fi
 
-  # Code from module ssize_t:
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
-$as_echo_n "checking for ssize_t... " >&6; }
-if ${gt_cv_ssize_t+:} false; then :
+  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+
+                  case "$host_os" in
+                     # Guess no on AIX and OSF/1.
+        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+                     # Guess yes otherwise.
+        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+      esac
+      if test $LOCALE_JA != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-int
-main ()
-{
-int x = sizeof (ssize_t *) + sizeof (ssize_t);
-            return !x;
-  ;
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        if (mbsinit (&state))
+          return 1;
+    }
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gt_cv_ssize_t=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_incomplete_state=yes
 else
-  gt_cv_ssize_t=no
+  gl_cv_func_mbrtowc_incomplete_state=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
-$as_echo "$gt_cv_ssize_t" >&6; }
-  if test $gt_cv_ssize_t = no; then
-
-$as_echo "#define ssize_t int" >>confdefs.h
-
-  fi
-
-  # Code from module stdbool:
-
-
-
-  # Define two additional variables used in the Makefile substitution.
 
-  if test "$ac_cv_header_stdbool_h" = yes; then
-    STDBOOL_H=''
-  else
-    STDBOOL_H='stdbool.h'
-  fi
-
-
-  if test "$ac_cv_type__Bool" = yes; then
-    HAVE__BOOL=1
-  else
-    HAVE__BOOL=0
-  fi
+      fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
 
-  # Code from module stddef:
 
 
 
-  if test $gt_cv_c_wchar_t = no; then
-    HAVE_WCHAR_T=0
-    STDDEF_H=stddef.h
-  fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
-$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
-if ${gl_cv_decl_null_works+:} false; then :
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+
+                  case "$host_os" in
+                    # Guess no on Solaris 8.
+        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+                    # Guess yes otherwise.
+        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+      esac
+      if test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stddef.h>
-      int test[2 * (sizeof NULL == sizeof (void *)) -1];
 
-int
-main ()
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
 {
+  /* This fails on Solaris 8:
+     mbrtowc returns 2, and sets wc to 0x00F0.
+     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
 
-  ;
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 6, &state) != 4
+          && mbtowc (&wc, input + 3, 6) == 4)
+        return 1;
+    }
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_decl_null_works=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_sanitycheck=yes
 else
-  gl_cv_decl_null_works=no
+  gl_cv_func_mbrtowc_sanitycheck=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
-$as_echo "$gl_cv_decl_null_works" >&6; }
-  if test $gl_cv_decl_null_works = no; then
-    REPLACE_NULL=1
-    STDDEF_H=stddef.h
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+    REPLACE_MBSTATE_T=0
+    case "$gl_cv_func_mbrtowc_incomplete_state" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+    case "$gl_cv_func_mbrtowc_sanitycheck" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+  else
+    REPLACE_MBSTATE_T=1
   fi
-  if test -n "$STDDEF_H"; then
 
 
 
+  if test $ac_cv_func_mbrtowc = no; then
+    HAVE_MBRTOWC=0
+    ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MBRTOWC $ac_have_decl
+_ACEOF
 
+    if test $ac_cv_have_decl_mbrtowc = yes; then
+                        REPLACE_MBRTOWC=1
+    fi
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBRTOWC=1
+    else
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stddef_h='<'stddef.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
-$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
-if ${gl_cv_next_stddef_h+:} false; then :
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
+$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
+if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                  case "$host_os" in
+                  # Guess no on Solaris.
+        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
+                  # Guess yes otherwise.
+        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
 #include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
 
-_ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                  sed -n '\#/stddef.h#{
-                    s#.*"\(.*/stddef.h\)".*#\1#
-                    s#^/[^/]#//&#
-                    p
-                    q
-                  }'`'"'
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      char input[] = "\303\237er";
+      mbstate_t state;
+      wchar_t wc;
+      size_t ret;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      wc = (wchar_t) 0xBADFACE;
+      ret = mbrtowc (&wc, input, 5, &state);
+      if (ret != 2)
+        result |= 1;
+      if (!mbsinit (&state))
+        result |= 2;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      ret = mbrtowc (NULL, input, 5, &state);
+      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
+        result |= 4;
+      if (!mbsinit (&state))
+        result |= 8;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_null_arg1=yes
+else
+  gl_cv_func_mbrtowc_null_arg1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
-$as_echo "$gl_cv_next_stddef_h" >&6; }
-     fi
-     NEXT_STDDEF_H=$gl_cv_next_stddef_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'stddef.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stddef_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
-
-
-
-
-  fi
-
-  # Code from module stdint:
 
+      fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
+$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
 
-  if test $ac_cv_type_long_long_int = yes; then
-    HAVE_LONG_LONG_INT=1
-  else
-    HAVE_LONG_LONG_INT=0
-  fi
 
 
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
-    HAVE_UNSIGNED_LONG_LONG_INT=1
-  else
-    HAVE_UNSIGNED_LONG_LONG_INT=0
-  fi
 
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
+$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
+if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-      if test $ac_cv_header_inttypes_h = yes; then
-    HAVE_INTTYPES_H=1
-  else
-    HAVE_INTTYPES_H=0
-  fi
+                  case "$host_os" in
+              # Guess no on OSF/1.
+        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
+              # Guess yes otherwise.
+        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      mbstate_t state;
+      wchar_t wc;
+      int ret;
 
-      if test $ac_cv_header_sys_types_h = yes; then
-    HAVE_SYS_TYPES_H=1
-  else
-    HAVE_SYS_TYPES_H=0
-  fi
+      memset (&state, '\0', sizeof (mbstate_t));
+      wc = (wchar_t) 0xBADFACE;
+      mbrtowc (&wc, NULL, 5, &state);
+      /* Check that wc was not modified.  */
+      if (wc != (wchar_t) 0xBADFACE)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_null_arg2=yes
+else
+  gl_cv_func_mbrtowc_null_arg2=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
+$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
 
 
 
 
 
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
+$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
+if ${gl_cv_func_mbrtowc_retval+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+                  case "$host_os" in
+                                   # Guess no on HP-UX, Solaris, native Windows.
+        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+                                   # Guess yes otherwise.
+        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
+         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  int found_some_locale = 0;
+  /* This fails on Solaris.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      char input[] = "B\303\274\303\237er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stdint_h='<'stdint.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
-$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
-if ${gl_cv_next_stdint_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        {
+          input[1] = '\0';
+          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+            result |= 1;
+        }
+      found_some_locale = 1;
+    }
+  /* This fails on HP-UX 11.11.  */
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
 
-             if test $ac_cv_header_stdint_h = yes; then
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        {
+          input[1] = '\0';
+          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+            result |= 2;
+        }
+      found_some_locale = 1;
+    }
+  /* This fails on native Windows.  */
+  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+    {
+      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 4;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+    {
+      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdint.h>
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 8;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+    {
+      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 16;
+        }
+      found_some_locale = 1;
+    }
+  return (found_some_locale ? result : 77);
+}
 _ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-                                                            gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                  sed -n '\#/stdint.h#{
-                    s#.*"\(.*/stdint.h\)".*#\1#
-                    s#^/[^/]#//&#
-                    p
-                    q
-                  }'`'"'
-          else
-               gl_cv_next_stdint_h='<'stdint.h'>'
-             fi
-
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_retval=yes
+else
+  if test $? != 77; then
+             gl_cv_func_mbrtowc_retval=no
+           fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
-$as_echo "$gl_cv_next_stdint_h" >&6; }
-     fi
-     NEXT_STDINT_H=$gl_cv_next_stdint_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'stdint.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stdint_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
 
 
-  if test $ac_cv_header_stdint_h = yes; then
-    HAVE_STDINT_H=1
-  else
-    HAVE_STDINT_H=0
-  fi
 
 
-    if test $ac_cv_header_stdint_h = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
-$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
-if ${gl_cv_header_working_stdint_h+:} false; then :
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
+if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_header_working_stdint_h=no
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+
+                  case "$host_os" in
+                       # Guess no on Solaris 8 and 9.
+        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+                       # Guess yes otherwise.
+        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+      esac
+      if test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8 and 9.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "", 1, &state) != 0)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_nul_retval=yes
+else
+  gl_cv_func_mbrtowc_nul_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+      case "$gl_cv_func_mbrtowc_null_arg1" in
+        *yes) ;;
+        *)
+$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_null_arg2" in
+        *yes) ;;
+        *)
+$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_retval" in
+        *yes) ;;
+        *)
+$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_nul_retval" in
+        *yes) ;;
+        *)
+$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+    fi
+  fi
+
+if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
+
+
+  :
+
+fi
+
+
+
+
+
+          GNULIB_MBRTOWC=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                     # Guess no on AIX and OSF/1.
+        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+                     # Guess yes otherwise.
+        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+      esac
+      if test $LOCALE_JA != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+        if (mbsinit (&state))
+          return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_incomplete_state=yes
+else
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  case "$host_os" in
+                    # Guess no on Solaris 8.
+        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+                    # Guess yes otherwise.
+        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+      esac
+      if test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8:
+     mbrtowc returns 2, and sets wc to 0x00F0.
+     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 6, &state) != 4
+          && mbtowc (&wc, input + 3, 6) == 4)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_mbrtowc_sanitycheck=yes
+else
+  gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+    REPLACE_MBSTATE_T=0
+    case "$gl_cv_func_mbrtowc_incomplete_state" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+    case "$gl_cv_func_mbrtowc_sanitycheck" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
+  else
+    REPLACE_MBSTATE_T=1
+  fi
+
+
+
+  if test $ac_cv_func_mbsinit = no; then
+    HAVE_MBSINIT=0
+    ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MBSINIT $ac_have_decl
+_ACEOF
+
+    if test $ac_cv_have_decl_mbsinit = yes; then
+                        REPLACE_MBSINIT=1
+    fi
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBSINIT=1
+    else
+                        case "$host_os" in
+        mingw*) REPLACE_MBSINIT=1 ;;
+      esac
+    fi
+  fi
+
+if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
+
+
+  :
+
+fi
+
+
+
+
+
+          GNULIB_MBSINIT=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
+
+
+
+
+
+
+  if false; then
+    REPLACE_MBTOWC=1
+  fi
+
+if test $REPLACE_MBTOWC = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
+
+
+  :
+
+fi
+
+
+
+
+
+          GNULIB_MBTOWC=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
+
+
+
 
 
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#include <stdint.h>
-/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
-#if !(defined WCHAR_MIN && defined WCHAR_MAX)
-#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
-#endif
-
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
 
 
-#ifdef INT8_MAX
-int8_t a1 = INT8_MAX;
-int8_t a1min = INT8_MIN;
-#endif
-#ifdef INT16_MAX
-int16_t a2 = INT16_MAX;
-int16_t a2min = INT16_MIN;
-#endif
-#ifdef INT32_MAX
-int32_t a3 = INT32_MAX;
-int32_t a3min = INT32_MIN;
-#endif
-#ifdef INT64_MAX
-int64_t a4 = INT64_MAX;
-int64_t a4min = INT64_MIN;
-#endif
-#ifdef UINT8_MAX
-uint8_t b1 = UINT8_MAX;
-#else
-typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
-#endif
-#ifdef UINT16_MAX
-uint16_t b2 = UINT16_MAX;
-#endif
-#ifdef UINT32_MAX
-uint32_t b3 = UINT32_MAX;
-#endif
-#ifdef UINT64_MAX
-uint64_t b4 = UINT64_MAX;
-#endif
-int_least8_t c1 = INT8_C (0x7f);
-int_least8_t c1max = INT_LEAST8_MAX;
-int_least8_t c1min = INT_LEAST8_MIN;
-int_least16_t c2 = INT16_C (0x7fff);
-int_least16_t c2max = INT_LEAST16_MAX;
-int_least16_t c2min = INT_LEAST16_MIN;
-int_least32_t c3 = INT32_C (0x7fffffff);
-int_least32_t c3max = INT_LEAST32_MAX;
-int_least32_t c3min = INT_LEAST32_MIN;
-int_least64_t c4 = INT64_C (0x7fffffffffffffff);
-int_least64_t c4max = INT_LEAST64_MAX;
-int_least64_t c4min = INT_LEAST64_MIN;
-uint_least8_t d1 = UINT8_C (0xff);
-uint_least8_t d1max = UINT_LEAST8_MAX;
-uint_least16_t d2 = UINT16_C (0xffff);
-uint_least16_t d2max = UINT_LEAST16_MAX;
-uint_least32_t d3 = UINT32_C (0xffffffff);
-uint_least32_t d3max = UINT_LEAST32_MAX;
-uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
-uint_least64_t d4max = UINT_LEAST64_MAX;
-int_fast8_t e1 = INT_FAST8_MAX;
-int_fast8_t e1min = INT_FAST8_MIN;
-int_fast16_t e2 = INT_FAST16_MAX;
-int_fast16_t e2min = INT_FAST16_MIN;
-int_fast32_t e3 = INT_FAST32_MAX;
-int_fast32_t e3min = INT_FAST32_MIN;
-int_fast64_t e4 = INT_FAST64_MAX;
-int_fast64_t e4min = INT_FAST64_MIN;
-uint_fast8_t f1 = UINT_FAST8_MAX;
-uint_fast16_t f2 = UINT_FAST16_MAX;
-uint_fast32_t f3 = UINT_FAST32_MAX;
-uint_fast64_t f4 = UINT_FAST64_MAX;
-#ifdef INTPTR_MAX
-intptr_t g = INTPTR_MAX;
-intptr_t gmin = INTPTR_MIN;
-#endif
-#ifdef UINTPTR_MAX
-uintptr_t h = UINTPTR_MAX;
-#endif
-intmax_t i = INTMAX_MAX;
-uintmax_t j = UINTMAX_MAX;
+     if test $ac_cv_func_nl_langinfo = yes; then
+    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
+$as_echo_n "checking whether YESEXPR works... " >&6; }
+if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
 
-#include <limits.h> /* for CHAR_BIT */
-#define TYPE_MINIMUM(t) \
-  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
-#define TYPE_MAXIMUM(t) \
-  ((t) ((t) 0 < (t) -1 \
-        ? (t) -1 \
-        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
-struct s {
-  int check_PTRDIFF:
-      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
-      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
-      ? 1 : -1;
-  /* Detect bug in FreeBSD 6.0 / ia64.  */
-  int check_SIG_ATOMIC:
-      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
-      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
-      ? 1 : -1;
-  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
-  int check_WCHAR:
-      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
-      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
-      ? 1 : -1;
-  /* Detect bug in mingw.  */
-  int check_WINT:
-      WINT_MIN == TYPE_MINIMUM (wint_t)
-      && WINT_MAX == TYPE_MAXIMUM (wint_t)
-      ? 1 : -1;
+         case "$host_os" in
+                   # Guess no on irix systems.
+           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
+                   # Guess yes elsewhere.
+           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
+         esac
 
-  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
-  int check_UINT8_C:
-        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
-  int check_UINT16_C:
-        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
 
-  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
-#ifdef UINT8_MAX
-  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
-#endif
-#ifdef UINT16_MAX
-  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
-#endif
-#ifdef UINT32_MAX
-  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
-#endif
-#ifdef UINT64_MAX
-  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
-#endif
-  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
-  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
-  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
-  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
-  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
-  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
-  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
-  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
-  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
-  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
-  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
-};
+int
+main ()
+{
+return !*nl_langinfo(YESEXPR);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_nl_langinfo_yesexpr_works=yes
+else
+  gl_cv_func_nl_langinfo_yesexpr_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
+$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
+    case $gl_cv_func_nl_langinfo_yesexpr_works in
+      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
+      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
+    esac
+
+cat >>confdefs.h <<_ACEOF
+#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
+_ACEOF
+
+    if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
+        && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
+      :
+    else
+      REPLACE_NL_LANGINFO=1
+
+$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
+
+    fi
+  else
+    HAVE_NL_LANGINFO=0
+  fi
+
+if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
+
+fi
+
+
+
+
+
+          GNULIB_NL_LANGINFO=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
+
+
+
+
+
+# Check whether --with-included-regex was given.
+if test "${with_included_regex+set}" = set; then :
+  withval=$with_included_regex;
+fi
+
+
+  case $with_included_regex in #(
+  yes|no) ac_use_included_regex=$with_included_regex
+        ;;
+  '')
+    # If the system regex support is good enough that it passes the
+    # following run test, then default to *not* using the included regex.c.
+    # If cross compiling, assume the test would fail and use the included
+    # regex.c.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
+$as_echo_n "checking for working re_compile_pattern... " >&6; }
+if ${gl_cv_func_re_compile_pattern_working+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+         gl_cv_func_re_compile_pattern_working=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+           #include <locale.h>
+           #include <limits.h>
+           #include <regex.h>
+
+int
+main ()
+{
+int result = 0;
+            static struct re_pattern_buffer regex;
+            unsigned char folded_chars[UCHAR_MAX + 1];
+            int i;
+            const char *s;
+            struct re_registers regs;
+
+            /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+               This test needs valgrind to catch the bug on Debian
+               GNU/Linux 3.1 x86, but it might catch the bug better
+               on other platforms and it shouldn't hurt to try the
+               test here.  */
+            if (setlocale (LC_ALL, "en_US.UTF-8"))
+              {
+                static char const pat[] = "insert into";
+                static char const data[] =
+                  "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+                re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+                               | RE_ICASE);
+                memset (&regex, 0, sizeof regex);
+                s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+                if (s)
+                  result |= 1;
+                else if (re_search (&regex, data, sizeof data - 1,
+                                    0, sizeof data - 1, &regs)
+                         != -1)
+                  result |= 1;
+                if (! setlocale (LC_ALL, "C"))
+                  return 1;
+              }
 
-int
-main ()
-{
+            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
+            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[^x]b", 6, &regex);
+            if (s)
+              result |= 2;
+            /* This should fail, but succeeds for glibc-2.5.  */
+            else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+              result |= 2;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-                                                    if test "$cross_compiling" = yes; then :
-                 gl_cv_header_working_stdint_h=yes
+            /* This regular expression is from Spencer ere test number 75
+               in grep-2.3.  */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+            memset (&regex, 0, sizeof regex);
+            for (i = 0; i <= UCHAR_MAX; i++)
+              folded_chars[i] = i;
+            regex.translate = folded_chars;
+            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
+            /* This should fail with _Invalid character class name_ error.  */
+            if (!s)
+              result |= 4;
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+            /* Ensure that [b-a] is diagnosed as invalid, when
+               using RE_NO_EMPTY_RANGES. */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[b-a]", 6, &regex);
+            if (s == 0)
+              result |= 8;
 
+            /* This should succeed, but does not for glibc-2.1.3.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("{1", 2, &regex);
+            if (s)
+              result |= 8;
 
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#include <stdint.h>
+            /* The following example is derived from a problem report
+               against gawk from Jorge Stolfi <stolfi at ic.unicamp.br>.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[an\371]*n", 7, &regex);
+            if (s)
+              result |= 8;
+            /* This should match, but does not for glibc-2.2.1.  */
+            else if (re_match (&regex, "an", 2, 0, &regs) != 2)
+              result |= 8;
 
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 8;
+            /* glibc-2.2.93 does not work with a negative RANGE argument.  */
+            else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+              result |= 8;
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
+            /* The version of regex.c in older versions of gnulib
+               ignored RE_ICASE.  Detect that problem too.  */
+            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 16;
+            else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+              result |= 16;
 
+            /* Catch a bug reported by Vin Shelton in
+               http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+               */
+            re_set_syntax (RE_SYNTAX_POSIX_BASIC
+                           & ~RE_CONTEXT_INVALID_DUP
+                           & ~RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+            if (s)
+              result |= 32;
 
-#include <stdio.h>
-#include <string.h>
-#define MVAL(macro) MVAL1(macro)
-#define MVAL1(expression) #expression
-static const char *macro_values[] =
-  {
-#ifdef INT8_MAX
-    MVAL (INT8_MAX),
-#endif
-#ifdef INT16_MAX
-    MVAL (INT16_MAX),
-#endif
-#ifdef INT32_MAX
-    MVAL (INT32_MAX),
-#endif
-#ifdef INT64_MAX
-    MVAL (INT64_MAX),
-#endif
-#ifdef UINT8_MAX
-    MVAL (UINT8_MAX),
-#endif
-#ifdef UINT16_MAX
-    MVAL (UINT16_MAX),
-#endif
-#ifdef UINT32_MAX
-    MVAL (UINT32_MAX),
-#endif
-#ifdef UINT64_MAX
-    MVAL (UINT64_MAX),
-#endif
-    NULL
-  };
+            /* REG_STARTEND was added to glibc on 2004-01-15.
+               Reject older versions.  */
+            if (! REG_STARTEND)
+              result |= 64;
 
-int
-main ()
-{
+#if 0
+            /* It would be nice to reject hosts whose regoff_t values are too
+               narrow (including glibc on hosts with 64-bit ptrdiff_t and
+               32-bit int), but we should wait until glibc implements this
+               feature.  Otherwise, support for equivalence classes and
+               multibyte collation symbols would always be broken except
+               when compiling --without-included-regex.   */
+            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+                || sizeof (regoff_t) < sizeof (ssize_t))
+              result |= 64;
+#endif
 
-  const char **mv;
-  for (mv = macro_values; *mv != NULL; mv++)
-    {
-      const char *value = *mv;
-      /* Test whether it looks like a cast expression.  */
-      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
-          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
-          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
-          || strncmp (value, "((int)"/*)*/, 6) == 0
-          || strncmp (value, "((signed short)"/*)*/, 15) == 0
-          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
-        return mv - macro_values + 1;
-    }
-  return 0;
+            return result;
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_header_working_stdint_h=yes
+  gl_cv_func_re_compile_pattern_working=yes
+else
+  gl_cv_func_re_compile_pattern_working=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
+$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
+    case $gl_cv_func_re_compile_pattern_working in #(
+    yes) ac_use_included_regex=no;; #(
+    no) ac_use_included_regex=yes;;
+    esac
+    ;;
+  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
+    ;;
+  esac
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
-$as_echo "$gl_cv_header_working_stdint_h" >&6; }
-  fi
-  if test "$gl_cv_header_working_stdint_h" = yes; then
-    STDINT_H=
-  else
-            for ac_header in sys/inttypes.h sys/bitypes.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+  if test $ac_use_included_regex = yes; then
 
-fi
+$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
 
-done
 
-    if test $ac_cv_header_sys_inttypes_h = yes; then
-      HAVE_SYS_INTTYPES_H=1
-    else
-      HAVE_SYS_INTTYPES_H=0
-    fi
+$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
+
+
+$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
+
+
+$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
+
+
+$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
+
+
+$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
+
+
+$as_echo "#define re_search rpl_re_search" >>confdefs.h
+
+
+$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
+
+
+$as_echo "#define re_match rpl_re_match" >>confdefs.h
+
+
+$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
+
+
+$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
+
+
+$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
+
+
+$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
+
+
+$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
+
 
-    if test $ac_cv_header_sys_bitypes_h = yes; then
-      HAVE_SYS_BITYPES_H=1
-    else
-      HAVE_SYS_BITYPES_H=0
-    fi
+$as_echo "#define regexec rpl_regexec" >>confdefs.h
 
 
+$as_echo "#define regerror rpl_regerror" >>confdefs.h
 
 
+$as_echo "#define regfree rpl_regfree" >>confdefs.h
 
+  fi
 
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
+if test $ac_use_included_regex = yes; then
 
 
-  for gltype in ptrdiff_t size_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
-$as_echo_n "checking for bit size of $gltype... " >&6; }
-if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
 
-#include <limits.h>"; then :
 
-else
-  result=unknown
-fi
 
-       eval gl_cv_bitsizeof_${gltype}=\$result
 
-fi
-eval ac_res=\$gl_cv_bitsizeof_${gltype}
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    eval result=\$gl_cv_bitsizeof_${gltype}
-    if test $result = unknown; then
-                                                result=0
-    fi
-    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    cat >>confdefs.h <<_ACEOF
-#define BITSIZEOF_${GLTYPE} $result
-_ACEOF
 
-    eval BITSIZEOF_${GLTYPE}=\$result
-  done
 
+  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
 
-  fi
 
 
-  for gltype in sig_atomic_t wchar_t wint_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
-$as_echo_n "checking for bit size of $gltype... " >&6; }
-if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
 
-#include <limits.h>"; then :
 
-else
-  result=unknown
-fi
 
-       eval gl_cv_bitsizeof_${gltype}=\$result
+  for ac_header in libintl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBINTL_H 1
+_ACEOF
 
 fi
-eval ac_res=\$gl_cv_bitsizeof_${gltype}
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    eval result=\$gl_cv_bitsizeof_${gltype}
-    if test $result = unknown; then
-                                                result=0
-    fi
-    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    cat >>confdefs.h <<_ACEOF
-#define BITSIZEOF_${GLTYPE} $result
-_ACEOF
 
-    eval BITSIZEOF_${GLTYPE}=\$result
-  done
+done
+
+
+  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
+"
+if test "x$ac_cv_have_decl_isblank" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISBLANK $ac_have_decl
+_ACEOF
 
 
+fi
 
-  for gltype in sig_atomic_t wchar_t wint_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
-$as_echo_n "checking whether $gltype is signed... " >&6; }
-if eval \${gl_cv_type_${gltype}_signed+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
+if ${gt_cv_ssize_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
-
-            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+#include <sys/types.h>
 int
 main ()
 {
-
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+            return !x;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  result=yes
+  gt_cv_ssize_t=yes
 else
-  result=no
+  gt_cv_ssize_t=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       eval gl_cv_type_${gltype}_signed=\$result
-
 fi
-eval ac_res=\$gl_cv_type_${gltype}_signed
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    eval result=\$gl_cv_type_${gltype}_signed
-    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    if test "$result" = yes; then
-      cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGNED_${GLTYPE} 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
+$as_echo "$gt_cv_ssize_t" >&6; }
+  if test $gt_cv_ssize_t = no; then
 
-      eval HAVE_SIGNED_${GLTYPE}=1
-    else
-      eval HAVE_SIGNED_${GLTYPE}=0
-    fi
-  done
+$as_echo "#define ssize_t int" >>confdefs.h
 
+  fi
 
-  gl_cv_type_ptrdiff_t_signed=yes
-  gl_cv_type_size_t_signed=no
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
 
 
-  for gltype in ptrdiff_t size_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
-if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval gl_cv_type_${gltype}_suffix=no
-       eval result=\$gl_cv_type_${gltype}_signed
-       if test "$result" = yes; then
-         glsufu=
-       else
-         glsufu=u
-       fi
-       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
-         case $glsuf in
-           '')  gltype1='int';;
-           l)   gltype1='long int';;
-           ll)  gltype1='long long int';;
-           i64) gltype1='__int64';;
-           u)   gltype1='unsigned int';;
-           ul)  gltype1='unsigned long int';;
-           ull) gltype1='unsigned long long int';;
-           ui64)gltype1='unsigned __int64';;
-         esac
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
+  # Define two additional variables used in the Makefile substitution.
 
-              extern $gltype foo;
-              extern $gltype1 foo;
-int
-main ()
-{
+  if test "$ac_cv_header_stdbool_h" = yes; then
+    STDBOOL_H=''
+  else
+    STDBOOL_H='stdbool.h'
+  fi
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval gl_cv_type_${gltype}_suffix=\$glsuf
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         eval result=\$gl_cv_type_${gltype}_suffix
-         test "$result" != no && break
-       done
+   if test -n "$STDBOOL_H"; then
+  GL_GENERATE_STDBOOL_H_TRUE=
+  GL_GENERATE_STDBOOL_H_FALSE='#'
+else
+  GL_GENERATE_STDBOOL_H_TRUE='#'
+  GL_GENERATE_STDBOOL_H_FALSE=
 fi
-eval ac_res=\$gl_cv_type_${gltype}_suffix
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    eval result=\$gl_cv_type_${gltype}_suffix
-    test "$result" = no && result=
-    eval ${GLTYPE}_SUFFIX=\$result
-    cat >>confdefs.h <<_ACEOF
-#define ${GLTYPE}_SUFFIX $result
-_ACEOF
-
-  done
 
 
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
   fi
 
 
-  for gltype in sig_atomic_t wchar_t wint_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
-if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval gl_cv_type_${gltype}_suffix=no
-       eval result=\$gl_cv_type_${gltype}_signed
-       if test "$result" = yes; then
-         glsufu=
-       else
-         glsufu=u
-       fi
-       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
-         case $glsuf in
-           '')  gltype1='int';;
-           l)   gltype1='long int';;
-           ll)  gltype1='long long int';;
-           i64) gltype1='__int64';;
-           u)   gltype1='unsigned int';;
-           ul)  gltype1='unsigned long int';;
-           ull) gltype1='unsigned long long int';;
-           ui64)gltype1='unsigned __int64';;
-         esac
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+
+  STDDEF_H=
+  if test $gt_cv_c_wchar_t = no; then
+    HAVE_WCHAR_T=0
+    STDDEF_H=stddef.h
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if ${gl_cv_decl_null_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stddef.h>
+      int test[2 * (sizeof NULL == sizeof (void *)) -1];
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
-
-              extern $gltype foo;
-              extern $gltype1 foo;
 int
 main ()
 {
@@ -21929,33 +23574,98 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  eval gl_cv_type_${gltype}_suffix=\$glsuf
+  gl_cv_decl_null_works=yes
+else
+  gl_cv_decl_null_works=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         eval result=\$gl_cv_type_${gltype}_suffix
-         test "$result" != no && break
-       done
 fi
-eval ac_res=\$gl_cv_type_${gltype}_suffix
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    eval result=\$gl_cv_type_${gltype}_suffix
-    test "$result" = no && result=
-    eval ${GLTYPE}_SUFFIX=\$result
-    cat >>confdefs.h <<_ACEOF
-#define ${GLTYPE}_SUFFIX $result
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+$as_echo "$gl_cv_decl_null_works" >&6; }
+  if test $gl_cv_decl_null_works = no; then
+    REPLACE_NULL=1
+    STDDEF_H=stddef.h
+  fi
+
+   if test -n "$STDDEF_H"; then
+  GL_GENERATE_STDDEF_H_TRUE=
+  GL_GENERATE_STDDEF_H_FALSE='#'
+else
+  GL_GENERATE_STDDEF_H_TRUE='#'
+  GL_GENERATE_STDDEF_H_FALSE=
+fi
+
+  if test -n "$STDDEF_H"; then
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stddef_h='<'stddef.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
+if ${gl_cv_next_stddef_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+
 _ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'stddef.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+$as_echo "$gl_cv_next_stddef_h" >&6; }
+     fi
+     NEXT_STDDEF_H=$gl_cv_next_stddef_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stddef.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stddef_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
 
-  done
 
 
 
-    STDINT_H=stdint.h
   fi
 
 
-  # Code from module stdlib:
 
 
 
@@ -21984,13 +23694,27 @@ _ACEOF
                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
                  *)    gl_absname_cpp="$ac_cpp" ;;
                esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'stdlib.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
                                                             gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                  sed -n '\#/stdlib.h#{
-                    s#.*"\(.*/stdlib.h\)".*#\1#
-                    s#^/[^/]#//&#
-                    p
-                    q
-                  }'`'"'
+                      sed -n "$gl_absolute_header_sed"`'"'
 
 
 fi
@@ -22011,45 +23735,9 @@ $as_echo "$gl_cv_next_stdlib_h" >&6; }
 
 
 
-  for ac_header in random.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "random.h" "ac_cv_header_random_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_random_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_RANDOM_H 1
-_ACEOF
-
-fi
-
-done
-
-  if test $ac_cv_header_random_h = yes; then
-    HAVE_RANDOM_H=1
-  else
-    HAVE_RANDOM_H=0
-  fi
-
-  ac_fn_c_check_type "$LINENO" "struct random_data" "ac_cv_type_struct_random_data" "#include <stdlib.h>
-      #if HAVE_RANDOM_H
-      # include <random.h>
-      #endif
-
-"
-if test "x$ac_cv_type_struct_random_data" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_RANDOM_DATA 1
-_ACEOF
-
-
-else
-  HAVE_STRUCT_RANDOM_DATA=0
-fi
-
 
 
-    for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp     mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r     setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt     unsetenv; do
+    for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps     posix_openpt ptsname ptsname_r random random_r realpath rpmatch     setenv setstate setstate_r srandom srandom_r     strtod strtoll strtoull unlockpt unsetenv; do
     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
@@ -22085,7 +23773,7 @@ fi
 eval ac_res=\$$as_gl_Symbol
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
 _ACEOF
@@ -22095,8 +23783,168 @@ fi
       done
 
 
-  # Code from module streq:
-  # Code from module unistd:
+
+
+
+  for ac_func in strcasecmp
+do :
+  ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRCASECMP 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_strcasecmp = no; then
+    HAVE_STRCASECMP=0
+  fi
+
+
+
+  for ac_func in strncasecmp
+do :
+  ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
+if test "x$ac_cv_func_strncasecmp" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRNCASECMP 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_strncasecmp = yes; then
+    HAVE_STRNCASECMP=1
+  else
+    HAVE_STRNCASECMP=0
+  fi
+  ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNCASECMP $ac_have_decl
+_ACEOF
+
+  if test $ac_cv_have_decl_strncasecmp = no; then
+    HAVE_DECL_STRNCASECMP=0
+  fi
+
+
+if test $HAVE_STRCASECMP = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
+
+
+  :
+
+fi
+if test $HAVE_STRNCASECMP = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
+
+
+  :
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_types_h='<'sys/types.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
+$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
+if ${gl_cv_next_sys_types_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'sys/types.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
+$as_echo "$gl_cv_next_sys_types_h" >&6; }
+     fi
+     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/types.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_types_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -22131,13 +23979,27 @@ _ACEOF
                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
                  *)    gl_absname_cpp="$ac_cpp" ;;
                esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'unistd.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
                                                             gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                  sed -n '\#/unistd.h#{
-                    s#.*"\(.*/unistd.h\)".*#\1#
-                    s#^/[^/]#//&#
-                    p
-                    q
-                  }'`'"'
+                      sed -n "$gl_absolute_header_sed"`'"'
           else
                gl_cv_next_unistd_h='<'unistd.h'>'
              fi
@@ -22169,7 +24031,11 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
 
 
 
-    for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat     fsync ftruncate getcwd getdomainname getdtablesize getgroups     gethostname getlogin getlogin_r getpagesize getusershell setusershell     endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink     readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat     usleep; do
+
+
+
+
+    for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat     fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups     gethostname getlogin getlogin_r getpagesize     getusershell setusershell endusershell     group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite     readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r     unlink unlinkat usleep; do
     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
@@ -22178,7 +24044,10 @@ if eval \${$as_gl_Symbol+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <unistd.h>
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 /* Some systems declare various items in the wrong headers.  */
 #if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <fcntl.h>
@@ -22208,7 +24077,7 @@ fi
 eval ac_res=\$$as_gl_Symbol
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
 _ACEOF
@@ -22218,9 +24087,6 @@ fi
       done
 
 
-  # Code from module verify:
-  # Code from module warn-on-use:
-  # Code from module wchar:
 
 
 
@@ -22254,13 +24120,27 @@ _ACEOF
                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
                  *)    gl_absname_cpp="$ac_cpp" ;;
                esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'wchar.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
                                                             gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                  sed -n '\#/wchar.h#{
-                    s#.*"\(.*/wchar.h\)".*#\1#
-                    s#^/[^/]#//&#
-                    p
-                    q
-                  }'`'"'
+                      sed -n "$gl_absolute_header_sed"`'"'
           else
                gl_cv_next_wchar_h='<'wchar.h'>'
              fi
@@ -22302,7 +24182,7 @@ $as_echo "$gl_cv_next_wchar_h" >&6; }
 
 
 
-    for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb     wcsrtombs wcsnrtombs wcwidth; do
+    for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb      wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset      wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp      wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr      wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth     ; do
     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
@@ -22342,7 +24222,7 @@ fi
 eval ac_res=\$$as_gl_Symbol
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
 _ACEOF
@@ -22352,7 +24232,6 @@ fi
       done
 
 
-  # Code from module wcrtomb:
 
 
 
@@ -22503,19 +24382,38 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
       *yes) ;;
       *) REPLACE_MBSTATE_T=1 ;;
     esac
-  else
-    REPLACE_MBSTATE_T=1
-  fi
-  if test $REPLACE_MBSTATE_T = 1; then
-
-    :
-
+  else
+    REPLACE_MBSTATE_T=1
   fi
 
 
 
   if test $ac_cv_func_wcrtomb = no; then
     HAVE_WCRTOMB=0
+    ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_WCRTOMB $ac_have_decl
+_ACEOF
+
+    if test $ac_cv_have_decl_wcrtomb = yes; then
+                        REPLACE_WCRTOMB=1
+    fi
   else
     if test $REPLACE_MBSTATE_T = 1; then
       REPLACE_WCRTOMB=1
@@ -22600,10 +24498,8 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
       esac
     fi
   fi
-  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
-
-    :
 
+if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
 
 
 
@@ -22617,12 +24513,15 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
 
   :
 
-  fi
+fi
+
+
+
 
 
+          GNULIB_WCRTOMB=1
 
 
-  GNULIB_WCRTOMB=1
 
 
 
@@ -22630,7 +24529,7 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
 
 
 
-  # Code from module wctype:
+
 
 
 
@@ -22643,21 +24542,6 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
 
 
 
-  if test $ac_cv_func_iswblank = yes; then
-    HAVE_ISWBLANK=1
-    REPLACE_ISWBLANK=0
-  else
-    HAVE_ISWBLANK=0
-    if test $ac_cv_have_decl_iswblank = yes; then
-      REPLACE_ISWBLANK=1
-    else
-      REPLACE_ISWBLANK=0
-    fi
-  fi
-
-
-
-
 
 
   if test $gt_cv_c_wint_t = yes; then
@@ -22697,13 +24581,27 @@ _ACEOF
                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
                  *)    gl_absname_cpp="$ac_cpp" ;;
                esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'wctype.h' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                  sed -n '\#/wctype.h#{
-                    s#.*"\(.*/wctype.h\)".*#\1#
-                    s#^/[^/]#//&#
-                    p
-                    q
-                  }'`'"'
+                      sed -n "$gl_absolute_header_sed"`'"'
           else
                gl_cv_next_wctype_h='<'wctype.h'>'
              fi
@@ -22751,9 +24649,9 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_func_iswcntrl_works=yes
+  gl_cv_func_iswcntrl_works="guessing yes"
 else
-  gl_cv_func_iswcntrl_works=no
+  gl_cv_func_iswcntrl_works="guessing no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
@@ -22793,30 +24691,203 @@ $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
   fi
 
 
-  if test "$gl_cv_func_iswcntrl_works" = no; then
-    REPLACE_ISWCNTRL=1
-  else
-    REPLACE_ISWCNTRL=0
-  fi
+  case "$gl_cv_func_iswcntrl_works" in
+    *yes) REPLACE_ISWCNTRL=0 ;;
+    *)    REPLACE_ISWCNTRL=1 ;;
+  esac
 
 
   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
         :
+  fi
+
+  if test $REPLACE_ISWCNTRL = 1; then
+    REPLACE_TOWLOWER=1
   else
-    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
+    for ac_func in towlower
+do :
+  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
+if test "x$ac_cv_func_towlower" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TOWLOWER 1
+_ACEOF
+
+fi
+done
+
+    if test $ac_cv_func_towlower = yes; then
+      REPLACE_TOWLOWER=0
+    else
+      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+             included before <wchar.h>.
+             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+             must be included before <wchar.h>.  */
+          #include <stddef.h>
+          #include <stdio.h>
+          #include <time.h>
+          #include <wchar.h>
+          #if HAVE_WCTYPE_H
+          # include <wctype.h>
+          #endif
+
+"
+if test "x$ac_cv_have_decl_towlower" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TOWLOWER $ac_have_decl
+_ACEOF
+
+      if test $ac_cv_have_decl_towlower = yes; then
+                                REPLACE_TOWLOWER=1
+      else
+        REPLACE_TOWLOWER=0
+      fi
+    fi
+  fi
 
 
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
+        :
+  fi
 
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
+$as_echo_n "checking for wctype_t... " >&6; }
+if ${gl_cv_type_wctype_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #if HAVE_WCTYPE_H
+            # include <wctype.h>
+            #endif
+            wctype_t a;
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_wctype_t=yes
+else
+  gl_cv_type_wctype_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
+$as_echo "$gl_cv_type_wctype_t" >&6; }
+  if test $gl_cv_type_wctype_t = no; then
+    HAVE_WCTYPE_T=0
+  fi
 
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
+$as_echo_n "checking for wctrans_t... " >&6; }
+if ${gl_cv_type_wctrans_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #include <wctype.h>
+            wctrans_t a;
 
-  gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
+int
+main ()
+{
 
-    fi
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_wctrans_t=yes
+else
+  gl_cv_type_wctrans_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
+$as_echo "$gl_cv_type_wctrans_t" >&6; }
+  if test $gl_cv_type_wctrans_t = no; then
+    HAVE_WCTRANS_T=0
   fi
 
+
+    for gl_func in wctype iswctype wctrans towctrans     ; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval \${$as_gl_Symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# include <wchar.h>
+#endif
+#include <wctype.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+                     eval ac_cv_have_decl_$gl_func=yes
+fi
+      done
+
+
   # End of code from modules
 
 
@@ -22909,7 +24980,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -22952,7 +25023,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -23087,35 +25158,26 @@ $as_echo "yes; used pkg-config" >&6; }
     then
 	   version_libcurl=`curl-config --version | sed 's at libcurl \(.*\)@\1@'`
 
-	   version_M=`echo $version_libcurl | sed 's@^\([0-9]\)*\.\([0-9]*\)\.\([0-9]*\)$@\1@'`
-	   version_m=`echo $version_libcurl | sed 's@^\([0-9]\)*\.\([0-9]*\)\.\([0-9]*\)$@\2@'`
-	   version_m_m=`echo $version_libcurl | sed 's@^\([0-9]\)*\.\([0-9]*\)\.\([0-9]*\)$@\3@'`
-
-
-       if test $version_M -gt 7
-	   then
-		  libcurl_ok='yes'
-	   elif test $version_M -eq 7 && test $version_m -gt 10
-	   then
-		  libcurl_ok='yes'
-	   elif test $version_M -eq 7 && test $version_m -eq 10 && test $version_m_m -gt 5
-	   then
-		  libcurl_ok='yes'
-	   else
-		  libcurl_ok='no'
-	   fi
-
-	   	   if test $libcurl_ok = "no"
-	   then
-		  as_fn_error $? "must have libcurl 7.10.6 or greater, found $version_libcurl" "$LINENO" 5
-	   fi
+           as_arg_v1="$version_libcurl"
+as_arg_v2="7.10.6"
+awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
+case $? in #(
+  1) :
+    as_fn_error $? "I could not find libcurl 7.10.6 or newer, found $version_libcurl" "$LINENO" 5 ;; #(
+  0) :
+     ;; #(
+  2) :
+     ;; #(
+  *) :
+     ;;
+esac
 
 	   CURL_LIBS="`curl-config --libs`"
 	   CURL_STATIC_LIBS=$CURL_LIBS
 	   curlprivatelibs="`curl-config --libs`"
 	   CURL_CFLAGS="`curl-config --cflags`"
-	   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; used curl-config" >&5
-$as_echo "yes; used curl-config" >&6; }
+	   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; used curl-config and found version $version_libcurl" >&5
+$as_echo "yes; used curl-config and found version $version_libcurl" >&6; }
     else
 	   as_fn_error $? "I could not find libcurl" "$LINENO" 5
     fi
@@ -23145,8 +25207,7 @@ then
     { $as_echo "$as_me:${as_lineno-$LINENO}: Using $with_xml2_prefix as the libxml2 prefix directory." >&5
 $as_echo "$as_me: Using $with_xml2_prefix as the libxml2 prefix directory." >&6;}
     XML2_LIBS="`$with_xml2_prefix/bin/xml2-config --libs`"
-    XML2_STATIC_LIBS=$XML2_LIBS
-    xmlprivatelibs="`$with_xml2_prefix/bin/xml2-config --libs`"
+        xmlprivatelibs="`$with_xml2_prefix/bin/xml2-config --libs`"
     XML2_CFLAGS="`$with_xml2_prefix/bin/xml2-config --cflags`"
     xml_set="yes"
 elif test -n "$with_xml2_prefix"
@@ -23234,32 +25295,34 @@ $as_echo_n "checking for libxml2... " >&6; }
 if test $libdap_pkgconfig_libxml2 = 'yes'
 then
 	xmlprivatereq=$libdap_libxml2_module
-	XML2_STATIC_LIBS="`$PKG_CONFIG --static --libs libxml-2.0`"
+		XML2_LIBS="`$PKG_CONFIG --libs libxml-2.0`"
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; used pkg-config" >&5
 $as_echo "yes; used pkg-config" >&6; }
 elif xml2-config --version > /dev/null 2>&1
 then
 	version_libxml2=`xml2-config --version`
-	version_M=`echo $version_libxml2 | sed 's@^\([0-9]\)*\.\([0-9]*\)\.\([0-9]*\)$@\1@'`
-	version_m=`echo $version_libxml2 | sed 's@^\([0-9]\)*\.\([0-9]*\)\.\([0-9]*\)$@\2@'`
-	version_m_m=`echo $version_libxml2 | sed 's@^\([0-9]\)*\.\([0-9]*\)\.\([0-9]*\)$@\3@'`
-
-	if test $version_M -gt 2
-	then
-		libxml2_ok='yes'
-	elif test $version_M -eq 2 && test $version_m -eq 6 && test $version_m_m -ge 16
-	then
-                libxml2_ok='yes'
-	fi
+
+        as_arg_v1="$version_libxml2"
+as_arg_v2="2.6.16"
+awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
+case $? in #(
+  1) :
+    as_fn_error $? "I could not find libxml2 2.6.16 or newer" "$LINENO" 5 ;; #(
+  0) :
+     ;; #(
+  2) :
+     ;; #(
+  *) :
+     ;;
+esac
 
 	XML2_LIBS="`xml2-config --libs`"
-	XML2_STATIC_LIBS=$XML2_LIBS
-	XML2_CFLAGS="`xml2-config --cflags`"
+		XML2_CFLAGS="`xml2-config --cflags`"
 	xmlprivatelibs="`xml2-config --libs`"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; used xml2-config" >&5
-$as_echo "yes; used xml2-config" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; used xml2-config and found version $version_libxml2" >&5
+$as_echo "yes; used xml2-config and found version $version_libxml2" >&6; }
 else
-	as_fn_error $? "I could not find libxml2 2.6.16 or newer" "$LINENO" 5
+	as_fn_error $? "I could not find ml2-config" "$LINENO" 5
 fi
 fi
 
@@ -23268,9 +25331,6 @@ fi
 
 
 
-
-# DAP_CHECK_ZLIB
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
@@ -23409,7 +25469,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_CPPUNIT_CONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -23515,6 +25575,31 @@ fi
 
 
 
+libdap_libgridfields_module='libgridfields >= 0.7.0'
+
+libgf_ok="no"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
     # Check whether --enable-debug was given.
 if test "${enable_debug+set}" = set; then :
   enableval=$enable_debug; DEBUG=$enableval
@@ -23560,19 +25645,68 @@ _ACEOF
 
 fi
 
-# Check whether --enable-checksums was given.
-if test "${enable_checksums+set}" = set; then :
-  enableval=$enable_checksums;
+# Check whether --enable-dap4 was given.
+if test "${enable_dap4+set}" = set; then :
+  enableval=$enable_dap4;
+fi
+
+
+if test "x$enable_dap4" = "xyes"; then :
+
+
+$as_echo "#define DAP4 1" >>confdefs.h
+
+     if true; then
+  DAP4_DEFINED_TRUE=
+  DAP4_DEFINED_FALSE='#'
+else
+  DAP4_DEFINED_TRUE='#'
+  DAP4_DEFINED_FALSE=
+fi
+
+else
+        if false; then
+  DAP4_DEFINED_TRUE=
+  DAP4_DEFINED_FALSE='#'
+else
+  DAP4_DEFINED_TRUE='#'
+  DAP4_DEFINED_FALSE=
 fi
 
 
-if test "x$enable_checksums" = "xyes"; then :
+fi
+
+# Check whether --enable-developer was given.
+if test "${enable_developer+set}" = set; then :
+  enableval=$enable_developer; case "${enableval}" in
+       yes) build_developer=true ;;
+       no)  build_developer=false ;;
+       *) as_fn_error $? "bad value ${enableval} for --enable-developer" "$LINENO" 5 ;;
+     esac
+else
+  build_developer=false
+fi
 
 
-$as_echo "#define CHECKSUMS 1" >>confdefs.h
+if test "x$build_developer" = "xtrue"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: \"Building developer version\"" >&5
+$as_echo "$as_me: \"Building developer version\"" >&6;}
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: \"Not building developer version\"" >&5
+$as_echo "$as_me: \"Not building developer version\"" >&6;}
 
+$as_echo "#define NDEBUG 1" >>confdefs.h
 
 fi
+ if test "x$build_developer" = "xtrue"; then
+  BUILD_DEVELOPER_TRUE=
+  BUILD_DEVELOPER_FALSE='#'
+else
+  BUILD_DEVELOPER_TRUE='#'
+  BUILD_DEVELOPER_FALSE=
+fi
+
+
 
 
 
@@ -23581,6 +25715,8 @@ fi
 
 ac_config_files="$ac_config_files Makefile libdap.pc libdapclient.pc libdapserver.pc main_page.doxygen doxy.conf gl/Makefile tests/Makefile tests/atlocal unit-tests/Makefile unit-tests/cache-testsuite/Makefile"
 
+
+
 ac_config_files="$ac_config_files dap-config"
 
 
@@ -23693,6 +25829,14 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
  if test -n "$EXEEXT"; then
   am__EXEEXT_TRUE=
   am__EXEEXT_FALSE='#'
@@ -23713,10 +25857,6 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${USE_C99_TYPES_TRUE}" && test -z "${USE_C99_TYPES_FALSE}"; then
-  as_fn_error $? "conditional \"USE_C99_TYPES\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${COMPILER_IS_GCC_TRUE}" && test -z "${COMPILER_IS_GCC_FALSE}"; then
   as_fn_error $? "conditional \"COMPILER_IS_GCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -23725,10 +25865,39 @@ if test -z "${COMPILER_IS_GCC_TRUE}" && test -z "${COMPILER_IS_GCC_FALSE}"; then
   as_fn_error $? "conditional \"COMPILER_IS_GCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+
+if test -z "${USE_C99_TYPES_TRUE}" && test -z "${USE_C99_TYPES_FALSE}"; then
+  as_fn_error $? "conditional \"USE_C99_TYPES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
+  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then
+  as_fn_error $? "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
+  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
+  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
+  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
+  as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
     gl_libobjs=
     gl_ltlibobjs=
@@ -23769,6 +25938,18 @@ if test -z "${CPPUNIT_TRUE}" && test -z "${CPPUNIT_FALSE}"; then
   as_fn_error $? "conditional \"CPPUNIT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${DAP4_DEFINED_TRUE}" && test -z "${DAP4_DEFINED_FALSE}"; then
+  as_fn_error $? "conditional \"DAP4_DEFINED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DAP4_DEFINED_TRUE}" && test -z "${DAP4_DEFINED_FALSE}"; then
+  as_fn_error $? "conditional \"DAP4_DEFINED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_DEVELOPER_TRUE}" && test -z "${BUILD_DEVELOPER_FALSE}"; then
+  as_fn_error $? "conditional \"BUILD_DEVELOPER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
@@ -24067,16 +26248,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -24136,28 +26317,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -24178,8 +26347,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libdap $as_me 3.11.7, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+This file was extended by libdap $as_me 3.12.0, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -24244,11 +26413,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libdap config.status 3.11.7
-configured by $0, generated by GNU Autoconf 2.68,
+libdap config.status 3.12.0
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -24339,7 +26508,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
@@ -24382,6 +26551,7 @@ pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
@@ -24464,7 +26634,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
@@ -24536,7 +26705,6 @@ with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
@@ -24575,6 +26743,7 @@ _LTECHO_EOF'
 # Quote evaled strings.
 for var in SHELL \
 ECHO \
+PATH_SEPARATOR \
 SED \
 GREP \
 EGREP \
@@ -24625,7 +26794,6 @@ with_gnu_ld \
 allow_undefined_flag \
 no_undefined_flag \
 hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
 hardcode_libdir_separator \
 exclude_expsyms \
 include_expsyms \
@@ -24659,7 +26827,6 @@ with_gnu_ld_CXX \
 allow_undefined_flag_CXX \
 no_undefined_flag_CXX \
 hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_CXX \
 hardcode_libdir_separator_CXX \
 exclude_expsyms_CXX \
 include_expsyms_CXX \
@@ -25367,7 +27534,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     "tests/atconfig":C) cat >tests/atconfig <<ATEOF
 # Configurable variable values for building test suites.
 # Generated by $0.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2012 Free Software Foundation, Inc.
 
 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
 at_testdir='tests'
@@ -25401,7 +27568,7 @@ ATEOF
     # Strip MF so we end up with the name of the file.
     mf=`echo "$mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
+    # We used to match only the files named 'Makefile.in', but
     # some people rename them; so instead we look at the file content.
     # Grep'ing the first line is not enough: some people post-process
     # each Makefile.in and add a new line on top of each file to say so.
@@ -25435,21 +27602,19 @@ $as_echo X"$mf" |
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # from the Makefile without running 'make'.
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
     test -z "am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
     # simplest approach to changing $(DEPDIR) to its actual value in the
     # expansion.
     for file in `sed -n "
       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`$as_dirname -- "$file" ||
@@ -25503,8 +27668,8 @@ $as_echo X"$file" |
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -25558,6 +27723,9 @@ SHELL=$lt_SHELL
 # An echo program that protects backslashes.
 ECHO=$lt_ECHO
 
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
 # The host system.
 host_alias=$host_alias
 host=$host
@@ -25859,10 +28027,6 @@ no_undefined_flag=$lt_no_undefined_flag
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
@@ -26205,10 +28369,6 @@ no_undefined_flag=$lt_no_undefined_flag_CXX
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 
diff --git a/configure.ac b/configure.ac
index 5b1143a..5015c8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,28 +2,25 @@
 dnl -*- autoconf -*-
 dnl Process this file with autoconf to produce a configure script.
 
-AC_PREREQ(2.62)
+AC_PREREQ(2.61)
 dnl Update version here and below at LIB_CURRENT, ..., if needed.
-AC_INIT(libdap, 3.11.7, opendap-tech at opendap.org)
+AC_INIT(libdap, 3.12.0, opendap-tech at opendap.org)
 AC_DEFINE(DAP_PROTOCOL_VERSION, ["3.4"], [Highest DAP version implemented?])
 AC_SUBST(DAP_PROTOCOL_VERSION)
 
 AC_CONFIG_SRCDIR([Connect.cc])
 AC_CONFIG_AUX_DIR(conf)
-AM_CONFIG_HEADER([config.h dods-datatypes-config.h xdr-datatypes-config.h])
+AC_CONFIG_HEADERS([config.h dods-datatypes-config.h xdr-datatypes-config.h])
 AC_CONFIG_MACRO_DIR([conf])
 
 AM_INIT_AUTOMAKE
 AC_CONFIG_TESTDIR(tests, [.])
 
-dnl AC_DEFINE([FILE_METHODS], [1], [Define this to activate the old FILE * methods.])
-
 AC_DEFINE(CNAME, "libdap", [What sort of HTTP client is this?])
 AC_DEFINE_UNQUOTED(CVER, "$PACKAGE_VERSION", [Client version number])
 AC_DEFINE_UNQUOTED(DVR, "libdap/$PACKAGE_VERSION", [Client name and version combined])
 AC_SUBST(DVR)
 
-
 PACKAGE_MAJOR_VERSION=`echo $PACKAGE_VERSION | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\1@'`
 PACKAGE_MINOR_VERSION=`echo $PACKAGE_VERSION | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\2@'`
 PACKAGE_SUBMINOR_VERSION=`echo $PACKAGE_VERSION | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\3@'`
@@ -44,9 +41,9 @@ dnl to default values otherwise.
 AC_CANONICAL_HOST
 AC_SUBST(host)
 
-DAPLIB_CURRENT=15
-DAPLIB_AGE=4
-DAPLIB_REVISION=1
+DAPLIB_CURRENT=16
+DAPLIB_AGE=5
+DAPLIB_REVISION=0
 AC_SUBST(DAPLIB_CURRENT)
 AC_SUBST(DAPLIB_AGE)
 AC_SUBST(DAPLIB_REVISION)
@@ -54,8 +51,8 @@ AC_SUBST(DAPLIB_REVISION)
 LIBDAP_VERSION="$DAPLIB_CURRENT:$DAPLIB_REVISION:$DAPLIB_AGE"
 AC_SUBST(LIBDAP_VERSION)
 
-CLIENTLIB_CURRENT=4
-CLIENTLIB_AGE=1
+CLIENTLIB_CURRENT=5
+CLIENTLIB_AGE=2
 CLIENTLIB_REVISION=0
 AC_SUBST(CLIENTLIB_CURRENT)
 AC_SUBST(CLIENTLIB_AGE)
@@ -64,8 +61,8 @@ AC_SUBST(CLIENTLIB_REVISION)
 CLIENTLIB_VERSION="$CLIENTLIB_CURRENT:$CLIENTLIB_REVISION:$CLIENTLIB_AGE"
 AC_SUBST(CLIENTLIB_VERSION)
 
-SERVERLIB_CURRENT=11
-SERVERLIB_AGE=4
+SERVERLIB_CURRENT=12
+SERVERLIB_AGE=5
 SERVERLIB_REVISION=0
 AC_SUBST(SERVERLIB_CURRENT)
 AC_SUBST(SERVERLIB_AGE)
@@ -82,6 +79,14 @@ AC_PROG_CC
 dnl Call this gnulib macro right after a working C Compiler is found
 gl_EARLY
 
+dnl echo "CC = $CC"
+if test "$CC" = "gcc"
+then
+    AM_CONDITIONAL([COMPILER_IS_GCC],[true])
+else
+    AM_CONDITIONAL([COMPILER_IS_GCC],[false])
+fi
+
 AM_PROG_LEX
 AC_PROG_INSTALL
 AC_PROG_LN_S
@@ -97,6 +102,7 @@ dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
+
 AC_CHECK_HEADERS([fcntl.h malloc.h memory.h netinet/in.h stddef.h stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h])
 
 dnl Checks for typedefs, structures, and compiler characteristics.
@@ -107,42 +113,27 @@ AC_CHECK_MEMBERS([struct stat.st_blksize])
 AC_HEADER_TIME
 AC_STRUCT_TM
 AC_C_VOLATILE
+AC_C_BIGENDIAN
+        
 DODS_CHECK_SIZES
 
-dnl echo "CC = $CC"
-if test "$CC" = "gcc"
-then
-    AM_CONDITIONAL([COMPILER_IS_GCC],[true])
-else
-    AM_CONDITIONAL([COMPILER_IS_GCC],[false])
-fi
+AC_ARG_ENABLE([runtime-endian-check],
+    AC_HELP_STRING([--enable-runtime-endian-check], [Enable runtime tests for big- or little-endian byte order (default is NO)])
+)
 
-# Checks for library functions.
+AS_IF([test "x$enable_runtime_endian_check" = "xyes"], [
+    dnl Do the stuff needed for enabling the feature
+    AC_DEFINE([COMPUTE_ENDIAN_AT_RUNTIME], 1, [Should a function (run-time) be used to determine the byte order?])
+])
 
-# These, at least some of them, cannot be used along with gnulib without
-# breaking stuff. Since we are not bothering to handle the cases where these
-# functions break, there's not much point in testing for them. However, it
-# might be a good thing to use the gnulib versions since those fix various
-# common problems found in many distributions.
-
-dnl AC_FUNC_CLOSEDIR_VOID
-dnl AC_FUNC_FORK
-dnl AC_FUNC_STRFTIME
-dnl AC_HEADER_STDBOOL
-dnl AC_FUNC_ALLOCA
-dnl AC_FUNC_ERROR_AT_LINE
-dnl AC_FUNC_MALLOC
-dnl AC_FUNC_MEMCMP
-dnl AC_FUNC_REALLOC
-dnl AC_FUNC_STAT
-dnl AC_FUNC_STRTOD
+# Checks for library functions.
 
 dnl using AC_CHECK_FUNCS does not run macros from gnulib.
 AC_CHECK_FUNCS([alarm atexit bzero dup2 getcwd getpagesize localtime_r memmove memset pow putenv setenv strchr strerror strtol strtoul timegm mktime])
 
 gl_SOURCE_BASE(gl)
 gl_M4_BASE(gl/m4)
-gl_MODULES(regex)
+gl_MODULES(regex btyeswap)
 
 gl_INIT
 
@@ -188,37 +179,14 @@ then
     then
 	   version_libcurl=`curl-config --version | sed 's at libcurl \(.*\)@\1@'`
 
-	   version_M=`echo $version_libcurl | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\1@'`
-	   version_m=`echo $version_libcurl | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\2@'`
-	   version_m_m=`echo $version_libcurl | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\3@'`
-	
-       dnl Test for several different versions of libcurl. We can use 7.10.6
-	   dnl or newer.
-	
-       if test $version_M -gt 7
-	   then
-		  libcurl_ok='yes'
-	   elif test $version_M -eq 7 && test $version_m -gt 10
-	   then
-		  libcurl_ok='yes'
-	   elif test $version_M -eq 7 && test $version_m -eq 10 && test $version_m_m -gt 5
-	   then
-		  libcurl_ok='yes'
-	   else
-		  libcurl_ok='no'
-	   fi
-
-	   dnl First test the minimum
-	   if test $libcurl_ok = "no"
-	   then
-		  AC_MSG_ERROR([must have libcurl 7.10.6 or greater, found $version_libcurl])
-	   fi
-
+           AS_VERSION_COMPARE(["$version_libcurl"], ["7.10.6"], 
+                [AC_MSG_ERROR([I could not find libcurl 7.10.6 or newer, found $version_libcurl])])
+        
 	   CURL_LIBS="`curl-config --libs`"
 	   CURL_STATIC_LIBS=$CURL_LIBS
 	   curlprivatelibs="`curl-config --libs`"
 	   CURL_CFLAGS="`curl-config --cflags`"
-	   AC_MSG_RESULT([yes; used curl-config])
+	   AC_MSG_RESULT([yes; used curl-config and found version $version_libcurl])
     else
 	   AC_MSG_ERROR([I could not find libcurl])
     fi
@@ -241,7 +209,7 @@ if test -n "$with_xml2_prefix" -a -x $with_xml2_prefix/bin/xml2-config
 then
     AC_MSG_NOTICE([Using $with_xml2_prefix as the libxml2 prefix directory.])
     XML2_LIBS="`$with_xml2_prefix/bin/xml2-config --libs`"
-    XML2_STATIC_LIBS=$XML2_LIBS
+    dnl XML2_STATIC_LIBS=$XML2_LIBS
     xmlprivatelibs="`$with_xml2_prefix/bin/xml2-config --libs`"
     XML2_CFLAGS="`$with_xml2_prefix/bin/xml2-config --cflags`"
     xml_set="yes"
@@ -254,47 +222,37 @@ if test -z "$xml_set"
 then
 libdap_pkgconfig_libxml2=yes
 libdap_libxml2_module='libxml-2.0 >= 2.6.16'
-PKG_CHECK_MODULES([XML2],[$libdap_libxml2_module],,
-  [libdap_pkgconfig_libxml2=no])
+PKG_CHECK_MODULES([XML2],[$libdap_libxml2_module], ,[libdap_pkgconfig_libxml2=no])
 AC_MSG_CHECKING([for libxml2])
 if test $libdap_pkgconfig_libxml2 = 'yes'
 then
 	xmlprivatereq=$libdap_libxml2_module
-	XML2_STATIC_LIBS="`$PKG_CONFIG --static --libs libxml-2.0`"
+	dnl XML2_STATIC_LIBS="`$PKG_CONFIG --static --libs libxml-2.0`"
+	XML2_LIBS="`$PKG_CONFIG --libs libxml-2.0`"
 	AC_MSG_RESULT([yes; used pkg-config])
 elif xml2-config --version > /dev/null 2>&1
 then
 	version_libxml2=`xml2-config --version`
-	version_M=`echo $version_libxml2 | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\1@'`
-	version_m=`echo $version_libxml2 | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\2@'`
-	version_m_m=`echo $version_libxml2 | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\3@'`
-	
-	if test $version_M -gt 2
-	then
-		libxml2_ok='yes'
-	elif test $version_M -eq 2 && test $version_m -eq 6 && test $version_m_m -ge 16
-	then
-                libxml2_ok='yes'
-	fi
 
+        AS_VERSION_COMPARE(["$version_libxml2"], ["2.6.16"], 
+                [AC_MSG_ERROR([I could not find libxml2 2.6.16 or newer])])
+        
 	XML2_LIBS="`xml2-config --libs`"
-	XML2_STATIC_LIBS=$XML2_LIBS
+	dnl XML2_STATIC_LIBS=$XML2_LIBS
 	XML2_CFLAGS="`xml2-config --cflags`"
 	xmlprivatelibs="`xml2-config --libs`"
-	AC_MSG_RESULT([yes; used xml2-config])
+	AC_MSG_RESULT([yes; used xml2-config and found version $version_libxml2])
 else
-	AC_MSG_ERROR([I could not find libxml2 2.6.16 or newer])
+	AC_MSG_ERROR([I could not find ml2-config])
 fi
 fi
 
 AC_SUBST([xmlprivatereq])
 AC_SUBST([xmlprivatelibs])
 AC_SUBST([XML2_LIBS])
-AC_SUBST([XML2_STATIC_LIBS])
+dnl AC_SUBST([XML2_STATIC_LIBS])
 AC_SUBST([XML2_CFLAGS])
 
-# DAP_CHECK_ZLIB
-
 AC_CHECK_LIB([pthread], [pthread_kill], 
 	[PTHREAD_LIBS="-lpthread"],
 	[AC_MSG_ERROR([I could not find pthreads])])
@@ -309,10 +267,130 @@ AM_PATH_CPPUNIT(1.12.0,
 	[AM_CONDITIONAL([CPPUNIT], [true])],
 	[AM_CONDITIONAL([CPPUNIT], [false])])
 
+dnl When pkgconfig support is added, use this
+libdap_libgridfields_module='libgridfields >= 0.7.0'
+
+libgf_ok="no"
+
+dnl AC_ARG_WITH([gridfields],
+dnl     AC_HELP_STRING([--with-gridfields=path], [Use the gridfields library at this location.]),
+dnl     [if test "$withval" = "yes"
+dnl      then
+dnl          AC_MSG_ERROR([You must supply a path when using --with-gridfields; try --enable-gridfields.])
+dnl      else
+dnl          AC_MSG_NOTICE([Using $withval as the GridFields prefix directory.])
+dnl          GF_LIBS="-L$withval/lib -lgridfields"
+dnl          GF_CFLAGS="-I$withval/include"
+dnl          AC_DEFINE([GRIDFIELDS],[1],[define if gridfields lib is present])
+dnl          libgf_ok="yes"
+dnl      fi],
+dnl     [])
+
+dnl AC_ARG_ENABLE([gridfields],
+dnl     AC_HELP_STRING([--enable-gridfields], [Enable libgridfields-based server functions (default is NO)]))
+
+dnl if test "$libgf_ok" = "no" -a "$enable_gridfields" = "yes"
+dnl then
+     
+dnl AC_MSG_CHECKING([for libgridfields])
+dnl if gridfields-config --version > /dev/null 2>&1
+dnl then
+dnl     version_libgf=`gridfields-config --version | sed 's at libgridfields \(.*\)@\1@'`
+
+dnl     version_M=`echo $version_libgf | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\1@'`
+dnl     version_m=`echo $version_libgf | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\2@'`
+dnl     version_m_m=`echo $version_libgf | sed 's@^\([[0-9]]\)*\.\([[0-9]]*\)\.\([[0-9]]*\)$@\3@'`
+    
+dnl     dnl Test for several different versions of libgridfields
+    
+dnl     if test $version_M -gt 0
+dnl     then
+dnl         libgf_ok='yes'
+dnl     elif test $version_M -eq 0 && test $version_m -gt 7
+dnl     then
+dnl         libgf_ok='yes'
+dnl     elif test $version_M -eq 0 && test $version_m -eq 7 && test $version_m_m -gt 0
+dnl     then
+dnl         libgf_ok='yes'
+dnl     else
+dnl         libgf_ok='no'
+dnl     fi
+
+dnl     if test "$libgf_ok"="no"
+dnl     then
+dnl         AC_MSG_ERROR([must have libgf 0.7.0 or greater, found $version_libgf])
+dnl     fi
+
+dnl     GF_LIBS="`gridfields-config --libs`"
+dnl     GF_CFLAGS="`gridfields-config --cflags`"
+
+dnl     AC_DEFINE([GRDIFIELDS],[1],[define if gridfields lib is present])
+dnl     AC_MSG_RESULT([yes; used gridfields-config])
+dnl else
+dnl     AC_MSG_ERROR([I could not find libgridfields])
+dnl fi
+
+dnl fi
+
+dnl AC_SUBST([GF_LIBS])
+dnl AC_SUBST([GF_CFLAGS])
+
+dnl if test "$libgf_ok" = "yes"
+dnl then
+dnl     echo "Set gridfields CFLAGS to $GF_CFLAGS"
+dnl     echo "Set gridfields LIBS to $GF_LIBS"
+dnl     AM_CONDITIONAL([USING_GRIDFIELDS],[true])
+dnl else
+dnl     AM_CONDITIONAL([USING_GRIDFIELDS],[false])
+dnl fi
+
+dnl # Which, if any, copy of GDAL should be used for the build?
+dnl GDAL_FOUND=
+
+dnl AC_ARG_WITH(gdal, AS_HELP_STRING([--with-gdal], [Use the copy of GDAL at this location]),
+dnl             with_gdal_prefix="$withval", with_gdal_prefix="")
+
+dnl if test -n "$with_gdal_prefix" -a -x $with_gdal_prefix/bin/gdal-config
+dnl then
+dnl     AC_MSG_NOTICE([Using $with_gdal_prefix as the GDAL prefix directory.])
+dnl     GDAL_LIBS="`$with_gdal_prefix/bin/gdal-config --libs` `$with_gdal_prefix/bin/gdal-config --dep-libs`"
+dnl     GDAL_CFLAGS="`$with_gdal_prefix/bin/gdal-config --cflags`"
+dnl     GDAL_FOUND="yes"
+dnl elif test -n "$with_gdal_prefix"
+dnl then
+dnl     AC_MSG_ERROR([You set the gdal-prefix directory to $with_gdal_prefix, but gdal-config is not there.])
+dnl fi
+
+dnl # Because of the run-time errors encountered when there are competing
+dnl # versions of libs, only include GDAL when explictly told to. NB: see
+dnl # the fileout_gdal handler for another place where GDAL can be added to
+dnl # a running Hyrax server. jhrg 11/23/12
+
+dnl # if test -z "$GDAL_FOUND"
+dnl # then
+dnl #    AX_LIB_GDAL([1.9.0])
+dnl #    if test ! -z "$GDAL_CFLAGS" -a ! -z "$GDAL_LDFLAGS"; then
+dnl #        GDAL_FOUND="yes"
+dnl #    fi
+dnl # fi
+
+dnl AC_SUBST([GDAL_LIBS])
+dnl AC_SUBST([GDAL_CFLAGS])
+
+
+dnl if test -n "$GDAL_FOUND"
+dnl then
+dnl     echo "Set GDAL_CFLAGS to $GDAL_CFLAGS"
+dnl     echo "Set GDAL_LIBS to $GF_LIBS"
+dnl     AM_CONDITIONAL([USING_GDAL],[true])
+dnl     AC_DEFINE([GDAL],[1],[define if gdal lib is present])
+dnl else
+dnl     AM_CONDITIONAL([USING_GDAL],[false])
+dnl fi
+
 DODS_DEBUG_OPTION
 
-dnl Temporary hack; find a home for the deflate program; set it to
-dnl prefix/etc/deflate. See util.cc:dods_root()
+dnl See util.cc:dods_root()
 if test "$prefix" = "NONE"
 then
 AC_DEFINE([LIBDAP_ROOT], ["/usr/local"], [Set to the prefix directory])
@@ -320,16 +398,49 @@ else
 AC_DEFINE_UNQUOTED([LIBDAP_ROOT], ["$prefix"], [Set to the prefix directory])
 fi
 
-AC_ARG_ENABLE([checksums], 
-    AC_HELP_STRING([--enable-checksums], [Enable MD5 checksums (default is NO)]))
+AC_ARG_ENABLE([dap4], 
+    AC_HELP_STRING([--enable-dap4], [Enable DAP4 types and responses (default is NO)]))
 
-dnl echo "enable_checksums = $enable_checksums"
-AS_IF([test "x$enable_checksums" = "xyes"], [
+AS_IF([test "x$enable_dap4" = "xyes"], [
     dnl Do the stuff needed for enabling the feature
-    dnl echo "Defining checksums! "
-    AC_DEFINE([CHECKSUMS], 1, [Should checksums be generated])
+    dnl echo "Defining DAP4! "
+    AC_DEFINE([DAP4], 1, [Should DAP4 support be enabled?])
+    AM_CONDITIONAL([DAP4_DEFINED], [true]) ],
+    [ dnl else enable_dap4 is false
+    AM_CONDITIONAL([DAP4_DEFINED], [false])
 ])
 
+AC_ARG_ENABLE([developer],
+[AS_HELP_STRING([--enable-developer],
+[Build a debug (-g3 -O0) version of this code and include assert() calls in the code (default is no)])],
+[case "${enableval}" in
+       yes) build_developer=true ;;
+       no)  build_developer=false ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-developer]) ;;
+     esac],
+[build_developer=false])
+
+if test "x$build_developer" = "xtrue"; then
+   AC_MSG_NOTICE(["Building developer version"])
+else
+   AC_MSG_NOTICE(["Not building developer version"])
+   AC_DEFINE([NDEBUG], [1], [Remove this to activate assert() calls.])
+fi
+AM_CONDITIONAL([BUILD_DEVELOPER], [test "x$build_developer" = "xtrue"])
+
+dnl AC_ARG_ENABLE([checksums], 
+dnl    AC_HELP_STRING([--enable-checksums], [Enable MD5 checksums for DAP2 (default is NO)]))
+dnl
+dnl echo "enable_checksums = $enable_checksums"
+dnl AS_IF([test "x$enable_checksums" = "xyes"], [
+dnl    dnl Do the stuff needed for enabling the feature
+dnl    dnl echo "Defining checksums! "
+dnl    AC_DEFINE([CHECKSUMS], 1, [Should checksums be generated])
+dnl    AM_CONDITIONAL([CHECKSUMS_DEFINED], [true]) ],
+dnl    [ dnl else enable_checksums is false
+dnl    AM_CONDITIONAL([CHECKSUMS_DEFINED], [false])
+dnl])
+
 dnl autoheader macros; tack some text at the top and bottom of config_dap.h.in
 
 AH_TOP([#ifndef _config_h
@@ -349,12 +460,17 @@ AC_CONFIG_FILES([Makefile
                  libdapclient.pc
                  libdapserver.pc
                  main_page.doxygen
-		 doxy.conf
+	         doxy.conf
                  gl/Makefile
                  tests/Makefile
                  tests/atlocal
                  unit-tests/Makefile
                  unit-tests/cache-testsuite/Makefile])
+
+dnl swath2grid/Makefile
+dnl swath2grid/bes.conf
+dnl ugridFunctions/Makefile
+
 AC_CONFIG_FILES([dap-config], [chmod +x dap-config]) 
-		 
+	
 AC_OUTPUT
diff --git a/dap-config.in b/dap-config.in
index 6b3848b..0553cfd 100644
--- a/dap-config.in
+++ b/dap-config.in
@@ -5,6 +5,7 @@
 prefix=@prefix@
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
+libdir64=${exec_prefix}/lib64
 includedir=${prefix}/include
 
 usage()
@@ -59,21 +60,20 @@ while test $# -gt 0; do
 	;;
 
     --libs)
-       	echo "-L${libdir} -ldap -ldapserver -ldapclient @CURL_LIBS@ @XML2_LIBS@ @PTHREAD_LIBS@ @UUID_LIBS@ @LIBS@"
+       	echo "-L${libdir64} -L${libdir} -ldap -ldapserver -ldapclient @CURL_LIBS@ @XML2_LIBS@ @PTHREAD_LIBS@ @UUID_LIBS@ @LIBS@"
+        ;;
 #
 #   Changed CURL_STATIC_LIBS to CURL_LIBS because the former was including a
 #   a boatload of crypto stuff that might or might not be present on a server.
 #   Various handlers use this script to determine which libraries to link with.
 #   jhrg 2/7/12
-#       	echo "-L${libdir} -ldap -ldapserver -ldapclient @CURL_STATIC_LIBS@ @XML2_STATIC_LIBS@ @PTHREAD_LIBS@ @UUID_LIBS@ @LIBS@"
-       	;;
 
     --server-libs)
-       	echo "-L${libdir} -ldap -ldapserver @XML2_LIBS@ @PTHREAD_LIBS@ @UUID_LIBS@ @LIBS@"
+       	echo "-L${libdir64} -L${libdir} -ldap -ldapserver @XML2_LIBS@ @PTHREAD_LIBS@ @UUID_LIBS@ @LIBS@"
        	;;
 
     --client-libs)
-       	echo "-L${libdir} -ldap -ldapclient @CURL_LIBS@ @XML2_STATIC_LIBS@ @PTHREAD_LIBS@ @UUID_LIBS@ @LIBS@"
+       	echo "-L${libdir64} -L${libdir} -ldap -ldapclient @CURL_LIBS@ @XML2_LIBS@ @PTHREAD_LIBS@ @UUID_LIBS@ @LIBS@"
        	;;
 
     --prefix)
diff --git a/das.lex b/das.lex
index b68e510..f105c54 100644
--- a/das.lex
+++ b/das.lex
@@ -64,7 +64,7 @@
 
 #include <cstdio>
 
-static char rcsid[] not_used ={"$Id: das.lex 25112 2011-12-29 21:44:54Z jimg $"};
+static char rcsid[] not_used ={"$Id: das.lex 27157 2013-09-28 21:22:52Z jimg $"};
 
 #ifndef _MSC_VER
 #include <string.h>
@@ -88,6 +88,7 @@ using namespace libdap ;
 #define YY_DECL int daslex YY_PROTO(( void ))
 #define YY_FATAL_ERROR(msg) {\
     throw(Error(string("Error scanning DAS object text: ") + string(msg))); \
+    yy_fatal_error(msg); /* This will never be run but putting it here removes a warning that the funtion is never used. */ \
 }
 
 #include "das.tab.hh"
@@ -99,6 +100,8 @@ static int start_line;		/* used in quote and comment error handlers */
     
 %option noyywrap
 %option nounput
+%option noinput
+%option 8bit
 %option prefix="das"
 %option outfile="lex.das.cc"
  
diff --git a/das.tab.cc b/das.tab.cc
index 0dffd4a..e3503c8 100644
--- a/das.tab.cc
+++ b/das.tab.cc
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   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
@@ -29,7 +28,7 @@
    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.  */
 
@@ -47,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -55,60 +54,53 @@
 /* Pure parsers.  */
 #define YYPURE 0
 
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
 /* Substitute the variable and function names.  */
-#define yyparse dasparse
-#define yylex   daslex
-#define yyerror daserror
-#define yylval  daslval
-#define yychar  daschar
-#define yydebug dasdebug
-#define yynerrs dasnerrs
+#define yyparse         dasparse
+#define yylex           daslex
+#define yyerror         daserror
+#define yylval          daslval
+#define yychar          daschar
+#define yydebug         dasdebug
+#define yynerrs         dasnerrs
 
 
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     SCAN_ATTR = 258,
-     SCAN_WORD = 259,
-     SCAN_ALIAS = 260,
-     SCAN_BYTE = 261,
-     SCAN_INT16 = 262,
-     SCAN_UINT16 = 263,
-     SCAN_INT32 = 264,
-     SCAN_UINT32 = 265,
-     SCAN_FLOAT32 = 266,
-     SCAN_FLOAT64 = 267,
-     SCAN_STRING = 268,
-     SCAN_URL = 269,
-     SCAN_XML = 270
-   };
+/* Copy the first part of user declarations.  */
+
+
+/* Line 189 of yacc.c  */
+#line 81 "das.tab.cc"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
 #endif
-/* Tokens.  */
-#define SCAN_ATTR 258
-#define SCAN_WORD 259
-#define SCAN_ALIAS 260
-#define SCAN_BYTE 261
-#define SCAN_INT16 262
-#define SCAN_UINT16 263
-#define SCAN_INT32 264
-#define SCAN_UINT32 265
-#define SCAN_FLOAT32 266
-#define SCAN_FLOAT64 267
-#define SCAN_STRING 268
-#define SCAN_URL 269
-#define SCAN_XML 270
 
+/* 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
 
+/* "%code requires" blocks.  */
 
-/* Copy the first part of user declarations.  */
-#line 40 "das.y"
+/* Line 209 of yacc.c  */
+#line 40 "das.yy"
 
 
 #define YYSTYPE char *
@@ -116,8 +108,6 @@
 
 #include "config.h"
 
-static char rcsid[] not_used = {"$Id: das.y 21577 2009-10-02 16:12:17Z jimg $"};
-
 #include <string>
 
 #include <vector>
@@ -129,7 +119,7 @@ static char rcsid[] not_used = {"$Id: das.y 21577 2009-10-02 16:12:17Z jimg $"};
 #include "debug.h"
 #include "parser.h"
 #include "util.h"
-#include "das.tab.hh"
+  // #include "das.tab.hh"
 
 #ifdef TRACE_NEW
 #include "trace_new.h"
@@ -150,10 +140,58 @@ using namespace libdap ;
 
 #define DAS_OBJ(arg) ((DAS *)((parser_arg *)(arg))->_object)
 
-#define YYPARSE_PARAM arg
+//#define YYPARSE_PARAM arg
 
 extern int das_line_num;	/* defined in das.lex */
 
+
+
+
+/* Line 209 of yacc.c  */
+#line 152 "das.tab.cc"
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     SCAN_ATTR = 258,
+     SCAN_WORD = 259,
+     SCAN_ALIAS = 260,
+     SCAN_BYTE = 261,
+     SCAN_INT16 = 262,
+     SCAN_UINT16 = 263,
+     SCAN_INT32 = 264,
+     SCAN_UINT32 = 265,
+     SCAN_FLOAT32 = 266,
+     SCAN_FLOAT64 = 267,
+     SCAN_STRING = 268,
+     SCAN_URL = 269,
+     SCAN_XML = 270
+   };
+#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.  */
+
+
+/* Line 264 of yacc.c  */
+#line 190 "das.tab.cc"
+/* Unqualified %code blocks.  */
+
+/* Line 265 of yacc.c  */
+#line 85 "das.yy"
+
 // No global static objects. We go through this every so often, I guess I
 // should learn... 1/24/2000 jhrg
 static string *name;	/* holds name in attr_pair rule */
@@ -182,7 +220,7 @@ Check that the URL is correct.";
 typedef int checker(const char *);
 
 int daslex(void);
-static void daserror(char *s);
+static void daserror(parser_arg *arg, const string &s /*char *s*/);
 static void add_attribute(const string &type, const string &name, 
 			  const string &value, checker *chk) throw (Error);
 static void add_alias(AttrTable *das, AttrTable *current, const string &name, 
@@ -193,38 +231,9 @@ static void add_bad_attribute(AttrTable *attr, const string &type,
 
 
 
-/* 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
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef int YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations.  */
-
 
-/* Line 216 of yacc.c.  */
-#line 228 "das.tab.cc"
+/* Line 265 of yacc.c  */
+#line 237 "das.tab.cc"
 
 #ifdef short
 # undef short
@@ -274,7 +283,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -299,14 +308,14 @@ typedef short int yytype_int16;
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int i)
+YYID (int yyi)
 #else
 static int
-YYID (i)
-    int i;
+YYID (yyi)
+    int yyi;
 #endif
 {
-  return i;
+  return yyi;
 }
 #endif
 
@@ -387,9 +396,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-  };
+  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)
@@ -423,12 +432,12 @@ union yyalloc
    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)					\
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
@@ -537,15 +546,15 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   185,   185,   185,   202,   203,   207,   208,   214,   215,
-     216,   219,   221,   222,   221,   225,   226,   225,   229,   230,
-     229,   233,   234,   233,   237,   238,   237,   241,   242,   241,
-     245,   246,   245,   249,   250,   249,   253,   254,   253,   257,
-     258,   257,   262,   282,   261,   290,   289,   295,   299,   305,
-     309,   315,   319,   325,   329,   335,   339,   345,   349,   355,
-     359,   365,   370,   377,   381,   387,   403,   406,   409,   412,
-     412,   412,   412,   412,   413,   413,   413,   413,   414,   414,
-     414,   414,   418,   422,   417
+       0,   194,   194,   194,   211,   212,   216,   217,   223,   224,
+     225,   228,   230,   231,   230,   234,   235,   234,   238,   239,
+     238,   242,   243,   242,   246,   247,   246,   250,   251,   250,
+     254,   255,   254,   258,   259,   258,   262,   263,   262,   266,
+     267,   266,   271,   291,   270,   299,   298,   304,   308,   314,
+     318,   324,   328,   334,   338,   344,   348,   354,   358,   364,
+     368,   374,   379,   386,   390,   396,   412,   415,   418,   421,
+     421,   421,   421,   421,   422,   422,   422,   422,   423,   423,
+     423,   423,   427,   431,   426
 };
 #endif
 
@@ -557,12 +566,13 @@ static const char *const yytname[] =
   "$end", "error", "$undefined", "SCAN_ATTR", "SCAN_WORD", "SCAN_ALIAS",
   "SCAN_BYTE", "SCAN_INT16", "SCAN_UINT16", "SCAN_INT32", "SCAN_UINT32",
   "SCAN_FLOAT32", "SCAN_FLOAT64", "SCAN_STRING", "SCAN_URL", "SCAN_XML",
-  "'{'", "'}'", "';'", "','", "$accept", "attr_start", "@1", "attributes",
-  "attribute", "attr_list", "attr_tuple", "@2", "@3", "@4", "@5", "@6",
-  "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", "@16", "@17",
-  "@18", "@19", "@20", "@21", "@22", "@23", "@24", "bytes", "int16",
-  "uint16", "int32", "uint32", "float32", "float64", "strs", "urls", "xml",
-  "url", "str_or_id", "float_or_int", "name", "alias", "@25", "@26", 0
+  "'{'", "'}'", "';'", "','", "$accept", "attr_start", "$@1", "attributes",
+  "attribute", "attr_list", "attr_tuple", "$@2", "$@3", "$@4", "$@5",
+  "$@6", "$@7", "$@8", "$@9", "$@10", "$@11", "$@12", "$@13", "$@14",
+  "$@15", "$@16", "$@17", "$@18", "$@19", "$@20", "$@21", "$@22", "$@23",
+  "$@24", "bytes", "int16", "uint16", "int32", "uint32", "float32",
+  "float64", "strs", "urls", "xml", "url", "str_or_id", "float_or_int",
+  "name", "alias", "$@25", "$@26", 0
 };
 #endif
 
@@ -753,7 +763,7 @@ do								\
     }								\
   else								\
     {								\
-      yyerror (YY_("syntax error: cannot back up")); \
+      yyerror (arg, YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
 while (YYID (0))
@@ -794,7 +804,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -833,7 +843,7 @@ do {									  \
     {									  \
       YYFPRINTF (stderr, "%s ", Title);					  \
       yy_symbol_print (stderr,						  \
-		  Type, Value); \
+		  Type, Value, arg); \
       YYFPRINTF (stderr, "\n");						  \
     }									  \
 } while (YYID (0))
@@ -847,17 +857,19 @@ do {									  \
 #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)
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_arg *arg)
 #else
 static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg)
     FILE *yyoutput;
     int yytype;
     YYSTYPE const * const yyvaluep;
+    parser_arg *arg;
 #endif
 {
   if (!yyvaluep)
     return;
+  YYUSE (arg);
 # ifdef YYPRINT
   if (yytype < YYNTOKENS)
     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
@@ -879,13 +891,14 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_arg *arg)
 #else
 static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
+yy_symbol_print (yyoutput, yytype, yyvaluep, arg)
     FILE *yyoutput;
     int yytype;
     YYSTYPE const * const yyvaluep;
+    parser_arg *arg;
 #endif
 {
   if (yytype < YYNTOKENS)
@@ -893,7 +906,7 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
   else
     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg);
   YYFPRINTF (yyoutput, ")");
 }
 
@@ -905,17 +918,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 #else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
@@ -933,12 +949,13 @@ do {								\
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_arg *arg)
 #else
 static void
-yy_reduce_print (yyvsp, yyrule)
+yy_reduce_print (yyvsp, yyrule, arg)
     YYSTYPE *yyvsp;
     int yyrule;
+    parser_arg *arg;
 #endif
 {
   int yynrhs = yyr2[yyrule];
@@ -949,18 +966,18 @@ yy_reduce_print (yyvsp, yyrule)
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       		       );
-      fprintf (stderr, "\n");
+		       		       , arg);
+      YYFPRINTF (stderr, "\n");
     }
 }
 
 # define YY_REDUCE_PRINT(Rule)		\
 do {					\
   if (yydebug)				\
-    yy_reduce_print (yyvsp, Rule); \
+    yy_reduce_print (yyvsp, Rule, arg); \
 } while (YYID (0))
 
 /* Nonzero means print parse trace.  It is left uninitialized so that
@@ -1211,16 +1228,18 @@ yysyntax_error (char *yyresult, int yystate, int yychar)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_arg *arg)
 #else
 static void
-yydestruct (yymsg, yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep, arg)
     const char *yymsg;
     int yytype;
     YYSTYPE *yyvaluep;
+    parser_arg *arg;
 #endif
 {
   YYUSE (yyvaluep);
+  YYUSE (arg);
 
   if (!yymsg)
     yymsg = "Deleting";
@@ -1233,10 +1252,8 @@ yydestruct (yymsg, yytype, yyvaluep)
 	break;
     }
 }
-

 
 /* Prevent warnings from -Wmissing-prototypes.  */
-
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
 int yyparse (void *YYPARSE_PARAM);
@@ -1245,18 +1262,17 @@ int yyparse ();
 #endif
 #else /* ! YYPARSE_PARAM */
 #if defined __STDC__ || defined __cplusplus
-int yyparse (void);
+int yyparse (parser_arg *arg);
 #else
 int yyparse ();
 #endif
 #endif /* ! YYPARSE_PARAM */
 
 
-
-/* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
+/* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
 
 /* Number of syntax errors so far.  */
@@ -1264,9 +1280,9 @@ int yynerrs;
 
 
 
-/*----------.
-| yyparse.  |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1282,74 +1298,76 @@ yyparse (YYPARSE_PARAM)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 int
-yyparse (void)
+yyparse (parser_arg *arg)
 #else
 int
-yyparse ()
-
+yyparse (arg)
+    parser_arg *arg;
 #endif
 #endif
 {
-  
-  int yystate;
-  int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
 
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
 
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
 
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
 
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
+       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;
 
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
+    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.  */
+  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;
 
@@ -1379,7 +1397,6 @@ yyparse ()
 	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
@@ -1387,7 +1404,6 @@ yyparse ()
 	yyoverflow (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
-
 		    &yystacksize);
 
 	yyss = yyss1;
@@ -1410,9 +1426,8 @@ yyparse ()
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 #  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
@@ -1423,7 +1438,6 @@ yyparse ()
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
-
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 		  (unsigned long int) yystacksize));
 
@@ -1433,6 +1447,9 @@ yyparse ()
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
@@ -1441,16 +1458,16 @@ yyparse ()
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
+     lookahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to look-ahead token.  */
+  /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
   if (yyn == YYPACT_NINF)
     goto yydefault;
 
-  /* Not known => get a look-ahead token if don't already have one.  */
+  /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -1482,20 +1499,16 @@ yybackup:
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
   *++yyvsp = yylval;
@@ -1535,7 +1548,9 @@ yyreduce:
   switch (yyn)
     {
         case 2:
-#line 185 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 194 "das.yy"
     {
 		name = new string();
 		type = new string();
@@ -1547,7 +1562,9 @@ yyreduce:
     break;
 
   case 3:
-#line 194 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 203 "das.yy"
     {
 		POP;	// pop the DAS/AttrTable before stack's dtor
 		delete name;
@@ -1557,114 +1574,158 @@ yyreduce:
     break;
 
   case 7:
-#line 209 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 218 "das.yy"
     {
 		    parse_error((parser_arg *)arg, NO_DAS_MSG, das_line_num);
 		;}
     break;
 
   case 12:
-#line 221 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 230 "das.yy"
     { save_str(*type, "Byte", das_line_num); ;}
     break;
 
   case 13:
-#line 222 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 231 "das.yy"
     { save_str(*name, (yyvsp[(3) - (3)]), das_line_num); ;}
     break;
 
   case 15:
-#line 225 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 234 "das.yy"
     { save_str(*type, "Int16", das_line_num); ;}
     break;
 
   case 16:
-#line 226 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 235 "das.yy"
     { save_str(*name, (yyvsp[(3) - (3)]), das_line_num); ;}
     break;
 
   case 18:
-#line 229 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 238 "das.yy"
     { save_str(*type, "UInt16", das_line_num); ;}
     break;
 
   case 19:
-#line 230 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 239 "das.yy"
     { save_str(*name, (yyvsp[(3) - (3)]), das_line_num); ;}
     break;
 
   case 21:
-#line 233 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 242 "das.yy"
     { save_str(*type, "Int32", das_line_num); ;}
     break;
 
   case 22:
-#line 234 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 243 "das.yy"
     { save_str(*name, (yyvsp[(3) - (3)]), das_line_num); ;}
     break;
 
   case 24:
-#line 237 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 246 "das.yy"
     { save_str(*type, "UInt32", das_line_num); ;}
     break;
 
   case 25:
-#line 238 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 247 "das.yy"
     { save_str(*name, (yyvsp[(3) - (3)]), das_line_num); ;}
     break;
 
   case 27:
-#line 241 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 250 "das.yy"
     { save_str(*type, "Float32", das_line_num); ;}
     break;
 
   case 28:
-#line 242 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 251 "das.yy"
     { save_str(*name, (yyvsp[(3) - (3)]), das_line_num); ;}
     break;
 
   case 30:
-#line 245 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 254 "das.yy"
     { save_str(*type, "Float64", das_line_num); ;}
     break;
 
   case 31:
-#line 246 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 255 "das.yy"
     { save_str(*name, (yyvsp[(3) - (3)]), das_line_num); ;}
     break;
 
   case 33:
-#line 249 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 258 "das.yy"
     { *type = "String"; ;}
     break;
 
   case 34:
-#line 250 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 259 "das.yy"
     { *name = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 36:
-#line 253 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 262 "das.yy"
     { *type = "Url"; ;}
     break;
 
   case 37:
-#line 254 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 263 "das.yy"
     { *name = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 39:
-#line 257 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 266 "das.yy"
     { *type = "OtherXML"; ;}
     break;
 
   case 40:
-#line 258 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 267 "das.yy"
     { *name = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 42:
-#line 262 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 271 "das.yy"
     {
 		    DBG(cerr << "Processing ID: " << (yyvsp[(1) - (1)]) << endl);
 		    
@@ -1687,7 +1748,9 @@ yyreduce:
     break;
 
   case 43:
-#line 282 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 291 "das.yy"
     {
 		    /* pop top of stack; store in attr_tab */
 		    DBG(cerr << " Popped attr_tab: " << TOP_OF_STACK << endl);
@@ -1696,112 +1759,144 @@ yyreduce:
     break;
 
   case 45:
-#line 290 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 299 "das.yy"
     { 
 		    parse_error(ATTR_TUPLE_MSG, das_line_num, (yyvsp[(1) - (1)]));
 		;}
     break;
 
   case 47:
-#line 296 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 305 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(1) - (1)]), &check_byte);
 		;}
     break;
 
   case 48:
-#line 300 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 309 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(3) - (3)]), &check_byte);
 		;}
     break;
 
   case 49:
-#line 306 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 315 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(1) - (1)]), &check_int16);
 		;}
     break;
 
   case 50:
-#line 310 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 319 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(3) - (3)]), &check_int16);
 		;}
     break;
 
   case 51:
-#line 316 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 325 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(1) - (1)]), &check_uint16);
 		;}
     break;
 
   case 52:
-#line 320 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 329 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(3) - (3)]), &check_uint16);
 		;}
     break;
 
   case 53:
-#line 326 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 335 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(1) - (1)]), &check_int32);
 		;}
     break;
 
   case 54:
-#line 330 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 339 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(3) - (3)]), &check_int32);
 		;}
     break;
 
   case 55:
-#line 336 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 345 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(1) - (1)]), &check_uint32);
 		;}
     break;
 
   case 56:
-#line 340 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 349 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(3) - (3)]), &check_uint32);
 		;}
     break;
 
   case 57:
-#line 346 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 355 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(1) - (1)]), &check_float32);
 		;}
     break;
 
   case 58:
-#line 350 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 359 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(3) - (3)]), &check_float32);
 		;}
     break;
 
   case 59:
-#line 356 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 365 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(1) - (1)]), &check_float64);
 		;}
     break;
 
   case 60:
-#line 360 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 369 "das.yy"
     {
 		    add_attribute(*type, *name, (yyvsp[(3) - (3)]), &check_float64);
 		;}
     break;
 
   case 61:
-#line 366 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 375 "das.yy"
     {
 		    string attr = remove_quotes((yyvsp[(1) - (1)]));
 		    add_attribute(*type, *name, attr, 0);
@@ -1809,7 +1904,9 @@ yyreduce:
     break;
 
   case 62:
-#line 371 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 380 "das.yy"
     {
 		    string attr = remove_quotes((yyvsp[(3) - (3)]));
 		    add_attribute(*type, *name, attr, 0);
@@ -1817,21 +1914,27 @@ yyreduce:
     break;
 
   case 63:
-#line 378 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 387 "das.yy"
     {
                     add_attribute(*type, *name, (yyvsp[(1) - (1)]), &check_url);
                 ;}
     break;
 
   case 64:
-#line 382 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 391 "das.yy"
     {
                     add_attribute(*type, *name, (yyvsp[(3) - (3)]), &check_url);
                 ;}
     break;
 
   case 65:
-#line 388 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 397 "das.yy"
     {
                     // XML must be quoted in the DAS but the quotes are an
                     // artifact of the DAS syntax so they are not part of the
@@ -1848,14 +1951,18 @@ yyreduce:
     break;
 
   case 82:
-#line 418 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 427 "das.yy"
     { 
 		    *name = (yyvsp[(2) - (2)]);
 		;}
     break;
 
   case 83:
-#line 422 "das.y"
+
+/* Line 1455 of yacc.c  */
+#line 431 "das.yy"
     {
 		    add_alias( DAS_OBJ(arg)->get_top_level_attributes(),
 		               TOP_OF_STACK, *name, string((yyvsp[(4) - (4)])) ) ;
@@ -1863,8 +1970,9 @@ yyreduce:
     break;
 
 
-/* Line 1267 of yacc.c.  */
-#line 1868 "das.tab.cc"
+
+/* Line 1455 of yacc.c  */
+#line 1976 "das.tab.cc"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1875,7 +1983,6 @@ yyreduce:
 
   *++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.  */
@@ -1900,7 +2007,7 @@ yyerrlab:
     {
       ++yynerrs;
 #if ! YYERROR_VERBOSE
-      yyerror (YY_("syntax error"));
+      yyerror (arg, YY_("syntax error"));
 #else
       {
 	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
@@ -1924,11 +2031,11 @@ yyerrlab:
 	if (0 < yysize && yysize <= yymsg_alloc)
 	  {
 	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
+	    yyerror (arg, yymsg);
 	  }
 	else
 	  {
-	    yyerror (YY_("syntax error"));
+	    yyerror (arg, YY_("syntax error"));
 	    if (yysize != 0)
 	      goto yyexhaustedlab;
 	  }
@@ -1940,7 +2047,7 @@ yyerrlab:
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
+      /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
@@ -1952,12 +2059,12 @@ yyerrlab:
       else
 	{
 	  yydestruct ("Error: discarding",
-		      yytoken, &yylval);
+		      yytoken, &yylval, arg);
 	  yychar = YYEMPTY;
 	}
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -2008,15 +2115,12 @@ yyerrlab1:
 
 
       yydestruct ("Error: popping",
-		  yystos[yystate], yyvsp);
+		  yystos[yystate], yyvsp, arg);
       YYPOPSTACK (1);
       yystate = *yyssp;
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   *++yyvsp = yylval;
 
 
@@ -2041,20 +2145,20 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
 yyexhaustedlab:
-  yyerror (YY_("memory exhausted"));
+  yyerror (arg, YY_("memory exhausted"));
   yyresult = 2;
   /* Fall through.  */
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
+  if (yychar != YYEMPTY)
      yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
+		 yytoken, &yylval, arg);
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -2062,7 +2166,7 @@ yyreturn:
   while (yyssp != yyss)
     {
       yydestruct ("Cleanup: popping",
-		  yystos[*yyssp], yyvsp);
+		  yystos[*yyssp], yyvsp, arg);
       YYPOPSTACK (1);
     }
 #ifndef yyoverflow
@@ -2078,14 +2182,16 @@ yyreturn:
 }
 
 
-#line 429 "das.y"
+
+/* Line 1675 of yacc.c  */
+#line 438 "das.yy"
 
 
 // This function is required for linking, but DODS uses its own error
 // reporting mechanism.
 
 static void
-daserror(char *)
+daserror(parser_arg *, const string &)
 {
 }
 
diff --git a/das.tab.hh b/das.tab.hh
index 78af108..9ea4caa 100644
--- a/das.tab.hh
+++ b/das.tab.hh
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   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
@@ -29,10 +28,63 @@
    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.  */
 
+/* "%code requires" blocks.  */
+
+/* Line 1676 of yacc.c  */
+#line 40 "das.yy"
+
+
+#define YYSTYPE char *
+#define ATTR_STRING_QUOTE_FIX
+
+#include "config.h"
+
+#include <string>
+
+#include <vector>
+
+#include "DAS.h"
+#include "Error.h"
+#include "util.h"
+#include "escaping.h"
+#include "debug.h"
+#include "parser.h"
+#include "util.h"
+  // #include "das.tab.hh"
+
+#ifdef TRACE_NEW
+#include "trace_new.h"
+#endif
+
+#define yylex daslex
+#define yyerror daserror 
+
+using namespace std;
+using namespace libdap ;
+
+// These macros are used to access the `arguments' passed to the parser. A
+// pointer to an error object and a pointer to an integer status variable are
+// passed in to the parser within a structure (which itself is passed as a
+// pointer). Note that the ERROR macro explicitly casts OBJ to an ERROR *. 
+// The parser now throws an exception when it encounters an error. 5/23/2002
+// jhrg 
+
+#define DAS_OBJ(arg) ((DAS *)((parser_arg *)(arg))->_object)
+
+//#define YYPARSE_PARAM arg
+
+extern int das_line_num;	/* defined in das.lex */
+
+
+
+
+/* Line 1676 of yacc.c  */
+#line 87 "das.tab.hh"
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -54,30 +106,16 @@
      SCAN_XML = 270
    };
 #endif
-/* Tokens.  */
-#define SCAN_ATTR 258
-#define SCAN_WORD 259
-#define SCAN_ALIAS 260
-#define SCAN_BYTE 261
-#define SCAN_INT16 262
-#define SCAN_UINT16 263
-#define SCAN_INT32 264
-#define SCAN_UINT32 265
-#define SCAN_FLOAT32 266
-#define SCAN_FLOAT64 267
-#define SCAN_STRING 268
-#define SCAN_URL 269
-#define SCAN_XML 270
-
 
 
 
 #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
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 extern YYSTYPE daslval;
 
+
diff --git a/das.y b/das.yy
similarity index 97%
rename from das.y
rename to das.yy
index 7ba6a86..a85f573 100644
--- a/das.y
+++ b/das.yy
@@ -37,15 +37,13 @@
    jhrg 7/12/94 
 */
 
-%{
+%code requires {
 
 #define YYSTYPE char *
 #define ATTR_STRING_QUOTE_FIX
 
 #include "config.h"
 
-static char rcsid[] not_used = {"$Id: das.y 21577 2009-10-02 16:12:17Z jimg $"};
-
 #include <string>
 
 #include <vector>
@@ -57,7 +55,7 @@ static char rcsid[] not_used = {"$Id: das.y 21577 2009-10-02 16:12:17Z jimg $"};
 #include "debug.h"
 #include "parser.h"
 #include "util.h"
-#include "das.tab.hh"
+  // #include "das.tab.hh"
 
 #ifdef TRACE_NEW
 #include "trace_new.h"
@@ -78,10 +76,13 @@ using namespace libdap ;
 
 #define DAS_OBJ(arg) ((DAS *)((parser_arg *)(arg))->_object)
 
-#define YYPARSE_PARAM arg
+//#define YYPARSE_PARAM arg
 
 extern int das_line_num;	/* defined in das.lex */
 
+} // code requires
+
+%code {
 // No global static objects. We go through this every so often, I guess I
 // should learn... 1/24/2000 jhrg
 static string *name;	/* holds name in attr_pair rule */
@@ -110,7 +111,7 @@ Check that the URL is correct.";
 typedef int checker(const char *);
 
 int daslex(void);
-static void daserror(char *s);
+static void daserror(parser_arg *arg, const string &s /*char *s*/);
 static void add_attribute(const string &type, const string &name, 
 			  const string &value, checker *chk) throw (Error);
 static void add_alias(AttrTable *das, AttrTable *current, const string &name, 
@@ -119,7 +120,15 @@ static void add_bad_attribute(AttrTable *attr, const string &type,
 			      const string &name, const string &value,
 			      const string &msg);
 
-%}
+} // code
+
+%require "2.4"
+
+%parse-param {parser_arg *arg}
+%name-prefix "das"
+%defines
+%debug
+%verbose
 
 %expect 26
 
@@ -432,7 +441,7 @@ alias:          SCAN_ALIAS SCAN_WORD
 // reporting mechanism.
 
 static void
-daserror(char *)
+daserror(parser_arg *, const string &)
 {
 }
 
diff --git a/dds.lex b/dds.lex
index 70b189c..82b8b51 100644
--- a/dds.lex
+++ b/dds.lex
@@ -56,8 +56,6 @@
 #include <cstdio>
 #include <cstring>
 
-static char rcsid[] not_used = {"$Id: dds.lex 25112 2011-12-29 21:44:54Z jimg $"};
-
 #include "parser.h"
 #include "dds.tab.hh"
 #include "escaping.h"
@@ -80,6 +78,7 @@ using namespace libdap ;
 
 #define YY_FATAL_ERROR(msg) {\
     throw(Error(string("Error scanning DDS object text: ") + string(msg))); \
+    yy_fatal_error(msg); /* see das.lex */ \
 }
 
 int dds_line_num = 1;
@@ -90,6 +89,8 @@ static void store_word();
 
 %option noyywrap
 %option nounput
+%option noinput
+%option 8bit
 %option prefix="dds"
 %option outfile="lex.dds.cc"
 %x comment
diff --git a/dds.tab.cc b/dds.tab.cc
index fdee3a7..7580858 100644
--- a/dds.tab.cc
+++ b/dds.tab.cc
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   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
@@ -29,7 +28,7 @@
    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.  */
 
@@ -47,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -55,72 +54,57 @@
 /* Pure parsers.  */
 #define YYPURE 0
 
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
 /* Substitute the variable and function names.  */
-#define yyparse ddsparse
-#define yylex   ddslex
-#define yyerror ddserror
-#define yylval  ddslval
-#define yychar  ddschar
-#define yydebug ddsdebug
-#define yynerrs ddsnerrs
+#define yyparse         ddsparse
+#define yylex           ddslex
+#define yyerror         ddserror
+#define yylval          ddslval
+#define yychar          ddschar
+#define yydebug         ddsdebug
+#define yynerrs         ddsnerrs
 
 
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     SCAN_WORD = 258,
-     SCAN_DATASET = 259,
-     SCAN_LIST = 260,
-     SCAN_SEQUENCE = 261,
-     SCAN_STRUCTURE = 262,
-     SCAN_FUNCTION = 263,
-     SCAN_GRID = 264,
-     SCAN_BYTE = 265,
-     SCAN_INT16 = 266,
-     SCAN_UINT16 = 267,
-     SCAN_INT32 = 268,
-     SCAN_UINT32 = 269,
-     SCAN_FLOAT32 = 270,
-     SCAN_FLOAT64 = 271,
-     SCAN_STRING = 272,
-     SCAN_URL = 273
-   };
+/* Copy the first part of user declarations.  */
+
+
+/* Line 189 of yacc.c  */
+#line 81 "dds.tab.cc"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
 #endif
-/* Tokens.  */
-#define SCAN_WORD 258
-#define SCAN_DATASET 259
-#define SCAN_LIST 260
-#define SCAN_SEQUENCE 261
-#define SCAN_STRUCTURE 262
-#define SCAN_FUNCTION 263
-#define SCAN_GRID 264
-#define SCAN_BYTE 265
-#define SCAN_INT16 266
-#define SCAN_UINT16 267
-#define SCAN_INT32 268
-#define SCAN_UINT32 269
-#define SCAN_FLOAT32 270
-#define SCAN_FLOAT64 271
-#define SCAN_STRING 272
-#define SCAN_URL 273
 
+/* 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
 
+/* "%code requires" blocks.  */
 
-/* Copy the first part of user declarations.  */
-#line 47 "dds.y"
+/* Line 209 of yacc.c  */
+#line 47 "dds.yy"
 
 
 #include "config_dap.h"
 
-static char rcsid[] not_used = {"$Id: dds.y 25112 2011-12-29 21:44:54Z jimg $"};
-
 #include <cstring>
 #include <cassert>
 #include <iostream>
@@ -157,10 +141,75 @@ using namespace libdap;
 // exceptions. 5/22/2002 jhrg
 #define DDS_OBJ(arg) ((DDS *)((parser_arg *)(arg))->_object)
 
-#define YYPARSE_PARAM arg
+// #define YYPARSE_PARAM arg
 
 extern int dds_line_num;	/* defined in dds.lex */
 
+
+
+
+/* Line 209 of yacc.c  */
+#line 153 "dds.tab.cc"
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     SCAN_WORD = 258,
+     SCAN_DATASET = 259,
+     SCAN_LIST = 260,
+     SCAN_SEQUENCE = 261,
+     SCAN_STRUCTURE = 262,
+     SCAN_FUNCTION = 263,
+     SCAN_GRID = 264,
+     SCAN_BYTE = 265,
+     SCAN_INT16 = 266,
+     SCAN_UINT16 = 267,
+     SCAN_INT32 = 268,
+     SCAN_UINT32 = 269,
+     SCAN_FLOAT32 = 270,
+     SCAN_FLOAT64 = 271,
+     SCAN_STRING = 272,
+     SCAN_URL = 273
+   };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c  */
+#line 131 "dds.yy"
+
+    bool boolean;
+    char word[ID_MAX];
+
+
+
+/* Line 214 of yacc.c  */
+#line 195 "dds.tab.cc"
+} 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.  */
+
+
+/* Line 264 of yacc.c  */
+#line 207 "dds.tab.cc"
+/* Unqualified %code blocks.  */
+
+/* Line 265 of yacc.c  */
+#line 93 "dds.yy"
+
+
 // No global static objects in the dap library! 1/24/2000 jhrg
 static stack<BaseType *> *ctor;
 static BaseType *current;
@@ -176,9 +225,9 @@ static const char *BAD_DECLARATION =
 (e.g., Int32 i;). Make sure that the variable name is not the name\n\
 of a datatype and that the Array: and Maps: sections of a Grid are\n\
 labeled properly.";
- 
+
 int ddslex();
-void ddserror(char *s);
+void ddserror(parser_arg *arg, const string &s /*char *s*/);
 void error_exit_cleanup();
 void add_entry(DDS &table, stack<BaseType *> **ctor, BaseType **current, 
 	       Part p);
@@ -187,46 +236,9 @@ void invalid_declaration(parser_arg *arg, string semantic_err_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
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 121 "dds.y"
-{
-    bool boolean;
-    char word[ID_MAX];
-}
-/* Line 193 of yacc.c.  */
-#line 217 "dds.tab.cc"
-	YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 216 of yacc.c.  */
-#line 230 "dds.tab.cc"
+/* Line 265 of yacc.c  */
+#line 242 "dds.tab.cc"
 
 #ifdef short
 # undef short
@@ -276,7 +288,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -301,14 +313,14 @@ typedef short int yytype_int16;
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int i)
+YYID (int yyi)
 #else
 static int
-YYID (i)
-    int i;
+YYID (yyi)
+    int yyi;
 #endif
 {
-  return i;
+  return yyi;
 }
 #endif
 
@@ -389,9 +401,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-  };
+  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)
@@ -425,12 +437,12 @@ union yyalloc
    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)					\
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
@@ -528,12 +540,12 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   150,   150,   150,   160,   161,   164,   168,   178,   182,
-     183,   190,   213,   212,   233,   232,   253,   265,   277,   252,
-     298,   309,   315,   321,   327,   328,   329,   330,   331,   332,
-     333,   334,   335,   338,   339,   342,   342,   342,   342,   342,
-     343,   343,   343,   343,   344,   344,   344,   344,   345,   348,
-     372,   376,   371,   403,   414,   415,   416
+       0,   160,   160,   160,   170,   171,   174,   178,   188,   192,
+     193,   200,   223,   222,   243,   242,   263,   275,   287,   262,
+     308,   319,   325,   331,   337,   338,   339,   340,   341,   342,
+     343,   344,   345,   348,   349,   352,   352,   352,   352,   352,
+     353,   353,   353,   353,   354,   354,   354,   354,   355,   358,
+     382,   386,   381,   413,   424,   425,   426
 };
 #endif
 
@@ -546,10 +558,10 @@ static const char *const yytname[] =
   "SCAN_SEQUENCE", "SCAN_STRUCTURE", "SCAN_FUNCTION", "SCAN_GRID",
   "SCAN_BYTE", "SCAN_INT16", "SCAN_UINT16", "SCAN_INT32", "SCAN_UINT32",
   "SCAN_FLOAT32", "SCAN_FLOAT64", "SCAN_STRING", "SCAN_URL", "'{'", "'}'",
-  "';'", "':'", "'['", "']'", "'='", "$accept", "start", "@1", "datasets",
-  "dataset", "declarations", "declaration", "@2", "@3", "@4", "@5", "@6",
-  "structure", "sequence", "grid", "base_type", "var", "var_name",
-  "array_decl", "@7", "@8", "name", 0
+  "';'", "':'", "'['", "']'", "'='", "$accept", "start", "$@1", "datasets",
+  "dataset", "declarations", "declaration", "$@2", "$@3", "$@4", "$@5",
+  "$@6", "structure", "sequence", "grid", "base_type", "var", "var_name",
+  "array_decl", "$@7", "$@8", "name", 0
 };
 #endif
 
@@ -732,7 +744,7 @@ do								\
     }								\
   else								\
     {								\
-      yyerror (YY_("syntax error: cannot back up")); \
+      yyerror (arg, YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
 while (YYID (0))
@@ -773,7 +785,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -812,7 +824,7 @@ do {									  \
     {									  \
       YYFPRINTF (stderr, "%s ", Title);					  \
       yy_symbol_print (stderr,						  \
-		  Type, Value); \
+		  Type, Value, arg); \
       YYFPRINTF (stderr, "\n");						  \
     }									  \
 } while (YYID (0))
@@ -826,17 +838,19 @@ do {									  \
 #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)
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_arg *arg)
 #else
 static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg)
     FILE *yyoutput;
     int yytype;
     YYSTYPE const * const yyvaluep;
+    parser_arg *arg;
 #endif
 {
   if (!yyvaluep)
     return;
+  YYUSE (arg);
 # ifdef YYPRINT
   if (yytype < YYNTOKENS)
     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
@@ -858,13 +872,14 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_arg *arg)
 #else
 static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
+yy_symbol_print (yyoutput, yytype, yyvaluep, arg)
     FILE *yyoutput;
     int yytype;
     YYSTYPE const * const yyvaluep;
+    parser_arg *arg;
 #endif
 {
   if (yytype < YYNTOKENS)
@@ -872,7 +887,7 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
   else
     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg);
   YYFPRINTF (yyoutput, ")");
 }
 
@@ -884,17 +899,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 #else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
@@ -912,12 +930,13 @@ do {								\
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_arg *arg)
 #else
 static void
-yy_reduce_print (yyvsp, yyrule)
+yy_reduce_print (yyvsp, yyrule, arg)
     YYSTYPE *yyvsp;
     int yyrule;
+    parser_arg *arg;
 #endif
 {
   int yynrhs = yyr2[yyrule];
@@ -928,18 +947,18 @@ yy_reduce_print (yyvsp, yyrule)
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       		       );
-      fprintf (stderr, "\n");
+		       		       , arg);
+      YYFPRINTF (stderr, "\n");
     }
 }
 
 # define YY_REDUCE_PRINT(Rule)		\
 do {					\
   if (yydebug)				\
-    yy_reduce_print (yyvsp, Rule); \
+    yy_reduce_print (yyvsp, Rule, arg); \
 } while (YYID (0))
 
 /* Nonzero means print parse trace.  It is left uninitialized so that
@@ -1190,16 +1209,18 @@ yysyntax_error (char *yyresult, int yystate, int yychar)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_arg *arg)
 #else
 static void
-yydestruct (yymsg, yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep, arg)
     const char *yymsg;
     int yytype;
     YYSTYPE *yyvaluep;
+    parser_arg *arg;
 #endif
 {
   YYUSE (yyvaluep);
+  YYUSE (arg);
 
   if (!yymsg)
     yymsg = "Deleting";
@@ -1212,10 +1233,8 @@ yydestruct (yymsg, yytype, yyvaluep)
 	break;
     }
 }
-

 
 /* Prevent warnings from -Wmissing-prototypes.  */
-
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
 int yyparse (void *YYPARSE_PARAM);
@@ -1224,18 +1243,17 @@ int yyparse ();
 #endif
 #else /* ! YYPARSE_PARAM */
 #if defined __STDC__ || defined __cplusplus
-int yyparse (void);
+int yyparse (parser_arg *arg);
 #else
 int yyparse ();
 #endif
 #endif /* ! YYPARSE_PARAM */
 
 
-
-/* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
+/* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
 
 /* Number of syntax errors so far.  */
@@ -1243,9 +1261,9 @@ int yynerrs;
 
 
 
-/*----------.
-| yyparse.  |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1261,74 +1279,76 @@ yyparse (YYPARSE_PARAM)
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 int
-yyparse (void)
+yyparse (parser_arg *arg)
 #else
 int
-yyparse ()
-
+yyparse (arg)
+    parser_arg *arg;
 #endif
 #endif
 {
-  
-  int yystate;
-  int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
 
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
 
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
 
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
 
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
+       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;
 
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
+    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.  */
+  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;
 
@@ -1358,7 +1378,6 @@ yyparse ()
 	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
@@ -1366,7 +1385,6 @@ yyparse ()
 	yyoverflow (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
-
 		    &yystacksize);
 
 	yyss = yyss1;
@@ -1389,9 +1407,8 @@ yyparse ()
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 #  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
@@ -1402,7 +1419,6 @@ yyparse ()
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
-
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 		  (unsigned long int) yystacksize));
 
@@ -1412,6 +1428,9 @@ yyparse ()
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
@@ -1420,16 +1439,16 @@ yyparse ()
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
+     lookahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to look-ahead token.  */
+  /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
   if (yyn == YYPACT_NINF)
     goto yydefault;
 
-  /* Not known => get a look-ahead token if don't already have one.  */
+  /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -1461,20 +1480,16 @@ yybackup:
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
   *++yyvsp = yylval;
@@ -1514,7 +1529,9 @@ yyreduce:
   switch (yyn)
     {
         case 2:
-#line 150 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 160 "dds.yy"
     {
 		    /* On entry to the parser, make the BaseType stack. */
 		    ctor = new stack<BaseType *>;
@@ -1522,21 +1539,27 @@ yyreduce:
     break;
 
   case 3:
-#line 155 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 165 "dds.yy"
     {
 		    delete ctor; ctor = 0;
 		;}
     break;
 
   case 6:
-#line 165 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 175 "dds.yy"
     {
 		    (yyval.boolean) = (yyvsp[(3) - (6)].boolean) && (yyvsp[(5) - (6)].word);
 		;}
     break;
 
   case 7:
-#line 169 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 179 "dds.yy"
     {
 		    parse_error((parser_arg *)arg, NO_DDS_MSG,
  				dds_line_num, (yyvsp[(1) - (1)].word));
@@ -1546,24 +1569,32 @@ yyreduce:
     break;
 
   case 8:
-#line 178 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 188 "dds.yy"
     {
 		    (yyval.boolean) = true;
 		;}
     break;
 
   case 9:
-#line 182 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 192 "dds.yy"
     { (yyval.boolean) = true; ;}
     break;
 
   case 10:
-#line 183 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 193 "dds.yy"
     { (yyval.boolean) = true; ;}
     break;
 
   case 11:
-#line 191 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 201 "dds.yy"
     { 
 		    string smsg;
 		    if (current->check_semantics(smsg)) {
@@ -1587,7 +1618,9 @@ yyreduce:
     break;
 
   case 12:
-#line 213 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 223 "dds.yy"
     { 
 		    if( current ) delete current ;
 		    current = ctor->top(); 
@@ -1596,7 +1629,9 @@ yyreduce:
     break;
 
   case 13:
-#line 219 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 229 "dds.yy"
     { 
 		    string smsg;
 		    if (current->check_semantics(smsg))
@@ -1612,7 +1647,9 @@ yyreduce:
     break;
 
   case 14:
-#line 233 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 243 "dds.yy"
     { 
 		    if( current ) delete current ;
 		    current = ctor->top(); 
@@ -1621,7 +1658,9 @@ yyreduce:
     break;
 
   case 15:
-#line 239 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 249 "dds.yy"
     { 
 		    string smsg;
 		    if (current->check_semantics(smsg))
@@ -1637,7 +1676,9 @@ yyreduce:
     break;
 
   case 16:
-#line 253 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 263 "dds.yy"
     { 
 		    if (is_keyword(string((yyvsp[(3) - (4)].word)), "array"))
 			part = array; 
@@ -1652,7 +1693,9 @@ yyreduce:
     break;
 
   case 17:
-#line 265 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 275 "dds.yy"
     { 
 		    if (is_keyword(string((yyvsp[(7) - (8)].word)), "maps"))
 			part = maps; 
@@ -1667,7 +1710,9 @@ yyreduce:
     break;
 
   case 18:
-#line 277 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 287 "dds.yy"
     {
 		    if( current ) delete current ;
 		    current = ctor->top(); 
@@ -1676,7 +1721,9 @@ yyreduce:
     break;
 
   case 19:
-#line 283 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 293 "dds.yy"
     {
 		    string smsg;
 		    if (current->check_semantics(smsg)) {
@@ -1694,7 +1741,9 @@ yyreduce:
     break;
 
   case 20:
-#line 299 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 309 "dds.yy"
     {
 		    ostringstream msg;
 		    msg << BAD_DECLARATION;
@@ -1705,78 +1754,106 @@ yyreduce:
     break;
 
   case 21:
-#line 310 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 320 "dds.yy"
     { 
 		    ctor->push(DDS_OBJ(arg)->get_factory()->NewStructure()); 
 		;}
     break;
 
   case 22:
-#line 316 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 326 "dds.yy"
     { 
 		    ctor->push(DDS_OBJ(arg)->get_factory()->NewSequence()); 
 		;}
     break;
 
   case 23:
-#line 322 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 332 "dds.yy"
     { 
 		    ctor->push(DDS_OBJ(arg)->get_factory()->NewGrid()); 
 		;}
     break;
 
   case 24:
-#line 327 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 337 "dds.yy"
     { if( current ) delete current ;current = DDS_OBJ(arg)->get_factory()->NewByte(); ;}
     break;
 
   case 25:
-#line 328 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 338 "dds.yy"
     { if( current ) delete current ;current = DDS_OBJ(arg)->get_factory()->NewInt16(); ;}
     break;
 
   case 26:
-#line 329 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 339 "dds.yy"
     { if( current ) delete current ;current = DDS_OBJ(arg)->get_factory()->NewUInt16(); ;}
     break;
 
   case 27:
-#line 330 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 340 "dds.yy"
     { if( current ) delete current ;current = DDS_OBJ(arg)->get_factory()->NewInt32(); ;}
     break;
 
   case 28:
-#line 331 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 341 "dds.yy"
     { if( current ) delete current ;current = DDS_OBJ(arg)->get_factory()->NewUInt32(); ;}
     break;
 
   case 29:
-#line 332 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 342 "dds.yy"
     { if( current ) delete current ;current = DDS_OBJ(arg)->get_factory()->NewFloat32(); ;}
     break;
 
   case 30:
-#line 333 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 343 "dds.yy"
     { if( current ) delete current ;current = DDS_OBJ(arg)->get_factory()->NewFloat64(); ;}
     break;
 
   case 31:
-#line 334 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 344 "dds.yy"
     { if( current ) delete current ;current = DDS_OBJ(arg)->get_factory()->NewStr(); ;}
     break;
 
   case 32:
-#line 335 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 345 "dds.yy"
     { if( current ) delete current ;current = DDS_OBJ(arg)->get_factory()->NewUrl(); ;}
     break;
 
   case 33:
-#line 338 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 348 "dds.yy"
     { current->set_name((yyvsp[(1) - (1)].word)); ;}
     break;
 
   case 49:
-#line 349 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 359 "dds.yy"
     { 
 		     if (!check_int32((yyvsp[(2) - (3)].word))) {
 			 string msg = "In the dataset descriptor object:\n";
@@ -1801,14 +1878,18 @@ yyreduce:
     break;
 
   case 50:
-#line 372 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 382 "dds.yy"
     {
 		     id = new string((yyvsp[(2) - (2)].word));
 		 ;}
     break;
 
   case 51:
-#line 376 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 386 "dds.yy"
     { 
 		     if (!check_int32((yyvsp[(5) - (5)].word))) {
 			 string msg = "In the dataset descriptor object:\n";
@@ -1834,14 +1915,18 @@ yyreduce:
     break;
 
   case 52:
-#line 399 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 409 "dds.yy"
     {
 		     (yyval.boolean) = true;
 		 ;}
     break;
 
   case 53:
-#line 404 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 414 "dds.yy"
     {
 		     ostringstream msg;
 		     msg << "In the dataset descriptor object:" << endl
@@ -1853,17 +1938,23 @@ yyreduce:
     break;
 
   case 54:
-#line 414 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 424 "dds.yy"
     { (*DDS_OBJ(arg)).set_dataset_name((yyvsp[(1) - (1)].word)); ;}
     break;
 
   case 55:
-#line 415 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 425 "dds.yy"
     { (*DDS_OBJ(arg)).set_dataset_name((yyvsp[(1) - (1)].word)); ;}
     break;
 
   case 56:
-#line 417 "dds.y"
+
+/* Line 1455 of yacc.c  */
+#line 427 "dds.yy"
     {
 		  ostringstream msg;
 		  msg << "Error parsing the dataset name." << endl
@@ -1875,8 +1966,9 @@ yyreduce:
     break;
 
 
-/* Line 1267 of yacc.c.  */
-#line 1880 "dds.tab.cc"
+
+/* Line 1455 of yacc.c  */
+#line 1972 "dds.tab.cc"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1887,7 +1979,6 @@ yyreduce:
 
   *++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.  */
@@ -1912,7 +2003,7 @@ yyerrlab:
     {
       ++yynerrs;
 #if ! YYERROR_VERBOSE
-      yyerror (YY_("syntax error"));
+      yyerror (arg, YY_("syntax error"));
 #else
       {
 	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
@@ -1936,11 +2027,11 @@ yyerrlab:
 	if (0 < yysize && yysize <= yymsg_alloc)
 	  {
 	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
+	    yyerror (arg, yymsg);
 	  }
 	else
 	  {
-	    yyerror (YY_("syntax error"));
+	    yyerror (arg, YY_("syntax error"));
 	    if (yysize != 0)
 	      goto yyexhaustedlab;
 	  }
@@ -1952,7 +2043,7 @@ yyerrlab:
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
+      /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
@@ -1964,12 +2055,12 @@ yyerrlab:
       else
 	{
 	  yydestruct ("Error: discarding",
-		      yytoken, &yylval);
+		      yytoken, &yylval, arg);
 	  yychar = YYEMPTY;
 	}
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -2020,15 +2111,12 @@ yyerrlab1:
 
 
       yydestruct ("Error: popping",
-		  yystos[yystate], yyvsp);
+		  yystos[yystate], yyvsp, arg);
       YYPOPSTACK (1);
       yystate = *yyssp;
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   *++yyvsp = yylval;
 
 
@@ -2053,20 +2141,20 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
 yyexhaustedlab:
-  yyerror (YY_("memory exhausted"));
+  yyerror (arg, YY_("memory exhausted"));
   yyresult = 2;
   /* Fall through.  */
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
+  if (yychar != YYEMPTY)
      yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
+		 yytoken, &yylval, arg);
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -2074,7 +2162,7 @@ yyreturn:
   while (yyssp != yyss)
     {
       yydestruct ("Cleanup: popping",
-		  yystos[*yyssp], yyvsp);
+		  yystos[*yyssp], yyvsp, arg);
       YYPOPSTACK (1);
     }
 #ifndef yyoverflow
@@ -2090,7 +2178,9 @@ yyreturn:
 }
 
 
-#line 427 "dds.y"
+
+/* Line 1675 of yacc.c  */
+#line 437 "dds.yy"
 
 
 /* 
@@ -2099,7 +2189,7 @@ yyreturn:
  */
 
 void
-ddserror(char *)
+ddserror(parser_arg *, const string &)
 {
 }
 
diff --git a/dds.tab.hh b/dds.tab.hh
index d08c777..7541b15 100644
--- a/dds.tab.hh
+++ b/dds.tab.hh
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   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
@@ -29,10 +28,64 @@
    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.  */
 
+/* "%code requires" blocks.  */
+
+/* Line 1676 of yacc.c  */
+#line 47 "dds.yy"
+
+
+#include "config_dap.h"
+
+#include <cstring>
+#include <cassert>
+#include <iostream>
+#include <stack>
+#include <sstream>
+
+#include "Byte.h"
+#include "Int16.h"
+#include "UInt16.h"
+#include "Int32.h"
+#include "UInt32.h"
+#include "Float32.h"
+#include "Float64.h"
+#include "Str.h"
+#include "Url.h"
+#include "Array.h"
+#include "Structure.h"
+#include "Sequence.h"
+#include "Grid.h"
+
+#include "DDS.h"
+#include "Error.h"
+#include "parser.h"
+#include "util.h"
+
+using namespace std;
+using namespace libdap;
+
+// These macros are used to access the `arguments' passed to the parser. A
+// pointer to an error object and a pointer to an integer status variable are
+// passed in to the parser within a structure (which itself is passed as a
+// pointer). Note that the ERROR macro explicitly casts OBJ to an ERROR *. 
+// ERROR is no longer used. These parsers now signal problems by throwing
+// exceptions. 5/22/2002 jhrg
+#define DDS_OBJ(arg) ((DDS *)((parser_arg *)(arg))->_object)
+
+// #define YYPARSE_PARAM arg
+
+extern int dds_line_num;	/* defined in dds.lex */
+
+
+
+
+/* Line 1676 of yacc.c  */
+#line 88 "dds.tab.hh"
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -57,41 +110,29 @@
      SCAN_URL = 273
    };
 #endif
-/* Tokens.  */
-#define SCAN_WORD 258
-#define SCAN_DATASET 259
-#define SCAN_LIST 260
-#define SCAN_SEQUENCE 261
-#define SCAN_STRUCTURE 262
-#define SCAN_FUNCTION 263
-#define SCAN_GRID 264
-#define SCAN_BYTE 265
-#define SCAN_INT16 266
-#define SCAN_UINT16 267
-#define SCAN_INT32 268
-#define SCAN_UINT32 269
-#define SCAN_FLOAT32 270
-#define SCAN_FLOAT64 271
-#define SCAN_STRING 272
-#define SCAN_URL 273
-
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 121 "dds.y"
 {
+
+/* Line 1676 of yacc.c  */
+#line 131 "dds.yy"
+
     bool boolean;
     char word[ID_MAX];
-}
-/* Line 1529 of yacc.c.  */
-#line 90 "dds.tab.hh"
-	YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c  */
+#line 130 "dds.tab.hh"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 extern YYSTYPE ddslval;
 
+
diff --git a/dds.y b/dds.yy
similarity index 98%
rename from dds.y
rename to dds.yy
index 42dc593..517192c 100644
--- a/dds.y
+++ b/dds.yy
@@ -44,12 +44,10 @@
    jhrg 8/29/94 
 */
 
-%{
+%code requires {
 
 #include "config_dap.h"
 
-static char rcsid[] not_used = {"$Id: dds.y 25112 2011-12-29 21:44:54Z jimg $"};
-
 #include <cstring>
 #include <cassert>
 #include <iostream>
@@ -86,10 +84,14 @@ using namespace libdap;
 // exceptions. 5/22/2002 jhrg
 #define DDS_OBJ(arg) ((DDS *)((parser_arg *)(arg))->_object)
 
-#define YYPARSE_PARAM arg
+// #define YYPARSE_PARAM arg
 
 extern int dds_line_num;	/* defined in dds.lex */
 
+} // code requires
+
+%code {
+
 // No global static objects in the dap library! 1/24/2000 jhrg
 static stack<BaseType *> *ctor;
 static BaseType *current;
@@ -105,16 +107,24 @@ static const char *BAD_DECLARATION =
 (e.g., Int32 i;). Make sure that the variable name is not the name\n\
 of a datatype and that the Array: and Maps: sections of a Grid are\n\
 labeled properly.";
- 
+
 int ddslex();
-void ddserror(char *s);
+void ddserror(parser_arg *arg, const string &s /*char *s*/);
 void error_exit_cleanup();
 void add_entry(DDS &table, stack<BaseType *> **ctor, BaseType **current, 
 	       Part p);
 void invalid_declaration(parser_arg *arg, string semantic_err_msg, 
 			 char *type, char *name);
 
-%}
+} // code
+
+%require "2.4"
+
+%parse-param {parser_arg *arg}
+%name-prefix "dds"
+%defines
+%debug
+%verbose
 
 %expect 52
 
@@ -432,7 +442,7 @@ name:		var_name { (*DDS_OBJ(arg)).set_dataset_name($1); }
  */
 
 void
-ddserror(char *)
+ddserror(parser_arg *, const string &)
 {
 }
 
diff --git a/debug.h b/debug.h
index 834cde2..30897b2 100644
--- a/debug.h
+++ b/debug.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 */
diff --git a/dods-datatypes-config.h.in b/dods-datatypes-config.h.in
index ee92aac..9aa5b60 100644
--- a/dods-datatypes-config.h.in
+++ b/dods-datatypes-config.h.in
@@ -23,7 +23,7 @@
    the dods-datatypes.h header when its contents change. This saves on
    compilation since the header is used by many files in the dap++ library.
    The downside is that the typedefs are so ugly... 2/14/2001 jhrg */
-
+   
 #undef DINT32
 typedef DINT32 dods_int32;
 
@@ -43,7 +43,16 @@ typedef DBYTE dods_byte;
 typedef DFLOAT64 dods_float64;
 
 #undef DFLOAT32
-typedef DFLOAT32 dods_float32;		
+typedef DFLOAT32 dods_float32;	
+
+#undef DINT8
+typedef DINT8 dods_int8;
+
+#undef DINT64
+typedef DINT64 dods_int64;
+
+#undef DUINT64
+typedef DUINT64 dods_uint64;
 
 #endif /* __DODS_DATATYPES__ */
 
diff --git a/dods-datatypes-static.h b/dods-datatypes-static.h
index 9ceb0e0..ab5dce7 100644
--- a/dods-datatypes-static.h
+++ b/dods-datatypes-static.h
@@ -44,6 +44,13 @@ typedef double dods_float64;
 
 typedef float dods_float32;		
 
+// Added for DAP4
+typedef int8_t dods_int8;
+
+typedef int64_t dods_int64;
+
+typedef uint64_t dods_uint64;
+
 } // namespace libdap
 
 #endif /* __DODS_DATATYPES__ */
diff --git a/dods-datatypes.h b/dods-datatypes.h
index 9ceb0e0..ab5dce7 100644
--- a/dods-datatypes.h
+++ b/dods-datatypes.h
@@ -44,6 +44,13 @@ typedef double dods_float64;
 
 typedef float dods_float32;		
 
+// Added for DAP4
+typedef int8_t dods_int8;
+
+typedef int64_t dods_int64;
+
+typedef uint64_t dods_uint64;
+
 } // namespace libdap
 
 #endif /* __DODS_DATATYPES__ */
diff --git a/dods-limits.h b/dods-limits.h
index a112c5b..d5fab95 100644
--- a/dods-limits.h
+++ b/dods-limits.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -35,6 +35,9 @@
 #ifndef _dods_limits_h
 #define _dods_limits_h
 
+#if 0
+// The old values. I switched to hex notation when 64-bit ints were added
+// to DAP4.
 #define DODS_CHAR_BIT 8
 #define DODS_SCHAR_MIN -128
 #define DODS_SCHAR_MAX 127
@@ -45,13 +48,39 @@
 #define DODS_SHRT_MAX 32767
 #define DODS_USHRT_MAX 65535U
 
-#define DODS_INT_MIN (-2147483647 - 1)
+#define DODS_INT_MIN -2147483648
+// was (-2147483647 - 1)
 #define DODS_INT_MAX 2147483647
 #define DODS_UINT_MAX 4294967295U
 
-#define DODS_LONG_MIN (-2147483647 - 1)
+#define DODS_LONG_MIN -2147483648
+// was (-2147483647 - 1)
 #define DODS_LONG_MAX 2147483647
 #define DODS_ULONG_MAX 4294967295UL
+#endif
+
+#define DODS_CHAR_BIT 8
+#define DODS_SCHAR_MIN (-0x7f-1)
+#define DODS_SCHAR_MAX 0x7f
+#define DODS_UCHAR_MAX 0xffU
+#define DODS_UCHAR_MIN 0
+
+#define DODS_SHRT_MIN (-0x7fff-1)
+#define DODS_SHRT_MAX 0x7fff
+#define DODS_USHRT_MAX 0xffffU
+
+#define DODS_INT_MIN (-0x7fffffff-1)
+#define DODS_INT_MAX 0x7fffffff
+#define DODS_UINT_MAX 0xffffffffUL
+
+#define DODS_LONG_MIN DODS_INT_MIN
+#define DODS_LONG_MAX DODS_INT_MAX
+#define DODS_ULONG_MAX DODS_UINT_MAX
+
+#define DODS_LLONG_MIN (-0x7fffffffffffffffLL-1)
+#define DODS_LLONG_MAX 0x7fffffffffffffffLL
+#define DODS_ULLONG_MAX 0xffffffffffffffffULL
+
 
 #define DODS_DBL_DIG 15 /* digits of precision of a "double" */
 #define DODS_DBL_MAX 1.7976931348623157E+308 /* max decimal value of a */
diff --git a/doxy.conf b/doxy.conf
index 7373f2a..3fb7a66 100644
--- a/doxy.conf
+++ b/doxy.conf
@@ -31,7 +31,7 @@ PROJECT_NAME           = libdap++
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = "Updated for version 3.11.7"
+PROJECT_NUMBER         = "Updated for version 3.12.0"
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 
diff --git a/escaping.cc b/escaping.cc
index 212e9d7..0f55e90 100644
--- a/escaping.cc
+++ b/escaping.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/escaping.h b/escaping.h
index 73cdcb0..6976b60 100644
--- a/escaping.h
+++ b/escaping.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/expr.h b/expr.h
index b0bbf1f..bfdcf44 100644
--- a/expr.h
+++ b/expr.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -62,11 +62,10 @@ typedef struct
 
 // Syntactic sugar for `pointer to function returning boolean' (bool_func)
 // and `pointer to function returning BaseType *' (btp_func). Both function
-// types take three arguments, an integer (argc), a vector of BaseType *s
-// (argv) and the DDS for the dataset for which these function is being
-// evaluated (analogous to the ENVP in UNIX). ARGC is the length of ARGV.
-
-// These two types of functions now take four args - the DDS was added.
+// types take four arguments, an integer (argc), a vector of BaseType *s
+// (argv), the DDS for the dataset for which these function is being
+// evaluated (analogous to the ENVP in UNIX) and a pointer for the function's
+// return value. ARGC is the length of ARGV.
 
 /** @todo A better design would wrap these in a class and record at minimum
     their names so that error messages could be a bit more informative. jhrg
@@ -84,6 +83,10 @@ typedef void(*proj_func)(int argc, BaseType *argv[], DDS &dds, ConstraintEvaluat
 // INT_LIST and INT_LIST_LIST are used by the parser to store the array
 // indexes.
 
+// To add the new feature of 'to the end' in an array projection (denoted using
+// start), I used the value -1 for an index. This makes do difference here. jhrg
+// 12/20/12
+
 typedef std::vector<int> int_list;
 typedef std::vector<int>::const_iterator int_citer ;
 typedef std::vector<int>::iterator int_iter ;
diff --git a/getdap.cc b/getdap.cc
index 3bdf713..ebef248 100644
--- a/getdap.cc
+++ b/getdap.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -35,10 +35,6 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    { "$Id: getdap.cc 21695 2009-11-04 17:45:04Z jimg $"
-    };
-
 #ifdef WIN32
 #include <io.h>
 #include <fcntl.h>
diff --git a/gl/Makefile.am b/gl/Makefile.am
index bfb32e6..51046af 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -1,15 +1,27 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
-# This file is free software, distributed under the terms of the GNU
-# General Public License.  As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file 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 file.  If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=gl/doc --tests-base=tests --aux-dir=conf --lgpl --libtool --macro-prefix=gl regex
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=gl/doc --tests-base=tests --aux-dir=conf --lgpl --no-conditional-dependencies --libtool --macro-prefix=gl byteswap regex
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -46,42 +58,23 @@ BUILT_SOURCES += $(ALLOCA_H)
 
 # We need the following in order to create <alloca.h> when the system
 # doesn't have one that works with the given compiler.
-alloca.h: alloca.in.h
+if GL_GENERATE_ALLOCA_H
+alloca.h: alloca.in.h $(top_builddir)/config.status
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
 	  cat $(srcdir)/alloca.in.h; \
 	} > $@-t && \
 	mv -f $@-t $@
+else
+alloca.h: $(top_builddir)/config.status
+	rm -f $@
+endif
 MOSTLYCLEANFILES += alloca.h alloca.h-t
 
 EXTRA_DIST += alloca.in.h
 
 ## end   gnulib module alloca-opt
 
-## begin gnulib module arg-nonnull
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += arg-nonnull.h
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
-arg-nonnull.h: $(top_srcdir)/conf/arg-nonnull.h
-	$(AM_V_GEN)rm -f $@-t $@ && \
-	sed -n -e '/GL_ARG_NONNULL/,$$p' \
-	  < $(top_srcdir)/conf/arg-nonnull.h \
-	  > $@-t && \
-	mv $@-t $@
-MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
-
-ARG_NONNULL_H=arg-nonnull.h
-
-EXTRA_DIST += $(top_srcdir)/conf/arg-nonnull.h
-
-## end   gnulib module arg-nonnull
-
 ## begin gnulib module btowc
 
 
@@ -91,29 +84,28 @@ EXTRA_libgnu_la_SOURCES += btowc.c
 
 ## end   gnulib module btowc
 
-## begin gnulib module c++defs
+## begin gnulib module byteswap
 
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
+BUILT_SOURCES += $(BYTESWAP_H)
 
-BUILT_SOURCES += c++defs.h
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/conf/c++defs.h
+# We need the following in order to create <byteswap.h> when the system
+# doesn't have one.
+if GL_GENERATE_BYTESWAP_H
+byteswap.h: byteswap.in.h $(top_builddir)/config.status
 	$(AM_V_GEN)rm -f $@-t $@ && \
-	sed -n -e '/_GL_CXXDEFS/,$$p' \
-	  < $(top_srcdir)/conf/c++defs.h \
-	  > $@-t && \
-	mv $@-t $@
-MOSTLYCLEANFILES += c++defs.h c++defs.h-t
-
-CXXDEFS_H=c++defs.h
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/byteswap.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+else
+byteswap.h: $(top_builddir)/config.status
+	rm -f $@
+endif
+MOSTLYCLEANFILES += byteswap.h byteswap.h-t
 
-EXTRA_DIST += $(top_srcdir)/conf/c++defs.h
+EXTRA_DIST += byteswap.in.h
 
-## end   gnulib module c++defs
+## end   gnulib module byteswap
 
 ## begin gnulib module configmake
 
@@ -152,11 +144,7 @@ configmake.h: Makefile
 	  echo '#define PKGLIBDIR "$(pkglibdir)"'; \
 	  echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
 	} | sed '/""/d' > $@-t && \
-	if test -f $@ && cmp $@-t $@ > /dev/null; then \
-	  rm -f $@-t; \
-	else \
-	  rm -f $@; mv $@-t $@; \
-	fi
+	mv -f $@-t $@
 
 BUILT_SOURCES += configmake.h
 CLEANFILES += configmake.h configmake.h-t
@@ -175,15 +163,16 @@ BUILT_SOURCES += langinfo.h
 
 # We need the following in order to create an empty placeholder for
 # <langinfo.h> when the system doesn't have one.
-langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
 	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
-	      -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+	      -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \
 	      -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
 	      -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
 	      -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
@@ -275,6 +264,50 @@ EXTRA_DIST += config.charset ref-add.sin ref-del.sin
 
 ## end   gnulib module localcharset
 
+## begin gnulib module locale
+
+BUILT_SOURCES += locale.h
+
+# We need the following in order to create <locale.h> when the system
+# doesn't have one that provides all definitions.
+locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
+	      -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
+	      -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
+	      -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+	      -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+	      -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
+	      -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
+	      -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+	      -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+	      -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/locale.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += locale.h locale.h-t
+
+EXTRA_DIST += locale.in.h
+
+## end   gnulib module locale
+
+## begin gnulib module localeconv
+
+
+EXTRA_DIST += localeconv.c
+
+EXTRA_libgnu_la_SOURCES += localeconv.c
+
+## end   gnulib module localeconv
+
 ## begin gnulib module malloc-gnu
 
 
@@ -311,6 +344,15 @@ EXTRA_libgnu_la_SOURCES += mbsinit.c
 
 ## end   gnulib module mbsinit
 
+## begin gnulib module mbtowc
+
+
+EXTRA_DIST += mbtowc-impl.h mbtowc.c
+
+EXTRA_libgnu_la_SOURCES += mbtowc.c
+
+## end   gnulib module mbtowc
+
 ## begin gnulib module nl_langinfo
 
 
@@ -329,18 +371,104 @@ EXTRA_libgnu_la_SOURCES += regcomp.c regex.c regex_internal.c regexec.c
 
 ## end   gnulib module regex
 
+## begin gnulib module snippet/_Noreturn
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all Makefile.am that
+# need it. This is ensured by the applicability 'all' defined above.
+
+_NORETURN_H=$(top_srcdir)/conf/snippet/_Noreturn.h
+
+EXTRA_DIST += $(top_srcdir)/conf/snippet/_Noreturn.h
+
+## end   gnulib module snippet/_Noreturn
+
+## begin gnulib module snippet/arg-nonnull
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += arg-nonnull.h
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
+# off.
+arg-nonnull.h: $(top_srcdir)/conf/snippet/arg-nonnull.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	sed -n -e '/GL_ARG_NONNULL/,$$p' \
+	  < $(top_srcdir)/conf/snippet/arg-nonnull.h \
+	  > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+
+ARG_NONNULL_H=arg-nonnull.h
+
+EXTRA_DIST += $(top_srcdir)/conf/snippet/arg-nonnull.h
+
+## end   gnulib module snippet/arg-nonnull
+
+## begin gnulib module snippet/c++defs
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += c++defs.h
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/conf/snippet/c++defs.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	sed -n -e '/_GL_CXXDEFS/,$$p' \
+	  < $(top_srcdir)/conf/snippet/c++defs.h \
+	  > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += c++defs.h c++defs.h-t
+
+CXXDEFS_H=c++defs.h
+
+EXTRA_DIST += $(top_srcdir)/conf/snippet/c++defs.h
+
+## end   gnulib module snippet/c++defs
+
+## begin gnulib module snippet/warn-on-use
+
+BUILT_SOURCES += warn-on-use.h
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
+# off.
+warn-on-use.h: $(top_srcdir)/conf/snippet/warn-on-use.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	sed -n -e '/^.ifndef/,$$p' \
+	  < $(top_srcdir)/conf/snippet/warn-on-use.h \
+	  > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+
+WARN_ON_USE_H=warn-on-use.h
+
+EXTRA_DIST += $(top_srcdir)/conf/snippet/warn-on-use.h
+
+## end   gnulib module snippet/warn-on-use
+
 ## begin gnulib module stdbool
 
 BUILT_SOURCES += $(STDBOOL_H)
 
 # We need the following in order to create <stdbool.h> when the system
 # doesn't have one that works.
-stdbool.h: stdbool.in.h
+if GL_GENERATE_STDBOOL_H
+stdbool.h: stdbool.in.h $(top_builddir)/config.status
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
 	  sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
 	} > $@-t && \
 	mv $@-t $@
+else
+stdbool.h: $(top_builddir)/config.status
+	rm -f $@
+endif
 MOSTLYCLEANFILES += stdbool.h stdbool.h-t
 
 EXTRA_DIST += stdbool.in.h
@@ -353,10 +481,12 @@ BUILT_SOURCES += $(STDDEF_H)
 
 # We need the following in order to create <stddef.h> when the system
 # doesn't have one that works with the given compiler.
-stddef.h: stddef.in.h
+if GL_GENERATE_STDDEF_H
+stddef.h: stddef.in.h $(top_builddir)/config.status
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-	  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
@@ -365,6 +495,10 @@ stddef.h: stddef.in.h
 	      < $(srcdir)/stddef.in.h; \
 	} > $@-t && \
 	mv $@-t $@
+else
+stddef.h: $(top_builddir)/config.status
+	rm -f $@
+endif
 MOSTLYCLEANFILES += stddef.h stddef.h-t
 
 EXTRA_DIST += stddef.in.h
@@ -377,10 +511,12 @@ BUILT_SOURCES += $(STDINT_H)
 
 # We need the following in order to create <stdint.h> when the system
 # doesn't have one that works with the given compiler.
-stdint.h: stdint.in.h
+if GL_GENERATE_STDINT_H
+stdint.h: stdint.in.h $(top_builddir)/config.status
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
 	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -389,6 +525,7 @@ stdint.h: stdint.in.h
 	      -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
 	      -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
 	      -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+	      -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
 	      -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
 	      -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
 	      -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
@@ -408,6 +545,10 @@ stdint.h: stdint.in.h
 	      < $(srcdir)/stdint.in.h; \
 	} > $@-t && \
 	mv $@-t $@
+else
+stdint.h: $(top_builddir)/config.status
+	rm -f $@
+endif
 MOSTLYCLEANFILES += stdint.h stdint.h-t
 
 EXTRA_DIST += stdint.in.h
@@ -420,40 +561,48 @@ BUILT_SOURCES += stdlib.h
 
 # We need the following in order to create <stdlib.h> when the system
 # doesn't have one that works with the given compiler.
-stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
+  $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-	  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-	      -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
-	      -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
-	      -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
-	      -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
-	      -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
-	      -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
-	      -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
-	      -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-	      -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-	      -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
-	      -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
-	      -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
-	      -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
-	      -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
-	      -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
-	      -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
-	      -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
-	      -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
-	      -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
-	      -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
-	      -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
-	      -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
-	      -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
-	      -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
-	      -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
-	      -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
-	      -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+	      -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+	      -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
+	      -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
+	      -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+	      -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
+	      -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
+	      -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
+	      -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
+	      -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
+	      -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
+	      -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
+	      -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
+	      -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
+	      -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+	      -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
+	      -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
+	      -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
+	      -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+	      -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
+	      -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
+	      -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
+	      -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
+	      -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+	      -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
+	      -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
+	      -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
+	      -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
+	      -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
+	      -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
+	      -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
+	      -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
+	      < $(srcdir)/stdlib.in.h | \
+	  sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
 	      -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
 	      -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
 	      -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
@@ -464,7 +613,10 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
 	      -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
 	      -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+	      -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
 	      -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
+	      -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+	      -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
 	      -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
 	      -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
 	      -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
@@ -480,17 +632,21 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
 	      -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
 	      -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
+	      -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
 	      -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+	      -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
 	      -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+	      -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
 	      -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
 	      -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
 	      -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
 	      -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
 	      -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+	      -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _Noreturn/r $(_NORETURN_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-	      < $(srcdir)/stdlib.in.h; \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
 	} > $@-t && \
 	mv $@-t $@
 MOSTLYCLEANFILES += stdlib.h stdlib.h-t
@@ -499,6 +655,15 @@ EXTRA_DIST += stdlib.in.h
 
 ## end   gnulib module stdlib
 
+## begin gnulib module strcase
+
+
+EXTRA_DIST += strcasecmp.c strncasecmp.c
+
+EXTRA_libgnu_la_SOURCES += strcasecmp.c strncasecmp.c
+
+## end   gnulib module strcase
+
 ## begin gnulib module streq
 
 
@@ -506,61 +671,127 @@ EXTRA_DIST += streq.h
 
 ## end   gnulib module streq
 
+## begin gnulib module strings
+
+BUILT_SOURCES += strings.h
+
+# We need the following in order to create <strings.h> when the system
+# doesn't have one that works with the given compiler.
+strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
+	      -e 's|@''GNULIB_FFS''@|$(GNULIB_FFS)|g' \
+	      -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \
+	      -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
+	      -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/strings.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += strings.h strings.h-t
+
+EXTRA_DIST += strings.in.h
+
+## end   gnulib module strings
+
+## begin gnulib module sys_types
+
+BUILT_SOURCES += sys/types.h
+
+# We need the following in order to create <sys/types.h> when the system
+# doesn't have one that works with the given compiler.
+sys/types.h: sys_types.in.h $(top_builddir)/config.status
+	$(AM_V_at)$(MKDIR_P) sys
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
+	      -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+	      < $(srcdir)/sys_types.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += sys/types.h sys/types.h-t
+
+EXTRA_DIST += sys_types.in.h
+
+## end   gnulib module sys_types
+
 ## begin gnulib module unistd
 
 BUILT_SOURCES += unistd.h
 
 # We need the following in order to create an empty placeholder for
 # <unistd.h> when the system doesn't have one.
-unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
 	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-	      -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
-	      -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
-	      -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
-	      -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
-	      -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
-	      -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
-	      -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
-	      -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
-	      -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
-	      -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
-	      -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
-	      -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
-	      -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
-	      -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
-	      -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
-	      -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
-	      -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
-	      -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
-	      -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
-	      -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
-	      -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
-	      -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
-	      -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
-	      -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
-	      -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
-	      -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
-	      -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
-	      -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
-	      -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
-	      -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
-	      -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
-	      -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
-	      -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
-	      -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
-	      -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
-	      -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
-	      -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
-	      -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
-	      -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
-	      -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
-	      -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+	      -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+	      -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
+	      -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
+	      -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+	      -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
+	      -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
+	      -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
+	      -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
+	      -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+	      -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
+	      -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
+	      -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
+	      -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
+	      -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
+	      -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
+	      -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
+	      -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
+	      -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
+	      -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
+	      -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
+	      -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
+	      -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+	      -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+	      -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
+	      -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
+	      -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
+	      -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
+	      -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
+	      -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
+	      -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
+	      -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
+	      -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
+	      -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
+	      -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
+	      -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
+	      -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
+	      -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
+	      -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
+	      -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
+	      -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
+	      -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
+	      -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
+	      -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
+	      -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
+	      -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
+	      -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
+	      -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
+	      -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
+	      -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
+	      -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
 	      < $(srcdir)/unistd.in.h | \
 	  sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
 	      -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
@@ -569,6 +800,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
 	      -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
 	      -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+	      -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
 	      -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
 	      -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
 	      -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
@@ -576,6 +808,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
 	      -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
 	      -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+	      -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
 	      -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
 	      -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
 	      -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
@@ -585,6 +818,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
 	      -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
 	      -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+	      -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
 	      -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
 	      -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
 	      -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
@@ -592,29 +826,35 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
 	      -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
 	      -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
+	      -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
 	      -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
 	      -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
 	      -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
 	      -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+	      -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
 	      -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
 	      -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
 	      -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
-	      -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+	  | \
+	  sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
 	      -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
 	      -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
 	      -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
 	      -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+	      -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
 	      -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
 	      -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
 	      -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
 	      -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
 	      -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+	      -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
 	      -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
 	      -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
 	      -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
 	      -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
 	      -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
 	      -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
+	      -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
 	      -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
 	      -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
 	      -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
@@ -639,28 +879,10 @@ EXTRA_DIST += unistd.in.h
 
 ## begin gnulib module verify
 
-libgnu_la_SOURCES += verify.h
 
-## end   gnulib module verify
-
-## begin gnulib module warn-on-use
+EXTRA_DIST += verify.h
 
-BUILT_SOURCES += warn-on-use.h
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/warn-on-use.h, except that it has the copyright header cut off.
-warn-on-use.h: $(top_srcdir)/conf/warn-on-use.h
-	$(AM_V_GEN)rm -f $@-t $@ && \
-	sed -n -e '/^.ifndef/,$$p' \
-	  < $(top_srcdir)/conf/warn-on-use.h \
-	  > $@-t && \
-	mv $@-t $@
-MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
-
-WARN_ON_USE_H=warn-on-use.h
-
-EXTRA_DIST += $(top_srcdir)/conf/warn-on-use.h
-
-## end   gnulib module warn-on-use
+## end   gnulib module verify
 
 ## begin gnulib module wchar
 
@@ -668,27 +890,57 @@ BUILT_SOURCES += wchar.h
 
 # We need the following in order to create <wchar.h> when the system
 # version does not work standalone.
-wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
 	      -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
 	      -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
-	      -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
-	      -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
-	      -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
-	      -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
-	      -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
-	      -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
-	      -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
-	      -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
-	      -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
-	      -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
-	      -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
-	      -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+	      -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
+	      -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
+	      -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
+	      -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
+	      -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
+	      -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
+	      -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
+	      -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
+	      -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
+	      -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
+	      -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
+	      -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
+	      -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
+	      -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
+	      -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
+	      -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
+	      -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
+	      -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
+	      -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
+	      -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
+	      -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
+	      -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
+	      -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
+	      -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
+	      -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
+	      -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
+	      -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
+	      -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
+	      -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
+	      -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
+	      -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
+	      -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
+	      -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
+	      -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
+	      -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
+	      -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
+	      -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
+	      -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
+	      -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
+	      < $(srcdir)/wchar.in.h | \
+	  sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
 	      -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
 	      -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
 	      -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
@@ -698,9 +950,38 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
 	      -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
 	      -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+	      -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \
+	      -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \
+	      -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \
+	      -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \
+	      -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \
+	      -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \
+	      -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \
+	      -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \
+	      -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \
+	      -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \
+	      -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \
+	      -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \
+	      -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \
+	      -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \
+	      -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \
+	      -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \
+	      -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \
+	      -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \
+	      -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \
+	      -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \
+	      -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \
+	      -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \
+	      -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \
+	      -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \
+	      -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \
+	      -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
+	      -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
+	      -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
 	      -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
 	      -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
-	      -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+	  | \
+	  sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
 	      -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
 	      -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
 	      -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
@@ -712,10 +993,10 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
 	      -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
 	      -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+	      -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-	    < $(srcdir)/wchar.in.h; \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
 	} > $@-t && \
 	mv $@-t $@
 MOSTLYCLEANFILES += wchar.h wchar.h-t
@@ -733,25 +1014,34 @@ EXTRA_libgnu_la_SOURCES += wcrtomb.c
 
 ## end   gnulib module wcrtomb
 
-## begin gnulib module wctype
+## begin gnulib module wctype-h
 
 BUILT_SOURCES += wctype.h
 
 # We need the following in order to create <wctype.h> when the system
 # doesn't have one that works with the given compiler.
-wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
 	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+	      -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
+	      -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
+	      -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
+	      -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
+	      -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \
 	      -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
 	      -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+	      -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \
+	      -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
 	      -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
 	      -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
 	      -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+	      -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
 	      < $(srcdir)/wctype.in.h; \
@@ -759,11 +1049,9 @@ wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
 	mv $@-t $@
 MOSTLYCLEANFILES += wctype.h wctype.h-t
 
-EXTRA_DIST += iswblank.c wctype.in.h
-
-EXTRA_libgnu_la_SOURCES += iswblank.c
+EXTRA_DIST += wctype.in.h
 
-## end   gnulib module wctype
+## end   gnulib module wctype-h
 
 
 mostlyclean-local: mostlyclean-generic
diff --git a/gl/Makefile.in b/gl/Makefile.in
index 25efe0e..a0a93e0 100644
--- a/gl/Makefile.in
+++ b/gl/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.12 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,20 +15,49 @@
 
 @SET_MAKE@
 
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
-# This file is free software, distributed under the terms of the GNU
-# General Public License.  As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file 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 file.  If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=gl/doc --tests-base=tests --aux-dir=conf --lgpl --libtool --macro-prefix=gl regex
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=gl/doc --tests-base=tests --aux-dir=conf --lgpl --no-conditional-dependencies --libtool --macro-prefix=gl byteswap regex
 
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -48,11 +77,11 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = gl
 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in
+	$(srcdir)/Makefile.in $(top_srcdir)/conf/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/btowc.m4 \
-	$(top_srcdir)/gl/m4/codeset.m4 \
+	$(top_srcdir)/gl/m4/byteswap.m4 $(top_srcdir)/gl/m4/codeset.m4 \
 	$(top_srcdir)/gl/m4/configmake.m4 \
 	$(top_srcdir)/gl/m4/extensions.m4 \
 	$(top_srcdir)/gl/m4/fcntl-o.m4 $(top_srcdir)/gl/m4/glibc21.m4 \
@@ -65,14 +94,19 @@ am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/locale-fr.m4 \
 	$(top_srcdir)/gl/m4/locale-ja.m4 \
 	$(top_srcdir)/gl/m4/locale-zh.m4 \
+	$(top_srcdir)/gl/m4/locale_h.m4 \
+	$(top_srcdir)/gl/m4/localeconv.m4 \
 	$(top_srcdir)/gl/m4/longlong.m4 $(top_srcdir)/gl/m4/malloc.m4 \
 	$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
-	$(top_srcdir)/gl/m4/mbstate_t.m4 \
+	$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \
 	$(top_srcdir)/gl/m4/multiarch.m4 \
 	$(top_srcdir)/gl/m4/nl_langinfo.m4 \
-	$(top_srcdir)/gl/m4/regex.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
-	$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \
-	$(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \
+	$(top_srcdir)/gl/m4/off_t.m4 $(top_srcdir)/gl/m4/regex.m4 \
+	$(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \
+	$(top_srcdir)/gl/m4/stddef_h.m4 $(top_srcdir)/gl/m4/stdint.m4 \
+	$(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \
+	$(top_srcdir)/gl/m4/strings_h.m4 \
+	$(top_srcdir)/gl/m4/sys_types_h.m4 \
 	$(top_srcdir)/gl/m4/unistd_h.m4 \
 	$(top_srcdir)/gl/m4/warn-on-use.m4 \
 	$(top_srcdir)/gl/m4/wchar_h.m4 $(top_srcdir)/gl/m4/wchar_t.m4 \
@@ -121,6 +155,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 HEADERS = $(noinst_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
@@ -163,6 +202,7 @@ ALLOCA_H = @ALLOCA_H@
 AMTAR = @AMTAR@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
+ARFLAGS = @ARFLAGS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -172,6 +212,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
 BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
 BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
 BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+BYTESWAP_H = @BYTESWAP_H@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -214,15 +255,20 @@ GNULIB_ATOLL = @GNULIB_ATOLL@
 GNULIB_BTOWC = @GNULIB_BTOWC@
 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHDIR = @GNULIB_CHDIR@
 GNULIB_CHOWN = @GNULIB_CHOWN@
 GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DUP = @GNULIB_DUP@
 GNULIB_DUP2 = @GNULIB_DUP2@
 GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
 GNULIB_ENVIRON = @GNULIB_ENVIRON@
 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
 GNULIB_FCHDIR = @GNULIB_FCHDIR@
 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FFS = @GNULIB_FFS@
 GNULIB_FSYNC = @GNULIB_FSYNC@
 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
 GNULIB_GETCWD = @GNULIB_GETCWD@
@@ -237,9 +283,14 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
 GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
 GNULIB_LCHOWN = @GNULIB_LCHOWN@
 GNULIB_LINK = @GNULIB_LINK@
 GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
 GNULIB_LSEEK = @GNULIB_LSEEK@
 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
 GNULIB_MBRLEN = @GNULIB_MBRLEN@
@@ -247,6 +298,7 @@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
 GNULIB_MBSINIT = @GNULIB_MBSINIT@
 GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
 GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
@@ -255,11 +307,15 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
 GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
 GNULIB_PIPE = @GNULIB_PIPE@
 GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
 GNULIB_PREAD = @GNULIB_PREAD@
 GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
 GNULIB_PUTENV = @GNULIB_PUTENV@
 GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_READ = @GNULIB_READ@
 GNULIB_READLINK = @GNULIB_READLINK@
 GNULIB_READLINKAT = @GNULIB_READLINKAT@
 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
@@ -267,6 +323,8 @@ GNULIB_REALPATH = @GNULIB_REALPATH@
 GNULIB_RMDIR = @GNULIB_RMDIR@
 GNULIB_RPMATCH = @GNULIB_RPMATCH@
 GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
 GNULIB_SLEEP = @GNULIB_SLEEP@
 GNULIB_STRTOD = @GNULIB_STRTOD@
 GNULIB_STRTOLL = @GNULIB_STRTOLL@
@@ -274,19 +332,51 @@ GNULIB_STRTOULL = @GNULIB_STRTOULL@
 GNULIB_SYMLINK = @GNULIB_SYMLINK@
 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
 GNULIB_UNLINK = @GNULIB_UNLINK@
 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
 GNULIB_UNSETENV = @GNULIB_UNSETENV@
 GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_WCPCPY = @GNULIB_WCPCPY@
+GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
 GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
+GNULIB_WCSCAT = @GNULIB_WCSCAT@
+GNULIB_WCSCHR = @GNULIB_WCSCHR@
+GNULIB_WCSCMP = @GNULIB_WCSCMP@
+GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
+GNULIB_WCSCPY = @GNULIB_WCSCPY@
+GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
+GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSLEN = @GNULIB_WCSLEN@
+GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
+GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
+GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
+GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
+GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
 GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
+GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
 GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCSSPN = @GNULIB_WCSSPN@
+GNULIB_WCSSTR = @GNULIB_WCSSTR@
+GNULIB_WCSTOK = @GNULIB_WCSTOK@
+GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
+GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
 GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCTOMB = @GNULIB_WCTOMB@
+GNULIB_WCTRANS = @GNULIB_WCTRANS@
+GNULIB_WCTYPE = @GNULIB_WCTYPE@
 GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
+GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
+GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
+GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
+GNULIB_WMEMSET = @GNULIB_WMEMSET@
 GNULIB_WRITE = @GNULIB_WRITE@
 GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
@@ -296,23 +386,29 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
 HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFS = @HAVE_FFS@
 HAVE_FSYNC = @HAVE_FSYNC@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
@@ -322,6 +418,7 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
 HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
@@ -348,9 +445,12 @@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
 HAVE_OS_H = @HAVE_OS_H@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM = @HAVE_RANDOM@
 HAVE_RANDOM_H = @HAVE_RANDOM_H@
 HAVE_RANDOM_R = @HAVE_RANDOM_R@
 HAVE_READLINK = @HAVE_READLINK@
@@ -358,11 +458,14 @@ HAVE_READLINKAT = @HAVE_READLINKAT@
 HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
 HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
 HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
 HAVE_SLEEP = @HAVE_SLEEP@
 HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRTOD = @HAVE_STRTOD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
@@ -381,11 +484,42 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCPCPY = @HAVE_WCPCPY@
+HAVE_WCPNCPY = @HAVE_WCPNCPY@
 HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
+HAVE_WCSCAT = @HAVE_WCSCAT@
+HAVE_WCSCHR = @HAVE_WCSCHR@
+HAVE_WCSCMP = @HAVE_WCSCMP@
+HAVE_WCSCOLL = @HAVE_WCSCOLL@
+HAVE_WCSCPY = @HAVE_WCSCPY@
+HAVE_WCSCSPN = @HAVE_WCSCSPN@
+HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSLEN = @HAVE_WCSLEN@
+HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
+HAVE_WCSNCAT = @HAVE_WCSNCAT@
+HAVE_WCSNCMP = @HAVE_WCSNCMP@
+HAVE_WCSNCPY = @HAVE_WCSNCPY@
+HAVE_WCSNLEN = @HAVE_WCSNLEN@
 HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSPBRK = @HAVE_WCSPBRK@
+HAVE_WCSRCHR = @HAVE_WCSRCHR@
 HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCSSPN = @HAVE_WCSSPN@
+HAVE_WCSSTR = @HAVE_WCSSTR@
+HAVE_WCSTOK = @HAVE_WCSTOK@
+HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
+HAVE_WCSXFRM = @HAVE_WCSXFRM@
+HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
 HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
 HAVE_WINT_T = @HAVE_WINT_T@
+HAVE_WMEMCHR = @HAVE_WMEMCHR@
+HAVE_WMEMCMP = @HAVE_WMEMCMP@
+HAVE_WMEMCPY = @HAVE_WMEMCPY@
+HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
 HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -418,16 +552,22 @@ MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
 NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
 NEXT_STDINT_H = @NEXT_STDINT_H@
 NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRINGS_H = @NEXT_STRINGS_H@
+NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
 NEXT_UNISTD_H = @NEXT_UNISTD_H@
 NEXT_WCHAR_H = @NEXT_WCHAR_H@
 NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
@@ -461,17 +601,21 @@ REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
 REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
 REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
 REPLACE_LSEEK = @REPLACE_LSEEK@
 REPLACE_MALLOC = @REPLACE_MALLOC@
 REPLACE_MBRLEN = @REPLACE_MBRLEN@
@@ -480,20 +624,27 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
 REPLACE_NULL = @REPLACE_NULL@
 REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_REALLOC = @REPLACE_REALLOC@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
 REPLACE_UNLINK = @REPLACE_UNLINK@
 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
@@ -502,7 +653,9 @@ REPLACE_USLEEP = @REPLACE_USLEEP@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
 REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
@@ -523,10 +676,10 @@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOC
 UUID_LIBS = @UUID_LIBS@
 VERSION = @VERSION@
 WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
 WINT_T_SUFFIX = @WINT_T_SUFFIX@
 XML2_CFLAGS = @XML2_CFLAGS@
 XML2_LIBS = @XML2_LIBS@
-XML2_STATIC_LIBS = @XML2_STATIC_LIBS@
 YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -596,15 +749,18 @@ SUBDIRS =
 noinst_HEADERS = 
 noinst_LIBRARIES = 
 noinst_LTLIBRARIES = libgnu.la
-EXTRA_DIST = m4/gnulib-cache.m4 alloca.in.h \
-	$(top_srcdir)/conf/arg-nonnull.h btowc.c \
-	$(top_srcdir)/conf/c++defs.h langinfo.in.h config.charset \
-	ref-add.sin ref-del.sin malloc.c malloc.c mbrtowc.c mbsinit.c \
-	nl_langinfo.c regcomp.c regex.c regex.h regex_internal.c \
-	regex_internal.h regexec.c stdbool.in.h stddef.in.h \
-	stdint.in.h stdlib.in.h streq.h unistd.in.h \
-	$(top_srcdir)/conf/warn-on-use.h wchar.in.h wcrtomb.c \
-	iswblank.c wctype.in.h
+EXTRA_DIST = m4/gnulib-cache.m4 alloca.in.h btowc.c byteswap.in.h \
+	langinfo.in.h config.charset ref-add.sin ref-del.sin \
+	locale.in.h localeconv.c malloc.c malloc.c mbrtowc.c mbsinit.c \
+	mbtowc-impl.h mbtowc.c nl_langinfo.c regcomp.c regex.c regex.h \
+	regex_internal.c regex_internal.h regexec.c \
+	$(top_srcdir)/conf/snippet/_Noreturn.h \
+	$(top_srcdir)/conf/snippet/arg-nonnull.h \
+	$(top_srcdir)/conf/snippet/c++defs.h \
+	$(top_srcdir)/conf/snippet/warn-on-use.h stdbool.in.h \
+	stddef.in.h stdint.in.h stdlib.in.h strcasecmp.c strncasecmp.c \
+	streq.h strings.in.h sys_types.in.h unistd.in.h verify.h \
+	wchar.in.h wcrtomb.c wctype.in.h
 
 # The BUILT_SOURCES created by this Makefile snippet are not used via #include
 # statements but through direct file reference. Therefore this snippet must be
@@ -615,15 +771,18 @@ EXTRA_DIST = m4/gnulib-cache.m4 alloca.in.h \
 # statements but through direct file reference. Therefore this snippet must be
 # present in all Makefile.am that need it. This is ensured by the applicability
 # 'all' defined above.
-BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h configmake.h \
-	langinfo.h $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdlib.h \
-	unistd.h warn-on-use.h wchar.h wctype.h
+BUILT_SOURCES = $(ALLOCA_H) $(BYTESWAP_H) configmake.h langinfo.h \
+	locale.h arg-nonnull.h c++defs.h warn-on-use.h $(STDBOOL_H) \
+	$(STDDEF_H) $(STDINT_H) stdlib.h strings.h sys/types.h \
+	unistd.h wchar.h wctype.h
 SUFFIXES = .sed .sin
-MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \
-	arg-nonnull.h-t c++defs.h c++defs.h-t langinfo.h langinfo.h-t \
-	stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t \
-	stdlib.h stdlib.h-t unistd.h unistd.h-t warn-on-use.h \
-	warn-on-use.h-t wchar.h wchar.h-t wctype.h wctype.h-t
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t byteswap.h \
+	byteswap.h-t langinfo.h langinfo.h-t locale.h locale.h-t \
+	arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
+	warn-on-use.h warn-on-use.h-t stdbool.h stdbool.h-t stddef.h \
+	stddef.h-t stdint.h stdint.h-t stdlib.h stdlib.h-t strings.h \
+	strings.h-t sys/types.h sys/types.h-t unistd.h unistd.h-t \
+	wchar.h wchar.h-t wctype.h wctype.h-t
 MOSTLYCLEANDIRS = 
 CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
 	ref-del.sed
@@ -631,17 +790,23 @@ DISTCLEANFILES =
 MAINTAINERCLEANFILES = 
 AM_CPPFLAGS = 
 AM_CFLAGS = 
-libgnu_la_SOURCES = gettext.h localcharset.h localcharset.c verify.h
+libgnu_la_SOURCES = gettext.h localcharset.h localcharset.c
 libgnu_la_LIBADD = $(gl_LTLIBOBJS)
 libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
-EXTRA_libgnu_la_SOURCES = btowc.c malloc.c malloc.c mbrtowc.c \
-	mbsinit.c nl_langinfo.c regcomp.c regex.c regex_internal.c \
-	regexec.c wcrtomb.c iswblank.c
+EXTRA_libgnu_la_SOURCES = btowc.c localeconv.c malloc.c malloc.c \
+	mbrtowc.c mbsinit.c mbtowc.c nl_langinfo.c regcomp.c regex.c \
+	regex_internal.c regexec.c strcasecmp.c strncasecmp.c \
+	wcrtomb.c
 libgnu_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(LTLIBINTL)
-ARG_NONNULL_H = arg-nonnull.h
-CXXDEFS_H = c++defs.h
 charset_alias = $(DESTDIR)$(libdir)/charset.alias
 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all Makefile.am that
+# need it. This is ensured by the applicability 'all' defined above.
+_NORETURN_H = $(top_srcdir)/conf/snippet/_Noreturn.h
+ARG_NONNULL_H = arg-nonnull.h
+CXXDEFS_H = c++defs.h
 WARN_ON_USE_H = warn-on-use.h
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -684,13 +849,15 @@ clean-noinstLIBRARIES:
 
 clean-noinstLTLIBRARIES:
 	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) 
+	@list='$(noinst_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) $(EXTRA_libgnu_la_DEPENDENCIES) 
 	$(libgnu_la_LINK)  $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
@@ -700,16 +867,19 @@ distclean-compile:
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/btowc.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/iswblank.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/localcharset.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/localeconv.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/malloc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mbrtowc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mbsinit.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mbtowc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nl_langinfo.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/regcomp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/regex.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/regex_internal.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/regexec.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/strcasecmp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/strncasecmp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/wcrtomb.Plo at am__quote@
 
 .c.o:
@@ -740,13 +910,13 @@ clean-libtool:
 	-rm -rf .libs _libs
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -771,7 +941,7 @@ $(RECURSIVE_TARGETS):
 	fi; test -z "$$fail"
 
 $(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -808,6 +978,10 @@ ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
+cscopelist-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -871,6 +1045,20 @@ GTAGS:
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS) $(LISP)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -906,13 +1094,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -949,10 +1134,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
 
@@ -1041,17 +1231,18 @@ ps-am:
 uninstall-am: uninstall-local
 
 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
-	ctags-recursive install install-am install-strip \
-	tags-recursive
+	cscopelist-recursive ctags-recursive install install-am \
+	install-strip tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
 	all all-am all-local check check-am clean clean-generic \
 	clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
-	ctags ctags-recursive distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-exec-local install-html \
+	cscopelist cscopelist-recursive ctags ctags-recursive \
+	distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-exec-local install-html \
 	install-html-am install-info install-info-am install-man \
 	install-pdf install-pdf-am install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
@@ -1063,28 +1254,25 @@ uninstall-am: uninstall-local
 
 # We need the following in order to create <alloca.h> when the system
 # doesn't have one that works with the given compiler.
-alloca.h: alloca.in.h
-	$(AM_V_GEN)rm -f $@-t $@ && \
-	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  cat $(srcdir)/alloca.in.h; \
-	} > $@-t && \
-	mv -f $@-t $@
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
-arg-nonnull.h: $(top_srcdir)/conf/arg-nonnull.h
-	$(AM_V_GEN)rm -f $@-t $@ && \
-	sed -n -e '/GL_ARG_NONNULL/,$$p' \
-	  < $(top_srcdir)/conf/arg-nonnull.h \
-	  > $@-t && \
-	mv $@-t $@
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/conf/c++defs.h
-	$(AM_V_GEN)rm -f $@-t $@ && \
-	sed -n -e '/_GL_CXXDEFS/,$$p' \
-	  < $(top_srcdir)/conf/c++defs.h \
-	  > $@-t && \
-	mv $@-t $@
+ at GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in.h $(top_builddir)/config.status
+ at GL_GENERATE_ALLOCA_H_TRUE@	$(AM_V_GEN)rm -f $@-t $@ && \
+ at GL_GENERATE_ALLOCA_H_TRUE@	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ at GL_GENERATE_ALLOCA_H_TRUE@	  cat $(srcdir)/alloca.in.h; \
+ at GL_GENERATE_ALLOCA_H_TRUE@	} > $@-t && \
+ at GL_GENERATE_ALLOCA_H_TRUE@	mv -f $@-t $@
+ at GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status
+ at GL_GENERATE_ALLOCA_H_FALSE@	rm -f $@
+
+# We need the following in order to create <byteswap.h> when the system
+# doesn't have one.
+ at GL_GENERATE_BYTESWAP_H_TRUE@byteswap.h: byteswap.in.h $(top_builddir)/config.status
+ at GL_GENERATE_BYTESWAP_H_TRUE@	$(AM_V_GEN)rm -f $@-t $@ && \
+ at GL_GENERATE_BYTESWAP_H_TRUE@	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ at GL_GENERATE_BYTESWAP_H_TRUE@	  cat $(srcdir)/byteswap.in.h; \
+ at GL_GENERATE_BYTESWAP_H_TRUE@	} > $@-t && \
+ at GL_GENERATE_BYTESWAP_H_TRUE@	mv -f $@-t $@
+ at GL_GENERATE_BYTESWAP_H_FALSE@byteswap.h: $(top_builddir)/config.status
+ at GL_GENERATE_BYTESWAP_H_FALSE@	rm -f $@
 
 # Listed in the same order as the GNU makefile conventions, and
 # provided by autoconf 2.59c+.
@@ -1121,23 +1309,20 @@ configmake.h: Makefile
 	  echo '#define PKGLIBDIR "$(pkglibdir)"'; \
 	  echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
 	} | sed '/""/d' > $@-t && \
-	if test -f $@ && cmp $@-t $@ > /dev/null; then \
-	  rm -f $@-t; \
-	else \
-	  rm -f $@; mv $@-t $@; \
-	fi
+	mv -f $@-t $@
 
 # We need the following in order to create an empty placeholder for
 # <langinfo.h> when the system doesn't have one.
-langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
 	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
-	      -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+	      -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \
 	      -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
 	      -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
 	      -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
@@ -1209,100 +1394,169 @@ charset.alias: config.charset
 	sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
 	mv t-$@ $@
 
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-stdbool.h: stdbool.in.h
-	$(AM_V_GEN)rm -f $@-t $@ && \
-	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
-	} > $@-t && \
-	mv $@-t $@
-
-# We need the following in order to create <stddef.h> when the system
-# doesn't have one that works with the given compiler.
-stddef.h: stddef.in.h
+# We need the following in order to create <locale.h> when the system
+# doesn't have one that provides all definitions.
+locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-	  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-	      -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
-	      -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
-	      -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
-	      < $(srcdir)/stddef.in.h; \
+	      -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
+	      -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
+	      -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
+	      -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+	      -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+	      -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
+	      -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
+	      -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+	      -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+	      -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/locale.in.h; \
 	} > $@-t && \
 	mv $@-t $@
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
+# off.
+arg-nonnull.h: $(top_srcdir)/conf/snippet/arg-nonnull.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	sed -n -e '/GL_ARG_NONNULL/,$$p' \
+	  < $(top_srcdir)/conf/snippet/arg-nonnull.h \
+	  > $@-t && \
+	mv $@-t $@
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/conf/snippet/c++defs.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	sed -n -e '/_GL_CXXDEFS/,$$p' \
+	  < $(top_srcdir)/conf/snippet/c++defs.h \
+	  > $@-t && \
+	mv $@-t $@
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
+# off.
+warn-on-use.h: $(top_srcdir)/conf/snippet/warn-on-use.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	sed -n -e '/^.ifndef/,$$p' \
+	  < $(top_srcdir)/conf/snippet/warn-on-use.h \
+	  > $@-t && \
+	mv $@-t $@
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+ at GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status
+ at GL_GENERATE_STDBOOL_H_TRUE@	$(AM_V_GEN)rm -f $@-t $@ && \
+ at GL_GENERATE_STDBOOL_H_TRUE@	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ at GL_GENERATE_STDBOOL_H_TRUE@	  sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+ at GL_GENERATE_STDBOOL_H_TRUE@	} > $@-t && \
+ at GL_GENERATE_STDBOOL_H_TRUE@	mv $@-t $@
+ at GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status
+ at GL_GENERATE_STDBOOL_H_FALSE@	rm -f $@
+
+# We need the following in order to create <stddef.h> when the system
+# doesn't have one that works with the given compiler.
+ at GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status
+ at GL_GENERATE_STDDEF_H_TRUE@	$(AM_V_GEN)rm -f $@-t $@ && \
+ at GL_GENERATE_STDDEF_H_TRUE@	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ at GL_GENERATE_STDDEF_H_TRUE@	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ at GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ at GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ at GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ at GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+ at GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
+ at GL_GENERATE_STDDEF_H_TRUE@	      -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
+ at GL_GENERATE_STDDEF_H_TRUE@	      < $(srcdir)/stddef.in.h; \
+ at GL_GENERATE_STDDEF_H_TRUE@	} > $@-t && \
+ at GL_GENERATE_STDDEF_H_TRUE@	mv $@-t $@
+ at GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status
+ at GL_GENERATE_STDDEF_H_FALSE@	rm -f $@
 
 # We need the following in order to create <stdint.h> when the system
 # doesn't have one that works with the given compiler.
-stdint.h: stdint.in.h
-	$(AM_V_GEN)rm -f $@-t $@ && \
-	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-	      -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
-	      -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-	      -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-	      -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
-	      -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
-	      -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-	      -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
-	      -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
-	      -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
-	      -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
-	      -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
-	      -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
-	      -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
-	      -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
-	      -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
-	      -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
-	      -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
-	      -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
-	      -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-	      -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-	      -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
-	      < $(srcdir)/stdint.in.h; \
-	} > $@-t && \
-	mv $@-t $@
+ at GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status
+ at GL_GENERATE_STDINT_H_TRUE@	$(AM_V_GEN)rm -f $@-t $@ && \
+ at GL_GENERATE_STDINT_H_TRUE@	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ at GL_GENERATE_STDINT_H_TRUE@	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+ at GL_GENERATE_STDINT_H_TRUE@	      < $(srcdir)/stdint.in.h; \
+ at GL_GENERATE_STDINT_H_TRUE@	} > $@-t && \
+ at GL_GENERATE_STDINT_H_TRUE@	mv $@-t $@
+ at GL_GENERATE_STDINT_H_FALSE@stdint.h: $(top_builddir)/config.status
+ at GL_GENERATE_STDINT_H_FALSE@	rm -f $@
 
 # We need the following in order to create <stdlib.h> when the system
 # doesn't have one that works with the given compiler.
-stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
+  $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-	  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-	      -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
-	      -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
-	      -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
-	      -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
-	      -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
-	      -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
-	      -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
-	      -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-	      -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-	      -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
-	      -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
-	      -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
-	      -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
-	      -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
-	      -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
-	      -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
-	      -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
-	      -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
-	      -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
-	      -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
-	      -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
-	      -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
-	      -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
-	      -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
-	      -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
-	      -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
-	      -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+	      -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+	      -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
+	      -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
+	      -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+	      -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
+	      -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
+	      -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
+	      -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
+	      -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
+	      -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
+	      -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
+	      -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
+	      -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
+	      -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+	      -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
+	      -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
+	      -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
+	      -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+	      -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
+	      -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
+	      -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
+	      -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
+	      -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+	      -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
+	      -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
+	      -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
+	      -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
+	      -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
+	      -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
+	      -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
+	      -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
+	      < $(srcdir)/stdlib.in.h | \
+	  sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
 	      -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
 	      -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
 	      -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
@@ -1313,7 +1567,10 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
 	      -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
 	      -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+	      -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
 	      -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
+	      -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+	      -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
 	      -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
 	      -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
 	      -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
@@ -1329,71 +1586,123 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
 	      -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
 	      -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
+	      -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
 	      -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+	      -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
 	      -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+	      -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
 	      -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
 	      -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
 	      -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
 	      -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
 	      -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+	      -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _Noreturn/r $(_NORETURN_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+	} > $@-t && \
+	mv $@-t $@
+
+# We need the following in order to create <strings.h> when the system
+# doesn't have one that works with the given compiler.
+strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
+	      -e 's|@''GNULIB_FFS''@|$(GNULIB_FFS)|g' \
+	      -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \
+	      -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
+	      -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-	      < $(srcdir)/stdlib.in.h; \
+	      < $(srcdir)/strings.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+
+# We need the following in order to create <sys/types.h> when the system
+# doesn't have one that works with the given compiler.
+sys/types.h: sys_types.in.h $(top_builddir)/config.status
+	$(AM_V_at)$(MKDIR_P) sys
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
+	      -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+	      < $(srcdir)/sys_types.in.h; \
 	} > $@-t && \
 	mv $@-t $@
 
 # We need the following in order to create an empty placeholder for
 # <unistd.h> when the system doesn't have one.
-unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
 	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-	      -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
-	      -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
-	      -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
-	      -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
-	      -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
-	      -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
-	      -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
-	      -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
-	      -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
-	      -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
-	      -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
-	      -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
-	      -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
-	      -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
-	      -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
-	      -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
-	      -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
-	      -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
-	      -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
-	      -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
-	      -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
-	      -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
-	      -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
-	      -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
-	      -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
-	      -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
-	      -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
-	      -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
-	      -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
-	      -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
-	      -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
-	      -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
-	      -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
-	      -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
-	      -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
-	      -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
-	      -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
-	      -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
-	      -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
-	      -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
-	      -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+	      -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+	      -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
+	      -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
+	      -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+	      -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
+	      -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
+	      -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
+	      -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
+	      -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+	      -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
+	      -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
+	      -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
+	      -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
+	      -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
+	      -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
+	      -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
+	      -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
+	      -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
+	      -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
+	      -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
+	      -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
+	      -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+	      -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+	      -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
+	      -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
+	      -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
+	      -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
+	      -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
+	      -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
+	      -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
+	      -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
+	      -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
+	      -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
+	      -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
+	      -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
+	      -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
+	      -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
+	      -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
+	      -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
+	      -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
+	      -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
+	      -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
+	      -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
+	      -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
+	      -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
+	      -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
+	      -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
+	      -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
+	      -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
+	      -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
 	      < $(srcdir)/unistd.in.h | \
 	  sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
 	      -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
@@ -1402,6 +1711,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
 	      -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
 	      -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+	      -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
 	      -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
 	      -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
 	      -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
@@ -1409,6 +1719,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
 	      -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
 	      -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+	      -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
 	      -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
 	      -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
 	      -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
@@ -1418,6 +1729,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
 	      -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
 	      -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+	      -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
 	      -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
 	      -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
 	      -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
@@ -1425,29 +1737,35 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
 	      -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
 	      -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
+	      -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
 	      -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
 	      -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
 	      -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
 	      -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+	      -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
 	      -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
 	      -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
 	      -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
-	      -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+	  | \
+	  sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
 	      -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
 	      -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
 	      -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
 	      -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+	      -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
 	      -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
 	      -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
 	      -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
 	      -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
 	      -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+	      -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
 	      -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
 	      -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
 	      -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
 	      -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
 	      -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
 	      -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
+	      -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
 	      -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
 	      -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
 	      -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
@@ -1464,38 +1782,60 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
 	} > $@-t && \
 	mv $@-t $@
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/warn-on-use.h, except that it has the copyright header cut off.
-warn-on-use.h: $(top_srcdir)/conf/warn-on-use.h
-	$(AM_V_GEN)rm -f $@-t $@ && \
-	sed -n -e '/^.ifndef/,$$p' \
-	  < $(top_srcdir)/conf/warn-on-use.h \
-	  > $@-t && \
-	mv $@-t $@
 
 # We need the following in order to create <wchar.h> when the system
 # version does not work standalone.
-wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
 	      -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
 	      -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
-	      -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
-	      -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
-	      -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
-	      -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
-	      -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
-	      -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
-	      -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
-	      -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
-	      -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
-	      -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
-	      -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
-	      -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+	      -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
+	      -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
+	      -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
+	      -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
+	      -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
+	      -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
+	      -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
+	      -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
+	      -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
+	      -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
+	      -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
+	      -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
+	      -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
+	      -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
+	      -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
+	      -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
+	      -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
+	      -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
+	      -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
+	      -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
+	      -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
+	      -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
+	      -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
+	      -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
+	      -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
+	      -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
+	      -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
+	      -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
+	      -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
+	      -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
+	      -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
+	      -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
+	      -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
+	      -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
+	      -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
+	      -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
+	      -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
+	      -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
+	      -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
+	      < $(srcdir)/wchar.in.h | \
+	  sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
 	      -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
 	      -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
 	      -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
@@ -1505,9 +1845,38 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
 	      -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
 	      -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+	      -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \
+	      -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \
+	      -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \
+	      -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \
+	      -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \
+	      -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \
+	      -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \
+	      -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \
+	      -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \
+	      -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \
+	      -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \
+	      -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \
+	      -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \
+	      -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \
+	      -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \
+	      -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \
+	      -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \
+	      -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \
+	      -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \
+	      -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \
+	      -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \
+	      -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \
+	      -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \
+	      -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \
+	      -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \
+	      -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
+	      -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
+	      -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
 	      -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
 	      -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
-	      -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+	  | \
+	  sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
 	      -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
 	      -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
 	      -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
@@ -1519,28 +1888,37 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	      -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
 	      -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
 	      -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+	      -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-	    < $(srcdir)/wchar.in.h; \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
 	} > $@-t && \
 	mv $@-t $@
 
 # We need the following in order to create <wctype.h> when the system
 # doesn't have one that works with the given compiler.
-wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
 	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+	      -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
+	      -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
+	      -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
+	      -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
+	      -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \
 	      -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
 	      -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+	      -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \
+	      -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
 	      -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
 	      -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
 	      -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+	      -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
 	      < $(srcdir)/wctype.in.h; \
diff --git a/gl/alloca.in.h b/gl/alloca.in.h
index 441b5f4..b5aaa88 100644
--- a/gl/alloca.in.h
+++ b/gl/alloca.in.h
@@ -1,6 +1,6 @@
 /* Memory allocation on the stack.
 
-   Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation,
+   Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify it
@@ -11,12 +11,12 @@
    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.
+   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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
+   License along with this program; if not, see
+   <http://www.gnu.org/licenses/>.
+  */
 
 /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
    means there is a real alloca function.  */
diff --git a/gl/btowc.c b/gl/btowc.c
index 2ab61a5..485e995 100644
--- a/gl/btowc.c
+++ b/gl/btowc.c
@@ -1,5 +1,5 @@
 /* Convert unibyte character to wide character.
-   Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno at clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/byteswap.in.h b/gl/byteswap.in.h
new file mode 100644
index 0000000..a9baa68
--- /dev/null
+++ b/gl/byteswap.in.h
@@ -0,0 +1,44 @@
+/* byteswap.h - Byte swapping
+   Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+   Written by Oskar Liljeblad <oskar at osk.mine.nu>, 2005.
+
+   This program 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 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 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, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _GL_BYTESWAP_H
+#define _GL_BYTESWAP_H
+
+/* Given an unsigned 16-bit argument X, return the value corresponding to
+   X with reversed byte order.  */
+#define bswap_16(x) ((((x) & 0x00FF) << 8) | \
+                     (((x) & 0xFF00) >> 8))
+
+/* Given an unsigned 32-bit argument X, return the value corresponding to
+   X with reversed byte order.  */
+#define bswap_32(x) ((((x) & 0x000000FF) << 24) | \
+                     (((x) & 0x0000FF00) << 8) | \
+                     (((x) & 0x00FF0000) >> 8) | \
+                     (((x) & 0xFF000000) >> 24))
+
+/* Given an unsigned 64-bit argument X, return the value corresponding to
+   X with reversed byte order.  */
+#define bswap_64(x) ((((x) & 0x00000000000000FFULL) << 56) | \
+                     (((x) & 0x000000000000FF00ULL) << 40) | \
+                     (((x) & 0x0000000000FF0000ULL) << 24) | \
+                     (((x) & 0x00000000FF000000ULL) << 8) | \
+                     (((x) & 0x000000FF00000000ULL) >> 8) | \
+                     (((x) & 0x0000FF0000000000ULL) >> 24) | \
+                     (((x) & 0x00FF000000000000ULL) >> 40) | \
+                     (((x) & 0xFF00000000000000ULL) >> 56))
+
+#endif /* _GL_BYTESWAP_H */
diff --git a/gl/config.charset b/gl/config.charset
index 55d7791..58ac759 100755
--- a/gl/config.charset
+++ b/gl/config.charset
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Output a system dependent table of character encoding aliases.
 #
-#   Copyright (C) 2000-2004, 2006-2011 Free Software Foundation, Inc.
+#   Copyright (C) 2000-2004, 2006-2012 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU Lesser General Public License as published by
@@ -14,8 +14,7 @@
 #   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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#   with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # The table consists of lines of the form
 #    ALIAS  CANONICAL
@@ -30,6 +29,8 @@
 # The current list of GNU canonical charset names is as follows.
 #
 #       name              MIME?             used by which systems
+#                                    (darwin = Mac OS X, woe32 = native Windows)
+#
 #   ASCII, ANSI_X3.4-1968       glibc solaris freebsd netbsd darwin cygwin
 #   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
 #   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
diff --git a/gl/gettext.h b/gl/gettext.h
index db4df6b..c7d9740 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBGETTEXT_H
 #define _LIBGETTEXT_H 1
@@ -93,6 +92,12 @@
 
 #endif
 
+/* Prefer gnulib's setlocale override over libintl's setlocale override.  */
+#ifdef GNULIB_defined_setlocale
+# undef setlocale
+# define setlocale rpl_setlocale
+#endif
+
 /* A pseudo function call that serves as a marker for the automated
    extraction of messages, but does not call gettext().  The run-time
    translation is done at a different place in the code.
@@ -179,7 +184,7 @@ npgettext_aux (const char *domain,
 #include <string.h>
 
 #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
-  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
    /* || __STDC_VERSION__ >= 199901L */ )
 
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
diff --git a/gl/iswblank.c b/gl/iswblank.c
deleted file mode 100644
index c25f9b0..0000000
--- a/gl/iswblank.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Test wide character for being blank.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
-
-   This program 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#include <config.h>
-
-/* Specification.  */
-#include <wctype.h>
-
-int
-iswblank (wint_t wc)
-{
-  return wc == ' ' || wc == '\t';
-}
diff --git a/gl/langinfo.in.h b/gl/langinfo.in.h
index f829722..63b92fd 100644
--- a/gl/langinfo.in.h
+++ b/gl/langinfo.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <langinfo.h>.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -12,15 +12,14 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /*
  * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
  * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
  */
 
-#ifndef _GL_LANGINFO_H
+#ifndef _ at GUARD_PREFIX@_LANGINFO_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -32,8 +31,8 @@
 # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
 #endif
 
-#ifndef _GL_LANGINFO_H
-#define _GL_LANGINFO_H
+#ifndef _ at GUARD_PREFIX@_LANGINFO_H
+#define _ at GUARD_PREFIX@_LANGINFO_H
 
 
 #if !@HAVE_LANGINFO_H@
@@ -41,7 +40,10 @@
 /* A platform that lacks <langinfo.h>.  */
 
 /* Assume that it also lacks <nl_types.h> and the nl_item type.  */
+# if !GNULIB_defined_nl_item
 typedef int nl_item;
+#  define GNULIB_defined_nl_item 1
+# endif
 
 /* nl_langinfo items of the LC_CTYPE category */
 # define CODESET     10000
@@ -170,5 +172,5 @@ _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
 #endif
 
 
-#endif /* _GL_LANGINFO_H */
-#endif /* _GL_LANGINFO_H */
+#endif /* _ at GUARD_PREFIX@_LANGINFO_H */
+#endif /* _ at GUARD_PREFIX@_LANGINFO_H */
diff --git a/gl/localcharset.c b/gl/localcharset.c
index 6460a2d..ce20310 100644
--- a/gl/localcharset.c
+++ b/gl/localcharset.c
@@ -1,6 +1,6 @@
 /* Determine a canonical name for the current locale's character encoding.
 
-   Copyright (C) 2000-2006, 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2000-2006, 2008-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -13,8 +13,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno at clisp.org>.  */
 
@@ -30,11 +29,11 @@
 #include <stdlib.h>
 
 #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
-# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */
+# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
 #endif
 
 #if defined _WIN32 || defined __WIN32__
-# define WIN32_NATIVE
+# define WINDOWS_NATIVE
 #endif
 
 #if defined __EMX__
@@ -44,7 +43,7 @@
 # endif
 #endif
 
-#if !defined WIN32_NATIVE
+#if !defined WINDOWS_NATIVE
 # include <unistd.h>
 # if HAVE_LANGINFO_CODESET
 #  include <langinfo.h>
@@ -57,7 +56,7 @@
 #  define WIN32_LEAN_AND_MEAN
 #  include <windows.h>
 # endif
-#elif defined WIN32_NATIVE
+#elif defined WINDOWS_NATIVE
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 #endif
@@ -83,7 +82,7 @@
 #endif
 
 #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-  /* Win32, Cygwin, OS/2, DOS */
+  /* Native Windows, Cygwin, OS/2, DOS */
 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
 #endif
 
@@ -123,7 +122,7 @@ get_charset_aliases (void)
   cp = charset_aliases;
   if (cp == NULL)
     {
-#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
+#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__)
       const char *dir;
       const char *base = "charset.alias";
       char *file_name;
@@ -228,8 +227,7 @@ get_charset_aliases (void)
                         {
                           /* Out of memory. */
                           res_size = 0;
-                          if (old_res_ptr != NULL)
-                            free (old_res_ptr);
+                          free (old_res_ptr);
                           break;
                         }
                       strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
@@ -309,7 +307,7 @@ get_charset_aliases (void)
            "DECKOREAN" "\0" "EUC-KR" "\0";
 # endif
 
-# if defined WIN32_NATIVE || defined __CYGWIN__
+# if defined WINDOWS_NATIVE || defined __CYGWIN__
       /* To avoid the troubles of installing a separate file in the same
          directory as the DLL and of retrieving the DLL's directory at
          runtime, simply inline the aliases here.  */
@@ -361,7 +359,7 @@ locale_charset (void)
   const char *codeset;
   const char *aliases;
 
-#if !(defined WIN32_NATIVE || defined OS2)
+#if !(defined WINDOWS_NATIVE || defined OS2)
 
 # if HAVE_LANGINFO_CODESET
 
@@ -408,10 +406,10 @@ locale_charset (void)
             }
         }
 
-      /* Woe32 has a function returning the locale's codepage as a number:
-         GetACP().  This encoding is used by Cygwin, unless the user has set
-         the environment variable CYGWIN=codepage:oem (which very few people
-         do).
+      /* The Windows API has a function returning the locale's codepage as a
+         number: GetACP().  This encoding is used by Cygwin, unless the user
+         has set the environment variable CYGWIN=codepage:oem (which very few
+         people do).
          Output directed to console windows needs to be converted (to
          GetOEMCP() if the console is using a raster font, or to
          GetConsoleOutputCP() if it is using a TrueType font).  Cygwin does
@@ -454,12 +452,12 @@ locale_charset (void)
 
 # endif
 
-#elif defined WIN32_NATIVE
+#elif defined WINDOWS_NATIVE
 
   static char buf[2 + 10 + 1];
 
-  /* Woe32 has a function returning the locale's codepage as a number:
-     GetACP().
+  /* The Windows API has a function returning the locale's codepage as a
+     number: GetACP().
      When the output goes to a console window, it needs to be provided in
      GetOEMCP() encoding if the console is using a raster font, or in
      GetConsoleOutputCP() encoding if it is using a TrueType font.
diff --git a/gl/localcharset.h b/gl/localcharset.h
index 97a43e7..c1882aa 100644
--- a/gl/localcharset.h
+++ b/gl/localcharset.h
@@ -1,5 +1,5 @@
 /* Determine a canonical name for the current locale's character encoding.
-   Copyright (C) 2000-2003, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU CHARSET Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LOCALCHARSET_H
 #define _LOCALCHARSET_H
diff --git a/gl/locale.in.h b/gl/locale.in.h
new file mode 100644
index 0000000..89b6745
--- /dev/null
+++ b/gl/locale.in.h
@@ -0,0 +1,201 @@
+/* A POSIX <locale.h>.
+   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+
+   This program 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 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 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, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _ at GUARD_PREFIX@_LOCALE_H
+
+#if __GNUC__ >= 3
+ at PRAGMA_SYSTEM_HEADER@
+#endif
+ at PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
+
+#ifndef _ at GUARD_PREFIX@_LOCALE_H
+#define _ at GUARD_PREFIX@_LOCALE_H
+
+/* NetBSD 5.0 mis-defines NULL.  */
+#include <stddef.h>
+
+/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>.  */
+#if @HAVE_XLOCALE_H@
+# include <xlocale.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
+   On systems that don't define it, use the same value as GNU libintl.  */
+#if !defined LC_MESSAGES
+# define LC_MESSAGES 1729
+#endif
+
+/* Bionic libc's 'struct lconv' is just a dummy.  */
+#if @REPLACE_STRUCT_LCONV@
+# define lconv rpl_lconv
+struct lconv
+{
+  /* All 'char *' are actually 'const char *'.  */
+
+  /* Members that depend on the LC_NUMERIC category of the locale.  See
+     <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
+
+  /* Symbol used as decimal point.  */
+  char *decimal_point;
+  /* Symbol used to separate groups of digits to the left of the decimal
+     point.  */
+  char *thousands_sep;
+  /* Definition of the size of groups of digits to the left of the decimal
+     point.  */
+  char *grouping;
+
+  /* Members that depend on the LC_MONETARY category of the locale.  See
+     <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
+
+  /* Symbol used as decimal point.  */
+  char *mon_decimal_point;
+  /* Symbol used to separate groups of digits to the left of the decimal
+     point.  */
+  char *mon_thousands_sep;
+  /* Definition of the size of groups of digits to the left of the decimal
+     point.  */
+  char *mon_grouping;
+  /* Sign used to indicate a value >= 0.  */
+  char *positive_sign;
+  /* Sign used to indicate a value < 0.  */
+  char *negative_sign;
+
+  /* For formatting local currency.  */
+  /* Currency symbol (3 characters) followed by separator (1 character).  */
+  char *currency_symbol;
+  /* Number of digits after the decimal point.  */
+  char frac_digits;
+  /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
+     comes after the number.  */
+  char p_cs_precedes;
+  /* For values >= 0: Position of the sign.  */
+  char p_sign_posn;
+  /* For values >= 0: Placement of spaces between currency symbol, sign, and
+     number.  */
+  char p_sep_by_space;
+  /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
+     comes after the number.  */
+  char n_cs_precedes;
+  /* For values < 0: Position of the sign.  */
+  char n_sign_posn;
+  /* For values < 0: Placement of spaces between currency symbol, sign, and
+     number.  */
+  char n_sep_by_space;
+
+  /* For formatting international currency.  */
+  /* Currency symbol (3 characters) followed by separator (1 character).  */
+  char *int_curr_symbol;
+  /* Number of digits after the decimal point.  */
+  char int_frac_digits;
+  /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
+     comes after the number.  */
+  char int_p_cs_precedes;
+  /* For values >= 0: Position of the sign.  */
+  char int_p_sign_posn;
+  /* For values >= 0: Placement of spaces between currency symbol, sign, and
+     number.  */
+  char int_p_sep_by_space;
+  /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
+     comes after the number.  */
+  char int_n_cs_precedes;
+  /* For values < 0: Position of the sign.  */
+  char int_n_sign_posn;
+  /* For values < 0: Placement of spaces between currency symbol, sign, and
+     number.  */
+  char int_n_sep_by_space;
+};
+#endif
+
+#if @GNULIB_LOCALECONV@
+# if @REPLACE_LOCALECONV@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef localeconv
+#   define localeconv rpl_localeconv
+#  endif
+_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void));
+_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void));
+# else
+_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void));
+# endif
+_GL_CXXALIASWARN (localeconv);
+#elif @REPLACE_STRUCT_LCONV@
+# undef localeconv
+# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
+#elif defined GNULIB_POSIXCHECK
+# undef localeconv
+# if HAVE_RAW_DECL_LOCALECONV
+_GL_WARN_ON_USE (localeconv,
+                 "localeconv returns too few information on some platforms - "
+                 "use gnulib module localeconv for portability");
+# endif
+#endif
+
+#if @GNULIB_SETLOCALE@
+# if @REPLACE_SETLOCALE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef setlocale
+#   define setlocale rpl_setlocale
+#   define GNULIB_defined_setlocale 1
+#  endif
+_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale));
+_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
+# else
+_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
+# endif
+_GL_CXXALIASWARN (setlocale);
+#elif defined GNULIB_POSIXCHECK
+# undef setlocale
+# if HAVE_RAW_DECL_SETLOCALE
+_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
+                 "use gnulib module setlocale for portability");
+# endif
+#endif
+
+#if @GNULIB_DUPLOCALE@
+# if @REPLACE_DUPLOCALE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef duplocale
+#   define duplocale rpl_duplocale
+#  endif
+_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
+# else
+#  if @HAVE_DUPLOCALE@
+_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
+#  endif
+# endif
+# if @HAVE_DUPLOCALE@
+_GL_CXXALIASWARN (duplocale);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef duplocale
+# if HAVE_RAW_DECL_DUPLOCALE
+_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
+                 "use gnulib module duplocale for portability");
+# endif
+#endif
+
+#endif /* _ at GUARD_PREFIX@_LOCALE_H */
+#endif /* _ at GUARD_PREFIX@_LOCALE_H */
diff --git a/gl/localeconv.c b/gl/localeconv.c
new file mode 100644
index 0000000..c22860c
--- /dev/null
+++ b/gl/localeconv.c
@@ -0,0 +1,103 @@
+/* Query locale dependent information for formatting numbers.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+   This program 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 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 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, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <locale.h>
+
+#if HAVE_STRUCT_LCONV_DECIMAL_POINT
+
+/* Override for platforms where 'struct lconv' lacks the int_p_*, int_n_*
+   members.  */
+
+struct lconv *
+localeconv (void)
+{
+  static struct lconv result;
+# undef lconv
+# undef localeconv
+  struct lconv *sys_result = localeconv ();
+
+  result.decimal_point = sys_result->decimal_point;
+  result.thousands_sep = sys_result->thousands_sep;
+  result.grouping = sys_result->grouping;
+  result.mon_decimal_point = sys_result->mon_decimal_point;
+  result.mon_thousands_sep = sys_result->mon_thousands_sep;
+  result.mon_grouping = sys_result->mon_grouping;
+  result.positive_sign = sys_result->positive_sign;
+  result.negative_sign = sys_result->negative_sign;
+  result.currency_symbol = sys_result->currency_symbol;
+  result.frac_digits = sys_result->frac_digits;
+  result.p_cs_precedes = sys_result->p_cs_precedes;
+  result.p_sign_posn = sys_result->p_sign_posn;
+  result.p_sep_by_space = sys_result->p_sep_by_space;
+  result.n_cs_precedes = sys_result->n_cs_precedes;
+  result.n_sign_posn = sys_result->n_sign_posn;
+  result.n_sep_by_space = sys_result->n_sep_by_space;
+  result.int_curr_symbol = sys_result->int_curr_symbol;
+  result.int_frac_digits = sys_result->int_frac_digits;
+  result.int_p_cs_precedes = sys_result->p_cs_precedes;
+  result.int_p_sign_posn = sys_result->p_sign_posn;
+  result.int_p_sep_by_space = sys_result->p_sep_by_space;
+  result.int_n_cs_precedes = sys_result->n_cs_precedes;
+  result.int_n_sign_posn = sys_result->n_sign_posn;
+  result.int_n_sep_by_space = sys_result->n_sep_by_space;
+
+  return &result;
+}
+
+#else
+
+/* Override for platforms where 'struct lconv' is a dummy.  */
+
+# include <limits.h>
+
+struct lconv *
+localeconv (void)
+{
+  static /*const*/ struct lconv result =
+    {
+      /* decimal_point */ ".",
+      /* thousands_sep */ "",
+      /* grouping */ "",
+      /* mon_decimal_point */ "",
+      /* mon_thousands_sep */ "",
+      /* mon_grouping */ "",
+      /* positive_sign */ "",
+      /* negative_sign */ "",
+      /* currency_symbol */ "",
+      /* frac_digits */ CHAR_MAX,
+      /* p_cs_precedes */ CHAR_MAX,
+      /* p_sign_posn */ CHAR_MAX,
+      /* p_sep_by_space */ CHAR_MAX,
+      /* n_cs_precedes */ CHAR_MAX,
+      /* n_sign_posn */ CHAR_MAX,
+      /* n_sep_by_space */ CHAR_MAX,
+      /* int_curr_symbol */ "",
+      /* int_frac_digits */ CHAR_MAX,
+      /* int_p_cs_precedes */ CHAR_MAX,
+      /* int_p_sign_posn */ CHAR_MAX,
+      /* int_p_sep_by_space */ CHAR_MAX,
+      /* int_n_cs_precedes */ CHAR_MAX,
+      /* int_n_sign_posn */ CHAR_MAX,
+      /* int_n_sep_by_space */ CHAR_MAX
+    };
+
+  return &result;
+}
+
+#endif
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
index 7feed46..d978cb8 100644
--- a/gl/m4/00gnulib.m4
+++ b/gl/m4/00gnulib.m4
@@ -1,5 +1,5 @@
 # 00gnulib.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index e2e8a05..656924b 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,5 +1,5 @@
-# alloca.m4 serial 10
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation,
+# alloca.m4 serial 14
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,8 +36,86 @@ AC_DEFUN([gl_FUNC_ALLOCA],
     ALLOCA_H=alloca.h
   fi
   AC_SUBST([ALLOCA_H])
+  AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"])
 ])
 
 # Prerequisites of lib/alloca.c.
 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
 AC_DEFUN([gl_PREREQ_ALLOCA], [:])
+
+# This works around a bug in autoconf <= 2.68.
+# See <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00277.html>.
+
+m4_version_prereq([2.69], [] ,[
+
+# This is taken from the following Autoconf patch:
+# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497
+
+# _AC_LIBOBJ_ALLOCA
+# -----------------
+# Set up the LIBOBJ replacement of 'alloca'.  Well, not exactly
+# AC_LIBOBJ since we actually set the output variable 'ALLOCA'.
+# Nevertheless, for Automake, AC_LIBSOURCES it.
+m4_define([_AC_LIBOBJ_ALLOCA],
+[# The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+AC_LIBSOURCES(alloca.c)
+AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
+AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
+
+AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
+[AC_EGREP_CPP(webecray,
+[#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    AC_CHECK_FUNC($ac_func,
+                  [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
+                                      [Define to one of '_getb67', 'GETB67',
+                                       'getb67' for Cray-2 and Cray-YMP
+                                       systems. This function is required for
+                                       'alloca.c' support on those systems.])
+    break])
+  done
+fi
+
+AC_CACHE_CHECK([stack direction for C alloca],
+               [ac_cv_c_stack_direction],
+[AC_RUN_IFELSE([AC_LANG_SOURCE(
+[AC_INCLUDES_DEFAULT
+int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
+
+int
+main (int argc, char **argv)
+{
+  return find_stack_direction (0, argc + !argv + 20) < 0;
+}])],
+               [ac_cv_c_stack_direction=1],
+               [ac_cv_c_stack_direction=-1],
+               [ac_cv_c_stack_direction=0])])
+AH_VERBATIM([STACK_DIRECTION],
+[/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+        STACK_DIRECTION > 0 => grows toward higher addresses
+        STACK_DIRECTION < 0 => grows toward lower addresses
+        STACK_DIRECTION = 0 => direction of growth unknown */
+@%:@undef STACK_DIRECTION])dnl
+AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
+])# _AC_LIBOBJ_ALLOCA
+])
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4
index 603298f..e565321 100644
--- a/gl/m4/btowc.m4
+++ b/gl/m4/btowc.m4
@@ -1,5 +1,5 @@
-# btowc.m4 serial 8
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# btowc.m4 serial 10
+dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -108,11 +108,6 @@ int main ()
       *) REPLACE_BTOWC=1 ;;
     esac
   fi
-  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
-    gl_REPLACE_WCHAR_H
-    AC_LIBOBJ([btowc])
-    gl_PREREQ_BTOWC
-  fi
 ])
 
 # Prerequisites of lib/btowc.c.
diff --git a/gl/m4/byteswap.m4 b/gl/m4/byteswap.m4
new file mode 100644
index 0000000..f3b7ec9
--- /dev/null
+++ b/gl/m4/byteswap.m4
@@ -0,0 +1,19 @@
+# byteswap.m4 serial 4
+dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Oskar Liljeblad.
+
+AC_DEFUN([gl_BYTESWAP],
+[
+  dnl Prerequisites of lib/byteswap.in.h.
+  AC_CHECK_HEADERS([byteswap.h], [
+    BYTESWAP_H=''
+  ], [
+    BYTESWAP_H='byteswap.h'
+  ])
+  AC_SUBST([BYTESWAP_H])
+  AM_CONDITIONAL([GL_GENERATE_BYTESWAP_H], [test -n "$BYTESWAP_H"])
+])
diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4
index da73552..cf53d24 100644
--- a/gl/m4/codeset.m4
+++ b/gl/m4/codeset.m4
@@ -1,5 +1,5 @@
 # codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/configmake.m4 b/gl/m4/configmake.m4
index a029823..8c82371 100644
--- a/gl/m4/configmake.m4
+++ b/gl/m4/configmake.m4
@@ -1,5 +1,5 @@
 # configmake.m4 serial 1
-dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 1330503..6d17d8a 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,7 +1,7 @@
-# serial 9  -*- Autoconf -*-
+# serial 12  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -43,7 +43,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
   AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
   if test "$MINIX" = yes; then
     AC_DEFINE([_POSIX_SOURCE], [1],
-      [Define to 1 if you need to in order for `stat' and other
+      [Define to 1 if you need to in order for 'stat' and other
        things to work.])
     AC_DEFINE([_POSIX_1_SOURCE], [2],
       [Define to 2 if the system does not provide POSIX.1 features
@@ -67,6 +67,10 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
+/* Enable general extensions on Mac OS X.  */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
@@ -95,6 +99,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
   test $ac_cv_safe_to_define___extensions__ = yes &&
     AC_DEFINE([__EXTENSIONS__])
   AC_DEFINE([_ALL_SOURCE])
+  AC_DEFINE([_DARWIN_C_SOURCE])
   AC_DEFINE([_GNU_SOURCE])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
   AC_DEFINE([_TANDEM_SOURCE])
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 88db07e..9862741 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
-# fcntl-o.m4 serial 3
-dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+# fcntl-o.m4 serial 4
+dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -17,12 +17,21 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
   m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
     [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
     [AC_REQUIRE([AC_GNU_SOURCE])])
+
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+  AC_CHECK_FUNCS_ONCE([symlink])
   AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
     [AC_RUN_IFELSE(
        [AC_LANG_PROGRAM(
           [[#include <sys/types.h>
            #include <sys/stat.h>
-           #include <unistd.h>
+           #if HAVE_UNISTD_H
+           # include <unistd.h>
+           #else /* on Windows with MSVC */
+           # include <io.h>
+           # include <stdlib.h>
+           # defined sleep(n) _sleep ((n) * 1000)
+           #endif
            #include <fcntl.h>
            #ifndef O_NOATIME
             #define O_NOATIME 0
@@ -38,6 +47,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
           ]],
           [[
             int result = !constants;
+            #if HAVE_SYMLINK
             {
               static char const sym[] = "conftest.sym";
               if (symlink (".", sym) != 0)
@@ -53,6 +63,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
                 }
               unlink (sym);
             }
+            #endif
             {
               static char const file[] = "confdefs.h";
               int fd = open (file, O_RDONLY | O_NOATIME);
diff --git a/gl/m4/glibc21.m4 b/gl/m4/glibc21.m4
index bc81c11..c938fb1 100644
--- a/gl/m4/glibc21.m4
+++ b/gl/m4/glibc21.m4
@@ -1,5 +1,5 @@
 # glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2011 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index fd7e050..c7196a3 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -1,9 +1,21 @@
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
-# This file is free software, distributed under the terms of the GNU
-# General Public License.  As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file 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 file.  If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
@@ -15,11 +27,12 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=gl/doc --tests-base=tests --aux-dir=conf --lgpl --libtool --macro-prefix=gl regex
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=gl/doc --tests-base=tests --aux-dir=conf --lgpl --no-conditional-dependencies --libtool --macro-prefix=gl byteswap regex
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
 gl_MODULES([
+  byteswap
   regex
 ])
 gl_AVOID([])
@@ -34,3 +47,4 @@ gl_MAKEFILE_NAME([])
 gl_LIBTOOL
 gl_MACRO_PREFIX([gl])
 gl_PO_DOMAIN([])
+gl_WITNESS_C_DOMAIN([])
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index ecbf336..15d2b2b 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 23
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 33
+dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,11 +12,25 @@ AC_DEFUN([gl_COMMON], [
   AC_REQUIRE([gl_COMMON_BODY])
 ])
 AC_DEFUN([gl_COMMON_BODY], [
+  AH_VERBATIM([_Noreturn],
+[/* The _Noreturn keyword of C11.  */
+#if ! (defined _Noreturn \
+       || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+      || 0x5110 <= __SUNPRO_C)
+#  define _Noreturn __attribute__ ((__noreturn__))
+# elif defined _MSC_VER && 1200 <= _MSC_VER
+#  define _Noreturn __declspec (noreturn)
+# else
+#  define _Noreturn
+# endif
+#endif
+])
   AH_VERBATIM([isoc99_inline],
 [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
    the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
    earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
-   __APPLE__ && __MACH__ test for MacOS X.
+   __APPLE__ && __MACH__ test for Mac OS X.
    __APPLE_CC__ tests for the Apple compiler and its version.
    __STDC_VERSION__ tests for the C99 mode.  */
 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
@@ -34,6 +48,20 @@ AC_DEFUN([gl_COMMON_BODY], [
 /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
    is a misnomer outside of parameter lists.  */
 #define _UNUSED_PARAMETER_ _GL_UNUSED
+
+/* The __pure__ attribute was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The __const__ attribute was added in gcc 2.95.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
 ])
   dnl Preparation for running test programs:
   dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
@@ -47,16 +75,49 @@ AC_DEFUN([gl_COMMON_BODY], [
 # expands to a C preprocessor expression that evaluates to 1 or 0, depending
 # whether a gnulib module that has been requested shall be considered present
 # or not.
-AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
+m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
 
 # gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
 # sets the shell variable that indicates the presence of the given module to
 # a C preprocessor expression that will evaluate to 1.
 AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
 [
-  GNULIB_[]m4_translit([[$1]],
-    [abcdefghijklmnopqrstuvwxyz./-],
-    [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
+  gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
+    [GNULIB_[]m4_translit([[$1]],
+                          [abcdefghijklmnopqrstuvwxyz./-],
+                          [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
+    [gl_MODULE_INDICATOR_CONDITION])
+])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
+# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
+# The shell variable's value is a C preprocessor expression that evaluates
+# to 0 or 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
+[
+  m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
+    [
+     dnl Simplify the expression VALUE || 1 to 1.
+     $1=1
+    ],
+    [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
+                                             [gl_MODULE_INDICATOR_CONDITION])])
+])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
+# modifies the shell variable to include the given condition.  The shell
+# variable's value is a C preprocessor expression that evaluates to 0 or 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
+[
+  dnl Simplify the expression 1 || CONDITION to 1.
+  if test "$[]$1" != 1; then
+    dnl Simplify the expression 0 || CONDITION to CONDITION.
+    if test "$[]$1" = 0; then
+      $1=$2
+    else
+      $1="($[]$1 || $2)"
+    fi
+  fi
 ])
 
 # gl_MODULE_INDICATOR([modulename])
@@ -109,7 +170,8 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
 AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK],
 [
   dnl Override gl_WARN_ON_USE_PREPARE.
-  AC_DEFUN([gl_WARN_ON_USE_PREPARE], [])
+  dnl But hide this definition from 'aclocal'.
+  AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], [])
 ])
 
 # gl_ASSERT_NO_GNULIB_TESTS
@@ -150,6 +212,83 @@ m4_ifndef([AS_VAR_IF],
 [m4_define([AS_VAR_IF],
 [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
 
+# gl_PROG_CC_C99
+# Modifies the value of the shell variable CC in an attempt to make $CC
+# understand ISO C99 source code.
+# This is like AC_PROG_CC_C99, except that
+# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60,
+# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
+#   <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>,
+#   but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
+#   <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>.
+# Remaining problems:
+# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
+#   to CC twice
+#   <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
+# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
+AC_DEFUN([gl_PROG_CC_C99],
+[
+  dnl Change that version number to the minimum Autoconf version that supports
+  dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls.
+  m4_version_prereq([9.0],
+    [AC_REQUIRE([AC_PROG_CC_C99])],
+    [AC_REQUIRE([AC_PROG_CC_STDC])])
+])
+
+# gl_PROG_AR_RANLIB
+# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
+# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override
+# the values.
+AC_DEFUN([gl_PROG_AR_RANLIB],
+[
+  dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
+  dnl as "cc", and GCC as "gcc". They have different object file formats and
+  dnl library formats. In particular, the GNU binutils programs ar, ranlib
+  dnl produce libraries that work only with gcc, not with cc.
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
+    [
+      AC_EGREP_CPP([Amsterdam],
+        [
+#ifdef __ACK__
+Amsterdam
+#endif
+        ],
+        [gl_cv_c_amsterdam_compiler=yes],
+        [gl_cv_c_amsterdam_compiler=no])
+    ])
+  if test -z "$AR"; then
+    if test $gl_cv_c_amsterdam_compiler = yes; then
+      AR='cc -c.a'
+      if test -z "$ARFLAGS"; then
+        ARFLAGS='-o'
+      fi
+    else
+      dnl Use the Automake-documented default values for AR and ARFLAGS,
+      dnl but prefer ${host}-ar over ar (useful for cross-compiling).
+      AC_CHECK_TOOL([AR], [ar], [ar])
+      if test -z "$ARFLAGS"; then
+        ARFLAGS='cru'
+      fi
+    fi
+  else
+    if test -z "$ARFLAGS"; then
+      ARFLAGS='cru'
+    fi
+  fi
+  AC_SUBST([AR])
+  AC_SUBST([ARFLAGS])
+  if test -z "$RANLIB"; then
+    if test $gl_cv_c_amsterdam_compiler = yes; then
+      RANLIB=':'
+    else
+      dnl Use the ranlib program if it is available.
+      AC_PROG_RANLIB
+    fi
+  fi
+  AC_SUBST([RANLIB])
+])
+
 # AC_PROG_MKDIR_P
 # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
 # for interoperability with automake-1.9.6 from autoconf-2.62.
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index f327798..ae09ed7 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,10 +1,22 @@
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
-# This file is free software, distributed under the terms of the GNU
-# General Public License.  As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file 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 file.  If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
@@ -25,11 +37,10 @@ AC_DEFUN([gl_EARLY],
   m4_pattern_allow([^gl_ES$])dnl a valid locale name
   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
-  AC_REQUIRE([AC_PROG_RANLIB])
+  AC_REQUIRE([gl_PROG_AR_RANLIB])
   # Code from module alloca-opt:
-  # Code from module arg-nonnull:
   # Code from module btowc:
-  # Code from module c++defs:
+  # Code from module byteswap:
   # Code from module configmake:
   # Code from module extensions:
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
@@ -37,25 +48,34 @@ AC_DEFUN([gl_EARLY],
   # Code from module include_next:
   # Code from module langinfo:
   # Code from module localcharset:
+  # Code from module locale:
+  # Code from module localeconv:
   # Code from module malloc-gnu:
   # Code from module malloc-posix:
   # Code from module mbrtowc:
   # Code from module mbsinit:
+  # Code from module mbtowc:
   # Code from module multiarch:
   # Code from module nl_langinfo:
   # Code from module regex:
+  # Code from module snippet/_Noreturn:
+  # Code from module snippet/arg-nonnull:
+  # Code from module snippet/c++defs:
+  # Code from module snippet/warn-on-use:
   # Code from module ssize_t:
   # Code from module stdbool:
   # Code from module stddef:
   # Code from module stdint:
   # Code from module stdlib:
+  # Code from module strcase:
   # Code from module streq:
+  # Code from module strings:
+  # Code from module sys_types:
   # Code from module unistd:
   # Code from module verify:
-  # Code from module warn-on-use:
   # Code from module wchar:
   # Code from module wcrtomb:
-  # Code from module wctype:
+  # Code from module wctype-h:
 ])
 
 # This macro should be invoked from ./configure.ac, in the section
@@ -72,67 +92,93 @@ AC_DEFUN([gl_INIT],
   m4_pushdef([gl_LIBSOURCES_DIR], [])
   gl_COMMON
   gl_source_base='gl'
-  # Code from module alloca-opt:
-  gl_FUNC_ALLOCA
-  # Code from module arg-nonnull:
-  # Code from module btowc:
-  gl_FUNC_BTOWC
-  gl_WCHAR_MODULE_INDICATOR([btowc])
-  # Code from module c++defs:
-  # Code from module configmake:
-  gl_CONFIGMAKE_PREP
-  # Code from module extensions:
-  # Code from module gettext-h:
-  AC_SUBST([LIBINTL])
-  AC_SUBST([LTLIBINTL])
-  # Code from module include_next:
-  # Code from module langinfo:
-  gl_LANGINFO_H
-  # Code from module localcharset:
-  gl_LOCALCHARSET
-  LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
-  AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
-  # Code from module malloc-gnu:
-  gl_FUNC_MALLOC_GNU
-  gl_MODULE_INDICATOR([malloc-gnu])
-  # Code from module malloc-posix:
-  gl_FUNC_MALLOC_POSIX
-  gl_STDLIB_MODULE_INDICATOR([malloc-posix])
-  # Code from module mbrtowc:
-  gl_FUNC_MBRTOWC
-  gl_WCHAR_MODULE_INDICATOR([mbrtowc])
-  # Code from module mbsinit:
-  gl_FUNC_MBSINIT
-  gl_WCHAR_MODULE_INDICATOR([mbsinit])
-  # Code from module multiarch:
-  gl_MULTIARCH
-  # Code from module nl_langinfo:
-  gl_FUNC_NL_LANGINFO
-  gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
-  # Code from module regex:
-  gl_REGEX
-  # Code from module ssize_t:
-  gt_TYPE_SSIZE_T
-  # Code from module stdbool:
-  AM_STDBOOL_H
-  # Code from module stddef:
-  gl_STDDEF_H
-  # Code from module stdint:
-  gl_STDINT_H
-  # Code from module stdlib:
-  gl_STDLIB_H
-  # Code from module streq:
-  # Code from module unistd:
-  gl_UNISTD_H
-  # Code from module verify:
-  # Code from module warn-on-use:
-  # Code from module wchar:
-  gl_WCHAR_H
-  # Code from module wcrtomb:
-  gl_FUNC_WCRTOMB
-  gl_WCHAR_MODULE_INDICATOR([wcrtomb])
-  # Code from module wctype:
-  gl_WCTYPE_H
+gl_FUNC_ALLOCA
+gl_FUNC_BTOWC
+if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+  AC_LIBOBJ([btowc])
+  gl_PREREQ_BTOWC
+fi
+gl_WCHAR_MODULE_INDICATOR([btowc])
+gl_BYTESWAP
+gl_CONFIGMAKE_PREP
+AC_SUBST([LIBINTL])
+AC_SUBST([LTLIBINTL])
+gl_LANGINFO_H
+gl_LOCALCHARSET
+LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
+AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+gl_LOCALE_H
+gl_FUNC_LOCALECONV
+if test $REPLACE_LOCALECONV = 1; then
+  AC_LIBOBJ([localeconv])
+  gl_PREREQ_LOCALECONV
+fi
+gl_LOCALE_MODULE_INDICATOR([localeconv])
+gl_FUNC_MALLOC_GNU
+if test $REPLACE_MALLOC = 1; then
+  AC_LIBOBJ([malloc])
+fi
+gl_MODULE_INDICATOR([malloc-gnu])
+gl_FUNC_MALLOC_POSIX
+if test $REPLACE_MALLOC = 1; then
+  AC_LIBOBJ([malloc])
+fi
+gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+gl_FUNC_MBRTOWC
+if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+  AC_LIBOBJ([mbrtowc])
+  gl_PREREQ_MBRTOWC
+fi
+gl_WCHAR_MODULE_INDICATOR([mbrtowc])
+gl_FUNC_MBSINIT
+if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+  AC_LIBOBJ([mbsinit])
+  gl_PREREQ_MBSINIT
+fi
+gl_WCHAR_MODULE_INDICATOR([mbsinit])
+gl_FUNC_MBTOWC
+if test $REPLACE_MBTOWC = 1; then
+  AC_LIBOBJ([mbtowc])
+  gl_PREREQ_MBTOWC
+fi
+gl_STDLIB_MODULE_INDICATOR([mbtowc])
+gl_MULTIARCH
+gl_FUNC_NL_LANGINFO
+if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
+  AC_LIBOBJ([nl_langinfo])
+fi
+gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
+gl_REGEX
+if test $ac_use_included_regex = yes; then
+  AC_LIBOBJ([regex])
+  gl_PREREQ_REGEX
+fi
+gt_TYPE_SSIZE_T
+AM_STDBOOL_H
+gl_STDDEF_H
+gl_STDINT_H
+gl_STDLIB_H
+gl_STRCASE
+if test $HAVE_STRCASECMP = 0; then
+  AC_LIBOBJ([strcasecmp])
+  gl_PREREQ_STRCASECMP
+fi
+if test $HAVE_STRNCASECMP = 0; then
+  AC_LIBOBJ([strncasecmp])
+  gl_PREREQ_STRNCASECMP
+fi
+gl_HEADER_STRINGS_H
+gl_SYS_TYPES_H
+AC_PROG_MKDIR_P
+gl_UNISTD_H
+gl_WCHAR_H
+gl_FUNC_WCRTOMB
+if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+  AC_LIBOBJ([wcrtomb])
+  gl_PREREQ_WCRTOMB
+fi
+gl_WCHAR_MODULE_INDICATOR([wcrtomb])
+gl_WCTYPE_H
   # End of code from modules
   m4_ifval(gl_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -269,20 +315,25 @@ AC_DEFUN([gltests_LIBSOURCES], [
 # This macro records the list of files which have been installed by
 # gnulib-tool and may be removed by future gnulib-tool invocations.
 AC_DEFUN([gl_FILE_LIST], [
-  build-aux/arg-nonnull.h
-  build-aux/c++defs.h
-  build-aux/warn-on-use.h
+  build-aux/snippet/_Noreturn.h
+  build-aux/snippet/arg-nonnull.h
+  build-aux/snippet/c++defs.h
+  build-aux/snippet/warn-on-use.h
   lib/alloca.in.h
   lib/btowc.c
+  lib/byteswap.in.h
   lib/config.charset
   lib/gettext.h
-  lib/iswblank.c
   lib/langinfo.in.h
   lib/localcharset.c
   lib/localcharset.h
+  lib/locale.in.h
+  lib/localeconv.c
   lib/malloc.c
   lib/mbrtowc.c
   lib/mbsinit.c
+  lib/mbtowc-impl.h
+  lib/mbtowc.c
   lib/nl_langinfo.c
   lib/ref-add.sin
   lib/ref-del.sin
@@ -296,7 +347,11 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/stddef.in.h
   lib/stdint.in.h
   lib/stdlib.in.h
+  lib/strcasecmp.c
   lib/streq.h
+  lib/strings.in.h
+  lib/strncasecmp.c
+  lib/sys_types.in.h
   lib/unistd.in.h
   lib/verify.h
   lib/wchar.in.h
@@ -305,6 +360,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/00gnulib.m4
   m4/alloca.m4
   m4/btowc.m4
+  m4/byteswap.m4
   m4/codeset.m4
   m4/configmake.m4
   m4/extensions.m4
@@ -317,19 +373,26 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/locale-fr.m4
   m4/locale-ja.m4
   m4/locale-zh.m4
+  m4/locale_h.m4
+  m4/localeconv.m4
   m4/longlong.m4
   m4/malloc.m4
   m4/mbrtowc.m4
   m4/mbsinit.m4
   m4/mbstate_t.m4
+  m4/mbtowc.m4
   m4/multiarch.m4
   m4/nl_langinfo.m4
+  m4/off_t.m4
   m4/regex.m4
   m4/ssize_t.m4
   m4/stdbool.m4
   m4/stddef_h.m4
   m4/stdint.m4
   m4/stdlib_h.m4
+  m4/strcase.m4
+  m4/strings_h.m4
+  m4/sys_types_h.m4
   m4/unistd_h.m4
   m4/warn-on-use.m4
   m4/wchar_h.m4
diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4
index ed41e9d..a09ffc1 100644
--- a/gl/m4/gnulib-tool.m4
+++ b/gl/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
 # gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index b3c7849..a60a261 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,5 +1,5 @@
-# include_next.m4 serial 18
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# include_next.m4 serial 23
+dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -143,7 +143,7 @@ choke me
 # even if the compiler does not support include_next.
 # The three "///" are to pacify Sun C 5.8, which otherwise would say
 # "warning: #include of /usr/include/... may be non-portable".
-# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
 # Note: This macro assumes that the header file is not empty after
 # preprocessing, i.e. it does not only define preprocessor macros but also
 # provides some type/enum definitions or function/variable declarations.
@@ -175,11 +175,13 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
     [AC_CHECK_HEADERS_ONCE([$1])
     ])
 
+dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
+dnl until we can assume autoconf 2.64 or newer.
   m4_foreach_w([gl_HEADER_NAME], [$1],
     [AS_VAR_PUSHDEF([gl_next_header],
                     [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
      if test $gl_cv_have_include_next = yes; then
-       AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+       AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
      else
        AC_CACHE_CHECK(
          [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
@@ -205,33 +207,57 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
                  *)    gl_absname_cpp="$ac_cpp" ;;
                esac
+changequote(,)
+               case "$host_os" in
+                 mingw*)
+                   dnl For the sake of native Windows compilers (excluding gcc),
+                   dnl treat backslash as a directory separator, like /.
+                   dnl Actually, these compilers use a double-backslash as
+                   dnl directory separator, inside the
+                   dnl   # line "filename"
+                   dnl directives.
+                   gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+               dnl A sed expression that turns a string into a basic regular
+               dnl expression, for use within "/.../".
+               gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+changequote([,])
+               gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \
+                                        | sed -e "$gl_make_literal_regex_sed"`
+               gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+                   s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+changequote(,)dnl
+                   s|^/[^/]|//&|
+changequote([,])dnl
+                   p
+                   q
+                 }'
                dnl eval is necessary to expand gl_absname_cpp.
                dnl Ultrix and Pyramid sh refuse to redirect output of eval,
                dnl so use subshell.
-               AS_VAR_SET([gl_next_header],
+               AS_VAR_SET(gl_next_header,
                  ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
-                  sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
-                    s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
-                    s#^/[^/]#//&#
-                    p
-                    q
-                  }'`'"'])
+                      sed -n "$gl_absolute_header_sed"`'"'])
           m4_if([$2], [check],
             [else
-               AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+               AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
              fi
             ])
          ])
      fi
      AC_SUBST(
        AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
-       [AS_VAR_GET([gl_next_header])])
+       [AS_VAR_GET(gl_next_header)])
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
        gl_next_as_first_directive='<'gl_HEADER_NAME'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
+       gl_next_as_first_directive=AS_VAR_GET(gl_next_header)
      fi
      AC_SUBST(
        AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4
index 4cced8a..b93fe70 100644
--- a/gl/m4/langinfo_h.m4
+++ b/gl/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
 # langinfo_h.m4 serial 7
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/localcharset.m4 b/gl/m4/localcharset.m4
index 6801ca9..8010379 100644
--- a/gl/m4/localcharset.m4
+++ b/gl/m4/localcharset.m4
@@ -1,5 +1,5 @@
 # localcharset.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/locale-fr.m4 b/gl/m4/locale-fr.m4
index 2616f91..71b6847 100644
--- a/gl/m4/locale-fr.m4
+++ b/gl/m4/locale-fr.m4
@@ -1,5 +1,5 @@
-# locale-fr.m4 serial 12
-dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+# locale-fr.m4 serial 17
+dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -25,9 +25,19 @@ struct tm t;
 char buf[16];
 int main () {
   /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
   if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -53,46 +63,67 @@ int main () {
      one byte long. This excludes the UTF-8 encoding.  */
   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
   /* Check whether the decimal separator is a comma.
      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
      are nl_langinfo(RADIXCHAR) are both ".".  */
   if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
   return 0;
 }
 changequote([,])dnl
       ])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
-      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-      # configure script would override the LC_ALL setting. Likewise for
-      # LC_CTYPE, which is also set at the beginning of the configure script.
-      # Test for the usual locale name.
-      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-        gt_cv_locale_fr=fr_FR
-      else
-        # Test for the locale name with explicit encoding suffix.
-        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_fr=fr_FR.ISO-8859-1
-        else
-          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR.ISO8859-1
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the native Windows locale name.
+          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=French_France.1252
+          else
+            # None found.
+            gt_cv_locale_fr=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR
           else
-            # Test for the HP-UX locale name.
-            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.iso88591
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.ISO-8859-1
             else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr
+              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr_FR.ISO8859-1
               else
-                # None found.
-                gt_cv_locale_fr=none
+                # Test for the HP-UX locale name.
+                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr=fr_FR.iso88591
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr=fr
+                  else
+                    # None found.
+                    gt_cv_locale_fr=none
+                  fi
+                fi
               fi
             fi
           fi
-        fi
-      fi
+          ;;
+      esac
     fi
     rm -fr conftest*
   ])
@@ -122,9 +153,19 @@ int main () {
      variables, and all locales use the UTF-8 encoding.  */
 #if !(defined __BEOS__ || defined __HAIKU__)
   /* Check whether the given locale name is recognized by the system.  */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
   if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -150,36 +191,57 @@ int main () {
       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
     return 1;
 #endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
   /* Check whether the decimal separator is a comma.
      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
      are nl_langinfo(RADIXCHAR) are both ".".  */
   if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
   return 0;
 }
 changequote([,])dnl
       ])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
-      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-      # configure script would override the LC_ALL setting. Likewise for
-      # LC_CTYPE, which is also set at the beginning of the configure script.
-      # Test for the usual locale name.
-      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-        gt_cv_locale_fr_utf8=fr_FR
-      else
-        # Test for the locale name with explicit encoding suffix.
-        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_fr_utf8=fr_FR.UTF-8
-        else
-          # Test for the Solaris 7 locale name.
-          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr.UTF-8
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Windows locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
           else
             # None found.
             gt_cv_locale_fr_utf8=none
           fi
-        fi
-      fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
     fi
     rm -fr conftest*
   ])
diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4
index 40b4d65..5ba0e43 100644
--- a/gl/m4/locale-ja.m4
+++ b/gl/m4/locale-ja.m4
@@ -1,5 +1,5 @@
-# locale-ja.m4 serial 8
-dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+# locale-ja.m4 serial 12
+dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -27,9 +27,19 @@ int main ()
 {
   const char *p;
   /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
   if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -66,42 +76,58 @@ int main ()
 changequote([,])dnl
       ])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
-      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-      # configure script would override the LC_ALL setting. Likewise for
-      # LC_CTYPE, which is also set at the beginning of the configure script.
-      # Test for the AIX locale name.
-      if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-        gt_cv_locale_ja=ja_JP
-      else
-        # Test for the locale name with explicit encoding suffix.
-        if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_ja=ja_JP.EUC-JP
-        else
-          # Test for the HP-UX, OSF/1, NetBSD locale name.
-          if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_ja=ja_JP.eucJP
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Note that on native Windows, the Japanese locale is
+          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+          # cannot use it here.
+          gt_cv_locale_ja=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the AIX locale name.
+          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP
           else
-            # Test for the IRIX, FreeBSD locale name.
-            if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_ja=ja_JP.EUC
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC-JP
             else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_ja=ja
+              # Test for the HP-UX, OSF/1, NetBSD locale name.
+              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja_JP.eucJP
               else
-                # Special test for NetBSD 1.6.
-                if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
-                  gt_cv_locale_ja=ja_JP.eucJP
+                # Test for the IRIX, FreeBSD locale name.
+                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_ja=ja_JP.EUC
                 else
-                  # None found.
-                  gt_cv_locale_ja=none
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_ja=ja
+                  else
+                    # Special test for NetBSD 1.6.
+                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                      gt_cv_locale_ja=ja_JP.eucJP
+                    else
+                      # None found.
+                      gt_cv_locale_ja=none
+                    fi
+                  fi
                 fi
               fi
             fi
           fi
-        fi
-      fi
+          ;;
+      esac
     fi
     rm -fr conftest*
   ])
diff --git a/gl/m4/locale-zh.m4 b/gl/m4/locale-zh.m4
index 81c2e2b..e5502b2 100644
--- a/gl/m4/locale-zh.m4
+++ b/gl/m4/locale-zh.m4
@@ -1,5 +1,5 @@
-# locale-zh.m4 serial 7
-dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+# locale-zh.m4 serial 12
+dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -28,9 +28,19 @@ int main ()
 {
   const char *p;
   /* Check whether the given locale name is recognized by the system.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+#else
   if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -67,22 +77,47 @@ int main ()
 changequote([,])dnl
       ])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
-      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-      # configure script would override the LC_ALL setting. Likewise for
-      # LC_CTYPE, which is also set at the beginning of the configure script.
-      # Test for the locale name without encoding suffix.
-      if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-        gt_cv_locale_zh_CN=zh_CN
-      else
-        # Test for the locale name with explicit encoding suffix.
-        if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_zh_CN=zh_CN.GB18030
-        else
-          # None found.
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Windows locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        solaris2.8)
+          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
           gt_cv_locale_zh_CN=none
-        fi
-      fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
     else
       # If there was a link error, due to mblen(), the system is so old that
       # it certainly doesn't have a chinese locale.
diff --git a/gl/m4/locale_h.m4 b/gl/m4/locale_h.m4
new file mode 100644
index 0000000..c0f4d52
--- /dev/null
+++ b/gl/m4/locale_h.m4
@@ -0,0 +1,122 @@
+# locale_h.m4 serial 19
+dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LOCALE_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+
+  dnl Persuade glibc <locale.h> to define locale_t and the int_p_*, int_n_*
+  dnl members of 'struct lconv'.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl If <stddef.h> is replaced, then <locale.h> must also be replaced.
+  AC_REQUIRE([gl_STDDEF_H])
+
+  dnl Solaris 11 2011-11 defines the int_p_*, int_n_* members of 'struct lconv'
+  dnl only if _LCONV_C99 is defined.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    solaris*)
+      AC_DEFINE([_LCONV_C99], [1], [Define to 1 on Solaris.])
+      ;;
+  esac
+
+  AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001],
+    [gl_cv_header_locale_h_posix2001],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <locale.h>
+            int x = LC_MESSAGES;
+            int y = sizeof (((struct lconv *) 0)->decimal_point);]],
+          [[]])],
+       [gl_cv_header_locale_h_posix2001=yes],
+       [gl_cv_header_locale_h_posix2001=no])])
+
+  dnl Check for <xlocale.h>.
+  AC_CHECK_HEADERS_ONCE([xlocale.h])
+  if test $ac_cv_header_xlocale_h = yes; then
+    HAVE_XLOCALE_H=1
+    dnl Check whether use of locale_t requires inclusion of <xlocale.h>,
+    dnl e.g. on Mac OS X 10.5. If <locale.h> does not define locale_t by
+    dnl itself, we assume that <xlocale.h> will do so.
+    AC_CACHE_CHECK([whether locale.h defines locale_t],
+      [gl_cv_header_locale_has_locale_t],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <locale.h>
+              locale_t x;]],
+            [[]])],
+         [gl_cv_header_locale_has_locale_t=yes],
+         [gl_cv_header_locale_has_locale_t=no])
+      ])
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      gl_cv_header_locale_h_needs_xlocale_h=no
+    else
+      gl_cv_header_locale_h_needs_xlocale_h=yes
+    fi
+  else
+    HAVE_XLOCALE_H=0
+    gl_cv_header_locale_h_needs_xlocale_h=no
+  fi
+  AC_SUBST([HAVE_XLOCALE_H])
+
+  dnl Check whether 'struct lconv' is complete.
+  dnl Bionic libc's 'struct lconv' is just a dummy.
+  dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x,
+  dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members.
+  AC_CACHE_CHECK([whether struct lconv is properly defined],
+    [gl_cv_sys_struct_lconv_ok],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <locale.h>
+            struct lconv l;
+            int x = sizeof (l.decimal_point);
+            int y = sizeof (l.int_p_cs_precedes);]],
+          [[]])],
+       [gl_cv_sys_struct_lconv_ok=yes],
+       [gl_cv_sys_struct_lconv_ok=no])
+    ])
+  if test $gl_cv_sys_struct_lconv_ok = no; then
+    REPLACE_STRUCT_LCONV=1
+  fi
+
+  dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_NEXT_HEADERS([locale.h])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <locale.h>
+/* Some systems provide declarations in a non-standard header.  */
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+    ]],
+    [setlocale duplocale])
+])
+
+AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_LOCALE_H_DEFAULTS],
+[
+  GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV])
+  GNULIB_SETLOCALE=0;  AC_SUBST([GNULIB_SETLOCALE])
+  GNULIB_DUPLOCALE=0;  AC_SUBST([GNULIB_DUPLOCALE])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DUPLOCALE=1;       AC_SUBST([HAVE_DUPLOCALE])
+  REPLACE_LOCALECONV=0;   AC_SUBST([REPLACE_LOCALECONV])
+  REPLACE_SETLOCALE=0;    AC_SUBST([REPLACE_SETLOCALE])
+  REPLACE_DUPLOCALE=0;    AC_SUBST([REPLACE_DUPLOCALE])
+  REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
+])
diff --git a/gl/m4/localeconv.m4 b/gl/m4/localeconv.m4
new file mode 100644
index 0000000..5fae06d
--- /dev/null
+++ b/gl/m4/localeconv.m4
@@ -0,0 +1,22 @@
+# localeconv.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOCALECONV],
+[
+  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+  AC_REQUIRE([gl_LOCALE_H])
+
+  if test $REPLACE_STRUCT_LCONV = 1; then
+    REPLACE_LOCALECONV=1
+  fi
+])
+
+# Prerequisites of lib/localeconv.c.
+AC_DEFUN([gl_PREREQ_LOCALECONV],
+[
+  AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [],
+    [[#include <locale.h>]])
+])
diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4
index a4d95aa..b9c65c7 100644
--- a/gl/m4/longlong.m4
+++ b/gl/m4/longlong.m4
@@ -1,5 +1,5 @@
-# longlong.m4 serial 14
-dnl Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc.
+# longlong.m4 serial 17
+dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,8 +7,8 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl From Paul Eggert.
 
 # Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This fixes a bug in Autoconf 2.61, but can be removed once we
-# assume 2.62 everywhere.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
 
 # Note: If the type 'long long int' exists but is only 32 bits large
 # (as on some very old compilers), HAVE_LONG_LONG_INT will not be
@@ -16,44 +16,48 @@ dnl From Paul Eggert.
 
 AC_DEFUN([AC_TYPE_LONG_LONG_INT],
 [
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
   AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
-    [AC_LINK_IFELSE(
-       [_AC_TYPE_LONG_LONG_SNIPPET],
-       [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
-        dnl If cross compiling, assume the bug isn't important, since
-        dnl nobody cross compiles for this platform as far as we know.
-        AC_RUN_IFELSE(
-          [AC_LANG_PROGRAM(
-             [[@%:@include <limits.h>
-               @%:@ifndef LLONG_MAX
-               @%:@ define HALF \
-                        (1LL << (sizeof (long long int) * CHAR_BIT - 2))
-               @%:@ define LLONG_MAX (HALF - 1 + HALF)
-               @%:@endif]],
-             [[long long int n = 1;
-               int i;
-               for (i = 0; ; i++)
-                 {
-                   long long int m = n << i;
-                   if (m >> i != n)
-                     return 1;
-                   if (LLONG_MAX / 2 < m)
-                     break;
-                 }
-               return 0;]])],
-          [ac_cv_type_long_long_int=yes],
-          [ac_cv_type_long_long_int=no],
-          [ac_cv_type_long_long_int=yes])],
-       [ac_cv_type_long_long_int=no])])
+     [ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+          dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+          dnl If cross compiling, assume the bug is not important, since
+          dnl nobody cross compiles for this platform as far as we know.
+          AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[@%:@include <limits.h>
+                 @%:@ifndef LLONG_MAX
+                 @%:@ define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 @%:@ define LLONG_MAX (HALF - 1 + HALF)
+                 @%:@endif]],
+               [[long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;]])],
+            [],
+            [ac_cv_type_long_long_int=no],
+            [:])
+        fi
+      fi])
   if test $ac_cv_type_long_long_int = yes; then
     AC_DEFINE([HAVE_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `long long int'.])
+      [Define to 1 if the system has the type 'long long int'.])
   fi
 ])
 
 # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This fixes a bug in Autoconf 2.61, but can be removed once we
-# assume 2.62 everywhere.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
 
 # Note: If the type 'unsigned long long int' exists but is only 32 bits
 # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
@@ -64,13 +68,16 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
 [
   AC_CACHE_CHECK([for unsigned long long int],
     [ac_cv_type_unsigned_long_long_int],
-    [AC_LINK_IFELSE(
-       [_AC_TYPE_LONG_LONG_SNIPPET],
-       [ac_cv_type_unsigned_long_long_int=yes],
-       [ac_cv_type_unsigned_long_long_int=no])])
+    [ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       AC_LINK_IFELSE(
+         [_AC_TYPE_LONG_LONG_SNIPPET],
+         [],
+         [ac_cv_type_unsigned_long_long_int=no])
+     fi])
   if test $ac_cv_type_unsigned_long_long_int = yes; then
     AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `unsigned long long int'.])
+      [Define to 1 if the system has the type 'unsigned long long int'.])
   fi
 ])
 
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 8094444..8fa48e9 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,9 +1,47 @@
-# malloc.m4 serial 12
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# malloc.m4 serial 14
+dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+m4_version_prereq([2.70], [] ,[
+
+# This is taken from the following Autoconf patch:
+# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+AC_DEFUN([_AC_FUNC_MALLOC_IF],
+[
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CHECK_HEADERS([stdlib.h])
+  AC_CACHE_CHECK([for GNU libc compatible malloc],
+    [ac_cv_func_malloc_0_nonnull],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+            # include <stdlib.h>
+            #else
+            char *malloc ();
+            #endif
+          ]],
+          [[return ! malloc (0);]])
+       ],
+       [ac_cv_func_malloc_0_nonnull=yes],
+       [ac_cv_func_malloc_0_nonnull=no],
+       [case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* \
+          | hpux* | solaris* | cygwin* | mingw*)
+            ac_cv_func_malloc_0_nonnull=yes ;;
+          # If we don't know, assume the worst.
+          *) ac_cv_func_malloc_0_nonnull=no ;;
+        esac
+       ])
+    ])
+  AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
+])# _AC_FUNC_MALLOC_IF
+
+])
+
 # gl_FUNC_MALLOC_GNU
 # ------------------
 # Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
@@ -17,7 +55,7 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU],
                [Define to 1 if your system has a GNU libc compatible 'malloc'
                 function, and to 0 otherwise.])],
     [AC_DEFINE([HAVE_MALLOC_GNU], [0])
-     gl_REPLACE_MALLOC
+     REPLACE_MALLOC=1
     ])
 ])
 
@@ -33,7 +71,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
     AC_DEFINE([HAVE_MALLOC_POSIX], [1],
       [Define if the 'malloc' function is POSIX compliant.])
   else
-    gl_REPLACE_MALLOC
+    REPLACE_MALLOC=1
   fi
 ])
 
@@ -58,9 +96,3 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
         [gl_cv_func_malloc_posix=no])
     ])
 ])
-
-AC_DEFUN([gl_REPLACE_MALLOC],
-[
-  AC_LIBOBJ([malloc])
-  REPLACE_MALLOC=1
-])
diff --git a/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4
index c07da11..8f829c8 100644
--- a/gl/m4/mbrtowc.m4
+++ b/gl/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 21
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2011 Free Software Foundation,
+# mbrtowc.m4 serial 25
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2012 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,22 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
   AC_CHECK_FUNCS_ONCE([mbrtowc])
   if test $ac_cv_func_mbrtowc = no; then
     HAVE_MBRTOWC=0
+    AC_CHECK_DECLS([mbrtowc],,, [[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+]])
+    if test $ac_cv_have_decl_mbrtowc = yes; then
+      dnl On Minix 3.1.8, the system's <wchar.h> declares mbrtowc() although
+      dnl it does not have the function. Avoid a collision with gnulib's
+      dnl replacement.
+      REPLACE_MBRTOWC=1
+    fi
   else
     if test $REPLACE_MBSTATE_T = 1; then
       REPLACE_MBRTOWC=1
@@ -53,11 +69,6 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
       esac
     fi
   fi
-  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
-    gl_REPLACE_WCHAR_H
-    AC_LIBOBJ([mbrtowc])
-    gl_PREREQ_MBRTOWC
-  fi
 ])
 
 dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
@@ -88,9 +99,6 @@ AC_DEFUN([gl_MBSTATE_T_BROKEN],
   else
     REPLACE_MBSTATE_T=1
   fi
-  if test $REPLACE_MBSTATE_T = 1; then
-    gl_REPLACE_WCHAR_H
-  fi
 ])
 
 dnl Test whether mbrtowc puts the state into non-initial state when parsing an
@@ -348,7 +356,7 @@ AC_DEFUN([gl_MBRTOWC_RETVAL],
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([gt_LOCALE_FR_UTF8])
   AC_REQUIRE([gt_LOCALE_JA])
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_REQUIRE([AC_CANONICAL_HOST])
   AC_CACHE_CHECK([whether mbrtowc has a correct return value],
     [gl_cv_func_mbrtowc_retval],
     [
@@ -356,13 +364,14 @@ AC_DEFUN([gl_MBRTOWC_RETVAL],
       dnl is present.
 changequote(,)dnl
       case "$host_os" in
-                          # Guess no on HP-UX and Solaris.
-        hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
-                          # Guess yes otherwise.
-        *)                gl_cv_func_mbrtowc_retval="guessing yes" ;;
+                                   # Guess no on HP-UX, Solaris, native Windows.
+        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+                                   # Guess yes otherwise.
+        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
       esac
 changequote([,])dnl
-      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
+         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
         AC_RUN_IFELSE(
           [AC_LANG_SOURCE([[
 #include <locale.h>
@@ -378,6 +387,7 @@ changequote([,])dnl
 int main ()
 {
   int result = 0;
+  int found_some_locale = 0;
   /* This fails on Solaris.  */
   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
     {
@@ -392,6 +402,7 @@ int main ()
           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
             result |= 1;
         }
+      found_some_locale = 1;
     }
   /* This fails on HP-UX 11.11.  */
   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
@@ -407,11 +418,61 @@ int main ()
           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
             result |= 2;
         }
+      found_some_locale = 1;
     }
-  return result;
+  /* This fails on native Windows.  */
+  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+    {
+      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 4;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+    {
+      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 8;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+    {
+      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 16;
+        }
+      found_some_locale = 1;
+    }
+  return (found_some_locale ? result : 77);
 }]])],
           [gl_cv_func_mbrtowc_retval=yes],
-          [gl_cv_func_mbrtowc_retval=no],
+          [if test $? != 77; then
+             gl_cv_func_mbrtowc_retval=no
+           fi
+          ],
           [:])
       fi
     ])
diff --git a/gl/m4/mbsinit.m4 b/gl/m4/mbsinit.m4
index 03b3144..da56c3d 100644
--- a/gl/m4/mbsinit.m4
+++ b/gl/m4/mbsinit.m4
@@ -1,5 +1,5 @@
-# mbsinit.m4 serial 4
-dnl Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
+# mbsinit.m4 serial 8
+dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_MBSINIT],
 [
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
 
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
   gl_MBSTATE_T_BROKEN
@@ -14,16 +15,34 @@ AC_DEFUN([gl_FUNC_MBSINIT],
   AC_CHECK_FUNCS_ONCE([mbsinit])
   if test $ac_cv_func_mbsinit = no; then
     HAVE_MBSINIT=0
+    AC_CHECK_DECLS([mbsinit],,, [[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+]])
+    if test $ac_cv_have_decl_mbsinit = yes; then
+      dnl On Minix 3.1.8, the system's <wchar.h> declares mbsinit() although
+      dnl it does not have the function. Avoid a collision with gnulib's
+      dnl replacement.
+      REPLACE_MBSINIT=1
+    fi
   else
     if test $REPLACE_MBSTATE_T = 1; then
       REPLACE_MBSINIT=1
+    else
+      dnl On mingw, mbsinit() always returns 1, which is inappropriate for
+      dnl states produced by mbrtowc() for an incomplete multibyte character
+      dnl in multibyte locales.
+      case "$host_os" in
+        mingw*) REPLACE_MBSINIT=1 ;;
+      esac
     fi
   fi
-  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
-    gl_REPLACE_WCHAR_H
-    AC_LIBOBJ([mbsinit])
-    gl_PREREQ_MBSINIT
-  fi
 ])
 
 # Prerequisites of lib/mbsinit.c.
diff --git a/gl/m4/mbstate_t.m4 b/gl/m4/mbstate_t.m4
index f7c46b8..61a8190 100644
--- a/gl/m4/mbstate_t.m4
+++ b/gl/m4/mbstate_t.m4
@@ -1,5 +1,5 @@
 # mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbtowc.m4 b/gl/m4/mbtowc.m4
new file mode 100644
index 0000000..fec0d25
--- /dev/null
+++ b/gl/m4/mbtowc.m4
@@ -0,0 +1,19 @@
+# mbtowc.m4 serial 2
+dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBTOWC],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+  if false; then
+    REPLACE_MBTOWC=1
+  fi
+])
+
+# Prerequisites of lib/mbtowc.c.
+AC_DEFUN([gl_PREREQ_MBTOWC], [
+  :
+])
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index 691d892..0c288b8 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,12 +1,12 @@
-# multiarch.m4 serial 6
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# multiarch.m4 serial 7
+dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 # Determine whether the compiler is or may be producing universal binaries.
 #
-# On MacOS X 10.5 and later systems, the user can create libraries and
+# On Mac OS X 10.5 and later systems, the user can create libraries and
 # executables that work on multiple system types--known as "fat" or
 # "universal" binaries--by specifying multiple '-arch' options to the
 # compiler but only a single '-arch' option to the preprocessor.  Like
diff --git a/gl/m4/nl_langinfo.m4 b/gl/m4/nl_langinfo.m4
index ca9d28d..80fe60d 100644
--- a/gl/m4/nl_langinfo.m4
+++ b/gl/m4/nl_langinfo.m4
@@ -1,5 +1,5 @@
-# nl_langinfo.m4 serial 4
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# nl_langinfo.m4 serial 5
+dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -43,10 +43,8 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
       REPLACE_NL_LANGINFO=1
       AC_DEFINE([REPLACE_NL_LANGINFO], [1],
         [Define if nl_langinfo exists but is overridden by gnulib.])
-      AC_LIBOBJ([nl_langinfo])
     fi
   else
     HAVE_NL_LANGINFO=0
-    AC_LIBOBJ([nl_langinfo])
   fi
 ])
diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4
new file mode 100644
index 0000000..dfca2df
--- /dev/null
+++ b/gl/m4/off_t.m4
@@ -0,0 +1,18 @@
+# off_t.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Check whether to override the 'off_t' type.
+dnl Set WINDOWS_64_BIT_OFF_T.
+
+AC_DEFUN([gl_TYPE_OFF_T],
+[
+  m4_ifdef([gl_LARGEFILE], [
+    AC_REQUIRE([gl_LARGEFILE])
+  ], [
+    WINDOWS_64_BIT_OFF_T=0
+  ])
+  AC_SUBST([WINDOWS_64_BIT_OFF_T])
+])
diff --git a/gl/m4/regex.m4 b/gl/m4/regex.m4
index 24198b5..41be5e8 100644
--- a/gl/m4/regex.m4
+++ b/gl/m4/regex.m4
@@ -1,6 +1,6 @@
-# serial 58
+# serial 61
 
-# Copyright (C) 1996-2001, 2003-2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -175,6 +175,9 @@ AC_DEFUN([gl_REGEX],
   esac
 
   if test $ac_use_included_regex = yes; then
+    AC_DEFINE([_REGEX_INCLUDE_LIMITS_H], [1],
+      [Define if you want <regex.h> to include <limits.h>, so that it
+       consistently overrides <limits.h>'s RE_DUP_MAX.])
     AC_DEFINE([_REGEX_LARGE_OFFSETS], [1],
       [Define if you want regoff_t to be at least as wide POSIX requires.])
     AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],
@@ -207,8 +210,6 @@ AC_DEFUN([gl_REGEX],
       [Define to rpl_regerror if the replacement should be used.])
     AC_DEFINE([regfree], [rpl_regfree],
       [Define to rpl_regfree if the replacement should be used.])
-    AC_LIBOBJ([regex])
-    gl_PREREQ_REGEX
   fi
 ])
 
@@ -221,5 +222,5 @@ AC_DEFUN([gl_PREREQ_REGEX],
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
   AC_CHECK_HEADERS([libintl.h])
   AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll])
-  AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
+  AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])
 ])
diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4
index d712752..209d64c 100644
--- a/gl/m4/ssize_t.m4
+++ b/gl/m4/ssize_t.m4
@@ -1,5 +1,5 @@
 # ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4
index df10486..eabfa64 100644
--- a/gl/m4/stdbool.m4
+++ b/gl/m4/stdbool.m4
@@ -1,17 +1,17 @@
 # Check for stdbool.h that conforms to C99.
 
-dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 5
 
 # Prepare for substituting <stdbool.h> if it is not supported.
 
 AC_DEFUN([AM_STDBOOL_H],
 [
-  AC_REQUIRE([AC_HEADER_STDBOOL])
+  AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
 
   # Define two additional variables used in the Makefile substitution.
 
@@ -21,6 +21,7 @@ AC_DEFUN([AM_STDBOOL_H],
     STDBOOL_H='stdbool.h'
   fi
   AC_SUBST([STDBOOL_H])
+  AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"])
 
   if test "$ac_cv_type__Bool" = yes; then
     HAVE__BOOL=1
@@ -33,11 +34,9 @@ AC_DEFUN([AM_STDBOOL_H],
 # AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
 AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
 
-# This version of the macro is needed in autoconf <= 2.67.  Autoconf has
-# it built in since 2.60, but we want the tweaks from the 2.68 version
-# to avoid rejecting xlc and clang due to relying on extensions.
+# This version of the macro is needed in autoconf <= 2.68.
 
-AC_DEFUN([AC_HEADER_STDBOOL],
+AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
   [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
      [ac_cv_header_stdbool_h],
      [AC_COMPILE_IFELSE(
@@ -98,6 +97,4 @@ AC_DEFUN([AC_HEADER_STDBOOL],
         [ac_cv_header_stdbool_h=yes],
         [ac_cv_header_stdbool_h=no])])
    AC_CHECK_TYPES([_Bool])
-   if test $ac_cv_header_stdbool_h = yes; then
-     AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.])
-   fi])
+])
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index 1942b6a..cc11609 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,6 +1,6 @@
 dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 3
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# stddef_h.m4 serial 4
+dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,6 +9,7 @@ AC_DEFUN([gl_STDDEF_H],
 [
   AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
+  STDDEF_H=
   if test $gt_cv_c_wchar_t = no; then
     HAVE_WCHAR_T=0
     STDDEF_H=stddef.h
@@ -24,6 +25,8 @@ AC_DEFUN([gl_STDDEF_H],
     REPLACE_NULL=1
     STDDEF_H=stddef.h
   fi
+  AC_SUBST([STDDEF_H])
+  AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
   if test -n "$STDDEF_H"; then
     gl_NEXT_HEADERS([stddef.h])
   fi
@@ -41,5 +44,4 @@ AC_DEFUN([gl_STDDEF_H_DEFAULTS],
   dnl Assume proper GNU behavior unless another module says otherwise.
   REPLACE_NULL=0;                AC_SUBST([REPLACE_NULL])
   HAVE_WCHAR_T=1;                AC_SUBST([HAVE_WCHAR_T])
-  STDDEF_H='';                   AC_SUBST([STDDEF_H])
 ])
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index 26654c6..28d342e 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 37
-dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
+# stdint.m4 serial 43
+dnl Copyright (C) 2001-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl From Paul Eggert and Bruno Haible.
 dnl Test whether <stdint.h> is supported or must be substituted.
 
-AC_DEFUN([gl_STDINT_H],
+AC_DEFUN_ONCE([gl_STDINT_H],
 [
   AC_PREREQ([2.59])dnl
 
@@ -27,6 +27,15 @@ AC_DEFUN([gl_STDINT_H],
   fi
   AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
 
+  dnl Check for <wchar.h>, in the same way as gl_WCHAR_H does.
+  AC_CHECK_HEADERS_ONCE([wchar.h])
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
+  AC_SUBST([HAVE_WCHAR_H])
+
   dnl Check for <inttypes.h>.
   dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
   if test $ac_cv_header_inttypes_h = yes; then
@@ -60,8 +69,6 @@ AC_DEFUN([gl_STDINT_H],
       [gl_cv_header_working_stdint_h=no
        AC_COMPILE_IFELSE([
          AC_LANG_PROGRAM([[
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
 #include <stdint.h>
 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
@@ -210,8 +217,6 @@ struct s {
           dnl This detects a bug on HP-UX 11.23/ia64.
           AC_RUN_IFELSE([
             AC_LANG_PROGRAM([[
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
 #include <stdint.h>
 ]
@@ -292,14 +297,11 @@ static const char *macro_values[] =
     fi
     AC_SUBST([HAVE_SYS_BITYPES_H])
 
-    dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
-    dnl character support).
-    AC_CHECK_HEADERS_ONCE([wchar.h])
-
     gl_STDINT_TYPE_PROPERTIES
     STDINT_H=stdint.h
   fi
   AC_SUBST([STDINT_H])
+  AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
 ])
 
 dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
@@ -460,6 +462,14 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
   fi
   gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t],
     [gl_STDINT_INCLUDES])
+
+  dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99
+  dnl requirement that wint_t is "unchanged by default argument promotions".
+  dnl In this case gnulib's <wchar.h> and <wctype.h> override wint_t.
+  dnl Set the variable BITSIZEOF_WINT_T accordingly.
+  if test $BITSIZEOF_WINT_T -lt 32; then
+    BITSIZEOF_WINT_T=32
+  fi
 ])
 
 dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index a71468f..ab43728 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 34
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 41
+dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,20 +8,6 @@ AC_DEFUN([gl_STDLIB_H],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   gl_NEXT_HEADERS([stdlib.h])
-  AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT])
-  if test $ac_cv_header_random_h = yes; then
-    HAVE_RANDOM_H=1
-  else
-    HAVE_RANDOM_H=0
-  fi
-  AC_SUBST([HAVE_RANDOM_H])
-  AC_CHECK_TYPES([struct random_data],
-    [], [HAVE_STRUCT_RANDOM_DATA=0],
-    [[#include <stdlib.h>
-      #if HAVE_RANDOM_H
-      # include <random.h>
-      #endif
-    ]])
 
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use, and which is not
@@ -33,10 +19,11 @@ AC_DEFUN([gl_STDLIB_H],
 #if HAVE_RANDOM_H
 # include <random.h>
 #endif
-    ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
-    mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
-    setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
-    unsetenv])
+    ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
+    initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
+    posix_openpt ptsname ptsname_r random random_r realpath rpmatch
+    setenv setstate setstate_r srandom srandom_r
+    strtod strtoll strtoull unlockpt unsetenv])
 ])
 
 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
@@ -58,13 +45,17 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_GETSUBOPT=0;     AC_SUBST([GNULIB_GETSUBOPT])
   GNULIB_GRANTPT=0;       AC_SUBST([GNULIB_GRANTPT])
   GNULIB_MALLOC_POSIX=0;  AC_SUBST([GNULIB_MALLOC_POSIX])
+  GNULIB_MBTOWC=0;        AC_SUBST([GNULIB_MBTOWC])
   GNULIB_MKDTEMP=0;       AC_SUBST([GNULIB_MKDTEMP])
   GNULIB_MKOSTEMP=0;      AC_SUBST([GNULIB_MKOSTEMP])
   GNULIB_MKOSTEMPS=0;     AC_SUBST([GNULIB_MKOSTEMPS])
   GNULIB_MKSTEMP=0;       AC_SUBST([GNULIB_MKSTEMP])
   GNULIB_MKSTEMPS=0;      AC_SUBST([GNULIB_MKSTEMPS])
+  GNULIB_POSIX_OPENPT=0;  AC_SUBST([GNULIB_POSIX_OPENPT])
   GNULIB_PTSNAME=0;       AC_SUBST([GNULIB_PTSNAME])
+  GNULIB_PTSNAME_R=0;     AC_SUBST([GNULIB_PTSNAME_R])
   GNULIB_PUTENV=0;        AC_SUBST([GNULIB_PUTENV])
+  GNULIB_RANDOM=0;        AC_SUBST([GNULIB_RANDOM])
   GNULIB_RANDOM_R=0;      AC_SUBST([GNULIB_RANDOM_R])
   GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
   GNULIB_REALPATH=0;      AC_SUBST([GNULIB_REALPATH])
@@ -76,6 +67,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_SYSTEM_POSIX=0;  AC_SUBST([GNULIB_SYSTEM_POSIX])
   GNULIB_UNLOCKPT=0;      AC_SUBST([GNULIB_UNLOCKPT])
   GNULIB_UNSETENV=0;      AC_SUBST([GNULIB_UNSETENV])
+  GNULIB_WCTOMB=0;        AC_SUBST([GNULIB_WCTOMB])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE__EXIT=1;              AC_SUBST([HAVE__EXIT])
   HAVE_ATOLL=1;              AC_SUBST([HAVE_ATOLL])
@@ -88,7 +80,11 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_MKOSTEMPS=1;          AC_SUBST([HAVE_MKOSTEMPS])
   HAVE_MKSTEMP=1;            AC_SUBST([HAVE_MKSTEMP])
   HAVE_MKSTEMPS=1;           AC_SUBST([HAVE_MKSTEMPS])
+  HAVE_POSIX_OPENPT=1;       AC_SUBST([HAVE_POSIX_OPENPT])
   HAVE_PTSNAME=1;            AC_SUBST([HAVE_PTSNAME])
+  HAVE_PTSNAME_R=1;          AC_SUBST([HAVE_PTSNAME_R])
+  HAVE_RANDOM=1;             AC_SUBST([HAVE_RANDOM])
+  HAVE_RANDOM_H=1;           AC_SUBST([HAVE_RANDOM_H])
   HAVE_RANDOM_R=1;           AC_SUBST([HAVE_RANDOM_R])
   HAVE_REALPATH=1;           AC_SUBST([HAVE_REALPATH])
   HAVE_RPMATCH=1;            AC_SUBST([HAVE_RPMATCH])
@@ -104,11 +100,15 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   REPLACE_CALLOC=0;          AC_SUBST([REPLACE_CALLOC])
   REPLACE_CANONICALIZE_FILE_NAME=0;  AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
   REPLACE_MALLOC=0;          AC_SUBST([REPLACE_MALLOC])
+  REPLACE_MBTOWC=0;          AC_SUBST([REPLACE_MBTOWC])
   REPLACE_MKSTEMP=0;         AC_SUBST([REPLACE_MKSTEMP])
+  REPLACE_PTSNAME_R=0;       AC_SUBST([REPLACE_PTSNAME_R])
   REPLACE_PUTENV=0;          AC_SUBST([REPLACE_PUTENV])
+  REPLACE_RANDOM_R=0;        AC_SUBST([REPLACE_RANDOM_R])
   REPLACE_REALLOC=0;         AC_SUBST([REPLACE_REALLOC])
   REPLACE_REALPATH=0;        AC_SUBST([REPLACE_REALPATH])
   REPLACE_SETENV=0;          AC_SUBST([REPLACE_SETENV])
   REPLACE_STRTOD=0;          AC_SUBST([REPLACE_STRTOD])
   REPLACE_UNSETENV=0;        AC_SUBST([REPLACE_UNSETENV])
+  REPLACE_WCTOMB=0;          AC_SUBST([REPLACE_WCTOMB])
 ])
diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4
new file mode 100644
index 0000000..717fa9c
--- /dev/null
+++ b/gl/m4/strcase.m4
@@ -0,0 +1,45 @@
+# strcase.m4 serial 11
+dnl Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STRCASE],
+[
+  gl_FUNC_STRCASECMP
+  gl_FUNC_STRNCASECMP
+])
+
+AC_DEFUN([gl_FUNC_STRCASECMP],
+[
+  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  AC_CHECK_FUNCS([strcasecmp])
+  if test $ac_cv_func_strcasecmp = no; then
+    HAVE_STRCASECMP=0
+  fi
+])
+
+AC_DEFUN([gl_FUNC_STRNCASECMP],
+[
+  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  AC_CHECK_FUNCS([strncasecmp])
+  if test $ac_cv_func_strncasecmp = yes; then
+    HAVE_STRNCASECMP=1
+  else
+    HAVE_STRNCASECMP=0
+  fi
+  AC_CHECK_DECLS([strncasecmp])
+  if test $ac_cv_have_decl_strncasecmp = no; then
+    HAVE_DECL_STRNCASECMP=0
+  fi
+])
+
+# Prerequisites of lib/strcasecmp.c.
+AC_DEFUN([gl_PREREQ_STRCASECMP], [
+  :
+])
+
+# Prerequisites of lib/strncasecmp.c.
+AC_DEFUN([gl_PREREQ_STRNCASECMP], [
+  :
+])
diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4
new file mode 100644
index 0000000..a057e1c
--- /dev/null
+++ b/gl/m4/strings_h.m4
@@ -0,0 +1,52 @@
+# Configure a replacement for <strings.h>.
+# serial 6
+
+# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_STRINGS_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_STRINGS_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
+[
+  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+
+  gl_CHECK_NEXT_HEADERS([strings.h])
+  if test $ac_cv_header_strings_h = yes; then
+    HAVE_STRINGS_H=1
+  else
+    HAVE_STRINGS_H=0
+  fi
+  AC_SUBST([HAVE_STRINGS_H])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+    /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
+       <strings.h>.  */
+    #include <sys/types.h>
+    #include <strings.h>
+    ]], [ffs strcasecmp strncasecmp])
+])
+
+AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
+[
+  GNULIB_FFS=0;            AC_SUBST([GNULIB_FFS])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_FFS=1;              AC_SUBST([HAVE_FFS])
+  HAVE_STRCASECMP=1;       AC_SUBST([HAVE_STRCASECMP])
+  HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
+])
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
new file mode 100644
index 0000000..f11eef2
--- /dev/null
+++ b/gl/m4/sys_types_h.m4
@@ -0,0 +1,24 @@
+# sys_types_h.m4 serial 4
+dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SYS_TYPES_H],
+[
+  AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
+  gl_NEXT_HEADERS([sys/types.h])
+
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
+  dnl Ensure the type mode_t gets defined.
+  AC_REQUIRE([AC_TYPE_MODE_T])
+
+  dnl Whether to override the 'off_t' type.
+  AC_REQUIRE([gl_TYPE_OFF_T])
+])
+
+AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
+[
+])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index c81a113..7e7651b 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 53
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# unistd_h.m4 serial 65
+dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -21,9 +21,18 @@ AC_DEFUN([gl_UNISTD_H],
   fi
   AC_SUBST([HAVE_UNISTD_H])
 
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
+  dnl Determine WINDOWS_64_BIT_OFF_T.
+  AC_REQUIRE([gl_TYPE_OFF_T])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
-  gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
+  gl_WARN_ON_USE_PREPARE([[
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 /* Some systems declare various items in the wrong headers.  */
 #if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <fcntl.h>
@@ -33,12 +42,13 @@ AC_DEFUN([gl_UNISTD_H],
 #  include <io.h>
 # endif
 #endif
-    ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
-    fsync ftruncate getcwd getdomainname getdtablesize getgroups
-    gethostname getlogin getlogin_r getpagesize getusershell setusershell
-    endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink
-    readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat
-    usleep])
+    ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
+    fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
+    gethostname getlogin getlogin_r getpagesize
+    getusershell setusershell endusershell
+    group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
+    readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r
+    unlink unlinkat usleep])
 ])
 
 AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -52,47 +62,54 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
 
 AC_DEFUN([gl_UNISTD_H_DEFAULTS],
 [
-  GNULIB_CHOWN=0;            AC_SUBST([GNULIB_CHOWN])
-  GNULIB_CLOSE=0;            AC_SUBST([GNULIB_CLOSE])
-  GNULIB_DUP2=0;             AC_SUBST([GNULIB_DUP2])
-  GNULIB_DUP3=0;             AC_SUBST([GNULIB_DUP3])
-  GNULIB_ENVIRON=0;          AC_SUBST([GNULIB_ENVIRON])
-  GNULIB_EUIDACCESS=0;       AC_SUBST([GNULIB_EUIDACCESS])
-  GNULIB_FACCESSAT=0;        AC_SUBST([GNULIB_FACCESSAT])
-  GNULIB_FCHDIR=0;           AC_SUBST([GNULIB_FCHDIR])
-  GNULIB_FCHOWNAT=0;         AC_SUBST([GNULIB_FCHOWNAT])
-  GNULIB_FSYNC=0;            AC_SUBST([GNULIB_FSYNC])
-  GNULIB_FTRUNCATE=0;        AC_SUBST([GNULIB_FTRUNCATE])
-  GNULIB_GETCWD=0;           AC_SUBST([GNULIB_GETCWD])
-  GNULIB_GETDOMAINNAME=0;    AC_SUBST([GNULIB_GETDOMAINNAME])
-  GNULIB_GETDTABLESIZE=0;    AC_SUBST([GNULIB_GETDTABLESIZE])
-  GNULIB_GETGROUPS=0;        AC_SUBST([GNULIB_GETGROUPS])
-  GNULIB_GETHOSTNAME=0;      AC_SUBST([GNULIB_GETHOSTNAME])
-  GNULIB_GETLOGIN=0;         AC_SUBST([GNULIB_GETLOGIN])
-  GNULIB_GETLOGIN_R=0;       AC_SUBST([GNULIB_GETLOGIN_R])
-  GNULIB_GETPAGESIZE=0;      AC_SUBST([GNULIB_GETPAGESIZE])
-  GNULIB_GETUSERSHELL=0;     AC_SUBST([GNULIB_GETUSERSHELL])
-  GNULIB_LCHOWN=0;           AC_SUBST([GNULIB_LCHOWN])
-  GNULIB_LINK=0;             AC_SUBST([GNULIB_LINK])
-  GNULIB_LINKAT=0;           AC_SUBST([GNULIB_LINKAT])
-  GNULIB_LSEEK=0;            AC_SUBST([GNULIB_LSEEK])
-  GNULIB_PIPE=0;             AC_SUBST([GNULIB_PIPE])
-  GNULIB_PIPE2=0;            AC_SUBST([GNULIB_PIPE2])
-  GNULIB_PREAD=0;            AC_SUBST([GNULIB_PREAD])
-  GNULIB_PWRITE=0;           AC_SUBST([GNULIB_PWRITE])
-  GNULIB_READLINK=0;         AC_SUBST([GNULIB_READLINK])
-  GNULIB_READLINKAT=0;       AC_SUBST([GNULIB_READLINKAT])
-  GNULIB_RMDIR=0;            AC_SUBST([GNULIB_RMDIR])
-  GNULIB_SLEEP=0;            AC_SUBST([GNULIB_SLEEP])
-  GNULIB_SYMLINK=0;          AC_SUBST([GNULIB_SYMLINK])
-  GNULIB_SYMLINKAT=0;        AC_SUBST([GNULIB_SYMLINKAT])
-  GNULIB_TTYNAME_R=0;        AC_SUBST([GNULIB_TTYNAME_R])
-  GNULIB_UNISTD_H_GETOPT=0;  AC_SUBST([GNULIB_UNISTD_H_GETOPT])
-  GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
-  GNULIB_UNLINK=0;           AC_SUBST([GNULIB_UNLINK])
-  GNULIB_UNLINKAT=0;         AC_SUBST([GNULIB_UNLINKAT])
-  GNULIB_USLEEP=0;           AC_SUBST([GNULIB_USLEEP])
-  GNULIB_WRITE=0;            AC_SUBST([GNULIB_WRITE])
+  GNULIB_CHDIR=0;                AC_SUBST([GNULIB_CHDIR])
+  GNULIB_CHOWN=0;                AC_SUBST([GNULIB_CHOWN])
+  GNULIB_CLOSE=0;                AC_SUBST([GNULIB_CLOSE])
+  GNULIB_DUP=0;                  AC_SUBST([GNULIB_DUP])
+  GNULIB_DUP2=0;                 AC_SUBST([GNULIB_DUP2])
+  GNULIB_DUP3=0;                 AC_SUBST([GNULIB_DUP3])
+  GNULIB_ENVIRON=0;              AC_SUBST([GNULIB_ENVIRON])
+  GNULIB_EUIDACCESS=0;           AC_SUBST([GNULIB_EUIDACCESS])
+  GNULIB_FACCESSAT=0;            AC_SUBST([GNULIB_FACCESSAT])
+  GNULIB_FCHDIR=0;               AC_SUBST([GNULIB_FCHDIR])
+  GNULIB_FCHOWNAT=0;             AC_SUBST([GNULIB_FCHOWNAT])
+  GNULIB_FDATASYNC=0;            AC_SUBST([GNULIB_FDATASYNC])
+  GNULIB_FSYNC=0;                AC_SUBST([GNULIB_FSYNC])
+  GNULIB_FTRUNCATE=0;            AC_SUBST([GNULIB_FTRUNCATE])
+  GNULIB_GETCWD=0;               AC_SUBST([GNULIB_GETCWD])
+  GNULIB_GETDOMAINNAME=0;        AC_SUBST([GNULIB_GETDOMAINNAME])
+  GNULIB_GETDTABLESIZE=0;        AC_SUBST([GNULIB_GETDTABLESIZE])
+  GNULIB_GETGROUPS=0;            AC_SUBST([GNULIB_GETGROUPS])
+  GNULIB_GETHOSTNAME=0;          AC_SUBST([GNULIB_GETHOSTNAME])
+  GNULIB_GETLOGIN=0;             AC_SUBST([GNULIB_GETLOGIN])
+  GNULIB_GETLOGIN_R=0;           AC_SUBST([GNULIB_GETLOGIN_R])
+  GNULIB_GETPAGESIZE=0;          AC_SUBST([GNULIB_GETPAGESIZE])
+  GNULIB_GETUSERSHELL=0;         AC_SUBST([GNULIB_GETUSERSHELL])
+  GNULIB_GROUP_MEMBER=0;         AC_SUBST([GNULIB_GROUP_MEMBER])
+  GNULIB_ISATTY=0;               AC_SUBST([GNULIB_ISATTY])
+  GNULIB_LCHOWN=0;               AC_SUBST([GNULIB_LCHOWN])
+  GNULIB_LINK=0;                 AC_SUBST([GNULIB_LINK])
+  GNULIB_LINKAT=0;               AC_SUBST([GNULIB_LINKAT])
+  GNULIB_LSEEK=0;                AC_SUBST([GNULIB_LSEEK])
+  GNULIB_PIPE=0;                 AC_SUBST([GNULIB_PIPE])
+  GNULIB_PIPE2=0;                AC_SUBST([GNULIB_PIPE2])
+  GNULIB_PREAD=0;                AC_SUBST([GNULIB_PREAD])
+  GNULIB_PWRITE=0;               AC_SUBST([GNULIB_PWRITE])
+  GNULIB_READ=0;                 AC_SUBST([GNULIB_READ])
+  GNULIB_READLINK=0;             AC_SUBST([GNULIB_READLINK])
+  GNULIB_READLINKAT=0;           AC_SUBST([GNULIB_READLINKAT])
+  GNULIB_RMDIR=0;                AC_SUBST([GNULIB_RMDIR])
+  GNULIB_SETHOSTNAME=0;          AC_SUBST([GNULIB_SETHOSTNAME])
+  GNULIB_SLEEP=0;                AC_SUBST([GNULIB_SLEEP])
+  GNULIB_SYMLINK=0;              AC_SUBST([GNULIB_SYMLINK])
+  GNULIB_SYMLINKAT=0;            AC_SUBST([GNULIB_SYMLINKAT])
+  GNULIB_TTYNAME_R=0;            AC_SUBST([GNULIB_TTYNAME_R])
+  GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
+  GNULIB_UNISTD_H_SIGPIPE=0;     AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+  GNULIB_UNLINK=0;               AC_SUBST([GNULIB_UNLINK])
+  GNULIB_UNLINKAT=0;             AC_SUBST([GNULIB_UNLINKAT])
+  GNULIB_USLEEP=0;               AC_SUBST([GNULIB_USLEEP])
+  GNULIB_WRITE=0;                AC_SUBST([GNULIB_WRITE])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_CHOWN=1;           AC_SUBST([HAVE_CHOWN])
   HAVE_DUP2=1;            AC_SUBST([HAVE_DUP2])
@@ -101,6 +118,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_FACCESSAT=1;       AC_SUBST([HAVE_FACCESSAT])
   HAVE_FCHDIR=1;          AC_SUBST([HAVE_FCHDIR])
   HAVE_FCHOWNAT=1;        AC_SUBST([HAVE_FCHOWNAT])
+  HAVE_FDATASYNC=1;       AC_SUBST([HAVE_FDATASYNC])
   HAVE_FSYNC=1;           AC_SUBST([HAVE_FSYNC])
   HAVE_FTRUNCATE=1;       AC_SUBST([HAVE_FTRUNCATE])
   HAVE_GETDTABLESIZE=1;   AC_SUBST([HAVE_GETDTABLESIZE])
@@ -108,6 +126,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
   HAVE_GETLOGIN=1;        AC_SUBST([HAVE_GETLOGIN])
   HAVE_GETPAGESIZE=1;     AC_SUBST([HAVE_GETPAGESIZE])
+  HAVE_GROUP_MEMBER=1;    AC_SUBST([HAVE_GROUP_MEMBER])
   HAVE_LCHOWN=1;          AC_SUBST([HAVE_LCHOWN])
   HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
   HAVE_LINKAT=1;          AC_SUBST([HAVE_LINKAT])
@@ -117,6 +136,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_PWRITE=1;          AC_SUBST([HAVE_PWRITE])
   HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
   HAVE_READLINKAT=1;      AC_SUBST([HAVE_READLINKAT])
+  HAVE_SETHOSTNAME=1;     AC_SUBST([HAVE_SETHOSTNAME])
   HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
   HAVE_SYMLINK=1;         AC_SUBST([HAVE_SYMLINK])
   HAVE_SYMLINKAT=1;       AC_SUBST([HAVE_SYMLINKAT])
@@ -124,10 +144,12 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_USLEEP=1;          AC_SUBST([HAVE_USLEEP])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
   HAVE_DECL_FCHDIR=1;     AC_SUBST([HAVE_DECL_FCHDIR])
+  HAVE_DECL_FDATASYNC=1;  AC_SUBST([HAVE_DECL_FDATASYNC])
   HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
   HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
   HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
   HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
+  HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
   HAVE_DECL_TTYNAME_R=1;  AC_SUBST([HAVE_DECL_TTYNAME_R])
   HAVE_OS_H=0;            AC_SUBST([HAVE_OS_H])
   HAVE_SYS_PARAM_H=0;     AC_SUBST([HAVE_SYS_PARAM_H])
@@ -136,17 +158,20 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_DUP=0;          AC_SUBST([REPLACE_DUP])
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
   REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
+  REPLACE_FTRUNCATE=0;    AC_SUBST([REPLACE_FTRUNCATE])
   REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
   REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
   REPLACE_GETLOGIN_R=0;   AC_SUBST([REPLACE_GETLOGIN_R])
   REPLACE_GETGROUPS=0;    AC_SUBST([REPLACE_GETGROUPS])
   REPLACE_GETPAGESIZE=0;  AC_SUBST([REPLACE_GETPAGESIZE])
+  REPLACE_ISATTY=0;       AC_SUBST([REPLACE_ISATTY])
   REPLACE_LCHOWN=0;       AC_SUBST([REPLACE_LCHOWN])
   REPLACE_LINK=0;         AC_SUBST([REPLACE_LINK])
   REPLACE_LINKAT=0;       AC_SUBST([REPLACE_LINKAT])
   REPLACE_LSEEK=0;        AC_SUBST([REPLACE_LSEEK])
   REPLACE_PREAD=0;        AC_SUBST([REPLACE_PREAD])
   REPLACE_PWRITE=0;       AC_SUBST([REPLACE_PWRITE])
+  REPLACE_READ=0;         AC_SUBST([REPLACE_READ])
   REPLACE_READLINK=0;     AC_SUBST([REPLACE_READLINK])
   REPLACE_RMDIR=0;        AC_SUBST([REPLACE_RMDIR])
   REPLACE_SLEEP=0;        AC_SUBST([REPLACE_SLEEP])
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index e0d0f27..a77802e 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
-# warn-on-use.m4 serial 2
-dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+# warn-on-use.m4 serial 5
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -18,8 +18,8 @@ dnl with or without modifications, as long as this notice is preserved.
 # some systems declare functions in the wrong header, then INCLUDES
 # should do likewise.
 #
-# If you assume C89, then it is generally safe to assume declarations
-# for functions declared in that standard (such as gets) without
+# It is generally safe to assume declarations for functions declared
+# in the intersection of C89 and C11 (such as printf) without
 # needing gl_WARN_ON_USE_PREPARE.
 AC_DEFUN([gl_WARN_ON_USE_PREPARE],
 [
@@ -27,6 +27,8 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
     [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
       [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
        undefining macros.])])dnl
+dnl FIXME: gl_Symbol must be used unquoted until we can assume
+dnl autoconf 2.64 or newer.
   for gl_func in m4_flatten([$2]); do
     AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
     AC_CACHE_CHECK([whether $gl_func is declared without a macro],
@@ -35,8 +37,8 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
 [@%:@undef $gl_func
   (void) $gl_func;])],
         [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
-     AS_VAR_IF(gl_Symbol, [yes],
-       [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
+    AS_VAR_IF(gl_Symbol, [yes],
+      [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
        dnl shortcut - if the raw declaration exists, then set a cache
        dnl variable to allow skipping any later AC_CHECK_DECL efforts
        eval ac_cv_have_decl_$gl_func=yes])
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index e8adf89..c7a8b2d 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -1,13 +1,13 @@
 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
 
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Eric Blake.
 
-# wchar_h.m4 serial 37
+# wchar_h.m4 serial 39
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -48,8 +48,13 @@ AC_DEFUN([gl_WCHAR_H],
 # include <time.h>
 #endif
 #include <wchar.h>
-    ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
-    wcsrtombs wcsnrtombs wcwidth])
+    ]],
+    [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
+     wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset
+     wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp
+     wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr
+     wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth
+    ])
 ])
 
 dnl Check whether <wchar.h> is usable at all.
@@ -114,13 +119,6 @@ Configuration aborted.])
   fi
 ])
 
-dnl Unconditionally enables the replacement of <wchar.h>.
-AC_DEFUN([gl_REPLACE_WCHAR_H],
-[
-  dnl This is a no-op, because <wchar.h> is always overridden.
-  :
-])
-
 AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
@@ -132,17 +130,45 @@ AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
 
 AC_DEFUN([gl_WCHAR_H_DEFAULTS],
 [
-  GNULIB_BTOWC=0;      AC_SUBST([GNULIB_BTOWC])
-  GNULIB_WCTOB=0;      AC_SUBST([GNULIB_WCTOB])
-  GNULIB_MBSINIT=0;    AC_SUBST([GNULIB_MBSINIT])
-  GNULIB_MBRTOWC=0;    AC_SUBST([GNULIB_MBRTOWC])
-  GNULIB_MBRLEN=0;     AC_SUBST([GNULIB_MBRLEN])
-  GNULIB_MBSRTOWCS=0;  AC_SUBST([GNULIB_MBSRTOWCS])
-  GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
-  GNULIB_WCRTOMB=0;    AC_SUBST([GNULIB_WCRTOMB])
-  GNULIB_WCSRTOMBS=0;  AC_SUBST([GNULIB_WCSRTOMBS])
-  GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
-  GNULIB_WCWIDTH=0;    AC_SUBST([GNULIB_WCWIDTH])
+  GNULIB_BTOWC=0;       AC_SUBST([GNULIB_BTOWC])
+  GNULIB_WCTOB=0;       AC_SUBST([GNULIB_WCTOB])
+  GNULIB_MBSINIT=0;     AC_SUBST([GNULIB_MBSINIT])
+  GNULIB_MBRTOWC=0;     AC_SUBST([GNULIB_MBRTOWC])
+  GNULIB_MBRLEN=0;      AC_SUBST([GNULIB_MBRLEN])
+  GNULIB_MBSRTOWCS=0;   AC_SUBST([GNULIB_MBSRTOWCS])
+  GNULIB_MBSNRTOWCS=0;  AC_SUBST([GNULIB_MBSNRTOWCS])
+  GNULIB_WCRTOMB=0;     AC_SUBST([GNULIB_WCRTOMB])
+  GNULIB_WCSRTOMBS=0;   AC_SUBST([GNULIB_WCSRTOMBS])
+  GNULIB_WCSNRTOMBS=0;  AC_SUBST([GNULIB_WCSNRTOMBS])
+  GNULIB_WCWIDTH=0;     AC_SUBST([GNULIB_WCWIDTH])
+  GNULIB_WMEMCHR=0;     AC_SUBST([GNULIB_WMEMCHR])
+  GNULIB_WMEMCMP=0;     AC_SUBST([GNULIB_WMEMCMP])
+  GNULIB_WMEMCPY=0;     AC_SUBST([GNULIB_WMEMCPY])
+  GNULIB_WMEMMOVE=0;    AC_SUBST([GNULIB_WMEMMOVE])
+  GNULIB_WMEMSET=0;     AC_SUBST([GNULIB_WMEMSET])
+  GNULIB_WCSLEN=0;      AC_SUBST([GNULIB_WCSLEN])
+  GNULIB_WCSNLEN=0;     AC_SUBST([GNULIB_WCSNLEN])
+  GNULIB_WCSCPY=0;      AC_SUBST([GNULIB_WCSCPY])
+  GNULIB_WCPCPY=0;      AC_SUBST([GNULIB_WCPCPY])
+  GNULIB_WCSNCPY=0;     AC_SUBST([GNULIB_WCSNCPY])
+  GNULIB_WCPNCPY=0;     AC_SUBST([GNULIB_WCPNCPY])
+  GNULIB_WCSCAT=0;      AC_SUBST([GNULIB_WCSCAT])
+  GNULIB_WCSNCAT=0;     AC_SUBST([GNULIB_WCSNCAT])
+  GNULIB_WCSCMP=0;      AC_SUBST([GNULIB_WCSCMP])
+  GNULIB_WCSNCMP=0;     AC_SUBST([GNULIB_WCSNCMP])
+  GNULIB_WCSCASECMP=0;  AC_SUBST([GNULIB_WCSCASECMP])
+  GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP])
+  GNULIB_WCSCOLL=0;     AC_SUBST([GNULIB_WCSCOLL])
+  GNULIB_WCSXFRM=0;     AC_SUBST([GNULIB_WCSXFRM])
+  GNULIB_WCSDUP=0;      AC_SUBST([GNULIB_WCSDUP])
+  GNULIB_WCSCHR=0;      AC_SUBST([GNULIB_WCSCHR])
+  GNULIB_WCSRCHR=0;     AC_SUBST([GNULIB_WCSRCHR])
+  GNULIB_WCSCSPN=0;     AC_SUBST([GNULIB_WCSCSPN])
+  GNULIB_WCSSPN=0;      AC_SUBST([GNULIB_WCSSPN])
+  GNULIB_WCSPBRK=0;     AC_SUBST([GNULIB_WCSPBRK])
+  GNULIB_WCSSTR=0;      AC_SUBST([GNULIB_WCSSTR])
+  GNULIB_WCSTOK=0;      AC_SUBST([GNULIB_WCSTOK])
+  GNULIB_WCSWIDTH=0;    AC_SUBST([GNULIB_WCSWIDTH])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_BTOWC=1;         AC_SUBST([HAVE_BTOWC])
   HAVE_MBSINIT=1;       AC_SUBST([HAVE_MBSINIT])
@@ -153,6 +179,34 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
   HAVE_WCRTOMB=1;       AC_SUBST([HAVE_WCRTOMB])
   HAVE_WCSRTOMBS=1;     AC_SUBST([HAVE_WCSRTOMBS])
   HAVE_WCSNRTOMBS=1;    AC_SUBST([HAVE_WCSNRTOMBS])
+  HAVE_WMEMCHR=1;       AC_SUBST([HAVE_WMEMCHR])
+  HAVE_WMEMCMP=1;       AC_SUBST([HAVE_WMEMCMP])
+  HAVE_WMEMCPY=1;       AC_SUBST([HAVE_WMEMCPY])
+  HAVE_WMEMMOVE=1;      AC_SUBST([HAVE_WMEMMOVE])
+  HAVE_WMEMSET=1;       AC_SUBST([HAVE_WMEMSET])
+  HAVE_WCSLEN=1;        AC_SUBST([HAVE_WCSLEN])
+  HAVE_WCSNLEN=1;       AC_SUBST([HAVE_WCSNLEN])
+  HAVE_WCSCPY=1;        AC_SUBST([HAVE_WCSCPY])
+  HAVE_WCPCPY=1;        AC_SUBST([HAVE_WCPCPY])
+  HAVE_WCSNCPY=1;       AC_SUBST([HAVE_WCSNCPY])
+  HAVE_WCPNCPY=1;       AC_SUBST([HAVE_WCPNCPY])
+  HAVE_WCSCAT=1;        AC_SUBST([HAVE_WCSCAT])
+  HAVE_WCSNCAT=1;       AC_SUBST([HAVE_WCSNCAT])
+  HAVE_WCSCMP=1;        AC_SUBST([HAVE_WCSCMP])
+  HAVE_WCSNCMP=1;       AC_SUBST([HAVE_WCSNCMP])
+  HAVE_WCSCASECMP=1;    AC_SUBST([HAVE_WCSCASECMP])
+  HAVE_WCSNCASECMP=1;   AC_SUBST([HAVE_WCSNCASECMP])
+  HAVE_WCSCOLL=1;       AC_SUBST([HAVE_WCSCOLL])
+  HAVE_WCSXFRM=1;       AC_SUBST([HAVE_WCSXFRM])
+  HAVE_WCSDUP=1;        AC_SUBST([HAVE_WCSDUP])
+  HAVE_WCSCHR=1;        AC_SUBST([HAVE_WCSCHR])
+  HAVE_WCSRCHR=1;       AC_SUBST([HAVE_WCSRCHR])
+  HAVE_WCSCSPN=1;       AC_SUBST([HAVE_WCSCSPN])
+  HAVE_WCSSPN=1;        AC_SUBST([HAVE_WCSSPN])
+  HAVE_WCSPBRK=1;       AC_SUBST([HAVE_WCSPBRK])
+  HAVE_WCSSTR=1;        AC_SUBST([HAVE_WCSSTR])
+  HAVE_WCSTOK=1;        AC_SUBST([HAVE_WCSTOK])
+  HAVE_WCSWIDTH=1;      AC_SUBST([HAVE_WCSWIDTH])
   HAVE_DECL_WCTOB=1;    AC_SUBST([HAVE_DECL_WCTOB])
   HAVE_DECL_WCWIDTH=1;  AC_SUBST([HAVE_DECL_WCWIDTH])
   REPLACE_MBSTATE_T=0;  AC_SUBST([REPLACE_MBSTATE_T])
@@ -167,4 +221,5 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
   REPLACE_WCSRTOMBS=0;  AC_SUBST([REPLACE_WCSRTOMBS])
   REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
   REPLACE_WCWIDTH=0;    AC_SUBST([REPLACE_WCWIDTH])
+  REPLACE_WCSWIDTH=0;   AC_SUBST([REPLACE_WCSWIDTH])
 ])
diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4
index d2c03c4..534735d 100644
--- a/gl/m4/wchar_t.m4
+++ b/gl/m4/wchar_t.m4
@@ -1,5 +1,5 @@
 # wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4
index 2905d9b..00d7302 100644
--- a/gl/m4/wcrtomb.m4
+++ b/gl/m4/wcrtomb.m4
@@ -1,5 +1,5 @@
-# wcrtomb.m4 serial 8
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# wcrtomb.m4 serial 11
+dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -14,6 +14,22 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
   AC_CHECK_FUNCS_ONCE([wcrtomb])
   if test $ac_cv_func_wcrtomb = no; then
     HAVE_WCRTOMB=0
+    AC_CHECK_DECLS([wcrtomb],,, [[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+]])
+    if test $ac_cv_have_decl_wcrtomb = yes; then
+      dnl On Minix 3.1.8, the system's <wchar.h> declares wcrtomb() although
+      dnl it does not have the function. Avoid a collision with gnulib's
+      dnl replacement.
+      REPLACE_WCRTOMB=1
+    fi
   else
     if test $REPLACE_MBSTATE_T = 1; then
       REPLACE_WCRTOMB=1
@@ -88,11 +104,6 @@ int main ()
       esac
     fi
   fi
-  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
-    gl_REPLACE_WCHAR_H
-    AC_LIBOBJ([wcrtomb])
-    gl_PREREQ_WCRTOMB
-  fi
 ])
 
 # Prerequisites of lib/wcrtomb.c.
diff --git a/gl/m4/wctype_h.m4 b/gl/m4/wctype_h.m4
index d2b37ce..4b19f64 100644
--- a/gl/m4/wctype_h.m4
+++ b/gl/m4/wctype_h.m4
@@ -1,8 +1,8 @@
-# wctype_h.m4 serial 12
+# wctype_h.m4 serial 17
 
 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
 
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,7 @@ dnl Written by Paul Eggert.
 
 AC_DEFUN([gl_WCTYPE_H],
 [
+  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_CHECK_FUNCS_ONCE([iswcntrl])
@@ -20,21 +21,6 @@ AC_DEFUN([gl_WCTYPE_H],
     HAVE_ISWCNTRL=0
   fi
   AC_SUBST([HAVE_ISWCNTRL])
-  AC_CHECK_FUNCS_ONCE([iswblank])
-  AC_CHECK_DECLS_ONCE([iswblank])
-  if test $ac_cv_func_iswblank = yes; then
-    HAVE_ISWBLANK=1
-    REPLACE_ISWBLANK=0
-  else
-    HAVE_ISWBLANK=0
-    if test $ac_cv_have_decl_iswblank = yes; then
-      REPLACE_ISWBLANK=1
-    else
-      REPLACE_ISWBLANK=0
-    fi
-  fi
-  AC_SUBST([HAVE_ISWBLANK])
-  AC_SUBST([REPLACE_ISWBLANK])
 
   AC_REQUIRE([AC_C_INLINE])
 
@@ -71,7 +57,8 @@ AC_DEFUN([gl_WCTYPE_H],
                           #if __GNU_LIBRARY__ == 1
                           Linux libc5 i18n is broken.
                           #endif]], [])],
-              [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
+              [gl_cv_func_iswcntrl_works="guessing yes"],
+              [gl_cv_func_iswcntrl_works="guessing no"])
             ])
         ])
     fi
@@ -81,20 +68,144 @@ AC_DEFUN([gl_WCTYPE_H],
   fi
   AC_SUBST([HAVE_WCTYPE_H])
 
-  if test "$gl_cv_func_iswcntrl_works" = no; then
-    REPLACE_ISWCNTRL=1
-  else
-    REPLACE_ISWCNTRL=0
-  fi
+  case "$gl_cv_func_iswcntrl_works" in
+    *yes) REPLACE_ISWCNTRL=0 ;;
+    *)    REPLACE_ISWCNTRL=1 ;;
+  esac
   AC_SUBST([REPLACE_ISWCNTRL])
 
   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
-    dnl Redefine all of iswcntrl, ..., towupper in <wctype.h>.
+    dnl Redefine all of iswcntrl, ..., iswxdigit in <wctype.h>.
     :
+  fi
+
+  if test $REPLACE_ISWCNTRL = 1; then
+    REPLACE_TOWLOWER=1
   else
-    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
-      dnl Redefine only iswblank.
-      AC_LIBOBJ([iswblank])
+    AC_CHECK_FUNCS([towlower])
+    if test $ac_cv_func_towlower = yes; then
+      REPLACE_TOWLOWER=0
+    else
+      AC_CHECK_DECLS([towlower],,,
+        [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+             included before <wchar.h>.
+             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+             must be included before <wchar.h>.  */
+          #include <stddef.h>
+          #include <stdio.h>
+          #include <time.h>
+          #include <wchar.h>
+          #if HAVE_WCTYPE_H
+          # include <wctype.h>
+          #endif
+        ]])
+      if test $ac_cv_have_decl_towlower = yes; then
+        dnl On Minix 3.1.8, the system's <wctype.h> declares towlower() and
+        dnl towupper() although it does not have the functions. Avoid a
+        dnl collision with gnulib's replacement.
+        REPLACE_TOWLOWER=1
+      else
+        REPLACE_TOWLOWER=0
+      fi
     fi
   fi
+  AC_SUBST([REPLACE_TOWLOWER])
+
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
+    dnl Redefine towlower, towupper in <wctype.h>.
+    :
+  fi
+
+  dnl We assume that the wctype() and iswctype() functions exist if and only
+  dnl if the type wctype_t is defined in <wchar.h> or in <wctype.h> if that
+  dnl exists.
+  dnl HP-UX 11.00 declares all these in <wchar.h> and lacks <wctype.h>.
+  AC_CACHE_CHECK([for wctype_t], [gl_cv_type_wctype_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #if HAVE_WCTYPE_H
+            # include <wctype.h>
+            #endif
+            wctype_t a;
+          ]],
+          [[]])],
+       [gl_cv_type_wctype_t=yes],
+       [gl_cv_type_wctype_t=no])
+    ])
+  if test $gl_cv_type_wctype_t = no; then
+    HAVE_WCTYPE_T=0
+  fi
+
+  dnl We assume that the wctrans() and towctrans() functions exist if and only
+  dnl if the type wctrans_t is defined in <wctype.h>.
+  AC_CACHE_CHECK([for wctrans_t], [gl_cv_type_wctrans_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+               included before <wchar.h>.
+               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+               must be included before <wchar.h>.  */
+            #include <stddef.h>
+            #include <stdio.h>
+            #include <time.h>
+            #include <wchar.h>
+            #include <wctype.h>
+            wctrans_t a;
+          ]],
+          [[]])],
+       [gl_cv_type_wctrans_t=yes],
+       [gl_cv_type_wctrans_t=no])
+    ])
+  if test $gl_cv_type_wctrans_t = no; then
+    HAVE_WCTRANS_T=0
+  fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# include <wchar.h>
+#endif
+#include <wctype.h>
+    ]],
+    [wctype iswctype wctrans towctrans
+    ])
+])
+
+AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_WCTYPE_H_DEFAULTS],
+[
+  GNULIB_ISWBLANK=0;    AC_SUBST([GNULIB_ISWBLANK])
+  GNULIB_WCTYPE=0;      AC_SUBST([GNULIB_WCTYPE])
+  GNULIB_ISWCTYPE=0;    AC_SUBST([GNULIB_ISWCTYPE])
+  GNULIB_WCTRANS=0;     AC_SUBST([GNULIB_WCTRANS])
+  GNULIB_TOWCTRANS=0;   AC_SUBST([GNULIB_TOWCTRANS])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_ISWBLANK=1;      AC_SUBST([HAVE_ISWBLANK])
+  HAVE_WCTYPE_T=1;      AC_SUBST([HAVE_WCTYPE_T])
+  HAVE_WCTRANS_T=1;     AC_SUBST([HAVE_WCTRANS_T])
+  REPLACE_ISWBLANK=0;   AC_SUBST([REPLACE_ISWBLANK])
 ])
diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
index da1ce3d..3260cce 100644
--- a/gl/m4/wint_t.m4
+++ b/gl/m4/wint_t.m4
@@ -1,5 +1,5 @@
 # wint_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/malloc.c b/gl/malloc.c
index 6a417c3..109c65c 100644
--- a/gl/malloc.c
+++ b/gl/malloc.c
@@ -1,6 +1,6 @@
 /* malloc() function that is glibc compatible.
 
-   Copyright (C) 1997-1998, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -13,11 +13,11 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering and Bruno Haible */
 
+#define _GL_USE_STDLIB_ALLOC 1
 #include <config.h>
 /* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h.  */
 #ifdef malloc
@@ -28,14 +28,10 @@
 # define NEED_MALLOC_GNU 1
 #endif
 
-/* Specification.  */
 #include <stdlib.h>
 
 #include <errno.h>
 
-/* Call the system's malloc below.  */
-#undef malloc
-
 /* Allocate an N-byte block of memory from the heap.
    If N is zero, allocate a 1-byte block.  */
 
diff --git a/gl/mbrtowc.c b/gl/mbrtowc.c
index 16bc228..5f2ec07 100644
--- a/gl/mbrtowc.c
+++ b/gl/mbrtowc.c
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno at clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -40,9 +40,6 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
 {
   char *pstate = (char *)ps;
 
-  if (pstate == NULL)
-    pstate = internal_state;
-
   if (s == NULL)
     {
       pwc = NULL;
@@ -54,6 +51,10 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
     return (size_t)(-2);
 
   /* Here n > 0.  */
+
+  if (pstate == NULL)
+    pstate = internal_state;
+
   {
     size_t nstate = pstate[0];
     char buf[4];
@@ -127,7 +128,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
       {
         const char *encoding = locale_charset ();
 
-        if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+        if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
           {
             /* Cf. unistr/u8-mblen.c.  */
             unsigned char c = (unsigned char) p[0];
@@ -184,7 +185,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
         /* As a reference for this code, you can use the GNU libiconv
            implementation.  Look for uses of the RET_TOOFEW macro.  */
 
-        if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+        if (STREQ_OPT (encoding,
+                       "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
           {
             if (m == 1)
               {
@@ -207,9 +209,12 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
               }
             goto invalid;
           }
-        if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
-            || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
-            || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+        if (STREQ_OPT (encoding,
+                       "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+            || STREQ_OPT (encoding,
+                          "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+            || STREQ_OPT (encoding,
+                          "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
           {
             if (m == 1)
               {
@@ -220,7 +225,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
               }
             goto invalid;
           }
-        if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+        if (STREQ_OPT (encoding,
+                       "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
           {
             if (m == 1)
               {
@@ -238,7 +244,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
               }
             goto invalid;
           }
-        if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+        if (STREQ_OPT (encoding,
+                       "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
           {
             if (m == 1)
               {
@@ -271,7 +278,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
               }
             goto invalid;
           }
-        if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+        if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
           {
             if (m == 1)
               {
@@ -334,7 +341,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
   {
     static mbstate_t internal_state;
 
-    /* Override mbrtowc's internal state.  We can not call mbsinit() on the
+    /* Override mbrtowc's internal state.  We cannot call mbsinit() on the
        hidden internal state, but we can call it on our variable.  */
     if (ps == NULL)
       ps = &internal_state;
diff --git a/gl/mbsinit.c b/gl/mbsinit.c
index 3390f6a..79278d4 100644
--- a/gl/mbsinit.c
+++ b/gl/mbsinit.c
@@ -1,5 +1,5 @@
 /* Test for initial conversion state.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2008-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno at clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -22,6 +22,18 @@
 
 #include "verify.h"
 
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+
+/* On native Windows, 'mbstate_t' is defined as 'int'.  */
+
+int
+mbsinit (const mbstate_t *ps)
+{
+  return ps == NULL || *ps == 0;
+}
+
+#else
+
 /* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs()
    and wcrtomb(), wcsrtombs().
    We assume that
@@ -43,5 +55,7 @@ mbsinit (const mbstate_t *ps)
 {
   const char *pstate = (const char *)ps;
 
-  return pstate[0] == 0;
+  return pstate == NULL || pstate[0] == 0;
 }
+
+#endif
diff --git a/gl/wcrtomb.c b/gl/mbtowc-impl.h
similarity index 50%
copy from gl/wcrtomb.c
copy to gl/mbtowc-impl.h
index ce9184f..3183f91 100644
--- a/gl/wcrtomb.c
+++ b/gl/mbtowc-impl.h
@@ -1,6 +1,6 @@
-/* Convert wide character to multibyte character.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno at clisp.org>, 2008.
+/* Convert multibyte character to wide character.
+   Copyright (C) 2011-2012 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno at clisp.org>, 2011.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -15,39 +15,30 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include <config.h>
+/* We don't need a static internal state, because the encoding is not state
+   dependent, and when mbrtowc returns (size_t)(-2). we throw the result
+   away. */
 
-/* Specification.  */
-#include <wchar.h>
-
-#include <errno.h>
-#include <stdlib.h>
-
-
-size_t
-wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
+int
+mbtowc (wchar_t *pwc, const char *s, size_t n)
 {
-  /* This implementation of wcrtomb on top of wctomb() supports only
-     stateless encodings.  ps must be in the initial state.  */
-  if (ps != NULL && !mbsinit (ps))
-    {
-      errno = EINVAL;
-      return (size_t)(-1);
-    }
-
   if (s == NULL)
-    /* We know the NUL wide character corresponds to the NUL character.  */
-    return 1;
+    return 0;
   else
     {
-      int ret = wctomb (s, wc);
+      mbstate_t state;
+      wchar_t wc;
+      size_t result;
 
-      if (ret >= 0)
-        return ret;
-      else
+      memset (&state, 0, sizeof (mbstate_t));
+      result = mbrtowc (&wc, s, n, &state);
+      if (result == (size_t)-1 || result == (size_t)-2)
         {
           errno = EILSEQ;
-          return (size_t)(-1);
+          return -1;
         }
+      if (pwc != NULL)
+        *pwc = wc;
+      return (wc == 0 ? 0 : result);
     }
 }
diff --git a/gl/btowc.c b/gl/mbtowc.c
similarity index 65%
copy from gl/btowc.c
copy to gl/mbtowc.c
index 2ab61a5..e48b2f2 100644
--- a/gl/btowc.c
+++ b/gl/mbtowc.c
@@ -1,6 +1,6 @@
-/* Convert unibyte character to wide character.
-   Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno at clisp.org>, 2008.
+/* Convert multibyte character to wide character.
+   Copyright (C) 2011-2012 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno at clisp.org>, 2011.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -17,23 +17,10 @@
 
 #include <config.h>
 
-/* Specification.  */
-#include <wchar.h>
-
-#include <stdio.h>
 #include <stdlib.h>
 
-wint_t
-btowc (int c)
-{
-  if (c != EOF)
-    {
-      char buf[1];
-      wchar_t wc;
+#include <errno.h>
+#include <string.h>
+#include <wchar.h>
 
-      buf[0] = c;
-      if (mbtowc (&wc, buf, 1) >= 0)
-        return wc;
-    }
-  return WEOF;
-}
+#include "mbtowc-impl.h"
diff --git a/gl/nl_langinfo.c b/gl/nl_langinfo.c
index 0754137..4b9bdbe 100644
--- a/gl/nl_langinfo.c
+++ b/gl/nl_langinfo.c
@@ -1,6 +1,6 @@
 /* nl_langinfo() replacement: query locale dependent information.
 
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007-2012 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -141,7 +141,8 @@ nl_langinfo (nl_item item)
       {
         static char buf[2 + 10 + 1];
 
-        /* Woe32 has a function returning the locale's codepage as a number.  */
+        /* The Windows API has a function returning the locale's codepage as
+           a number.  */
         sprintf (buf, "CP%u", GetACP ());
         return buf;
       }
diff --git a/gl/ref-add.sin b/gl/ref-add.sin
index 7a14c4d..8c1a7d0 100644
--- a/gl/ref-add.sin
+++ b/gl/ref-add.sin
@@ -1,6 +1,6 @@
 # Add this package to a list of references stored in a text file.
 #
-#   Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+#   Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU Lesser General Public License as published by
@@ -13,8 +13,7 @@
 #   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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#   with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # Written by Bruno Haible <haible at clisp.cons.org>.
 #
diff --git a/gl/ref-del.sin b/gl/ref-del.sin
index 8c8d764..fd87588 100644
--- a/gl/ref-del.sin
+++ b/gl/ref-del.sin
@@ -1,6 +1,6 @@
 # Remove this package from a list of references stored in a text file.
 #
-#   Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+#   Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU Lesser General Public License as published by
@@ -13,8 +13,7 @@
 #   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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#   with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # Written by Bruno Haible <haible at clisp.cons.org>.
 #
diff --git a/gl/regcomp.c b/gl/regcomp.c
index e631417..1bd1924 100644
--- a/gl/regcomp.c
+++ b/gl/regcomp.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu at yamato.ibm.com>.
 
@@ -14,8 +14,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
 					  size_t length, reg_syntax_t syntax);
@@ -206,7 +205,7 @@ static const size_t __re_error_msgid_idx[] =
    compiles PATTERN (of length LENGTH) and puts the result in BUFP.
    Returns 0 if the pattern was valid, otherwise an error string.
 
-   Assumes the `allocated' (and perhaps `buffer') and `translate' fields
+   Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields
    are set in BUFP on entry.  */
 
 #ifdef _LIBC
@@ -241,7 +240,7 @@ re_compile_pattern (const char *pattern, size_t length,
 weak_alias (__re_compile_pattern, re_compile_pattern)
 #endif
 
-/* Set by `re_set_syntax' to the current regexp syntax to recognize.  Can
+/* Set by 're_set_syntax' to the current regexp syntax to recognize.  Can
    also be assigned to arbitrarily: each pattern buffer stores its own
    syntax, so it can be changed between regex compilations.  */
 /* This has no initializer because initialized variables in Emacs
@@ -273,7 +272,7 @@ int
 re_compile_fastmap (bufp)
     struct re_pattern_buffer *bufp;
 {
-  re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+  re_dfa_t *dfa = bufp->buffer;
   char *fastmap = bufp->fastmap;
 
   memset (fastmap, '\0', sizeof (char) * SBC_MAX);
@@ -307,7 +306,7 @@ static void
 re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
 			 char *fastmap)
 {
-  re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+  re_dfa_t *dfa = bufp->buffer;
   Idx node_cnt;
   bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
   for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
@@ -439,15 +438,15 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
    PREG is a regex_t *.  We do not expect any fields to be initialized,
    since POSIX says we shouldn't.  Thus, we set
 
-     `buffer' to the compiled pattern;
-     `used' to the length of the compiled pattern;
-     `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
+     'buffer' to the compiled pattern;
+     'used' to the length of the compiled pattern;
+     'syntax' to RE_SYNTAX_POSIX_EXTENDED if the
        REG_EXTENDED bit in CFLAGS is set; otherwise, to
        RE_SYNTAX_POSIX_BASIC;
-     `newline_anchor' to REG_NEWLINE being set in CFLAGS;
-     `fastmap' to an allocated space for the fastmap;
-     `fastmap_accurate' to zero;
-     `re_nsub' to the number of subexpressions in PATTERN.
+     'newline_anchor' to REG_NEWLINE being set in CFLAGS;
+     'fastmap' to an allocated space for the fastmap;
+     'fastmap_accurate' to zero;
+     're_nsub' to the number of subexpressions in PATTERN.
 
    PATTERN is the address of the pattern string.
 
@@ -586,19 +585,23 @@ weak_alias (__regerror, regerror)
 static const bitset_t utf8_sb_map =
 {
   /* Set the first 128 bits.  */
-# if 4 * BITSET_WORD_BITS < ASCII_CHARS
-#  error "bitset_word_t is narrower than 32 bits"
-# elif 3 * BITSET_WORD_BITS < ASCII_CHARS
+# ifdef __GNUC__
+  [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
+# else
+#  if 4 * BITSET_WORD_BITS < ASCII_CHARS
+#   error "bitset_word_t is narrower than 32 bits"
+#  elif 3 * BITSET_WORD_BITS < ASCII_CHARS
   BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX,
-# elif 2 * BITSET_WORD_BITS < ASCII_CHARS
+#  elif 2 * BITSET_WORD_BITS < ASCII_CHARS
   BITSET_WORD_MAX, BITSET_WORD_MAX,
-# elif 1 * BITSET_WORD_BITS < ASCII_CHARS
+#  elif 1 * BITSET_WORD_BITS < ASCII_CHARS
   BITSET_WORD_MAX,
-# endif
+#  endif
   (BITSET_WORD_MAX
    >> (SBC_MAX % BITSET_WORD_BITS == 0
        ? 0
        : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS))
+# endif
 };
 #endif
 
@@ -657,7 +660,7 @@ void
 regfree (preg)
     regex_t *preg;
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   if (BE (dfa != NULL, 1))
     free_dfa_content (dfa);
   preg->buffer = NULL;
@@ -718,7 +721,7 @@ re_comp (s)
 				 + __re_error_msgid_idx[(int) REG_ESPACE]);
     }
 
-  /* Since `re_exec' always passes NULL for the `regs' argument, we
+  /* Since 're_exec' always passes NULL for the 'regs' argument, we
      don't need to initialize the pattern buffer fields which affect it.  */
 
   /* Match anchors at newlines.  */
@@ -729,7 +732,7 @@ re_comp (s)
   if (!ret)
     return NULL;
 
-  /* Yes, we're discarding `const' here if !HAVE_LIBINTL.  */
+  /* Yes, we're discarding 'const' here if !HAVE_LIBINTL.  */
   return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
 }
 
@@ -764,7 +767,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
   preg->regs_allocated = REGS_UNALLOCATED;
 
   /* Initialize the dfa.  */
-  dfa = (re_dfa_t *) preg->buffer;
+  dfa = preg->buffer;
   if (BE (preg->allocated < sizeof (re_dfa_t), 0))
     {
       /* If zero allocated, but buffer is non-null, try to realloc
@@ -775,7 +778,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
       if (dfa == NULL)
 	return REG_ESPACE;
       preg->allocated = sizeof (re_dfa_t);
-      preg->buffer = (unsigned char *) dfa;
+      preg->buffer = dfa;
     }
   preg->used = sizeof (re_dfa_t);
 
@@ -850,7 +853,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
 {
   __re_size_t table_size;
 #ifndef _LIBC
-  char *codeset_name;
+  const char *codeset_name;
 #endif
 #ifdef RE_ENABLE_I18N
   size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
@@ -873,7 +876,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
      calculation below, and for similar doubling calculations
      elsewhere.  And it's <= rather than <, because some of the
      doubling calculations add 1 afterwards.  */
-  if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0))
+  if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0))
     return REG_ESPACE;
 
   dfa->nodes_alloc = pat_len + 1;
@@ -947,9 +950,43 @@ static void
 internal_function
 init_word_char (re_dfa_t *dfa)
 {
-  int i, j, ch;
   dfa->word_ops_used = 1;
-  for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+  int i = 0;
+  int j;
+  int ch = 0;
+  if (BE (dfa->map_notascii == 0, 1))
+    {
+      bitset_word_t bits0 = 0x00000000;
+      bitset_word_t bits1 = 0x03ff0000;
+      bitset_word_t bits2 = 0x87fffffe;
+      bitset_word_t bits3 = 0x07fffffe;
+      if (BITSET_WORD_BITS == 64)
+	{
+	  dfa->word_char[0] = bits1 << 31 << 1 | bits0;
+	  dfa->word_char[1] = bits3 << 31 << 1 | bits2;
+	  i = 2;
+	}
+      else if (BITSET_WORD_BITS == 32)
+	{
+	  dfa->word_char[0] = bits0;
+	  dfa->word_char[1] = bits1;
+	  dfa->word_char[2] = bits2;
+	  dfa->word_char[3] = bits3;
+	  i = 4;
+	}
+      else
+        goto general_case;
+      ch = 128;
+
+      if (BE (dfa->is_utf8, 1))
+	{
+	  memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8);
+	  return;
+	}
+    }
+
+ general_case:
+  for (; i < BITSET_WORDS; ++i)
     for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
       if (isalnum (ch) || ch == '_')
 	dfa->word_char[i] |= (bitset_word_t) 1 << j;
@@ -960,7 +997,7 @@ init_word_char (re_dfa_t *dfa)
 static void
 free_workarea_compile (regex_t *preg)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_storage_t *storage, *next;
   for (storage = dfa->str_tree_storage; storage; storage = next)
     {
@@ -1144,7 +1181,7 @@ optimize_utf8 (re_dfa_t *dfa)
 static reg_errcode_t
 analyze (regex_t *preg)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   reg_errcode_t ret;
 
   /* Allocate arrays.  */
@@ -1325,7 +1362,7 @@ lower_subexps (void *extra, bin_tree_t *node)
 static bin_tree_t *
 lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *body = node->left;
   bin_tree_t *op, *cls, *tree1, *tree;
 
@@ -1659,7 +1696,7 @@ calc_eclosure (re_dfa_t *dfa)
       /* If we have already calculated, skip it.  */
       if (dfa->eclosures[node_idx].nelem != 0)
 	continue;
-      /* Calculate epsilon closure of `node_idx'.  */
+      /* Calculate epsilon closure of 'node_idx'.  */
       err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true);
       if (BE (err != REG_NOERROR, 0))
 	return err;
@@ -1709,14 +1746,14 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
       {
 	re_node_set eclosure_elem;
 	Idx edest = dfa->edests[node].elems[i];
-	/* If calculating the epsilon closure of `edest' is in progress,
+	/* If calculating the epsilon closure of 'edest' is in progress,
 	   return intermediate result.  */
 	if (dfa->eclosures[edest].nelem == REG_MISSING)
 	  {
 	    incomplete = true;
 	    continue;
 	  }
-	/* If we haven't calculated the epsilon closure of `edest' yet,
+	/* If we haven't calculated the epsilon closure of 'edest' yet,
 	   calculate now. Otherwise use calculated epsilon closure.  */
 	if (dfa->eclosures[edest].nelem == 0)
 	  {
@@ -1726,11 +1763,11 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
 	  }
 	else
 	  eclosure_elem = dfa->eclosures[edest];
-	/* Merge the epsilon closure of `edest'.  */
+	/* Merge the epsilon closure of 'edest'.  */
 	err = re_node_set_merge (&eclosure, &eclosure_elem);
 	if (BE (err != REG_NOERROR, 0))
 	  return err;
-	/* If the epsilon closure of `edest' is incomplete,
+	/* If the epsilon closure of 'edest' is incomplete,
 	   the epsilon closure of this node is also incomplete.  */
 	if (dfa->eclosures[edest].nelem == 0)
 	  {
@@ -2092,7 +2129,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
 
 /* Entry point of the parser.
    Parse the regular expression REGEXP and return the structure tree.
-   If an error is occured, ERR is set by error code, and return NULL.
+   If an error occurs, ERR is set by error code, and return NULL.
    This function build the following tree, from regular expression <reg_exp>:
 	   CAT
 	   / \
@@ -2106,7 +2143,7 @@ static bin_tree_t *
 parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
        reg_errcode_t *err)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *tree, *eor, *root;
   re_token_t current_token;
   dfa->syntax = syntax;
@@ -2134,13 +2171,13 @@ parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
 	  /   \
    <branch1> <branch2>
 
-   ALT means alternative, which represents the operator `|'.  */
+   ALT means alternative, which represents the operator '|'.  */
 
 static bin_tree_t *
 parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
 	       reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *tree, *branch = NULL;
   tree = parse_branch (regexp, preg, token, syntax, nest, err);
   if (BE (*err != REG_NOERROR && tree == NULL, 0))
@@ -2182,7 +2219,7 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
 	      reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
 {
   bin_tree_t *tree, *expr;
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   tree = parse_expression (regexp, preg, token, syntax, nest, err);
   if (BE (*err != REG_NOERROR && tree == NULL, 0))
     return NULL;
@@ -2193,16 +2230,21 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
       expr = parse_expression (regexp, preg, token, syntax, nest, err);
       if (BE (*err != REG_NOERROR && expr == NULL, 0))
 	{
+	  if (tree != NULL)
+	    postorder (tree, free_tree, NULL);
 	  return NULL;
 	}
       if (tree != NULL && expr != NULL)
 	{
-	  tree = create_tree (dfa, tree, expr, CONCAT);
-	  if (tree == NULL)
+	  bin_tree_t *newtree = create_tree (dfa, tree, expr, CONCAT);
+	  if (newtree == NULL)
 	    {
+	      postorder (expr, free_tree, NULL);
+	      postorder (tree, free_tree, NULL);
 	      *err = REG_ESPACE;
 	      return NULL;
 	    }
+	  tree = newtree;
 	}
       else if (tree == NULL)
 	tree = expr;
@@ -2221,7 +2263,7 @@ static bin_tree_t *
 parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
 		  reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *tree;
   switch (token->type)
     {
@@ -2437,7 +2479,7 @@ static bin_tree_t *
 parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
 	       reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *tree;
   size_t cur_nsub;
   cur_nsub = preg->re_nsub++;
@@ -2451,7 +2493,11 @@ parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
     {
       tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
       if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
-	*err = REG_EPAREN;
+	{
+	  if (tree != NULL)
+	    postorder (tree, free_tree, NULL);
+	  *err = REG_EPAREN;
+	}
       if (BE (*err != REG_NOERROR, 0))
 	return NULL;
     }
@@ -2529,6 +2575,12 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
 	  *err = REG_BADBR;
 	  return NULL;
 	}
+
+      if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0))
+	{
+	  *err = REG_ESIZE;
+	  return NULL;
+	}
     }
   else
     {
@@ -2569,7 +2621,10 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
     old_tree = NULL;
 
   if (elem->token.type == SUBEXP)
-    postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
+    {
+      uintptr_t subidx = elem->token.opr.idx;
+      postorder (elem, mark_opt_subexp, (void *) subidx);
+    }
 
   tree = create_tree (dfa, elem, NULL,
 		      (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
@@ -2615,7 +2670,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
      Build the range expression which starts from START_ELEM, and ends
      at END_ELEM.  The result are written to MBCSET and SBCSET.
      RANGE_ALLOC is the allocated size of mbcset->range_starts, and
-     mbcset->range_ends, is a pointer argument sinse we may
+     mbcset->range_ends, is a pointer argument since we may
      update it.  */
 
 static reg_errcode_t
@@ -2749,11 +2804,12 @@ build_range_exp (const reg_syntax_t syntax,
 
 static reg_errcode_t
 internal_function
-build_collating_symbol (bitset_t sbcset,
 # ifdef RE_ENABLE_I18N
-			re_charset_t *mbcset, Idx *coll_sym_alloc,
-# endif
-			const unsigned char *name)
+build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
+			Idx *coll_sym_alloc, const unsigned char *name)
+# else /* not RE_ENABLE_I18N */
+build_collating_symbol (bitset_t sbcset, const unsigned char *name)
+# endif /* not RE_ENABLE_I18N */
 {
   size_t name_len = strlen ((const char *) name);
   if (BE (name_len != 1, 0))
@@ -2781,8 +2837,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
   const int32_t *symb_table;
   const unsigned char *extra;
 
-  /* Local function for parse_bracket_exp used in _LIBC environement.
-     Seek the collating symbol entry correspondings to NAME.
+  /* Local function for parse_bracket_exp used in _LIBC environment.
+     Seek the collating symbol entry corresponding to NAME.
      Return the index of the symbol in the SYMB_TABLE.  */
 
   auto inline int32_t
@@ -2885,11 +2941,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
       return UINT_MAX;
     }
 
-  /* Local function for parse_bracket_exp used in _LIBC environement.
+  /* Local function for parse_bracket_exp used in _LIBC environment.
      Build the range expression which starts from START_ELEM, and ends
      at END_ELEM.  The result are written to MBCSET and SBCSET.
      RANGE_ALLOC is the allocated size of mbcset->range_starts, and
-     mbcset->range_ends, is a pointer argument sinse we may
+     mbcset->range_ends, is a pointer argument since we may
      update it.  */
 
   auto inline reg_errcode_t
@@ -2969,11 +3025,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
       return REG_NOERROR;
     }
 
-  /* Local function for parse_bracket_exp used in _LIBC environement.
+  /* Local function for parse_bracket_exp used in _LIBC environment.
      Build the collating element which is represented by NAME.
      The result are written to MBCSET and SBCSET.
      COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
-     pointer argument sinse we may update it.  */
+     pointer argument since we may update it.  */
 
   auto inline reg_errcode_t
   __attribute ((always_inline))
@@ -3075,6 +3131,10 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
   if (BE (sbcset == NULL, 0))
 #endif /* RE_ENABLE_I18N */
     {
+      re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+      re_free (mbcset);
+#endif
       *err = REG_ESPACE;
       return NULL;
     }
@@ -3413,7 +3473,7 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
      Build the equivalence class which is represented by NAME.
      The result are written to MBCSET and SBCSET.
      EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes,
-     is a pointer argument sinse we may update it.  */
+     is a pointer argument since we may update it.  */
 
 static reg_errcode_t
 #ifdef RE_ENABLE_I18N
@@ -3444,19 +3504,18 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
 						   _NL_COLLATE_EXTRAMB);
       indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
 						_NL_COLLATE_INDIRECTMB);
-      idx1 = findidx (&cp);
-      if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
+      idx1 = findidx (&cp, -1);
+      if (BE (idx1 == 0 || *cp != '\0', 0))
 	/* This isn't a valid character.  */
 	return REG_ECOLLATE;
 
-      /* Build single byte matcing table for this equivalence class.  */
-      char_buf[1] = (unsigned char) '\0';
+      /* Build single byte matching table for this equivalence class.  */
       len = weights[idx1 & 0xffffff];
       for (ch = 0; ch < SBC_MAX; ++ch)
 	{
 	  char_buf[0] = ch;
 	  cp = char_buf;
-	  idx2 = findidx (&cp);
+	  idx2 = findidx (&cp, 1);
 /*
 	  idx2 = table[ch];
 */
@@ -3509,7 +3568,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
      Build the character class which is represented by NAME.
      The result are written to MBCSET and SBCSET.
      CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes,
-     is a pointer argument sinse we may update it.  */
+     is a pointer argument since we may update it.  */
 
 static reg_errcode_t
 #ifdef RE_ENABLE_I18N
@@ -3703,8 +3762,9 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
 }
 
 /* This is intended for the expressions like "a{1,3}".
-   Fetch a number from `input', and return the number.
+   Fetch a number from 'input', and return the number.
    Return REG_MISSING if the number field is empty like "{,1}".
+   Return RE_DUP_MAX + 1 if the number field is too large.
    Return REG_ERROR if an error occurred.  */
 
 static Idx
@@ -3723,8 +3783,9 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
       num = ((token->type != CHARACTER || c < '0' || '9' < c
 	      || num == REG_ERROR)
 	     ? REG_ERROR
-	     : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0'));
-      num = (num > RE_DUP_MAX) ? REG_ERROR : num;
+	     : num == REG_MISSING
+	     ? c - '0'
+	     : MIN (RE_DUP_MAX + 1, num * 10 + c - '0'));
     }
   return num;
 }
@@ -3798,7 +3859,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
 static reg_errcode_t
 mark_opt_subexp (void *extra, bin_tree_t *node)
 {
-  Idx idx = (Idx) (long) extra;
+  Idx idx = (uintptr_t) extra;
   if (node->token.type == SUBEXP && node->token.opr.idx == idx)
     node->token.opt_subexp = 1;
 
diff --git a/gl/regex.c b/gl/regex.c
index 9d3cf3d..c578852 100644
--- a/gl/regex.c
+++ b/gl/regex.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu at yamato.ibm.com>.
 
@@ -14,12 +14,20 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
-#include <config.h>
+#ifndef _LIBC
+# include <config.h>
 
-/* Make sure noone compiles this code with a C++ compiler.  */
+# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+#  pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+# endif
+# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+#  pragma GCC diagnostic ignored "-Wtype-limits"
+# endif
+#endif
+
+/* Make sure no one compiles this code with a C++ compiler.  */
 #if defined __cplusplus && defined _LIBC
 # error "This is C code, use a C compiler"
 #endif
diff --git a/gl/regex.h b/gl/regex.h
index 1908687..07c1b3d 100644
--- a/gl/regex.h
+++ b/gl/regex.h
@@ -1,6 +1,6 @@
 /* Definitions for data structures and routines for the regular
    expression library.
-   Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2006, 2009-2011
+   Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2012
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -15,8 +15,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _REGEX_H
 #define _REGEX_H 1
@@ -28,13 +27,10 @@
 extern "C" {
 #endif
 
-/* Define __USE_GNU_REGEX to declare GNU extensions that violate the
+/* Define __USE_GNU to declare GNU extensions that violate the
    POSIX name space rules.  */
-#undef __USE_GNU_REGEX
-#if (defined _GNU_SOURCE					\
-     || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE	\
-	 && !defined _XOPEN_SOURCE))
-# define __USE_GNU_REGEX 1
+#ifdef _GNU_SOURCE
+# define __USE_GNU 1
 #endif
 
 #ifdef _REGEX_LARGE_OFFSETS
@@ -45,16 +41,6 @@ extern "C" {
    supported within glibc itself, and glibc users should not define
    _REGEX_LARGE_OFFSETS.  */
 
-/* The type of the offset of a byte within a string.
-   For historical reasons POSIX 1003.1-2004 requires that regoff_t be
-   at least as wide as off_t.  However, many common POSIX platforms set
-   regoff_t to the more-sensible ssize_t and the Open Group has
-   signalled its intention to change the requirement to be that
-   regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN
-   60 (2005-08-25).  We don't know of any hosts where ssize_t or
-   ptrdiff_t is wider than ssize_t, so ssize_t is safe.  */
-typedef ssize_t regoff_t;
-
 /* The type of nonnegative object indexes.  Traditionally, GNU regex
    uses 'int' for these.  Code that uses __re_idx_t should work
    regardless of whether the type is signed.  */
@@ -69,10 +55,8 @@ typedef size_t __re_long_size_t;
 
 #else
 
-/* Use types that are binary-compatible with the traditional GNU regex
-   implementation, which mishandles strings longer than INT_MAX.  */
-
-typedef int regoff_t;
+/* The traditional GNU regex implementation mishandles strings longer
+   than INT_MAX.  */
 typedef int __re_idx_t;
 typedef unsigned int __re_size_t;
 typedef unsigned long int __re_long_size_t;
@@ -93,8 +77,7 @@ typedef unsigned long int active_reg_t;
    add or remove a bit, only one other definition need change.  */
 typedef unsigned long int reg_syntax_t;
 
-#ifdef __USE_GNU_REGEX
-
+#ifdef __USE_GNU
 /* 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)
@@ -161,9 +144,9 @@ typedef unsigned long int reg_syntax_t;
    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 \}
+/* If this bit is set, then '{...}' defines an interval, and \{ and \}
      are literals.
-  If not set, then `\{...\}' defines an interval.  */
+  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.
@@ -225,8 +208,7 @@ typedef unsigned long int reg_syntax_t;
 /* 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)
-
-#endif /* defined __USE_GNU_REGEX */
+#endif
 
 /* This global variable defines the particular regexp syntax to use (for
    some interfaces).  When a regexp is compiled, the syntax used is
@@ -234,7 +216,7 @@ typedef unsigned long int reg_syntax_t;
    already-compiled regexps.  */
 extern reg_syntax_t re_syntax_options;
 

-#ifdef __USE_GNU_REGEX
+#ifdef __USE_GNU
 /* 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!)  */
@@ -246,16 +228,19 @@ extern reg_syntax_t re_syntax_options;
    | RE_NO_BK_PARENS              | RE_NO_BK_REFS			\
    | RE_NO_BK_VBAR                | RE_NO_EMPTY_RANGES			\
    | RE_DOT_NEWLINE		  | RE_CONTEXT_INDEP_ANCHORS		\
+   | RE_CHAR_CLASSES							\
    | 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 ))
+  ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS		\
+    | RE_INVALID_INTERVAL_ORD)						\
+   & ~(RE_DOT_NOT_NULL | 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)
+   | RE_INTERVALS	    | RE_NO_GNU_OPS				\
+   | RE_INVALID_INTERVAL_ORD)
 
 # define RE_SYNTAX_GREP							\
   (RE_BK_PLUS_QM              | RE_CHAR_CLASSES				\
@@ -306,13 +291,12 @@ extern reg_syntax_t re_syntax_options;
    | RE_NO_BK_VBAR	    | RE_UNMATCHED_RIGHT_PAREN_ORD)
 /* [[[end syntaxes]]] */
 
-#endif /* defined __USE_GNU_REGEX */
-

-#ifdef __USE_GNU_REGEX
-
 /* Maximum number of duplicates an interval can allow.  POSIX-conforming
    systems might define this in <limits.h>, but we want our
    value, so remove any previous define.  */
+# ifdef _REGEX_INCLUDE_LIMITS_H
+#  include <limits.h>
+# endif
 # ifdef RE_DUP_MAX
 #  undef RE_DUP_MAX
 # endif
@@ -320,16 +304,15 @@ extern reg_syntax_t re_syntax_options;
 /* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored
    the counter as a 2-byte signed integer.  This is no longer true, so
    RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to
-   ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined.
+   ((SIZE_MAX - 9) / 10) if _REGEX_LARGE_OFFSETS is defined.
    However, there would be a huge performance problem if someone
    actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains
    its historical value.  */
 # define RE_DUP_MAX (0x7fff)
-
-#endif /* defined __USE_GNU_REGEX */
+#endif
 
 
-/* POSIX `cflags' bits (i.e., information for `regcomp').  */
+/* 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.  */
@@ -349,7 +332,7 @@ extern reg_syntax_t re_syntax_options;
 #define REG_NOSUB (1 << 3)
 
 
-/* POSIX `eflags' bits (i.e., information for regexec).  */
+/* 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
@@ -367,7 +350,7 @@ extern reg_syntax_t re_syntax_options;
 
 
 /* If any error codes are removed, changed, or added, update the
-   `__re_error_msgid' table in regcomp.c.  */
+   '__re_error_msgid' table in regcomp.c.  */
 
 typedef enum
 {
@@ -392,11 +375,11 @@ typedef enum
 
   /* Error codes we've added.  */
   _REG_EEND,		/* Premature end.  */
-  _REG_ESIZE,		/* Compiled pattern bigger than 2^16 bytes.  */
+  _REG_ESIZE,		/* Too large (e.g., repeat count too large).  */
   _REG_ERPAREN		/* Unmatched ) or \); not returned from regcomp.  */
 } reg_errcode_t;
 
-#ifdef _XOPEN_SOURCE
+#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K
 # define REG_ENOSYS	_REG_ENOSYS
 #endif
 #define REG_NOERROR	_REG_NOERROR
@@ -417,126 +400,127 @@ typedef enum
 #define REG_ESIZE	_REG_ESIZE
 #define REG_ERPAREN	_REG_ERPAREN
 

-/* struct re_pattern_buffer normally uses member names like `buffer'
-   that POSIX does not allow.  In POSIX mode these members have names
-   with leading `re_' (e.g., `re_buffer').  */
-#ifdef __USE_GNU_REGEX
-# define _REG_RE_NAME(id) id
-# define _REG_RM_NAME(id) id
-#else
-# define _REG_RE_NAME(id) re_##id
-# define _REG_RM_NAME(id) rm_##id
+/* This data structure represents a compiled pattern.  Before calling
+   the pattern compiler, the fields 'buffer', 'allocated', 'fastmap',
+   and 'translate' can be set.  After the pattern has been compiled,
+   the fields 're_nsub', 'not_bol' and 'not_eol' are available.  All
+   other fields are private to the regex routines.  */
+
+#ifndef RE_TRANSLATE_TYPE
+# define __RE_TRANSLATE_TYPE unsigned char *
+# ifdef __USE_GNU
+#  define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE
+# endif
 #endif
 
-/* The user can specify the type of the re_translate member by
-   defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned
-   char *.  This pollutes the POSIX name space, so in POSIX mode just
-   use unsigned char *.  */
-#ifdef __USE_GNU_REGEX
-# ifndef RE_TRANSLATE_TYPE
-#  define RE_TRANSLATE_TYPE unsigned char *
-# endif
-# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE
+#ifdef __USE_GNU
+# define __REPB_PREFIX(name) name
 #else
-# define REG_TRANSLATE_TYPE unsigned char *
+# define __REPB_PREFIX(name) __##name
 #endif
 
-/* 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.  */
-
 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 *_REG_RE_NAME (buffer);
+  /* Space that holds the compiled pattern.  The type
+     'struct re_dfa_t' is private and is not declared here.  */
+  struct re_dfa_t *__REPB_PREFIX(buffer);
 
-  /* Number of bytes to which `buffer' points.  */
-  __re_long_size_t _REG_RE_NAME (allocated);
+  /* Number of bytes to which 'buffer' points.  */
+  __re_long_size_t __REPB_PREFIX(allocated);
 
-  /* Number of bytes actually used in `buffer'.  */
-  __re_long_size_t _REG_RE_NAME (used);
+  /* Number of bytes actually used in 'buffer'.  */
+  __re_long_size_t __REPB_PREFIX(used);
 
   /* Syntax setting with which the pattern was compiled.  */
-  reg_syntax_t _REG_RE_NAME (syntax);
+  reg_syntax_t __REPB_PREFIX(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 *_REG_RE_NAME (fastmap);
+  char *__REPB_PREFIX(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.  */
-  REG_TRANSLATE_TYPE _REG_RE_NAME (translate);
+  __RE_TRANSLATE_TYPE __REPB_PREFIX(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
+     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 int _REG_RE_NAME (can_be_null) : 1;
+     perfectly; see 're_compile_fastmap' (the "duplicate" case).  */
+  unsigned __REPB_PREFIX(can_be_null) : 1;
 
-  /* If REGS_UNALLOCATED, allocate space in the `regs' structure
-     for `max (RE_NREGS, re_nsub + 1)' groups.
+  /* 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.  */
-#ifdef __USE_GNU_REGEX
+#ifdef __USE_GNU
 # define REGS_UNALLOCATED 0
 # define REGS_REALLOCATE 1
 # define REGS_FIXED 2
 #endif
-  unsigned int _REG_RE_NAME (regs_allocated) : 2;
+  unsigned __REPB_PREFIX(regs_allocated) : 2;
 
-  /* Set to zero when `re_compile_pattern' compiles a pattern; set to
-     one by `re_compile_fastmap' if it updates the fastmap.  */
-  unsigned int _REG_RE_NAME (fastmap_accurate) : 1;
+  /* Set to zero when 're_compile_pattern' compiles a pattern; set to
+     one by 're_compile_fastmap' if it updates the fastmap.  */
+  unsigned __REPB_PREFIX(fastmap_accurate) : 1;
 
-  /* If set, `re_match_2' does not return information about
+  /* If set, 're_match_2' does not return information about
      subexpressions.  */
-  unsigned int _REG_RE_NAME (no_sub) : 1;
+  unsigned __REPB_PREFIX(no_sub) : 1;
 
   /* If set, a beginning-of-line anchor doesn't match at the beginning
      of the string.  */
-  unsigned int _REG_RE_NAME (not_bol) : 1;
+  unsigned __REPB_PREFIX(not_bol) : 1;
 
   /* Similarly for an end-of-line anchor.  */
-  unsigned int _REG_RE_NAME (not_eol) : 1;
+  unsigned __REPB_PREFIX(not_eol) : 1;
 
   /* If true, an anchor at a newline matches.  */
-  unsigned int _REG_RE_NAME (newline_anchor) : 1;
-
-/* [[[end pattern_buffer]]] */
+  unsigned __REPB_PREFIX(newline_anchor) : 1;
 };
 
 typedef struct re_pattern_buffer regex_t;
 

+/* Type for byte offsets within the string.  POSIX mandates this.  */
+#ifdef _REGEX_LARGE_OFFSETS
+/* POSIX 1003.1-2008 requires that regoff_t be at least as wide as
+   ptrdiff_t and ssize_t.  We don't know of any hosts where ptrdiff_t
+   is wider than ssize_t, so ssize_t is safe.  */
+typedef ssize_t regoff_t;
+#else
+/* The traditional GNU regex implementation mishandles strings longer
+   than INT_MAX.  */
+typedef int regoff_t;
+#endif
+
+
+#ifdef __USE_GNU
 /* This is the structure we store register match data in.  See
    regex.texinfo for a full description of what registers match.  */
 struct re_registers
 {
-  __re_size_t _REG_RM_NAME (num_regs);
-  regoff_t *_REG_RM_NAME (start);
-  regoff_t *_REG_RM_NAME (end);
+  __re_size_t 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.  */
-#if !defined RE_NREGS && defined __USE_GNU_REGEX
-# define RE_NREGS 30
+/* 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
 #endif
 
 
 /* POSIX specification for registers.  Aside from the different names than
-   `re_registers', POSIX uses an array of structures, instead of a
+   're_registers', POSIX uses an array of structures, instead of a
    structure of arrays.  */
 typedef struct
 {
@@ -546,13 +530,19 @@ typedef struct
 

 /* Declarations for routines.  */
 
+#ifdef __USE_GNU
 /* Sets the current default syntax to SYNTAX, and return the old syntax.
-   You can also simply assign to the `re_syntax_options' variable.  */
+   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.  */
+   and syntax given by the global 're_syntax_options', into the buffer
+   BUFFER.  Return NULL if successful, and an error string if not.
+
+   To free the allocated storage, you must call 'regfree' on BUFFER.
+   Note that the translate table must either have been initialised by
+   'regcomp', with a malloc'ed value, or set to NULL before calling
+   'regfree'.  */
 extern const char *re_compile_pattern (const char *__pattern, size_t __length,
 				       struct re_pattern_buffer *__buffer);
 
@@ -574,7 +564,7 @@ extern regoff_t re_search (struct re_pattern_buffer *__buffer,
 			   struct re_registers *__regs);
 
 
-/* Like `re_search', but search in the concatenation of STRING1 and
+/* Like 're_search', but search in the concatenation of STRING1 and
    STRING2.  Also, stop searching at index START + STOP.  */
 extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
 			     const char *__string1, __re_idx_t __length1,
@@ -584,14 +574,14 @@ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
 			     __re_idx_t __stop);
 
 
-/* Like `re_search', but return how many characters in STRING the regexp
+/* Like 're_search', but return how many characters in STRING the regexp
    in BUFFER matched, starting at position START.  */
 extern regoff_t re_match (struct re_pattern_buffer *__buffer,
 			  const char *__string, __re_idx_t __length,
 			  __re_idx_t __start, struct re_registers *__regs);
 
 
-/* Relates to `re_match' as `re_search_2' relates to `re_search'.  */
+/* Relates to 're_match' as 're_search_2' relates to 're_search'.  */
 extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
 			    const char *__string1, __re_idx_t __length1,
 			    const char *__string2, __re_idx_t __length2,
@@ -602,21 +592,22 @@ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
 /* 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
+   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
-   BUFFER will allocate its own register data, without freeing the old
-   data.  */
+   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,
 			      __re_size_t __num_regs,
 			      regoff_t *__starts, regoff_t *__ends);
+#endif	/* Use GNU */
 
-#if defined _REGEX_RE_COMP || defined _LIBC
+#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD)
 # ifndef _CRAY
 /* 4.2 bsd compatibility.  */
 extern char *re_comp (const char *);
@@ -644,7 +635,7 @@ extern int re_exec (const char *);
 #ifndef _Restrict_arr_
 # if ((199901L <= __STDC_VERSION__					\
        || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__))	\
-	   && !__STRICT_ANSI__))					\
+	   && !defined __STRICT_ANSI__))					\
       && !defined __GNUG__)
 #  define _Restrict_arr_ _Restrict_
 # else
diff --git a/gl/regex_internal.c b/gl/regex_internal.c
index e77cb76..71ee41e 100644
--- a/gl/regex_internal.c
+++ b/gl/regex_internal.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu at yamato.ibm.com>.
 
@@ -14,8 +14,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 static void re_string_construct_common (const char *str, Idx len,
 					re_string_t *pstr,
@@ -134,9 +133,9 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
     {
       wint_t *new_wcs;
 
-      /* Avoid overflow.  */
-      size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
-      if (BE (SIZE_MAX / max_object_size < new_buf_len, 0))
+      /* Avoid overflow in realloc.  */
+      const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
+      if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_buf_len, 0))
 	return REG_ESPACE;
 
       new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
@@ -236,13 +235,8 @@ build_wcs_buffer (re_string_t *pstr)
       else
 	p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
       mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
-      if (BE (mbclen == (size_t) -2, 0))
-	{
-	  /* The buffer doesn't have enough space, finish to build.  */
-	  pstr->cur_state = prev_st;
-	  break;
-	}
-      else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0))
+      if (BE (mbclen == (size_t) -1 || mbclen == 0
+	      || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0))
 	{
 	  /* We treat these cases as a singlebyte character.  */
 	  mbclen = 1;
@@ -251,6 +245,12 @@ build_wcs_buffer (re_string_t *pstr)
 	    wc = pstr->trans[wc];
 	  pstr->cur_state = prev_st;
 	}
+      else if (BE (mbclen == (size_t) -2, 0))
+	{
+	  /* The buffer doesn't have enough space, finish to build.  */
+	  pstr->cur_state = prev_st;
+	  break;
+	}
 
       /* Write wide character and padding.  */
       pstr->wcs[byte_idx++] = wc;
@@ -333,9 +333,11 @@ build_wcs_upper_buffer (re_string_t *pstr)
 	      for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
 		pstr->wcs[byte_idx++] = WEOF;
 	    }
-	  else if (mbclen == (size_t) -1 || mbclen == 0)
+	  else if (mbclen == (size_t) -1 || mbclen == 0
+		   || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
 	    {
-	      /* It is an invalid character or '\0'.  Just use the byte.  */
+	      /* It is an invalid character, an incomplete character
+		 at the end of the string, or '\0'.  Just use the byte.  */
 	      int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
 	      pstr->mbs[byte_idx] = ch;
 	      /* And also cast it to wide char.  */
@@ -448,7 +450,8 @@ build_wcs_upper_buffer (re_string_t *pstr)
 	    for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
 	      pstr->wcs[byte_idx++] = WEOF;
 	  }
-	else if (mbclen == (size_t) -1 || mbclen == 0)
+	else if (mbclen == (size_t) -1 || mbclen == 0
+		 || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
 	  {
 	    /* It is an invalid character or '\0'.  Just use the byte.  */
 	    int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
@@ -495,8 +498,7 @@ re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
        rawbuf_idx < new_raw_idx;)
     {
       wchar_t wc2;
-      Idx remain_len;
-      remain_len = pstr->len - rawbuf_idx;
+      Idx remain_len = pstr->raw_len - rawbuf_idx;
       prev_st = pstr->cur_state;
       mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
 			  remain_len, &pstr->cur_state);
@@ -732,21 +734,21 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
 			  mbstate_t cur_state;
 			  wchar_t wc2;
 			  Idx mlen = raw + pstr->len - p;
+			  unsigned char buf[6];
 			  size_t mbclen;
 
-#if 0 /* dead code: buf is set but never used */
-			  unsigned char buf[6];
+			  const unsigned char *pp = p;
 			  if (BE (pstr->trans != NULL, 0))
 			    {
 			      int i = mlen < 6 ? mlen : 6;
 			      while (--i >= 0)
 				buf[i] = pstr->trans[p[i]];
+			      pp = buf;
 			    }
-#endif
 			  /* XXX Don't use mbrtowc, we know which conversion
 			     to use (UTF-8 -> UCS4).  */
 			  memset (&cur_state, 0, sizeof (cur_state));
-			  mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+			  mbclen = __mbrtowc (&wc2, (const char *) pp, mlen,
 					      &cur_state);
 			  if (raw + offset - p <= mbclen
 			      && mbclen < (size_t) -2)
@@ -868,7 +870,7 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
 }
 
 static unsigned char
-internal_function __attribute ((pure))
+internal_function
 re_string_fetch_byte_case (re_string_t *pstr)
 {
   if (BE (!pstr->mbs_allocated, 1))
@@ -1412,13 +1414,12 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
       Idx *new_nexts, *new_indices;
       re_node_set *new_edests, *new_eclosures;
       re_token_t *new_nodes;
-      size_t max_object_size =
-	MAX (sizeof (re_token_t),
-	     MAX (sizeof (re_node_set),
-		  sizeof (Idx)));
 
-      /* Avoid overflows.  */
-      if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0))
+      /* Avoid overflows in realloc.  */
+      const size_t max_object_size = MAX (sizeof (re_token_t),
+					  MAX (sizeof (re_node_set),
+					       sizeof (Idx)));
+      if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0))
 	return REG_MISSING;
 
       new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
@@ -1550,7 +1551,7 @@ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
 	  && re_node_set_compare (state->entrance_nodes, nodes))
 	return state;
     }
-  /* There are no appropriate state in `dfa', create the new one.  */
+  /* There are no appropriate state in 'dfa', create the new one.  */
   new_state = create_cd_newstate (dfa, nodes, context, hash);
   if (BE (new_state == NULL, 0))
     *err = REG_ESPACE;
@@ -1579,7 +1580,7 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
     {
       Idx elem = newstate->nodes.elems[i];
       if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
-	if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0))
+	if (! re_node_set_insert_last (&newstate->non_eps_nodes, elem))
 	  return REG_ESPACE;
     }
 
@@ -1614,7 +1615,7 @@ free_state (re_dfastate_t *state)
   re_free (state);
 }
 
-/* Create the new state which is independ of contexts.
+/* Create the new state which is independent of contexts.
    Return the new state if succeeded, otherwise return NULL.  */
 
 static re_dfastate_t *
diff --git a/gl/regex_internal.h b/gl/regex_internal.h
index f9b0d24..fd331b1 100644
--- a/gl/regex_internal.h
+++ b/gl/regex_internal.h
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu at yamato.ibm.com>.
 
@@ -14,15 +14,13 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _REGEX_INTERNAL_H
 #define _REGEX_INTERNAL_H 1
 
 #include <assert.h>
 #include <ctype.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -32,13 +30,14 @@
 # include "localcharset.h"
 #endif
 #include <locale.h>
-
 #include <wchar.h>
 #include <wctype.h>
+#include <stdbool.h>
 #include <stdint.h>
 #if defined _LIBC
 # include <bits/libc-lock.h>
 #else
+# define __libc_lock_define(CLASS,NAME)
 # define __libc_lock_init(NAME) do { } while (0)
 # define __libc_lock_lock(NAME) do { } while (0)
 # define __libc_lock_unlock(NAME) do { } while (0)
@@ -76,11 +75,6 @@
 # define gettext_noop(String) String
 #endif
 
-/* For loser systems without the definition.  */
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
 #if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC
 # define RE_ENABLE_I18N
 #endif
@@ -111,8 +105,8 @@
 # define __wctype wctype
 # define __iswctype iswctype
 # define __btowc btowc
-# define __wcrtomb wcrtomb
 # define __mbrtowc mbrtowc
+# define __wcrtomb wcrtomb
 # define __regfree regfree
 # define attribute_hidden
 #endif /* not _LIBC */
@@ -124,6 +118,11 @@
 #endif
 
 typedef __re_idx_t Idx;
+#ifdef _REGEX_LARGE_OFFSETS
+# define IDX_MAX (SIZE_MAX - 2)
+#else
+# define IDX_MAX INT_MAX
+#endif
 
 /* Special return value for failure to match.  */
 #define REG_MISSING ((Idx) -1)
@@ -334,7 +333,7 @@ typedef struct
     Idx idx;			/* for BACK_REF */
     re_context_type ctx_type;	/* for ANCHOR */
   } opr;
-#if __GNUC__ >= 2 && !__STRICT_ANSI__
+#if __GNUC__ >= 2 && !defined __STRICT_ANSI__
   re_token_type_t type : 8;
 #else
   re_token_type_t type;
@@ -415,26 +414,24 @@ struct re_dfa_t;
 typedef struct re_dfa_t re_dfa_t;
 
 #ifndef _LIBC
-# if defined __i386__ && !defined __EMX__
-#  define internal_function   __attribute ((regparm (3), stdcall))
-# else
-#  define internal_function
-# endif
+# define internal_function
 #endif
 
+#ifndef NOT_IN_libc
 static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
 						Idx new_buf_len)
      internal_function;
-#ifdef RE_ENABLE_I18N
+# ifdef RE_ENABLE_I18N
 static void build_wcs_buffer (re_string_t *pstr) internal_function;
 static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
-     internal_function;
-#endif /* RE_ENABLE_I18N */
+  internal_function;
+# endif /* RE_ENABLE_I18N */
 static void build_upper_buffer (re_string_t *pstr) internal_function;
 static void re_string_translate_buffer (re_string_t *pstr) internal_function;
 static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
 					  int eflags)
      internal_function __attribute ((pure));
+#endif
 #define re_string_peek_byte(pstr, offset) \
   ((pstr)->mbs[(pstr)->cur_idx + offset])
 #define re_string_fetch_byte(pstr) \
@@ -472,6 +469,9 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
 #ifndef MAX
 # define MAX(a,b) ((a) < (b) ? (b) : (a))
 #endif
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
 
 #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t)))
 #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t)))
@@ -487,8 +487,8 @@ struct bin_tree_t
 
   re_token_t token;
 
-  /* `node_idx' is the index in dfa->nodes, if `type' == 0.
-     Otherwise `type' indicate the type of this node.  */
+  /* 'node_idx' is the index in dfa->nodes, if 'type' == 0.
+     Otherwise 'type' indicate the type of this node.  */
   Idx node_idx;
 };
 typedef struct bin_tree_t bin_tree_t;
@@ -541,9 +541,9 @@ struct re_dfastate_t
   struct re_dfastate_t **trtable, **word_trtable;
   unsigned int context : 4;
   unsigned int halt : 1;
-  /* If this state can accept `multi byte'.
+  /* If this state can accept "multi byte".
      Note that we refer to multibyte characters, and multi character
-     collating elements as `multi byte'.  */
+     collating elements as "multi byte".  */
   unsigned int accept_mb : 1;
   /* If this state has backreference node(s).  */
   unsigned int has_backref : 1;
@@ -672,7 +672,7 @@ struct re_dfa_t
   re_bitset_ptr_t sb_char;
   int str_tree_storage_idx;
 
-  /* number of subexpressions `re_nsub' is in regex_t.  */
+  /* number of subexpressions 're_nsub' is in regex_t.  */
   re_hashval_t state_hash_mask;
   Idx init_node;
   Idx nbackref; /* The number of backreference in this dfa.  */
@@ -696,9 +696,7 @@ struct re_dfa_t
 #ifdef DEBUG
   char* re_str;
 #endif
-#ifdef _LIBC
   __libc_lock_define (, lock)
-#endif
 };
 
 #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
@@ -822,15 +820,15 @@ re_string_wchar_at (const re_string_t *pstr, Idx idx)
   return (wint_t) pstr->wcs[idx];
 }
 
+# ifndef NOT_IN_libc
 static int
 internal_function __attribute ((pure))
 re_string_elem_size_at (const re_string_t *pstr, Idx idx)
 {
-# ifdef _LIBC
+#  ifdef _LIBC
   const unsigned char *p, *extra;
   const int32_t *table, *indirect;
-  int32_t tmp;
-#  include <locale/weight.h>
+#   include <locale/weight.h>
   uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
 
   if (nrules != 0)
@@ -841,13 +839,14 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
       indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
 						_NL_COLLATE_INDIRECTMB);
       p = pstr->mbs + idx;
-      tmp = findidx (&p);
+      findidx (&p, pstr->len - idx);
       return p - pstr->mbs - idx;
     }
   else
-# endif /* _LIBC */
+#  endif /* _LIBC */
     return 1;
 }
+# endif
 #endif /* RE_ENABLE_I18N */
 
 #ifndef __GNUC_PREREQ
diff --git a/gl/regexec.c b/gl/regexec.c
index c54bf65..b2c174f 100644
--- a/gl/regexec.c
+++ b/gl/regexec.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu at yamato.ibm.com>.
 
@@ -14,8 +14,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
 				     Idx n) internal_function;
@@ -51,9 +50,8 @@ static regoff_t re_search_stub (struct re_pattern_buffer *bufp,
 				regoff_t range, Idx stop,
 				struct re_registers *regs,
 				bool ret_len) internal_function;
-static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
-				  Idx nregs, int regs_allocated)
-     internal_function;
+static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
+                              Idx nregs, int regs_allocated) internal_function;
 static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
      internal_function;
 static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
@@ -209,11 +207,11 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
    string STRING.
 
    If NMATCH is zero or REG_NOSUB was set in the cflags argument to
-   `regcomp', we ignore PMATCH.  Otherwise, we assume PMATCH has at
+   'regcomp', we ignore PMATCH.  Otherwise, we assume PMATCH has at
    least NMATCH elements, and we set them to the offsets of the
    corresponding matched substrings.
 
-   EFLAGS specifies `execution flags' which affect matching: if
+   EFLAGS specifies "execution flags" which affect matching: if
    REG_NOTBOL is set, then ^ does not match at the beginning of the
    string; if REG_NOTEOL is set, then $ does not match at the end.
 
@@ -230,7 +228,7 @@ regexec (preg, string, nmatch, pmatch, eflags)
   reg_errcode_t err;
   Idx start, length;
 #ifdef _LIBC
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
 #endif
 
   if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
@@ -365,7 +363,6 @@ weak_alias (__re_search_2, re_search_2)
 #endif
 
 static regoff_t
-internal_function
 re_search_2_stub (struct re_pattern_buffer *bufp,
 		  const char *string1, Idx length1,
 		  const char *string2, Idx length2,
@@ -413,7 +410,6 @@ re_search_2_stub (struct re_pattern_buffer *bufp,
    otherwise the position of the match is returned.  */
 
 static regoff_t
-internal_function
 re_search_stub (struct re_pattern_buffer *bufp,
 		const char *string, Idx length,
 		Idx start, regoff_t range, Idx stop, struct re_registers *regs,
@@ -425,7 +421,7 @@ re_search_stub (struct re_pattern_buffer *bufp,
   regoff_t rval;
   int eflags = 0;
 #ifdef _LIBC
-  re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+  re_dfa_t *dfa = bufp->buffer;
 #endif
   Idx last_start = start + range;
 
@@ -477,9 +473,9 @@ re_search_stub (struct re_pattern_buffer *bufp,
 
   rval = 0;
 
-  /* I hope we needn't fill ther regs with -1's when no match was found.  */
+  /* I hope we needn't fill their regs with -1's when no match was found.  */
   if (result != REG_NOERROR)
-    rval = -1;
+    rval = result == REG_NOMATCH ? -1 : -2;
   else if (regs != NULL)
     {
       /* If caller wants register contents data back, copy them.  */
@@ -505,15 +501,14 @@ re_search_stub (struct re_pattern_buffer *bufp,
   return rval;
 }
 
-static unsigned int
-internal_function
+static unsigned
 re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
 	      int regs_allocated)
 {
   int rval = REGS_REALLOCATE;
   Idx i;
   Idx need_regs = nregs + 1;
-  /* We need one extra element beyond `num_regs' for the `-1' marker GNU code
+  /* We need one extra element beyond 'num_regs' for the '-1' marker GNU code
      uses.  */
 
   /* Have the register data arrays been allocated?  */
@@ -636,7 +631,7 @@ re_exec (s)
    (0 <= LAST_START && LAST_START <= LENGTH)  */
 
 static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
 re_search_internal (const regex_t *preg,
 		    const char *string, Idx length,
 		    Idx start, Idx last_start, Idx stop,
@@ -644,7 +639,7 @@ re_search_internal (const regex_t *preg,
 		    int eflags)
 {
   reg_errcode_t err;
-  const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+  const re_dfa_t *dfa = preg->buffer;
   Idx left_lim, right_lim;
   int incr;
   bool fl_longest_match;
@@ -719,7 +714,8 @@ re_search_internal (const regex_t *preg,
   if (nmatch > 1 || dfa->has_mb_node)
     {
       /* Avoid overflow.  */
-      if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0))
+      if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *))
+               <= mctx.input.bufs_len), 0))
 	{
 	  err = REG_ESPACE;
 	  goto free_return;
@@ -921,7 +917,7 @@ re_search_internal (const regex_t *preg,
 	    goto free_return;
 	}
 
-      /* At last, add the offset to the each registers, since we slided
+      /* At last, add the offset to each register, since we slid
 	 the buffers so that we could assume that the matching starts
 	 from 0.  */
       for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
@@ -971,7 +967,7 @@ re_search_internal (const regex_t *preg,
 }
 
 static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
 prune_impossible_nodes (re_match_context_t *mctx)
 {
   const re_dfa_t *const dfa = mctx->dfa;
@@ -987,7 +983,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
   halt_node = mctx->last_node;
 
   /* Avoid overflow.  */
-  if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0))
+  if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= match_last, 0))
     return REG_ESPACE;
 
   sifted_states = re_malloc (re_dfastate_t *, match_last + 1);
@@ -1105,7 +1101,7 @@ acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
    FL_LONGEST_MATCH means we want the POSIX longest matching.
    If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
    next place where we may want to try matching.
-   Note that the matcher assume that the maching starts from the current
+   Note that the matcher assumes that the matching starts from the current
    index of the buffer.  */
 
 static Idx
@@ -1174,7 +1170,8 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
       re_dfastate_t *old_state = cur_state;
       Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1;
 
-      if (BE (next_char_idx >= mctx->input.bufs_len, 0)
+      if ((BE (next_char_idx >= mctx->input.bufs_len, 0)
+	   && mctx->input.bufs_len < mctx->input.len)
 	  || (BE (next_char_idx >= mctx->input.valid_len, 0)
 	      && mctx->input.valid_len < mctx->input.len))
 	{
@@ -1435,7 +1432,7 @@ internal_function __attribute_warn_unused_result__
 set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
 	  regmatch_t *pmatch, bool fl_backtrack)
 {
-  const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+  const re_dfa_t *dfa = preg->buffer;
   Idx idx, cur_node;
   re_node_set eps_via_nodes;
   struct re_fail_stack_t *fs;
@@ -1607,21 +1604,21 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
    and sift the nodes in each states according to the following rules.
    Updated state_log will be wrote to STATE_LOG.
 
-   Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if...
+   Rules: We throw away the Node 'a' in the STATE_LOG[STR_IDX] if...
      1. When STR_IDX == MATCH_LAST(the last index in the state_log):
-	If `a' isn't the LAST_NODE and `a' can't epsilon transit to
-	the LAST_NODE, we throw away the node `a'.
-     2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts
-	string `s' and transit to `b':
+	If 'a' isn't the LAST_NODE and 'a' can't epsilon transit to
+	the LAST_NODE, we throw away the node 'a'.
+     2. When 0 <= STR_IDX < MATCH_LAST and 'a' accepts
+	string 's' and transit to 'b':
 	i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw
-	   away the node `a'.
+	   away the node 'a'.
 	ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is
-	    thrown away, we throw away the node `a'.
+	    thrown away, we throw away the node 'a'.
      3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b':
 	i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the
-	   node `a'.
+	   node 'a'.
 	ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away,
-	    we throw away the node `a'.  */
+	    we throw away the node 'a'.  */
 
 #define STATE_NODE_CONTAINS(state,node) \
   ((state) != NULL && re_node_set_contains (&(state)->nodes, node))
@@ -1694,11 +1691,11 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
   Idx i;
 
   /* Then build the next sifted state.
-     We build the next sifted state on `cur_dest', and update
-     `sifted_states[str_idx]' with `cur_dest'.
+     We build the next sifted state on 'cur_dest', and update
+     'sifted_states[str_idx]' with 'cur_dest'.
      Note:
-     `cur_dest' is the sifted state from `state_log[str_idx + 1]'.
-     `cur_src' points the node_set of the old `state_log[str_idx]'
+     'cur_dest' is the sifted state from 'state_log[str_idx + 1]'.
+     'cur_src' points the node_set of the old 'state_log[str_idx]'
      (with the epsilon nodes pre-filtered out).  */
   for (i = 0; i < cur_src->nelem; i++)
     {
@@ -1711,7 +1708,7 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
       assert (!IS_EPSILON_NODE (type));
 #endif
 #ifdef RE_ENABLE_I18N
-      /* If the node may accept `multi byte'.  */
+      /* If the node may accept "multi byte".  */
       if (dfa->nodes[prev_node].accept_mb)
 	naccepted = sift_states_iter_mb (mctx, sctx, prev_node,
 					 str_idx, sctx->last_str_idx);
@@ -1752,7 +1749,8 @@ clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
 {
   Idx top = mctx->state_log_top;
 
-  if (next_state_log_idx >= mctx->input.bufs_len
+  if ((next_state_log_idx >= mctx->input.bufs_len
+       && mctx->input.bufs_len < mctx->input.len)
       || (next_state_log_idx >= mctx->input.valid_len
 	  && mctx->input.valid_len < mctx->input.len))
     {
@@ -2267,17 +2265,17 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
 {
   const re_dfa_t *const dfa = mctx->dfa;
   int naccepted;
-  /* Check the node can accept `multi byte'.  */
+  /* Check the node can accept "multi byte".  */
   naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
   if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
       !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
 			    dfa->nexts[node_idx]))
-    /* The node can't accept the `multi byte', or the
+    /* The node can't accept the "multi byte", or the
        destination was already thrown away, then the node
-       could't accept the current input `multi byte'.   */
+       could't accept the current input "multi byte".   */
     naccepted = 0;
   /* Otherwise, it is sure that the node could accept
-     `naccepted' bytes input.  */
+     'naccepted' bytes input.  */
   return naccepted;
 }
 #endif /* RE_ENABLE_I18N */
@@ -2456,7 +2454,7 @@ find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
 /* From the node set CUR_NODES, pick up the nodes whose types are
    OP_OPEN_SUBEXP and which have corresponding back references in the regular
    expression. And register them to use them later for evaluating the
-   correspoding back references.  */
+   corresponding back references.  */
 
 static reg_errcode_t
 internal_function
@@ -2567,7 +2565,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
       if (naccepted == 0)
 	continue;
 
-      /* The node can accepts `naccepted' bytes.  */
+      /* The node can accepts 'naccepted' bytes.  */
       dest_idx = re_string_cur_idx (&mctx->input) + naccepted;
       mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted
 			       : mctx->max_mb_elem_len);
@@ -2619,7 +2617,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
       const re_token_t *node = dfa->nodes + node_idx;
       re_node_set *new_dest_nodes;
 
-      /* Check whether `node' is a backreference or not.  */
+      /* Check whether 'node' is a backreference or not.  */
       if (node->type != OP_BACK_REF)
 	continue;
 
@@ -2631,14 +2629,14 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
 	    continue;
 	}
 
-      /* `node' is a backreference.
+      /* 'node' is a backreference.
 	 Check the substring which the substring matched.  */
       bkc_idx = mctx->nbkref_ents;
       err = get_subexp (mctx, node_idx, cur_str_idx);
       if (BE (err != REG_NOERROR, 0))
 	goto free_return;
 
-      /* And add the epsilon closures (which is `new_dest_nodes') of
+      /* And add the epsilon closures (which is 'new_dest_nodes') of
 	 the backreference to appropriate state_log.  */
 #ifdef DEBUG
       assert (dfa->nexts[node_idx] != REG_MISSING);
@@ -2662,7 +2660,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
 	  dest_state = mctx->state_log[dest_str_idx];
 	  prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0
 			: mctx->state_log[cur_str_idx]->nodes.nelem);
-	  /* Add `new_dest_node' to state_log.  */
+	  /* Add 'new_dest_node' to state_log.  */
 	  if (dest_state == NULL)
 	    {
 	      mctx->state_log[dest_str_idx]
@@ -2936,9 +2934,12 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
     {
       re_dfastate_t **new_array;
       Idx old_alloc = path->alloc;
-      Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1;
-      if (BE (new_alloc < old_alloc, 0)
-	  || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
+      Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1;
+      Idx new_alloc;
+      if (BE (IDX_MAX - old_alloc < incr_alloc, 0))
+	return REG_ESPACE;
+      new_alloc = old_alloc + incr_alloc;
+      if (BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
 	return REG_ESPACE;
       new_array = re_realloc (path->array, re_dfastate_t *, new_alloc);
       if (BE (new_array == NULL, 0))
@@ -3101,7 +3102,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
       assert (!IS_EPSILON_NODE (type));
 #endif
 #ifdef RE_ENABLE_I18N
-      /* If the node may accept `multi byte'.  */
+      /* If the node may accept "multi byte".  */
       if (dfa->nodes[cur_node].accept_mb)
 	{
 	  naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input,
@@ -3358,7 +3359,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
   bitset_word_t elem, mask;
   bool dests_node_malloced = false;
   bool dest_states_malloced = false;
-  Idx ndests; /* Number of the destination states from `state'.  */
+  Idx ndests; /* Number of the destination states from 'state'.  */
   re_dfastate_t **trtable;
   re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl;
   re_node_set follows, *dests_node;
@@ -3372,8 +3373,8 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
   } *dests_alloc;
 
   /* We build DFA states which corresponds to the destination nodes
-     from `state'.  `dests_node[i]' represents the nodes which i-th
-     destination state contains, and `dests_ch[i]' represents the
+     from 'state'.  'dests_node[i]' represents the nodes which i-th
+     destination state contains, and 'dests_ch[i]' represents the
      characters which i-th destination state accepts.  */
   if (__libc_use_alloca (sizeof (struct dests_alloc)))
     dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc));
@@ -3387,16 +3388,17 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
   dests_node = dests_alloc->dests_node;
   dests_ch = dests_alloc->dests_ch;
 
-  /* Initialize transiton table.  */
+  /* Initialize transition table.  */
   state->word_trtable = state->trtable = NULL;
 
-  /* At first, group all nodes belonging to `state' into several
+  /* At first, group all nodes belonging to 'state' into several
      destinations.  */
   ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
   if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0))
     {
       if (dests_node_malloced)
 	free (dests_alloc);
+      /* Return false in case of an error, true otherwise.  */
       if (ndests == 0)
 	{
 	  state->trtable = (re_dfastate_t **)
@@ -3592,13 +3594,13 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
   reg_errcode_t err;
   bool ok;
   Idx i, j, k;
-  Idx ndests; /* Number of the destinations from `state'.  */
+  Idx ndests; /* Number of the destinations from 'state'.  */
   bitset_t accepts; /* Characters a node can accept.  */
   const re_node_set *cur_nodes = &state->nodes;
   bitset_empty (accepts);
   ndests = 0;
 
-  /* For all the nodes belonging to `state',  */
+  /* For all the nodes belonging to 'state',  */
   for (i = 0; i < cur_nodes->nelem; ++i)
     {
       re_token_t *node = &dfa->nodes[cur_nodes->elems[i]];
@@ -3641,7 +3643,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
       else
 	continue;
 
-      /* Check the `accepts' and sift the characters which are not
+      /* Check the 'accepts' and sift the characters which are not
 	 match it the context.  */
       if (constraint)
 	{
@@ -3700,7 +3702,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
 	    }
 	}
 
-      /* Then divide `accepts' into DFA states, or create a new
+      /* Then divide 'accepts' into DFA states, or create a new
 	 state.  Above, we make sure that accepts is not empty.  */
       for (j = 0; j < ndests; ++j)
 	{
@@ -3713,7 +3715,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
 	  if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c))
 	    continue;
 
-	  /* Enumerate the intersection set of this state and `accepts'.  */
+	  /* Enumerate the intersection set of this state and 'accepts'.  */
 	  has_intersec = 0;
 	  for (k = 0; k < BITSET_WORDS; ++k)
 	    has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k];
@@ -3721,7 +3723,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
 	  if (!has_intersec)
 	    continue;
 
-	  /* Then check if this state is a subset of `accepts'.  */
+	  /* Then check if this state is a subset of 'accepts'.  */
 	  not_subset = not_consumed = 0;
 	  for (k = 0; k < BITSET_WORDS; ++k)
 	    {
@@ -3729,8 +3731,8 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
 	      not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k];
 	    }
 
-	  /* If this state isn't a subset of `accepts', create a
-	     new group state, which has the `remains'. */
+	  /* If this state isn't a subset of 'accepts', create a
+	     new group state, which has the 'remains'. */
 	  if (not_subset)
 	    {
 	      bitset_copy (dests_ch[ndests], remains);
@@ -3769,7 +3771,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
 }
 
 #ifdef RE_ENABLE_I18N
-/* Check how many bytes the node `dfa->nodes[node_idx]' accepts.
+/* Check how many bytes the node 'dfa->nodes[node_idx]' accepts.
    Return the number of the bytes the node accepts.
    STR_IDX is the current index of the input string.
 
@@ -3896,7 +3898,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
 	  const int32_t *table, *indirect;
 	  const unsigned char *weights, *extra;
 	  const char *collseqwc;
-	  int32_t idx;
 	  /* This #include defines a local function!  */
 #  include <locale/weight.h>
 
@@ -3954,7 +3955,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
 		_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
 	      indirect = (const int32_t *)
 		_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
-	      int32_t idx = findidx (&cp);
+	      int32_t idx = findidx (&cp, elem_len);
 	      if (idx > 0)
 		for (i = 0; i < cset->nequiv_classes; ++i)
 		  {
@@ -3985,7 +3986,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
 # endif /* _LIBC */
 	{
 	  /* match with range expression?  */
-#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__)
+#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && defined __STRICT_ANSI__)
 	  wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
 #else
 	  wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
@@ -4066,7 +4067,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
 	  /* Skip the collation sequence value.  */
 	  idx += sizeof (uint32_t);
 	  /* Skip the wide char sequence of the collating element.  */
-	  idx = idx + sizeof (uint32_t) * (extra[idx] + 1);
+	  idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1);
 	  /* If we found the entry, return the sequence value.  */
 	  if (found)
 	    return *(uint32_t *) (extra + idx);
@@ -4140,11 +4141,12 @@ extend_buffers (re_match_context_t *mctx)
   re_string_t *pstr = &mctx->input;
 
   /* Avoid overflow.  */
-  if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0))
+  if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2
+          <= pstr->bufs_len, 0))
     return REG_ESPACE;
 
-  /* Double the lengthes of the buffers.  */
-  ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+  /* Double the lengths of the buffers.  */
+  ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2));
   if (BE (ret != REG_NOERROR, 0))
     return ret;
 
@@ -4207,7 +4209,7 @@ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
       size_t max_object_size =
 	MAX (sizeof (struct re_backref_cache_entry),
 	     sizeof (re_sub_match_top_t *));
-      if (BE (SIZE_MAX / max_object_size < n, 0))
+      if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n, 0))
 	return REG_ESPACE;
 
       mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n);
diff --git a/gl/stdbool.in.h b/gl/stdbool.in.h
index 0f33b19..6ea7f70 100644
--- a/gl/stdbool.in.h
+++ b/gl/stdbool.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <haible at clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -12,8 +12,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_STDBOOL_H
 #define _GL_STDBOOL_H
diff --git a/gl/stddef.in.h b/gl/stddef.in.h
index 70f5a86..e17ef24 100644
--- a/gl/stddef.in.h
+++ b/gl/stddef.in.h
@@ -1,6 +1,6 @@
 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
 
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -13,8 +13,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake.  */
 
@@ -38,9 +37,9 @@
    remember if special invocation has ever been used to obtain wint_t,
    in which case we need to clean up NULL yet again.  */
 
-# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
+# if !(defined _ at GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
 #  ifdef __need_wint_t
-#   undef _GL_STDDEF_H
+#   undef _ at GUARD_PREFIX@_STDDEF_H
 #   define _GL_STDDEF_WINT_T
 #  endif
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
@@ -49,14 +48,14 @@
 #else
 /* Normal invocation convention.  */
 
-# ifndef _GL_STDDEF_H
+# ifndef _ at GUARD_PREFIX@_STDDEF_H
 
 /* The include_next requires a split double-inclusion guard.  */
 
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
 
-#  ifndef _GL_STDDEF_H
-#   define _GL_STDDEF_H
+#  ifndef _ at GUARD_PREFIX@_STDDEF_H
+#   define _ at GUARD_PREFIX@_STDDEF_H
 
 /* On NetBSD 5.0, the definition of NULL lacks proper parentheses.  */
 #if @REPLACE_NULL@
@@ -82,6 +81,6 @@
 # define wchar_t int
 #endif
 
-#  endif /* _GL_STDDEF_H */
-# endif /* _GL_STDDEF_H */
+#  endif /* _ at GUARD_PREFIX@_STDDEF_H */
+# endif /* _ at GUARD_PREFIX@_STDDEF_H */
 #endif /* __need_XXX */
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index 2502816..3a73abf 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
@@ -13,15 +13,14 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /*
  * ISO C 99 <stdint.h> for platforms that lack it.
  * <http://www.opengroup.org/susv3xbd/stdint.h.html>
  */
 
-#ifndef _GL_STDINT_H
+#ifndef _ at GUARD_PREFIX@_STDINT_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -34,6 +33,16 @@
    <inttypes.h>.  */
 #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 
+/* On Android (Bionic libc), <sys/types.h> includes this file before
+   having defined 'time_t'.  Therefore in this case avoid including
+   other system header files; just include the system's <stdint.h>.
+   Ideally we should test __BIONIC__ here, but it is only defined after
+   <sys/cdefs.h> has been included; hence test __ANDROID__ instead.  */
+#if defined __ANDROID__ \
+    && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
+#else
+
 /* Get those types that are already defined in other system include
    files, so that we can "#define int8_t signed char" below without
    worrying about a later system include file containing a "typedef
@@ -49,28 +58,40 @@
       diagnostics.  */
 #  define __STDINT_H__
 # endif
+
+  /* Some pre-C++11 <stdint.h> implementations need this.  */
+# ifdef __cplusplus
+#  ifndef __STDC_CONSTANT_MACROS
+#   define __STDC_CONSTANT_MACROS 1
+#  endif
+#  ifndef __STDC_LIMIT_MACROS
+#   define __STDC_LIMIT_MACROS 1
+#  endif
+# endif
+
   /* Other systems may have an incomplete or buggy <stdint.h>.
      Include it before <inttypes.h>, since any "#include <stdint.h>"
      in <inttypes.h> would reinclude us, skipping our contents because
-     _GL_STDINT_H is defined.
+     _ at GUARD_PREFIX@_STDINT_H is defined.
      The include_next requires a split double-inclusion guard.  */
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 #endif
 
-#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
-#define _GL_STDINT_H
+#if ! defined _ at GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+#define _ at GUARD_PREFIX@_STDINT_H
 
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
    AIX 5.2 <sys/types.h> isn't needed and causes troubles.
-   MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+   Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
    relies on the system <stdint.h> definitions, so include
    <sys/types.h> after @NEXT_STDINT_H at .  */
 #if @HAVE_SYS_TYPES_H@ && ! defined _AIX
 # include <sys/types.h>
 #endif
 
-/* Get LONG_MIN, LONG_MAX, ULONG_MAX.  */
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+   LONG_MIN, LONG_MAX, ULONG_MAX.  */
 #include <limits.h>
 
 #if @HAVE_INTTYPES_H@
@@ -93,7 +114,7 @@
 
 #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 
-/* Minimum and maximum values for a integer type under the usual assumption.
+/* Minimum and maximum values for an integer type under the usual assumption.
    Return an unspecified value if BITS == 0, adding a check to pacify
    picky compilers.  */
 
@@ -108,6 +129,8 @@
         warnings in the signed case.  */ \
      ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
 
+#if !GNULIB_defined_stdint_types
+
 /* 7.18.1.1. Exact-width integer types */
 
 /* Here we assume a standard architecture where the hardware integer
@@ -224,8 +247,9 @@ typedef unsigned long long int gl_uint64_t;
 
 /* Here we assume a standard architecture where the hardware integer
    types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
-   are taken from the same list of types.  Assume that 'long int'
-   is fast enough for all narrower integers.  */
+   are taken from the same list of types.  The following code normally
+   uses types consistent with glibc, as that lessens the chance of
+   incompatibility with older GNU hosts.  */
 
 #undef int_fast8_t
 #undef uint_fast8_t
@@ -235,12 +259,21 @@ typedef unsigned long long int gl_uint64_t;
 #undef uint_fast32_t
 #undef int_fast64_t
 #undef uint_fast64_t
-typedef long int gl_int_fast8_t;
-typedef unsigned long int gl_uint_fast8_t;
-typedef long int gl_int_fast16_t;
-typedef unsigned long int gl_uint_fast16_t;
+typedef signed char gl_int_fast8_t;
+typedef unsigned char gl_uint_fast8_t;
+
+#ifdef __sun
+/* Define types compatible with SunOS 5.10, so that code compiled under
+   earlier SunOS versions works with code compiled under SunOS 5.10.  */
+typedef int gl_int_fast32_t;
+typedef unsigned int gl_uint_fast32_t;
+#else
 typedef long int gl_int_fast32_t;
 typedef unsigned long int gl_uint_fast32_t;
+#endif
+typedef gl_int_fast32_t gl_int_fast16_t;
+typedef gl_uint_fast32_t gl_uint_fast16_t;
+
 #define int_fast8_t gl_int_fast8_t
 #define uint_fast8_t gl_uint_fast8_t
 #define int_fast16_t gl_int_fast16_t
@@ -268,26 +301,36 @@ typedef unsigned long int gl_uintptr_t;
 /* Note: These types are compiler dependent. It may be unwise to use them in
    public header files. */
 
-#undef intmax_t
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+/* If the system defines INTMAX_MAX, assume that intmax_t works, and
+   similarly for UINTMAX_MAX and uintmax_t.  This avoids problems with
+   assuming one type where another is used by the system.  */
+
+#ifndef INTMAX_MAX
+# undef INTMAX_C
+# undef intmax_t
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
 typedef long long int gl_intmax_t;
-# define intmax_t gl_intmax_t
-#elif defined GL_INT64_T
-# define intmax_t int64_t
-#else
+#  define intmax_t gl_intmax_t
+# elif defined GL_INT64_T
+#  define intmax_t int64_t
+# else
 typedef long int gl_intmax_t;
-# define intmax_t gl_intmax_t
+#  define intmax_t gl_intmax_t
+# endif
 #endif
 
-#undef uintmax_t
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#ifndef UINTMAX_MAX
+# undef UINTMAX_C
+# undef uintmax_t
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
 typedef unsigned long long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
-#elif defined GL_UINT64_T
-# define uintmax_t uint64_t
-#else
+#  define uintmax_t gl_uintmax_t
+# elif defined GL_UINT64_T
+#  define uintmax_t uint64_t
+# else
 typedef unsigned long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
+#  define uintmax_t gl_uintmax_t
+# endif
 #endif
 
 /* Verify that intmax_t and uintmax_t have the same size.  Too much code
@@ -296,9 +339,10 @@ typedef unsigned long int gl_uintmax_t;
 typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
                                 ? 1 : -1];
 
-/* 7.18.2. Limits of specified-width integer types */
+#define GNULIB_defined_stdint_types 1
+#endif /* !GNULIB_defined_stdint_types */
 
-#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
+/* 7.18.2. Limits of specified-width integer types */
 
 /* 7.18.2.1. Limits of exact-width integer types */
 
@@ -385,23 +429,29 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
 #undef INT_FAST8_MIN
 #undef INT_FAST8_MAX
 #undef UINT_FAST8_MAX
-#define INT_FAST8_MIN  LONG_MIN
-#define INT_FAST8_MAX  LONG_MAX
-#define UINT_FAST8_MAX  ULONG_MAX
+#define INT_FAST8_MIN  SCHAR_MIN
+#define INT_FAST8_MAX  SCHAR_MAX
+#define UINT_FAST8_MAX  UCHAR_MAX
 
 #undef INT_FAST16_MIN
 #undef INT_FAST16_MAX
 #undef UINT_FAST16_MAX
-#define INT_FAST16_MIN  LONG_MIN
-#define INT_FAST16_MAX  LONG_MAX
-#define UINT_FAST16_MAX  ULONG_MAX
+#define INT_FAST16_MIN  INT_FAST32_MIN
+#define INT_FAST16_MAX  INT_FAST32_MAX
+#define UINT_FAST16_MAX  UINT_FAST32_MAX
 
 #undef INT_FAST32_MIN
 #undef INT_FAST32_MAX
 #undef UINT_FAST32_MAX
-#define INT_FAST32_MIN  LONG_MIN
-#define INT_FAST32_MAX  LONG_MAX
-#define UINT_FAST32_MAX  ULONG_MAX
+#ifdef __sun
+# define INT_FAST32_MIN  INT_MIN
+# define INT_FAST32_MAX  INT_MAX
+# define UINT_FAST32_MAX  UINT_MAX
+#else
+# define INT_FAST32_MIN  LONG_MIN
+# define INT_FAST32_MAX  LONG_MAX
+# define UINT_FAST32_MAX  ULONG_MAX
+#endif
 
 #undef INT_FAST64_MIN
 #undef INT_FAST64_MAX
@@ -426,21 +476,23 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
 
 /* 7.18.2.5. Limits of greatest-width integer types */
 
-#undef INTMAX_MIN
-#undef INTMAX_MAX
-#ifdef INT64_MAX
-# define INTMAX_MIN  INT64_MIN
-# define INTMAX_MAX  INT64_MAX
-#else
-# define INTMAX_MIN  INT32_MIN
-# define INTMAX_MAX  INT32_MAX
+#ifndef INTMAX_MAX
+# undef INTMAX_MIN
+# ifdef INT64_MAX
+#  define INTMAX_MIN  INT64_MIN
+#  define INTMAX_MAX  INT64_MAX
+# else
+#  define INTMAX_MIN  INT32_MIN
+#  define INTMAX_MAX  INT32_MAX
+# endif
 #endif
 
-#undef UINTMAX_MAX
-#ifdef UINT64_MAX
-# define UINTMAX_MAX  UINT64_MAX
-#else
-# define UINTMAX_MAX  UINT32_MAX
+#ifndef UINTMAX_MAX
+# ifdef UINT64_MAX
+#  define UINTMAX_MAX  UINT64_MAX
+# else
+#  define UINTMAX_MAX  UINT32_MAX
+# endif
 #endif
 
 /* 7.18.3. Limits of other integer types */
@@ -492,7 +544,12 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
    sequence of nested includes
    <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
    <stdint.h> and assumes its types are already defined.  */
-#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
+#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
+  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+     included before <wchar.h>.  */
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
 # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
 # include <wchar.h>
 # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
@@ -512,12 +569,8 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
 #define WINT_MAX  \
    _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0 at WINT_T_SUFFIX@)
 
-#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
-
 /* 7.18.4. Macros for integer constants */
 
-#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
 /* 7.18.4.1. Macros for minimum-width integer constants */
 /* According to ISO C 99 Technical Corrigendum 1 */
 
@@ -558,25 +611,26 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
 
 /* 7.18.4.2. Macros for greatest-width integer constants */
 
-#undef INTMAX_C
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define INTMAX_C(x)   x##LL
-#elif defined GL_INT64_T
-# define INTMAX_C(x)   INT64_C(x)
-#else
-# define INTMAX_C(x)   x##L
+#ifndef INTMAX_C
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#  define INTMAX_C(x)   x##LL
+# elif defined GL_INT64_T
+#  define INTMAX_C(x)   INT64_C(x)
+# else
+#  define INTMAX_C(x)   x##L
+# endif
 #endif
 
-#undef UINTMAX_C
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define UINTMAX_C(x)  x##ULL
-#elif defined GL_UINT64_T
-# define UINTMAX_C(x)  UINT64_C(x)
-#else
-# define UINTMAX_C(x)  x##UL
+#ifndef UINTMAX_C
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#  define UINTMAX_C(x)  x##ULL
+# elif defined GL_UINT64_T
+#  define UINTMAX_C(x)  UINT64_C(x)
+# else
+#  define UINTMAX_C(x)  x##UL
+# endif
 #endif
 
-#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
-
-#endif /* _GL_STDINT_H */
-#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
+#endif /* _ at GUARD_PREFIX@_STDINT_H */
+#endif /* !(defined __ANDROID__ && ...) */
+#endif /* !defined _ at GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 4e850e1..72c9dd1 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2012 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -28,13 +28,13 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_STDLIB_H
+#ifndef _ at GUARD_PREFIX@_STDLIB_H
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
 
-#ifndef _GL_STDLIB_H
-#define _GL_STDLIB_H
+#ifndef _ at GUARD_PREFIX@_STDLIB_H
+#define _ at GUARD_PREFIX@_STDLIB_H
 
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
@@ -49,21 +49,28 @@
 # include <sys/loadavg.h>
 #endif
 
-/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
-   from <stdlib.h> if _REENTRANT is defined.  Include it always.  */
-#if @HAVE_RANDOM_H@
-# include <random.h>
+/* Native Windows platforms declare mktemp() in <io.h>.  */
+#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
 #endif
 
-#if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
-    || defined GNULIB_POSIXCHECK
-# include <stdint.h>
-#endif
+#if @GNULIB_RANDOM_R@
+
+/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
+   from <stdlib.h> if _REENTRANT is defined.  Include it whenever we need
+   'struct random_data'.  */
+# if @HAVE_RANDOM_H@
+#  include <random.h>
+# endif
+
+# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
+#  include <stdint.h>
+# endif
 
-#if !@HAVE_STRUCT_RANDOM_DATA@
+# if !@HAVE_STRUCT_RANDOM_DATA@
 /* Define 'struct random_data'.
    But allow multiple gnulib generated <stdlib.h> replacements to coexist.  */
-# if !GNULIB_defined_struct_random_data
+#  if !GNULIB_defined_struct_random_data
 struct random_data
 {
   int32_t *fptr;                /* Front pointer.  */
@@ -74,23 +81,29 @@ struct random_data
   int rand_sep;                 /* Distance between front and rear.  */
   int32_t *end_ptr;             /* Pointer behind state table.  */
 };
-#  define GNULIB_defined_struct_random_data 1
+#   define GNULIB_defined_struct_random_data 1
+#  endif
 # endif
 #endif
 
-#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
-/* On MacOS X 10.3, only <unistd.h> declares mkstemp.  */
+#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+/* On Mac OS X 10.3, only <unistd.h> declares mkstemp.  */
+/* On Mac OS X 10.5, only <unistd.h> declares mkstemps.  */
 /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt.  */
 /* But avoid namespace pollution on glibc systems and native Windows.  */
 # include <unistd.h>
 #endif
 
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
-#  define __attribute__(Spec)   /* empty */
-# endif
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The attribute __pure__ was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
 #endif
 
+/* The definition of _Noreturn is copied here.  */
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
@@ -116,7 +129,7 @@ struct random_data
 /* Terminate the current process with the given return code, without running
    the 'atexit' handlers.  */
 # if !@HAVE__EXIT@
-_GL_FUNCDECL_SYS (_Exit, void, (int status) __attribute__ ((__noreturn__)));
+_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
 # endif
 _GL_CXXALIAS_SYS (_Exit, void, (int status));
 _GL_CXXALIASWARN (_Exit);
@@ -133,7 +146,9 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
 /* Parse a signed decimal integer.
    Returns the value of the integer.  Errors are not detected.  */
 # if !@HAVE_ATOLL@
-_GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (atoll, long long, (const char *string)
+                                    _GL_ATTRIBUTE_PURE
+                                    _GL_ARG_NONNULL ((1)));
 # endif
 _GL_CXXALIAS_SYS (atoll, long long, (const char *string));
 _GL_CXXALIASWARN (atoll);
@@ -247,14 +262,19 @@ _GL_CXXALIASWARN (grantpt);
 #elif defined GNULIB_POSIXCHECK
 # undef grantpt
 # if HAVE_RAW_DECL_GRANTPT
-_GL_WARN_ON_USE (ptsname, "grantpt is not portable - "
+_GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
                  "use gnulib module grantpt for portability");
 # endif
 #endif
 
+/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not
+   rely on GNU or POSIX semantics for malloc and realloc (for example,
+   by never specifying a zero size), so it does not need malloc or
+   realloc to be redefined.  */
 #if @GNULIB_MALLOC_POSIX@
 # if @REPLACE_MALLOC@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
+        || _GL_USE_STDLIB_ALLOC)
 #   undef malloc
 #   define malloc rpl_malloc
 #  endif
@@ -264,13 +284,28 @@ _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
 _GL_CXXALIAS_SYS (malloc, void *, (size_t size));
 # endif
 _GL_CXXALIASWARN (malloc);
-#elif defined GNULIB_POSIXCHECK
+#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
 # undef malloc
 /* Assume malloc is always declared.  */
 _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
                  "use gnulib module malloc-posix for portability");
 #endif
 
+/* Convert a multibyte character to a wide character.  */
+#if @GNULIB_MBTOWC@
+# if @REPLACE_MBTOWC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mbtowc
+#   define mbtowc rpl_mbtowc
+#  endif
+_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+# else
+_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+# endif
+_GL_CXXALIASWARN (mbtowc);
+#endif
+
 #if @GNULIB_MKDTEMP@
 /* Create a unique temporary directory from TEMPLATE.
    The last six characters of TEMPLATE must be "XXXXXX";
@@ -403,6 +438,22 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
 # endif
 #endif
 
+#if @GNULIB_POSIX_OPENPT@
+/* Return an FD open to the master side of a pseudo-terminal.  Flags should
+   include O_RDWR, and may also include O_NOCTTY.  */
+# if !@HAVE_POSIX_OPENPT@
+_GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
+# endif
+_GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
+_GL_CXXALIASWARN (posix_openpt);
+#elif defined GNULIB_POSIXCHECK
+# undef posix_openpt
+# if HAVE_RAW_DECL_POSIX_OPENPT
+_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
+                 "use gnulib module posix_openpt for portability");
+# endif
+#endif
+
 #if @GNULIB_PTSNAME@
 /* Return the pathname of the pseudo-terminal slave associated with
    the master FD is open on, or NULL on errors.  */
@@ -419,6 +470,32 @@ _GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
 # endif
 #endif
 
+#if @GNULIB_PTSNAME_R@
+/* Set the pathname of the pseudo-terminal slave associated with
+   the master FD is open on and return 0, or set errno and return
+   non-zero on errors.  */
+# if @REPLACE_PTSNAME_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ptsname_r
+#   define ptsname_r rpl_ptsname_r
+#  endif
+_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
+_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
+# else
+#  if !@HAVE_PTSNAME_R@
+_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
+#  endif
+_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
+# endif
+_GL_CXXALIASWARN (ptsname_r);
+#elif defined GNULIB_POSIXCHECK
+# undef ptsname_r
+# if HAVE_RAW_DECL_PTSNAME_R
+_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
+                 "use gnulib module ptsname_r for portability");
+# endif
+#endif
+
 #if @GNULIB_PUTENV@
 # if @REPLACE_PUTENV@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -442,12 +519,83 @@ _GL_CXXALIASWARN (putenv);
 # endif
 #endif
 
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (random, long, (void));
+# endif
+_GL_CXXALIAS_SYS (random, long, (void));
+_GL_CXXALIASWARN (random);
+#elif defined GNULIB_POSIXCHECK
+# undef random
+# if HAVE_RAW_DECL_RANDOM
+_GL_WARN_ON_USE (random, "random is unportable - "
+                 "use gnulib module random for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
+# endif
+_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
+_GL_CXXALIASWARN (srandom);
+#elif defined GNULIB_POSIXCHECK
+# undef srandom
+# if HAVE_RAW_DECL_SRANDOM
+_GL_WARN_ON_USE (srandom, "srandom is unportable - "
+                 "use gnulib module random for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (initstate, char *,
+                  (unsigned int seed, char *buf, size_t buf_size)
+                  _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (initstate, char *,
+                  (unsigned int seed, char *buf, size_t buf_size));
+_GL_CXXALIASWARN (initstate);
+#elif defined GNULIB_POSIXCHECK
+# undef initstate
+# if HAVE_RAW_DECL_INITSTATE_R
+_GL_WARN_ON_USE (initstate, "initstate is unportable - "
+                 "use gnulib module random for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
+_GL_CXXALIASWARN (setstate);
+#elif defined GNULIB_POSIXCHECK
+# undef setstate
+# if HAVE_RAW_DECL_SETSTATE_R
+_GL_WARN_ON_USE (setstate, "setstate is unportable - "
+                 "use gnulib module random for portability");
+# endif
+#endif
+
+
 #if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef random_r
+#   define random_r rpl_random_r
+#  endif
+_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
+                                 _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
+# else
+#  if !@HAVE_RANDOM_R@
 _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
                                  _GL_ARG_NONNULL ((1, 2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
+# endif
 _GL_CXXALIASWARN (random_r);
 #elif defined GNULIB_POSIXCHECK
 # undef random_r
@@ -458,13 +606,25 @@ _GL_WARN_ON_USE (random_r, "random_r is unportable - "
 #endif
 
 #if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef srandom_r
+#   define srandom_r rpl_srandom_r
+#  endif
+_GL_FUNCDECL_RPL (srandom_r, int,
+                  (unsigned int seed, struct random_data *rand_state)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (srandom_r, int,
+                  (unsigned int seed, struct random_data *rand_state));
+# else
+#  if !@HAVE_RANDOM_R@
 _GL_FUNCDECL_SYS (srandom_r, int,
                   (unsigned int seed, struct random_data *rand_state)
                   _GL_ARG_NONNULL ((2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (srandom_r, int,
                   (unsigned int seed, struct random_data *rand_state));
+# endif
 _GL_CXXALIASWARN (srandom_r);
 #elif defined GNULIB_POSIXCHECK
 # undef srandom_r
@@ -475,15 +635,29 @@ _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
 #endif
 
 #if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef initstate_r
+#   define initstate_r rpl_initstate_r
+#  endif
+_GL_FUNCDECL_RPL (initstate_r, int,
+                  (unsigned int seed, char *buf, size_t buf_size,
+                   struct random_data *rand_state)
+                  _GL_ARG_NONNULL ((2, 4)));
+_GL_CXXALIAS_RPL (initstate_r, int,
+                  (unsigned int seed, char *buf, size_t buf_size,
+                   struct random_data *rand_state));
+# else
+#  if !@HAVE_RANDOM_R@
 _GL_FUNCDECL_SYS (initstate_r, int,
                   (unsigned int seed, char *buf, size_t buf_size,
                    struct random_data *rand_state)
                   _GL_ARG_NONNULL ((2, 4)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (initstate_r, int,
                   (unsigned int seed, char *buf, size_t buf_size,
                    struct random_data *rand_state));
+# endif
 _GL_CXXALIASWARN (initstate_r);
 #elif defined GNULIB_POSIXCHECK
 # undef initstate_r
@@ -494,13 +668,25 @@ _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
 #endif
 
 #if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef setstate_r
+#   define setstate_r rpl_setstate_r
+#  endif
+_GL_FUNCDECL_RPL (setstate_r, int,
+                  (char *arg_state, struct random_data *rand_state)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (setstate_r, int,
+                  (char *arg_state, struct random_data *rand_state));
+# else
+#  if !@HAVE_RANDOM_R@
 _GL_FUNCDECL_SYS (setstate_r, int,
                   (char *arg_state, struct random_data *rand_state)
                   _GL_ARG_NONNULL ((1, 2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (setstate_r, int,
                   (char *arg_state, struct random_data *rand_state));
+# endif
 _GL_CXXALIASWARN (setstate_r);
 #elif defined GNULIB_POSIXCHECK
 # undef setstate_r
@@ -513,7 +699,8 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
 
 #if @GNULIB_REALLOC_POSIX@
 # if @REPLACE_REALLOC@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
+        || _GL_USE_STDLIB_ALLOC)
 #   undef realloc
 #   define realloc rpl_realloc
 #  endif
@@ -523,7 +710,7 @@ _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
 _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
 # endif
 _GL_CXXALIASWARN (realloc);
-#elif defined GNULIB_POSIXCHECK
+#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
 # undef realloc
 /* Assume realloc is always declared.  */
 _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
@@ -720,7 +907,22 @@ _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
 # endif
 #endif
 
+/* Convert a wide character to a multibyte character.  */
+#if @GNULIB_WCTOMB@
+# if @REPLACE_WCTOMB@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wctomb
+#   define wctomb rpl_wctomb
+#  endif
+_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
+_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
+# else
+_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
+# endif
+_GL_CXXALIASWARN (wctomb);
+#endif
+
 
-#endif /* _GL_STDLIB_H */
-#endif /* _GL_STDLIB_H */
+#endif /* _ at GUARD_PREFIX@_STDLIB_H */
+#endif /* _ at GUARD_PREFIX@_STDLIB_H */
 #endif
diff --git a/gl/strcasecmp.c b/gl/strcasecmp.c
new file mode 100644
index 0000000..ec3c3e6
--- /dev/null
+++ b/gl/strcasecmp.c
@@ -0,0 +1,62 @@
+/* Case-insensitive string comparison function.
+   Copyright (C) 1998-1999, 2005-2007, 2009-2012 Free Software Foundation, Inc.
+
+   This program 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, 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, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+#include <ctype.h>
+#include <limits.h>
+
+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+   greater than zero if S1 is lexicographically less than, equal to or greater
+   than S2.
+   Note: This function does not work with multibyte strings!  */
+
+int
+strcasecmp (const char *s1, const char *s2)
+{
+  const unsigned char *p1 = (const unsigned char *) s1;
+  const unsigned char *p2 = (const unsigned char *) s2;
+  unsigned char c1, c2;
+
+  if (p1 == p2)
+    return 0;
+
+  do
+    {
+      c1 = TOLOWER (*p1);
+      c2 = TOLOWER (*p2);
+
+      if (c1 == '\0')
+        break;
+
+      ++p1;
+      ++p2;
+    }
+  while (c1 == c2);
+
+  if (UCHAR_MAX <= INT_MAX)
+    return c1 - c2;
+  else
+    /* On machines where 'char' and 'int' are types of the same size, the
+       difference of two 'unsigned char' values - including the sign bit -
+       doesn't fit in an 'int'.  */
+    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/gl/streq.h b/gl/streq.h
index 3b52893..7fd07c8 100644
--- a/gl/streq.h
+++ b/gl/streq.h
@@ -1,5 +1,5 @@
 /* Optimized string comparison.
-   Copyright (C) 2001-2002, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2007, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published
@@ -21,8 +21,8 @@
 
 #include <string.h>
 
-/* STREQ allows to optimize string comparison with a small literal string.
-     STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+/* STREQ_OPT allows to optimize string comparison with a small literal string.
+     STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
    is semantically equivalent to
      strcmp (s, "EUC-KR") == 0
    just faster.  */
@@ -163,12 +163,12 @@ streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23,
     return 0;
 }
 
-#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
   streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
 
 #else
 
-#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
   (strcmp (s1, s2) == 0)
 
 #endif
diff --git a/gl/strings.in.h b/gl/strings.in.h
new file mode 100644
index 0000000..95c4cf7
--- /dev/null
+++ b/gl/strings.in.h
@@ -0,0 +1,122 @@
+/* A substitute <strings.h>.
+
+   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+
+   This program 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, 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, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _ at GUARD_PREFIX@_STRINGS_H
+
+#if __GNUC__ >= 3
+ at PRAGMA_SYSTEM_HEADER@
+#endif
+ at PRAGMA_COLUMNS@
+
+/* Minix 3.1.8 has a bug: <sys/types.h> must be included before <strings.h>.
+   But avoid namespace pollution on glibc systems.  */
+#if defined __minix && !defined __GLIBC__
+# include <sys/types.h>
+#endif
+
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_STRINGS_H@
+# @INCLUDE_NEXT@ @NEXT_STRINGS_H@
+#endif
+
+#ifndef _ at GUARD_PREFIX@_STRINGS_H
+#define _ at GUARD_PREFIX@_STRINGS_H
+
+#if ! @HAVE_DECL_STRNCASECMP@
+/* Get size_t.  */
+# include <stddef.h>
+#endif
+
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+  /* Find the index of the least-significant set bit.  */
+#if @GNULIB_FFS@
+# if !@HAVE_FFS@
+_GL_FUNCDECL_SYS (ffs, int, (int i));
+# endif
+_GL_CXXALIAS_SYS (ffs, int, (int i));
+_GL_CXXALIASWARN (ffs);
+#elif defined GNULIB_POSIXCHECK
+# undef ffs
+# if HAVE_RAW_DECL_FFS
+_GL_WARN_ON_USE (ffs, "ffs is not portable - use the ffs module");
+# endif
+#endif
+
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+   greater than zero if S1 is lexicographically less than, equal to or greater
+   than S2.
+   Note: This function does not work in multibyte locales.  */
+#if ! @HAVE_STRCASECMP@
+extern int strcasecmp (char const *s1, char const *s2)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+#if defined GNULIB_POSIXCHECK
+/* strcasecmp() does not work with multibyte strings:
+   POSIX says that it operates on "strings", and "string" in POSIX is defined
+   as a sequence of bytes, not of characters.   */
+# undef strcasecmp
+# if HAVE_RAW_DECL_STRCASECMP
+_GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character "
+                 "strings in multibyte locales - "
+                 "use mbscasecmp if you care about "
+                 "internationalization, or use c_strcasecmp , "
+                 "gnulib module c-strcase) if you want a locale "
+                 "independent function");
+# endif
+#endif
+
+/* Compare no more than N bytes of strings S1 and S2, ignoring case,
+   returning less than, equal to or greater than zero if S1 is
+   lexicographically less than, equal to or greater than S2.
+   Note: This function cannot work correctly in multibyte locales.  */
+#if ! @HAVE_DECL_STRNCASECMP@
+extern int strncasecmp (char const *s1, char const *s2, size_t n)
+     _GL_ARG_NONNULL ((1, 2));
+#endif
+#if defined GNULIB_POSIXCHECK
+/* strncasecmp() does not work with multibyte strings:
+   POSIX says that it operates on "strings", and "string" in POSIX is defined
+   as a sequence of bytes, not of characters.  */
+# undef strncasecmp
+# if HAVE_RAW_DECL_STRNCASECMP
+_GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character "
+                 "strings in multibyte locales - "
+                 "use mbsncasecmp or mbspcasecmp if you care about "
+                 "internationalization, or use c_strncasecmp , "
+                 "gnulib module c-strcase) if you want a locale "
+                 "independent function");
+# endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ at GUARD_PREFIX@_STRING_H */
+#endif /* _ at GUARD_PREFIX@_STRING_H */
diff --git a/gl/strncasecmp.c b/gl/strncasecmp.c
new file mode 100644
index 0000000..a61d55f
--- /dev/null
+++ b/gl/strncasecmp.c
@@ -0,0 +1,62 @@
+/* strncasecmp.c -- case insensitive string comparator
+   Copyright (C) 1998-1999, 2005-2007, 2009-2012 Free Software Foundation, Inc.
+
+   This program 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, 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, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+#include <ctype.h>
+#include <limits.h>
+
+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+
+/* Compare no more than N bytes of strings S1 and S2, ignoring case,
+   returning less than, equal to or greater than zero if S1 is
+   lexicographically less than, equal to or greater than S2.
+   Note: This function cannot work correctly in multibyte locales.  */
+
+int
+strncasecmp (const char *s1, const char *s2, size_t n)
+{
+  register const unsigned char *p1 = (const unsigned char *) s1;
+  register const unsigned char *p2 = (const unsigned char *) s2;
+  unsigned char c1, c2;
+
+  if (p1 == p2 || n == 0)
+    return 0;
+
+  do
+    {
+      c1 = TOLOWER (*p1);
+      c2 = TOLOWER (*p2);
+
+      if (--n == 0 || c1 == '\0')
+        break;
+
+      ++p1;
+      ++p2;
+    }
+  while (c1 == c2);
+
+  if (UCHAR_MAX <= INT_MAX)
+    return c1 - c2;
+  else
+    /* On machines where 'char' and 'int' are types of the same size, the
+       difference of two 'unsigned char' values - including the sign bit -
+       doesn't fit in an 'int'.  */
+    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h
new file mode 100644
index 0000000..6eedaeb
--- /dev/null
+++ b/gl/sys_types.in.h
@@ -0,0 +1,51 @@
+/* Provide a more complete sys/types.h.
+
+   Copyright (C) 2011-2012 Free Software Foundation, Inc.
+
+   This program 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, 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, see <http://www.gnu.org/licenses/>.  */
+
+#if __GNUC__ >= 3
+ at PRAGMA_SYSTEM_HEADER@
+#endif
+ at PRAGMA_COLUMNS@
+
+#ifndef _ at GUARD_PREFIX@_SYS_TYPES_H
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
+
+#ifndef _ at GUARD_PREFIX@_SYS_TYPES_H
+#define _ at GUARD_PREFIX@_SYS_TYPES_H
+
+/* Override off_t if Large File Support is requested on native Windows.  */
+#if @WINDOWS_64_BIT_OFF_T@
+/* Same as int64_t in <stdint.h>.  */
+# if defined _MSC_VER
+#  define off_t __int64
+# else
+#  define off_t long long int
+# endif
+/* Indicator, for gnulib internal purposes.  */
+# define _GL_WINDOWS_64_BIT_OFF_T 1
+#endif
+
+/* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>.  */
+/* But avoid namespace pollution on glibc systems.  */
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+    && ! defined __GLIBC__
+# include <stddef.h>
+#endif
+
+#endif /* _ at GUARD_PREFIX@_SYS_TYPES_H */
+#endif /* _ at GUARD_PREFIX@_SYS_TYPES_H */
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 694e94f..e96a39c 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <unistd.h>.
-   Copyright (C) 2003-2011 Free Software Foundation, Inc.
+   Copyright (C) 2003-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -12,8 +12,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -36,7 +35,7 @@
 # define _GL_WINSOCK2_H_WITNESS
 
 /* Normal invocation.  */
-#elif !defined _GL_UNISTD_H
+#elif !defined _ at GUARD_PREFIX@_UNISTD_H
 
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_UNISTD_H@
@@ -51,8 +50,8 @@
 # undef _GL_INCLUDING_WINSOCK2_H
 #endif
 
-#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
-#define _GL_UNISTD_H
+#if !defined _ at GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
+#define _ at GUARD_PREFIX@_UNISTD_H
 
 /* NetBSD 5.0 mis-defines NULL.  Also get size_t.  */
 #include <stddef.h>
@@ -75,16 +74,27 @@
 #endif
 
 /* mingw fails to declare _exit in <unistd.h>.  */
-/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
+/* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in
+   <unistd.h>.  */
 /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
 #ifndef __GLIBC__
 # include <stdlib.h>
 #endif
 
-/* mingw declares getcwd in <io.h>, not in <unistd.h>.  */
-#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
+/* Native Windows platforms declare chdir, getcwd, rmdir in
+   <io.h> and/or <direct.h>, not in <unistd.h>.
+   They also declare access(), chmod(), close(), dup(), dup2(), isatty(),
+   lseek(), read(), unlink(), write() in <io.h>.  */
+#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
+      || defined GNULIB_POSIXCHECK) \
      && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# include <io.h>     /* mingw32, mingw64 */
+# include <direct.h> /* mingw64, MSVC 9 */
+#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \
+       || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \
+       || defined GNULIB_POSIXCHECK) \
+      && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
 # include <io.h>
 #endif
 
@@ -97,7 +107,15 @@
 # include <netdb.h>
 #endif
 
-#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
+/* MSVC defines off_t in <sys/types.h>.
+   May also define off_t to a 64-bit type on native Windows.  */
+#if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@
+/* Get off_t.  */
+# include <sys/types.h>
+#endif
+
+#if (@GNULIB_READ@ || @GNULIB_WRITE@ \
+     || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
      || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
 /* Get ssize_t.  */
 # include <sys/types.h>
@@ -116,78 +134,77 @@
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
 
-#if @GNULIB_GETHOSTNAME@
-/* Get all possible declarations of gethostname().  */
-# if @UNISTD_H_HAVE_WINSOCK2_H@
-#  if !defined _GL_SYS_SOCKET_H
-#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#    undef socket
-#    define socket              socket_used_without_including_sys_socket_h
-#    undef connect
-#    define connect             connect_used_without_including_sys_socket_h
-#    undef accept
-#    define accept              accept_used_without_including_sys_socket_h
-#    undef bind
-#    define bind                bind_used_without_including_sys_socket_h
-#    undef getpeername
-#    define getpeername         getpeername_used_without_including_sys_socket_h
-#    undef getsockname
-#    define getsockname         getsockname_used_without_including_sys_socket_h
-#    undef getsockopt
-#    define getsockopt          getsockopt_used_without_including_sys_socket_h
-#    undef listen
-#    define listen              listen_used_without_including_sys_socket_h
-#    undef recv
-#    define recv                recv_used_without_including_sys_socket_h
-#    undef send
-#    define send                send_used_without_including_sys_socket_h
-#    undef recvfrom
-#    define recvfrom            recvfrom_used_without_including_sys_socket_h
-#    undef sendto
-#    define sendto              sendto_used_without_including_sys_socket_h
-#    undef setsockopt
-#    define setsockopt          setsockopt_used_without_including_sys_socket_h
-#    undef shutdown
-#    define shutdown            shutdown_used_without_including_sys_socket_h
-#   else
-     _GL_WARN_ON_USE (socket,
-                      "socket() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (connect,
-                      "connect() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (accept,
-                      "accept() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (bind,
-                      "bind() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (getpeername,
-                      "getpeername() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (getsockname,
-                      "getsockname() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (getsockopt,
-                      "getsockopt() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (listen,
-                      "listen() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (recv,
-                      "recv() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (send,
-                      "send() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (recvfrom,
-                      "recvfrom() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (sendto,
-                      "sendto() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (setsockopt,
-                      "setsockopt() used without including <sys/socket.h>");
-     _GL_WARN_ON_USE (shutdown,
-                      "shutdown() used without including <sys/socket.h>");
-#   endif
+/* Hide some function declarations from <winsock2.h>.  */
+
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
+# if !defined _ at GUARD_PREFIX@_SYS_SOCKET_H
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef socket
+#   define socket              socket_used_without_including_sys_socket_h
+#   undef connect
+#   define connect             connect_used_without_including_sys_socket_h
+#   undef accept
+#   define accept              accept_used_without_including_sys_socket_h
+#   undef bind
+#   define bind                bind_used_without_including_sys_socket_h
+#   undef getpeername
+#   define getpeername         getpeername_used_without_including_sys_socket_h
+#   undef getsockname
+#   define getsockname         getsockname_used_without_including_sys_socket_h
+#   undef getsockopt
+#   define getsockopt          getsockopt_used_without_including_sys_socket_h
+#   undef listen
+#   define listen              listen_used_without_including_sys_socket_h
+#   undef recv
+#   define recv                recv_used_without_including_sys_socket_h
+#   undef send
+#   define send                send_used_without_including_sys_socket_h
+#   undef recvfrom
+#   define recvfrom            recvfrom_used_without_including_sys_socket_h
+#   undef sendto
+#   define sendto              sendto_used_without_including_sys_socket_h
+#   undef setsockopt
+#   define setsockopt          setsockopt_used_without_including_sys_socket_h
+#   undef shutdown
+#   define shutdown            shutdown_used_without_including_sys_socket_h
+#  else
+    _GL_WARN_ON_USE (socket,
+                     "socket() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (connect,
+                     "connect() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (accept,
+                     "accept() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (bind,
+                     "bind() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (getpeername,
+                     "getpeername() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (getsockname,
+                     "getsockname() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (getsockopt,
+                     "getsockopt() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (listen,
+                     "listen() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (recv,
+                     "recv() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (send,
+                     "send() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (recvfrom,
+                     "recvfrom() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (sendto,
+                     "sendto() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (setsockopt,
+                     "setsockopt() used without including <sys/socket.h>");
+    _GL_WARN_ON_USE (shutdown,
+                     "shutdown() used without including <sys/socket.h>");
 #  endif
-#  if !defined _GL_SYS_SELECT_H
-#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#    undef select
-#    define select              select_used_without_including_sys_select_h
-#   else
-     _GL_WARN_ON_USE (select,
-                      "select() used without including <sys/select.h>");
-#   endif
+# endif
+# if !defined _ at GUARD_PREFIX@_SYS_SELECT_H
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef select
+#   define select              select_used_without_including_sys_select_h
+#  else
+    _GL_WARN_ON_USE (select,
+                     "select() used without including <sys/select.h>");
 #  endif
 # endif
 #endif
@@ -223,12 +240,24 @@ _GL_WARN_ON_USE (access, "the access function is a security risk - "
 #endif
 
 
+#if @GNULIB_CHDIR@
+_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIASWARN (chdir);
+#elif defined GNULIB_POSIXCHECK
+# undef chdir
+# if HAVE_RAW_DECL_CHDIR
+_GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
+                 "use gnulib module chdir for portability");
+# endif
+#endif
+
+
 #if @GNULIB_CHOWN@
 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
    to GID (if GID is not -1).  Follow symbolic links.
    Return 0 if successful, otherwise -1 and errno set.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/chown.html>.  */
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html.  */
 # if @REPLACE_CHOWN@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef chown
@@ -279,24 +308,32 @@ _GL_WARN_ON_USE (close, "close does not portably work on sockets - "
 #endif
 
 
-#if @REPLACE_DUP@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#  define dup rpl_dup
-# endif
+#if @GNULIB_DUP@
+# if @REPLACE_DUP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define dup rpl_dup
+#  endif
 _GL_FUNCDECL_RPL (dup, int, (int oldfd));
 _GL_CXXALIAS_RPL (dup, int, (int oldfd));
-#else
+# else
 _GL_CXXALIAS_SYS (dup, int, (int oldfd));
-#endif
+# endif
 _GL_CXXALIASWARN (dup);
+#elif defined GNULIB_POSIXCHECK
+# undef dup
+# if HAVE_RAW_DECL_DUP
+_GL_WARN_ON_USE (dup, "dup is unportable - "
+                 "use gnulib module dup for portability");
+# endif
+#endif
 
 
 #if @GNULIB_DUP2@
 /* Copy the file descriptor OLDFD into file descriptor NEWFD.  Do nothing if
    NEWFD = OLDFD, otherwise close NEWFD first if it is open.
    Return newfd if successful, otherwise -1 and errno set.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/dup2.html>.  */
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>.  */
 # if @REPLACE_DUP2@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define dup2 rpl_dup2
@@ -425,8 +462,8 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
 /* Change the process' current working directory to the directory on which
    the given file descriptor is open.
    Return 0 if successful, otherwise -1 and errno set.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/fchdir.html>.  */
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>.  */
 # if ! @HAVE_FCHDIR@
 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
 
@@ -483,11 +520,30 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
 #endif
 
 
-#if @GNULIB_FSYNC@
+#if @GNULIB_FDATASYNC@
 /* Synchronize changes to a file.
    Return 0 if successful, otherwise -1 and errno set.
-   See POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/fsync.html>.  */
+   See POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>.  */
+# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
+_GL_FUNCDECL_SYS (fdatasync, int, (int fd));
+# endif
+_GL_CXXALIAS_SYS (fdatasync, int, (int fd));
+_GL_CXXALIASWARN (fdatasync);
+#elif defined GNULIB_POSIXCHECK
+# undef fdatasync
+# if HAVE_RAW_DECL_FDATASYNC
+_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - "
+                 "use gnulib module fdatasync for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FSYNC@
+/* Synchronize changes, including metadata, to a file.
+   Return 0 if successful, otherwise -1 and errno set.
+   See POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>.  */
 # if !@HAVE_FSYNC@
 _GL_FUNCDECL_SYS (fsync, int, (int fd));
 # endif
@@ -505,12 +561,21 @@ _GL_WARN_ON_USE (fsync, "fsync is unportable - "
 #if @GNULIB_FTRUNCATE@
 /* Change the size of the file to which FD is opened to become equal to LENGTH.
    Return 0 if successful, otherwise -1 and errno set.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/ftruncate.html>.  */
-# if !@HAVE_FTRUNCATE@
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>.  */
+# if @REPLACE_FTRUNCATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ftruncate
+#   define ftruncate rpl_ftruncate
+#  endif
+_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length));
+_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length));
+# else
+#  if !@HAVE_FTRUNCATE@
 _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
+# endif
 _GL_CXXALIASWARN (ftruncate);
 #elif defined GNULIB_POSIXCHECK
 # undef ftruncate
@@ -526,8 +591,8 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
    of BUF.
    Return BUF if successful, or NULL if the directory couldn't be determined
    or SIZE was too small.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/getcwd.html>.
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
    Additionally, the gnulib module 'getcwd' guarantees the following GNU
    extension: If BUF is NULL, an array is allocated with 'malloc'; the array
    is SIZE bytes long, unless SIZE == 0, in which case it is as big as
@@ -796,11 +861,14 @@ _GL_CXXALIAS_RPL (getpagesize, int, (void));
 #    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #     define getpagesize() _gl_getpagesize ()
 #    else
+#     if !GNULIB_defined_getpagesize_function
 static inline int
 getpagesize ()
 {
   return _gl_getpagesize ();
 }
+#      define GNULIB_defined_getpagesize_function 1
+#     endif
 #    endif
 #   endif
 #  endif
@@ -867,12 +935,49 @@ _GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
 #endif
 
 
+#if @GNULIB_GROUP_MEMBER@
+/* Determine whether group id is in calling user's group list.  */
+# if !@HAVE_GROUP_MEMBER@
+_GL_FUNCDECL_SYS (group_member, int, (gid_t gid));
+# endif
+_GL_CXXALIAS_SYS (group_member, int, (gid_t gid));
+_GL_CXXALIASWARN (group_member);
+#elif defined GNULIB_POSIXCHECK
+# undef group_member
+# if HAVE_RAW_DECL_GROUP_MEMBER
+_GL_WARN_ON_USE (group_member, "group_member is unportable - "
+                 "use gnulib module group-member for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ISATTY@
+# if @REPLACE_ISATTY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef isatty
+#   define isatty rpl_isatty
+#  endif
+_GL_FUNCDECL_RPL (isatty, int, (int fd));
+_GL_CXXALIAS_RPL (isatty, int, (int fd));
+# else
+_GL_CXXALIAS_SYS (isatty, int, (int fd));
+# endif
+_GL_CXXALIASWARN (isatty);
+#elif defined GNULIB_POSIXCHECK
+# undef isatty
+# if HAVE_RAW_DECL_ISATTY
+_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
+                 "use gnulib module isatty for portability");
+# endif
+#endif
+
+
 #if @GNULIB_LCHOWN@
 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
    to GID (if GID is not -1).  Do not follow symbolic links.
    Return 0 if successful, otherwise -1 and errno set.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/lchown.html>.  */
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>.  */
 # if @REPLACE_LCHOWN@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef lchown
@@ -901,8 +1006,8 @@ _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
 #if @GNULIB_LINK@
 /* Create a new hard link for an existing file.
    Return 0 if successful, otherwise -1 and errno set.
-   See POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/link.html>.  */
+   See POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>.  */
 # if @REPLACE_LINK@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define link rpl_link
@@ -967,8 +1072,8 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - "
 #if @GNULIB_LSEEK@
 /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
    Return the new offset if successful, otherwise -1 and errno set.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/lseek.html>.  */
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>.  */
 # if @REPLACE_LSEEK@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define lseek rpl_lseek
@@ -1038,10 +1143,12 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
 #if @GNULIB_PREAD@
 /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET.
    Return the number of bytes placed into BUF if successful, otherwise
-   set errno and return -1.  0 indicates EOF.  See the POSIX:2001
-   specification <http://www.opengroup.org/susv3xsh/pread.html>.  */
+   set errno and return -1.  0 indicates EOF.
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>.  */
 # if @REPLACE_PREAD@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pread
 #   define pread rpl_pread
 #  endif
 _GL_FUNCDECL_RPL (pread, ssize_t,
@@ -1072,10 +1179,11 @@ _GL_WARN_ON_USE (pread, "pread is unportable - "
 /* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET.
    Return the number of bytes written if successful, otherwise
    set errno and return -1.  0 indicates nothing written.  See the
-   POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/pwrite.html>.  */
+   POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>.  */
 # if @REPLACE_PWRITE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pwrite
 #   define pwrite rpl_pwrite
 #  endif
 _GL_FUNCDECL_RPL (pwrite, ssize_t,
@@ -1102,12 +1210,34 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
 #endif
 
 
+#if @GNULIB_READ@
+/* Read up to COUNT bytes from file descriptor FD into the buffer starting
+   at BUF.  See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>.  */
+# if @REPLACE_READ@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef read
+#   define read rpl_read
+#  endif
+_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
+                                 _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
+# else
+/* Need to cast, because on mingw, the third parameter is
+                                                          unsigned int count
+   and the return type is 'int'.  */
+_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count));
+# endif
+_GL_CXXALIASWARN (read);
+#endif
+
+
 #if @GNULIB_READLINK@
 /* Read the contents of the symbolic link FILE and place the first BUFSIZE
    bytes of it into BUF.  Return the number of bytes placed into BUF if
    successful, otherwise -1 and errno set.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/readlink.html>.  */
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>.  */
 # if @REPLACE_READLINK@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define readlink rpl_readlink
@@ -1175,11 +1305,38 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
 #endif
 
 
+#if @GNULIB_SETHOSTNAME@
+/* Set the host name of the machine.
+   The host name may or may not be fully qualified.
+
+   Put LEN bytes of NAME into the host name.
+   Return 0 if successful, otherwise, set errno and return -1.
+
+   Platforms with no ability to set the hostname return -1 and set
+   errno = ENOSYS.  */
+# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
+_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
+                                    _GL_ARG_NONNULL ((1)));
+# endif
+/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
+   and FreeBSD 6.4 the second parameter is int.  On Solaris 11
+   2011-10, the first parameter is not const.  */
+_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
+_GL_CXXALIASWARN (sethostname);
+#elif defined GNULIB_POSIXCHECK
+# undef sethostname
+# if HAVE_RAW_DECL_SETHOSTNAME
+_GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
+                 "use gnulib module sethostname for portability");
+# endif
+#endif
+
+
 #if @GNULIB_SLEEP@
 /* Pause the execution of the current thread for N seconds.
    Returns the number of seconds left to sleep.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/sleep.html>.  */
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>.  */
 # if @REPLACE_SLEEP@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef sleep
@@ -1328,7 +1485,7 @@ _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
 /* Pause the execution of the current thread for N microseconds.
    Returns 0 on completion, or -1 on range error.
    See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/sleep.html>.  */
+   <http://www.opengroup.org/susv3xsh/usleep.html>.  */
 # if @REPLACE_USLEEP@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef usleep
@@ -1354,9 +1511,9 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - "
 
 #if @GNULIB_WRITE@
 /* Write up to COUNT bytes starting at BUF to file descriptor FD.
-   See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/write.html>.  */
-# if @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
+   See the POSIX:2008 specification
+   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>.  */
+# if @REPLACE_WRITE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef write
 #   define write rpl_write
@@ -1374,5 +1531,5 @@ _GL_CXXALIASWARN (write);
 #endif
 
 
-#endif /* _GL_UNISTD_H */
-#endif /* _GL_UNISTD_H */
+#endif /* _ at GUARD_PREFIX@_UNISTD_H */
+#endif /* _ at GUARD_PREFIX@_UNISTD_H */
diff --git a/gl/verify.h b/gl/verify.h
index a40d58a..6c4bd43 100644
--- a/gl/verify.h
+++ b/gl/verify.h
@@ -1,6 +1,6 @@
 /* Compile-time assert-like macros.
 
-   Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -17,21 +17,39 @@
 
 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
 
-#ifndef VERIFY_H
-# define VERIFY_H 1
+#ifndef _GL_VERIFY_H
+# define _GL_VERIFY_H
+
+
+/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
+   This is supported by GCC 4.6.0 and later, in C mode, and its use
+   here generates easier-to-read diagnostics when verify (R) fails.
+
+   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
+   This will likely be supported by future GCC versions, in C++ mode.
+
+   Use this only with GCC.  If we were willing to slow 'configure'
+   down we could also use it with other compilers, but since this
+   affects only the quality of diagnostics, why bother?  */
+# if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus
+#  define _GL_HAVE__STATIC_ASSERT 1
+# endif
+/* The condition (99 < __GNUC__) is temporary, until we know about the
+   first G++ release that supports static_assert.  */
+# if (99 < __GNUC__) && defined __cplusplus
+#  define _GL_HAVE_STATIC_ASSERT 1
+# endif
 
 /* Each of these macros verifies that its argument R is nonzero.  To
    be portable, R should be an integer constant expression.  Unlike
    assert (R), there is no run-time overhead.
 
-   There are two macros, since no single macro can be used in all
-   contexts in C.  verify_true (R) is for scalar contexts, including
-   integer constant expression contexts.  verify (R) is for declaration
-   contexts, e.g., the top level.
-
-   Symbols ending in "__" are private to this header.
+   If _Static_assert works, verify (R) uses it directly.  Similarly,
+   _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct
+   that is an operand of sizeof.
 
-   The code below uses several ideas.
+   The code below uses several ideas for C++ compilers, and for C
+   compilers that do not support _Static_assert:
 
    * The first step is ((R) ? 1 : -1).  Given an expression R, of
      integral or boolean or floating-point type, this yields an
@@ -39,7 +57,9 @@
      constant and nonnegative.
 
    * Next this expression W is wrapped in a type
-     struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
+     struct _gl_verify_type {
+       unsigned int _gl_verify_error_if_negative: W;
+     }.
      If W is negative, this yields a compile-time error.  No compiler can
      deal with a bit-field of negative size.
 
@@ -53,7 +73,7 @@
 
        void function (int n) { verify (n < 0); }
 
-   * For the verify macro, the struct verify_type__ will need to
+   * For the verify macro, the struct _gl_verify_type will need to
      somehow be embedded into a declaration.  To be portable, this
      declaration must declare an object, a constant, a function, or a
      typedef name.  If the declared entity uses the type directly,
@@ -91,11 +111,11 @@
      Which of the following alternatives can be used?
 
        extern int dummy [sizeof (struct {...})];
-       extern int dummy [sizeof (struct verify_type__ {...})];
+       extern int dummy [sizeof (struct _gl_verify_type {...})];
        extern void dummy (int [sizeof (struct {...})]);
-       extern void dummy (int [sizeof (struct verify_type__ {...})]);
+       extern void dummy (int [sizeof (struct _gl_verify_type {...})]);
        extern int (*dummy (void)) [sizeof (struct {...})];
-       extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
+       extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})];
 
      In the second and sixth case, the struct type is exported to the
      outer scope; two such declarations therefore collide.  GCC warns
@@ -109,15 +129,9 @@
      __COUNTER__ macro that can let us generate unique identifiers for
      each dummy function, to suppress this warning.
 
-   * This implementation exploits the fact that GCC does not warn about
-     the last declaration mentioned above.  If a future version of GCC
-     introduces a warning for this, the problem could be worked around
-     by using code specialized to GCC, just as __COUNTER__ is already
-     being used if available.
-
-       #if 4 <= __GNUC__
-       # define verify(R) [another version to keep GCC happy]
-       #endif
+   * This implementation exploits the fact that older versions of GCC,
+     which do not support _Static_assert, also do not warn about the
+     last declaration mentioned above.
 
    * In C++, any struct definition inside sizeof is invalid.
      Use a template type to work around the problem.  */
@@ -140,24 +154,88 @@
    possible.  */
 # define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
 
-/* Verify requirement R at compile-time, as an integer constant expression.
-   Return 1.  */
+/* Verify requirement R at compile-time, as an integer constant expression
+   that returns 1.  If R is false, fail at compile-time, preferably
+   with a diagnostic that includes the string-literal DIAGNOSTIC.  */
+
+# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
+    (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
 
 # ifdef __cplusplus
+#  if !GNULIB_defined_struct__gl_verify_type
 template <int w>
-  struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
-#  define verify_true(R) \
-     (!!sizeof (verify_type__<(R) ? 1 : -1>))
+  struct _gl_verify_type {
+    unsigned int _gl_verify_error_if_negative: w;
+  };
+#   define GNULIB_defined_struct__gl_verify_type 1
+#  endif
+#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+    _gl_verify_type<(R) ? 1 : -1>
+# elif defined _GL_HAVE__STATIC_ASSERT
+#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+     struct {                                   \
+       _Static_assert (R, DIAGNOSTIC);          \
+       int _gl_dummy;                          \
+     }
 # else
-#  define verify_true(R) \
-     (!!sizeof \
-      (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
+#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+     struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
 # endif
 
 /* Verify requirement R at compile-time, as a declaration without a
+   trailing ';'.  If R is false, fail at compile-time, preferably
+   with a diagnostic that includes the string-literal DIAGNOSTIC.
+
+   Unfortunately, unlike C11, this implementation must appear as an
+   ordinary declaration, and cannot appear inside struct { ... }.  */
+
+# ifdef _GL_HAVE__STATIC_ASSERT
+#  define _GL_VERIFY _Static_assert
+# else
+#  define _GL_VERIFY(R, DIAGNOSTIC)				       \
+     extern int (*_GL_GENSYM (_gl_verify_function) (void))	       \
+       [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
+# endif
+
+/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
+# ifdef _GL_STATIC_ASSERT_H
+#  if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
+#   define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
+#  endif
+#  if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
+#   define static_assert _Static_assert /* C11 requires this #define.  */
+#  endif
+# endif
+
+/* @assert.h omit start@  */
+
+/* Each of these macros verifies that its argument R is nonzero.  To
+   be portable, R should be an integer constant expression.  Unlike
+   assert (R), there is no run-time overhead.
+
+   There are two macros, since no single macro can be used in all
+   contexts in C.  verify_true (R) is for scalar contexts, including
+   integer constant expression contexts.  verify (R) is for declaration
+   contexts, e.g., the top level.  */
+
+/* Verify requirement R at compile-time, as an integer constant expression.
+   Return 1.  This is equivalent to verify_expr (R, 1).
+
+   verify_true is obsolescent; please use verify_expr instead.  */
+
+# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
+
+/* Verify requirement R at compile-time.  Return the value of the
+   expression E.  */
+
+# define verify_expr(R, E) \
+    (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
+
+/* Verify requirement R at compile-time, as a declaration without a
    trailing ';'.  */
 
-# define verify(R) \
-    extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)]
+# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+
+/* @assert.h omit end@  */
 
 #endif
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index 3ef65aa..5c93616 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -13,8 +13,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake.  */
 
@@ -49,7 +48,7 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_WCHAR_H
+#ifndef _ at GUARD_PREFIX@_WCHAR_H
 
 #define _GL_ALREADY_INCLUDING_WCHAR_H
 
@@ -61,9 +60,13 @@
    <wchar.h>.
    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
    included before <wchar.h>.
+   In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
+   by <stddef.h>.
    But avoid namespace pollution on glibc systems.  */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <stddef.h>
+#endif
+#ifndef __GLIBC__
 # include <stdio.h>
 # include <time.h>
 #endif
@@ -77,8 +80,16 @@
 
 #undef _GL_ALREADY_INCLUDING_WCHAR_H
 
-#ifndef _GL_WCHAR_H
-#define _GL_WCHAR_H
+#ifndef _ at GUARD_PREFIX@_WCHAR_H
+#define _ at GUARD_PREFIX@_WCHAR_H
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The attribute __pure__ was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -94,6 +105,18 @@
 #  define WEOF -1
 # endif
 #else
+/* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
+   This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be
+   "unchanged by default argument promotions".  Override it.  */
+# if defined _MSC_VER
+#  if !GNULIB_defined_wint_t
+#   include <crtdefs.h>
+typedef unsigned int rpl_wint_t;
+#   undef wint_t
+#   define wint_t rpl_wint_t
+#   define GNULIB_defined_wint_t 1
+#  endif
+# endif
 # ifndef WEOF
 #  define WEOF ((wint_t) -1)
 # endif
@@ -104,10 +127,12 @@
    On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
    implementing mbrtowc for encodings like UTF-8.  */
 #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
+# if !GNULIB_defined_mbstate_t
 typedef int rpl_mbstate_t;
-# undef mbstate_t
-# define mbstate_t rpl_mbstate_t
-# define GNULIB_defined_mbstate_t 1
+#  undef mbstate_t
+#  define mbstate_t rpl_mbstate_t
+#  define GNULIB_defined_mbstate_t 1
+# endif
 #endif
 
 
@@ -118,11 +143,11 @@ typedef int rpl_mbstate_t;
 #   undef btowc
 #   define btowc rpl_btowc
 #  endif
-_GL_FUNCDECL_RPL (btowc, wint_t, (int c));
+_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
 _GL_CXXALIAS_RPL (btowc, wint_t, (int c));
 # else
 #  if !@HAVE_BTOWC@
-_GL_FUNCDECL_SYS (btowc, wint_t, (int c));
+_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
 #  endif
 _GL_CXXALIAS_SYS (btowc, wint_t, (int c));
 # endif
@@ -143,12 +168,12 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - "
 #   undef wctob
 #   define wctob rpl_wctob
 #  endif
-_GL_FUNCDECL_RPL (wctob, int, (wint_t wc));
+_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
 _GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
 # else
 #  if !defined wctob && !@HAVE_DECL_WCTOB@
 /* wctob is provided by gnulib, or wctob exists but is not declared.  */
-_GL_FUNCDECL_SYS (wctob, int, (wint_t wc));
+_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
 #  endif
 _GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
 # endif
@@ -409,12 +434,12 @@ _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
 #   undef wcwidth
 #   define wcwidth rpl_wcwidth
 #  endif
-_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t));
+_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
 _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
 # else
 #  if !@HAVE_DECL_WCWIDTH@
 /* wcwidth exists but is not declared.  */
-_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t));
+_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
 #  endif
 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
 # endif
@@ -428,6 +453,576 @@ _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
 #endif
 
 
-#endif /* _GL_WCHAR_H */
-#endif /* _GL_WCHAR_H */
+/* Search N wide characters of S for C.  */
+#if @GNULIB_WMEMCHR@
+# if !@HAVE_WMEMCHR@
+_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)
+                                      _GL_ATTRIBUTE_PURE);
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t);
+         wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wmemchr,
+                        wchar_t *, (const wchar_t *, wchar_t, size_t),
+                        const wchar_t *, (const wchar_t *, wchar_t, size_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
+_GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
+                   (const wchar_t *s, wchar_t c, size_t n));
+# else
+_GL_CXXALIASWARN (wmemchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wmemchr
+# if HAVE_RAW_DECL_WMEMCHR
+_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
+                 "use gnulib module wmemchr for portability");
+# endif
+#endif
+
+
+/* Compare N wide characters of S1 and S2.  */
+#if @GNULIB_WMEMCMP@
+# if !@HAVE_WMEMCMP@
+_GL_FUNCDECL_SYS (wmemcmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n)
+                  _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (wmemcmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_CXXALIASWARN (wmemcmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wmemcmp
+# if HAVE_RAW_DECL_WMEMCMP
+_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - "
+                 "use gnulib module wmemcmp for portability");
+# endif
+#endif
+
+
+/* Copy N wide characters of SRC to DEST.  */
+#if @GNULIB_WMEMCPY@
+# if !@HAVE_WMEMCPY@
+_GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wmemcpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wmemcpy
+# if HAVE_RAW_DECL_WMEMCPY
+_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - "
+                 "use gnulib module wmemcpy for portability");
+# endif
+#endif
+
+
+/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for
+   overlapping memory areas.  */
+#if @GNULIB_WMEMMOVE@
+# if !@HAVE_WMEMMOVE@
+_GL_FUNCDECL_SYS (wmemmove, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wmemmove, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wmemmove);
+#elif defined GNULIB_POSIXCHECK
+# undef wmemmove
+# if HAVE_RAW_DECL_WMEMMOVE
+_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
+                 "use gnulib module wmemmove for portability");
+# endif
+#endif
+
+
+/* Set N wide characters of S to C.  */
+#if @GNULIB_WMEMSET@
+# if !@HAVE_WMEMSET@
+_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
+_GL_CXXALIASWARN (wmemset);
+#elif defined GNULIB_POSIXCHECK
+# undef wmemset
+# if HAVE_RAW_DECL_WMEMSET
+_GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
+                 "use gnulib module wmemset for portability");
+# endif
+#endif
+
+
+/* Return the number of wide characters in S.  */
+#if @GNULIB_WCSLEN@
+# if !@HAVE_WCSLEN@
+_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
+_GL_CXXALIASWARN (wcslen);
+#elif defined GNULIB_POSIXCHECK
+# undef wcslen
+# if HAVE_RAW_DECL_WCSLEN
+_GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
+                 "use gnulib module wcslen for portability");
+# endif
+#endif
+
+
+/* Return the number of wide characters in S, but at most MAXLEN.  */
+#if @GNULIB_WCSNLEN@
+# if !@HAVE_WCSNLEN@
+_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)
+                                   _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
+_GL_CXXALIASWARN (wcsnlen);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsnlen
+# if HAVE_RAW_DECL_WCSNLEN
+_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - "
+                 "use gnulib module wcsnlen for portability");
+# endif
+#endif
+
+
+/* Copy SRC to DEST.  */
+#if @GNULIB_WCSCPY@
+# if !@HAVE_WCSCPY@
+_GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+# endif
+_GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_CXXALIASWARN (wcscpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscpy
+# if HAVE_RAW_DECL_WCSCPY
+_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
+                 "use gnulib module wcscpy for portability");
+# endif
+#endif
+
+
+/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST.  */
+#if @GNULIB_WCPCPY@
+# if !@HAVE_WCPCPY@
+_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+# endif
+_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_CXXALIASWARN (wcpcpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wcpcpy
+# if HAVE_RAW_DECL_WCPCPY
+_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - "
+                 "use gnulib module wcpcpy for portability");
+# endif
+#endif
+
+
+/* Copy no more than N wide characters of SRC to DEST.  */
+#if @GNULIB_WCSNCPY@
+# if !@HAVE_WCSNCPY@
+_GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wcsncpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsncpy
+# if HAVE_RAW_DECL_WCSNCPY
+_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
+                 "use gnulib module wcsncpy for portability");
+# endif
+#endif
+
+
+/* Copy no more than N characters of SRC to DEST, returning the address of
+   the last character written into DEST.  */
+#if @GNULIB_WCPNCPY@
+# if !@HAVE_WCPNCPY@
+_GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcpncpy, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wcpncpy);
+#elif defined GNULIB_POSIXCHECK
+# undef wcpncpy
+# if HAVE_RAW_DECL_WCPNCPY
+_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - "
+                 "use gnulib module wcpncpy for portability");
+# endif
+#endif
+
+
+/* Append SRC onto DEST.  */
+#if @GNULIB_WCSCAT@
+# if !@HAVE_WCSCAT@
+_GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
+# endif
+_GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_CXXALIASWARN (wcscat);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscat
+# if HAVE_RAW_DECL_WCSCAT
+_GL_WARN_ON_USE (wcscat, "wcscat is unportable - "
+                 "use gnulib module wcscat for portability");
+# endif
+#endif
+
+
+/* Append no more than N wide characters of SRC onto DEST.  */
+#if @GNULIB_WCSNCAT@
+# if !@HAVE_WCSNCAT@
+_GL_FUNCDECL_SYS (wcsncat, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcsncat, wchar_t *,
+                  (wchar_t *dest, const wchar_t *src, size_t n));
+_GL_CXXALIASWARN (wcsncat);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsncat
+# if HAVE_RAW_DECL_WCSNCAT
+_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
+                 "use gnulib module wcsncat for portability");
+# endif
+#endif
+
+
+/* Compare S1 and S2.  */
+#if @GNULIB_WCSCMP@
+# if !@HAVE_WCSCMP@
+_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
+                               _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_CXXALIASWARN (wcscmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscmp
+# if HAVE_RAW_DECL_WCSCMP
+_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
+                 "use gnulib module wcscmp for portability");
+# endif
+#endif
+
+
+/* Compare no more than N wide characters of S1 and S2.  */
+#if @GNULIB_WCSNCMP@
+# if !@HAVE_WCSNCMP@
+_GL_FUNCDECL_SYS (wcsncmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n)
+                  _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (wcsncmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_CXXALIASWARN (wcsncmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsncmp
+# if HAVE_RAW_DECL_WCSNCMP
+_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
+                 "use gnulib module wcsncmp for portability");
+# endif
+#endif
+
+
+/* Compare S1 and S2, ignoring case.  */
+#if @GNULIB_WCSCASECMP@
+# if !@HAVE_WCSCASECMP@
+_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)
+                                   _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_CXXALIASWARN (wcscasecmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscasecmp
+# if HAVE_RAW_DECL_WCSCASECMP
+_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
+                 "use gnulib module wcscasecmp for portability");
+# endif
+#endif
+
+
+/* Compare no more than N chars of S1 and S2, ignoring case.  */
+#if @GNULIB_WCSNCASECMP@
+# if !@HAVE_WCSNCASECMP@
+_GL_FUNCDECL_SYS (wcsncasecmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n)
+                  _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (wcsncasecmp, int,
+                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_CXXALIASWARN (wcsncasecmp);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsncasecmp
+# if HAVE_RAW_DECL_WCSNCASECMP
+_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - "
+                 "use gnulib module wcsncasecmp for portability");
+# endif
+#endif
+
+
+/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE
+   category of the current locale.  */
+#if @GNULIB_WCSCOLL@
+# if !@HAVE_WCSCOLL@
+_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
+# endif
+_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_CXXALIASWARN (wcscoll);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscoll
+# if HAVE_RAW_DECL_WCSCOLL
+_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - "
+                 "use gnulib module wcscoll for portability");
+# endif
+#endif
+
+
+/* Transform S2 into array pointed to by S1 such that if wcscmp is applied
+   to two transformed strings the result is the as applying 'wcscoll' to the
+   original strings.  */
+#if @GNULIB_WCSXFRM@
+# if !@HAVE_WCSXFRM@
+_GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_CXXALIASWARN (wcsxfrm);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsxfrm
+# if HAVE_RAW_DECL_WCSXFRM
+_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
+                 "use gnulib module wcsxfrm for portability");
+# endif
+#endif
+
+
+/* Duplicate S, returning an identical malloc'd string.  */
+#if @GNULIB_WCSDUP@
+# if !@HAVE_WCSDUP@
+_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+# endif
+_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+_GL_CXXALIASWARN (wcsdup);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsdup
+# if HAVE_RAW_DECL_WCSDUP
+_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
+                 "use gnulib module wcsdup for portability");
+# endif
+#endif
+
+
+/* Find the first occurrence of WC in WCS.  */
+#if @GNULIB_WCSCHR@
+# if !@HAVE_WCSCHR@
+_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
+                                     _GL_ATTRIBUTE_PURE);
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wcschr (const wchar_t *, wchar_t);
+         wchar_t * std::wcschr (wchar_t *, wchar_t);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wcschr,
+                        wchar_t *, (const wchar_t *, wchar_t),
+                        const wchar_t *, (const wchar_t *, wchar_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
+_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
+# else
+_GL_CXXALIASWARN (wcschr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcschr
+# if HAVE_RAW_DECL_WCSCHR
+_GL_WARN_ON_USE (wcschr, "wcschr is unportable - "
+                 "use gnulib module wcschr for portability");
+# endif
+#endif
+
+
+/* Find the last occurrence of WC in WCS.  */
+#if @GNULIB_WCSRCHR@
+# if !@HAVE_WCSRCHR@
+_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
+                                      _GL_ATTRIBUTE_PURE);
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wcsrchr (const wchar_t *, wchar_t);
+         wchar_t * std::wcsrchr (wchar_t *, wchar_t);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wcsrchr,
+                        wchar_t *, (const wchar_t *, wchar_t),
+                        const wchar_t *, (const wchar_t *, wchar_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
+_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
+# else
+_GL_CXXALIASWARN (wcsrchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcsrchr
+# if HAVE_RAW_DECL_WCSRCHR
+_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
+                 "use gnulib module wcsrchr for portability");
+# endif
+#endif
+
+
+/* Return the length of the initial segmet of WCS which consists entirely
+   of wide characters not in REJECT.  */
+#if @GNULIB_WCSCSPN@
+# if !@HAVE_WCSCSPN@
+_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)
+                                   _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
+_GL_CXXALIASWARN (wcscspn);
+#elif defined GNULIB_POSIXCHECK
+# undef wcscspn
+# if HAVE_RAW_DECL_WCSCSPN
+_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
+                 "use gnulib module wcscspn for portability");
+# endif
+#endif
+
+
+/* Return the length of the initial segmet of WCS which consists entirely
+   of wide characters in ACCEPT.  */
+#if @GNULIB_WCSSPN@
+# if !@HAVE_WCSSPN@
+_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)
+                                  _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
+_GL_CXXALIASWARN (wcsspn);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsspn
+# if HAVE_RAW_DECL_WCSSPN
+_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - "
+                 "use gnulib module wcsspn for portability");
+# endif
+#endif
+
+
+/* Find the first occurrence in WCS of any character in ACCEPT.  */
+#if @GNULIB_WCSPBRK@
+# if !@HAVE_WCSPBRK@
+_GL_FUNCDECL_SYS (wcspbrk, wchar_t *,
+                  (const wchar_t *wcs, const wchar_t *accept)
+                  _GL_ATTRIBUTE_PURE);
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *);
+         wchar_t * std::wcspbrk (wchar_t *, const wchar_t *);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wcspbrk,
+                        wchar_t *, (const wchar_t *, const wchar_t *),
+                        const wchar_t *, (const wchar_t *, const wchar_t *));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
+                   (wchar_t *wcs, const wchar_t *accept));
+_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
+                   (const wchar_t *wcs, const wchar_t *accept));
+# else
+_GL_CXXALIASWARN (wcspbrk);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcspbrk
+# if HAVE_RAW_DECL_WCSPBRK
+_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
+                 "use gnulib module wcspbrk for portability");
+# endif
+#endif
+
+
+/* Find the first occurrence of NEEDLE in HAYSTACK.  */
+#if @GNULIB_WCSSTR@
+# if !@HAVE_WCSSTR@
+_GL_FUNCDECL_SYS (wcsstr, wchar_t *,
+                  (const wchar_t *haystack, const wchar_t *needle)
+                  _GL_ATTRIBUTE_PURE);
+# endif
+  /* On some systems, this function is defined as an overloaded function:
+       extern "C++" {
+         const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
+         wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
+       }  */
+_GL_CXXALIAS_SYS_CAST2 (wcsstr,
+                        wchar_t *, (const wchar_t *, const wchar_t *),
+                        const wchar_t *, (const wchar_t *, const wchar_t *));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+     && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcsstr, wchar_t *,
+                   (wchar_t *haystack, const wchar_t *needle));
+_GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
+                   (const wchar_t *haystack, const wchar_t *needle));
+# else
+_GL_CXXALIASWARN (wcsstr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcsstr
+# if HAVE_RAW_DECL_WCSSTR
+_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - "
+                 "use gnulib module wcsstr for portability");
+# endif
+#endif
+
+
+/* Divide WCS into tokens separated by characters in DELIM.  */
+#if @GNULIB_WCSTOK@
+# if !@HAVE_WCSTOK@
+_GL_FUNCDECL_SYS (wcstok, wchar_t *,
+                  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
+# endif
+_GL_CXXALIAS_SYS (wcstok, wchar_t *,
+                  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
+_GL_CXXALIASWARN (wcstok);
+#elif defined GNULIB_POSIXCHECK
+# undef wcstok
+# if HAVE_RAW_DECL_WCSTOK
+_GL_WARN_ON_USE (wcstok, "wcstok is unportable - "
+                 "use gnulib module wcstok for portability");
+# endif
+#endif
+
+
+/* Determine number of column positions required for first N wide
+   characters (or fewer if S ends before this) in S.  */
+#if @GNULIB_WCSWIDTH@
+# if @REPLACE_WCSWIDTH@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcswidth
+#   define wcswidth rpl_wcswidth
+#  endif
+_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)
+                                 _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n));
+# else
+#  if !@HAVE_WCSWIDTH@
+_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)
+                                 _GL_ATTRIBUTE_PURE);
+#  endif
+_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
+# endif
+_GL_CXXALIASWARN (wcswidth);
+#elif defined GNULIB_POSIXCHECK
+# undef wcswidth
+# if HAVE_RAW_DECL_WCSWIDTH
+_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
+                 "use gnulib module wcswidth for portability");
+# endif
+#endif
+
+
+#endif /* _ at GUARD_PREFIX@_WCHAR_H */
+#endif /* _ at GUARD_PREFIX@_WCHAR_H */
 #endif
diff --git a/gl/wcrtomb.c b/gl/wcrtomb.c
index ce9184f..a4d6bcd 100644
--- a/gl/wcrtomb.c
+++ b/gl/wcrtomb.c
@@ -1,5 +1,5 @@
 /* Convert wide character to multibyte character.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2008-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno at clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/wctype.in.h b/gl/wctype.in.h
index ddb6b49..e819d44 100644
--- a/gl/wctype.in.h
+++ b/gl/wctype.in.h
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
 
-   Copyright (C) 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 2006-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -13,8 +13,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible and Paul Eggert.  */
 
@@ -26,7 +25,7 @@
  * wctrans_t, and wctype_t are not yet implemented.
  */
 
-#ifndef _GL_WCTYPE_H
+#ifndef _ at GUARD_PREFIX@_WCTYPE_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -52,13 +51,26 @@
 # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@
 #endif
 
-#ifndef _GL_WCTYPE_H
-#define _GL_WCTYPE_H
+#ifndef _ at GUARD_PREFIX@_WCTYPE_H
+#define _ at GUARD_PREFIX@_WCTYPE_H
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
+/* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which
+   #defines a number of identifiers in the application namespace.  Revert
+   these #defines.  */
+#ifdef __sun
+# undef multibyte
+# undef eucw1
+# undef eucw2
+# undef eucw3
+# undef scrw1
+# undef scrw2
+# undef scrw3
+#endif
+
 /* Define wint_t and WEOF.  (Also done in wchar.in.h.)  */
 #if !@HAVE_WINT_T@ && !defined wint_t
 # define wint_t int
@@ -66,64 +78,82 @@
 #  define WEOF -1
 # endif
 #else
+/* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
+   This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be
+   "unchanged by default argument promotions".  Override it.  */
+# if defined _MSC_VER
+#  if !GNULIB_defined_wint_t
+#   include <crtdefs.h>
+typedef unsigned int rpl_wint_t;
+#   undef wint_t
+#   define wint_t rpl_wint_t
+#   define GNULIB_defined_wint_t 1
+#  endif
+# endif
 # ifndef WEOF
 #  define WEOF ((wint_t) -1)
 # endif
 #endif
 
 
+#if !GNULIB_defined_wctype_functions
+
 /* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
    Linux libc5 has <wctype.h> and the functions but they are broken.
    Assume all 11 functions (all isw* except iswblank) are implemented the
    same way, or not at all.  */
-#if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
+# if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
 
 /* IRIX 5.3 has macros but no functions, its isw* macros refer to an
    undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
    refer to system functions like _iswctype that are not in the
    standard C library.  Rather than try to get ancient buggy
    implementations like this to work, just disable them.  */
-# undef iswalnum
-# undef iswalpha
-# undef iswblank
-# undef iswcntrl
-# undef iswdigit
-# undef iswgraph
-# undef iswlower
-# undef iswprint
-# undef iswpunct
-# undef iswspace
-# undef iswupper
-# undef iswxdigit
-# undef towlower
-# undef towupper
+#  undef iswalnum
+#  undef iswalpha
+#  undef iswblank
+#  undef iswcntrl
+#  undef iswdigit
+#  undef iswgraph
+#  undef iswlower
+#  undef iswprint
+#  undef iswpunct
+#  undef iswspace
+#  undef iswupper
+#  undef iswxdigit
+#  undef towlower
+#  undef towupper
 
 /* Linux libc5 has <wctype.h> and the functions but they are broken.  */
-# if @REPLACE_ISWCNTRL@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   define iswalnum rpl_iswalnum
-#   define iswalpha rpl_iswalpha
-#   define iswblank rpl_iswblank
-#   define iswcntrl rpl_iswcntrl
-#   define iswdigit rpl_iswdigit
-#   define iswgraph rpl_iswgraph
-#   define iswlower rpl_iswlower
-#   define iswprint rpl_iswprint
-#   define iswpunct rpl_iswpunct
-#   define iswspace rpl_iswspace
-#   define iswupper rpl_iswupper
-#   define iswxdigit rpl_iswxdigit
-#   define towlower rpl_towlower
-#   define towupper rpl_towupper
+#  if @REPLACE_ISWCNTRL@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define iswalnum rpl_iswalnum
+#    define iswalpha rpl_iswalpha
+#    define iswblank rpl_iswblank
+#    define iswcntrl rpl_iswcntrl
+#    define iswdigit rpl_iswdigit
+#    define iswgraph rpl_iswgraph
+#    define iswlower rpl_iswlower
+#    define iswprint rpl_iswprint
+#    define iswpunct rpl_iswpunct
+#    define iswspace rpl_iswspace
+#    define iswupper rpl_iswupper
+#    define iswxdigit rpl_iswxdigit
+#   endif
+#  endif
+#  if @REPLACE_TOWLOWER@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define towlower rpl_towlower
+#    define towupper rpl_towupper
+#   endif
 #  endif
-# endif
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswalnum
-# else
+#  else
 iswalnum
-# endif
+#  endif
          (wint_t wc)
 {
   return ((wc >= '0' && wc <= '9')
@@ -131,88 +161,88 @@ iswalnum
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswalpha
-# else
+#  else
 iswalpha
-# endif
+#  endif
          (wint_t wc)
 {
   return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswblank
-# else
+#  else
 iswblank
-# endif
+#  endif
          (wint_t wc)
 {
   return wc == ' ' || wc == '\t';
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswcntrl
-# else
+#  else
 iswcntrl
-# endif
+#  endif
         (wint_t wc)
 {
   return (wc & ~0x1f) == 0 || wc == 0x7f;
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswdigit
-# else
+#  else
 iswdigit
-# endif
+#  endif
          (wint_t wc)
 {
   return wc >= '0' && wc <= '9';
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswgraph
-# else
+#  else
 iswgraph
-# endif
+#  endif
          (wint_t wc)
 {
   return wc >= '!' && wc <= '~';
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswlower
-# else
+#  else
 iswlower
-# endif
+#  endif
          (wint_t wc)
 {
   return wc >= 'a' && wc <= 'z';
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswprint
-# else
+#  else
 iswprint
-# endif
+#  endif
          (wint_t wc)
 {
   return wc >= ' ' && wc <= '~';
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswpunct
-# else
+#  else
 iswpunct
-# endif
+#  endif
          (wint_t wc)
 {
   return (wc >= '!' && wc <= '~'
@@ -221,11 +251,11 @@ iswpunct
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswspace
-# else
+#  else
 iswspace
-# endif
+#  endif
          (wint_t wc)
 {
   return (wc == ' ' || wc == '\t'
@@ -233,22 +263,22 @@ iswspace
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswupper
-# else
+#  else
 iswupper
-# endif
+#  endif
          (wint_t wc)
 {
   return wc >= 'A' && wc <= 'Z';
 }
 
 static inline int
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_ISWCNTRL@
 rpl_iswxdigit
-# else
+#  else
 iswxdigit
-# endif
+#  endif
           (wint_t wc)
 {
   return ((wc >= '0' && wc <= '9')
@@ -256,42 +286,42 @@ iswxdigit
 }
 
 static inline wint_t
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_TOWLOWER@
 rpl_towlower
-# else
+#  else
 towlower
-# endif
+#  endif
          (wint_t wc)
 {
   return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
 }
 
 static inline wint_t
-# if @REPLACE_ISWCNTRL@
+#  if @REPLACE_TOWLOWER@
 rpl_towupper
-# else
+#  else
 towupper
-# endif
+#  endif
          (wint_t wc)
 {
   return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc);
 }
 
-#elif ! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@
+# elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@)
 /* Only the iswblank function is missing.  */
 
-# if @REPLACE_ISWBLANK@
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   define iswblank rpl_iswblank
-#  endif
+#  if @REPLACE_ISWBLANK@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define iswblank rpl_iswblank
+#   endif
 _GL_FUNCDECL_RPL (iswblank, int, (wint_t wc));
-# else
+#  else
 _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc));
-# endif
+#  endif
 
-#endif
+# endif
 
-#if defined __MINGW32__
+# if defined __MINGW32__
 
 /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t.
    The functions towlower and towupper are implemented in the MSVCRT library
@@ -311,25 +341,27 @@ rpl_towlower (wint_t wc)
 {
   return (wint_t) (wchar_t) towlower (wc);
 }
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#  define towlower rpl_towlower
-# endif
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define towlower rpl_towlower
+#  endif
 
 static inline wint_t
 rpl_towupper (wint_t wc)
 {
   return (wint_t) (wchar_t) towupper (wc);
 }
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#  define towupper rpl_towupper
-# endif
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define towupper rpl_towupper
+#  endif
 
-#endif /* __MINGW32__ */
+# endif /* __MINGW32__ */
+
+# define GNULIB_defined_wctype_functions 1
+#endif
 
 #if @REPLACE_ISWCNTRL@
 _GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc));
 _GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
 _GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
 _GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
 _GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
@@ -342,11 +374,6 @@ _GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
 #else
 _GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc));
 _GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc));
-# if @REPLACE_ISWBLANK@
-_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
-# else
-_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc));
-# endif
 _GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc));
 _GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc));
 _GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc));
@@ -359,7 +386,6 @@ _GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc));
 #endif
 _GL_CXXALIASWARN (iswalnum);
 _GL_CXXALIASWARN (iswalpha);
-_GL_CXXALIASWARN (iswblank);
 _GL_CXXALIASWARN (iswcntrl);
 _GL_CXXALIASWARN (iswdigit);
 _GL_CXXALIASWARN (iswgraph);
@@ -370,7 +396,55 @@ _GL_CXXALIASWARN (iswspace);
 _GL_CXXALIASWARN (iswupper);
 _GL_CXXALIASWARN (iswxdigit);
 
-#if @REPLACE_ISWCNTRL@ || defined __MINGW32__
+#if @GNULIB_ISWBLANK@
+# if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@
+_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
+# else
+_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc));
+# endif
+_GL_CXXALIASWARN (iswblank);
+#endif
+
+#if !@HAVE_WCTYPE_T@
+# if !GNULIB_defined_wctype_t
+typedef void * wctype_t;
+#  define GNULIB_defined_wctype_t 1
+# endif
+#endif
+
+/* Get a descriptor for a wide character property.  */
+#if @GNULIB_WCTYPE@
+# if !@HAVE_WCTYPE_T@
+_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name));
+# endif
+_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name));
+_GL_CXXALIASWARN (wctype);
+#elif defined GNULIB_POSIXCHECK
+# undef wctype
+# if HAVE_RAW_DECL_WCTYPE
+_GL_WARN_ON_USE (wctype, "wctype is unportable - "
+                 "use gnulib module wctype for portability");
+# endif
+#endif
+
+/* Test whether a wide character has a given property.
+   The argument WC must be either a wchar_t value or WEOF.
+   The argument DESC must have been returned by the wctype() function.  */
+#if @GNULIB_ISWCTYPE@
+# if !@HAVE_WCTYPE_T@
+_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc));
+# endif
+_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc));
+_GL_CXXALIASWARN (iswctype);
+#elif defined GNULIB_POSIXCHECK
+# undef iswctype
+# if HAVE_RAW_DECL_ISWCTYPE
+_GL_WARN_ON_USE (iswctype, "iswctype is unportable - "
+                 "use gnulib module iswctype for portability");
+# endif
+#endif
+
+#if @REPLACE_TOWLOWER@ || defined __MINGW32__
 _GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc));
 _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc));
 #else
@@ -380,6 +454,45 @@ _GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc));
 _GL_CXXALIASWARN (towlower);
 _GL_CXXALIASWARN (towupper);
 
+#if !@HAVE_WCTRANS_T@
+# if !GNULIB_defined_wctrans_t
+typedef void * wctrans_t;
+#  define GNULIB_defined_wctrans_t 1
+# endif
+#endif
+
+/* Get a descriptor for a wide character case conversion.  */
+#if @GNULIB_WCTRANS@
+# if !@HAVE_WCTRANS_T@
+_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name));
+# endif
+_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name));
+_GL_CXXALIASWARN (wctrans);
+#elif defined GNULIB_POSIXCHECK
+# undef wctrans
+# if HAVE_RAW_DECL_WCTRANS
+_GL_WARN_ON_USE (wctrans, "wctrans is unportable - "
+                 "use gnulib module wctrans for portability");
+# endif
+#endif
+
+/* Perform a given case conversion on a wide character.
+   The argument WC must be either a wchar_t value or WEOF.
+   The argument DESC must have been returned by the wctrans() function.  */
+#if @GNULIB_TOWCTRANS@
+# if !@HAVE_WCTRANS_T@
+_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
+# endif
+_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
+_GL_CXXALIASWARN (towctrans);
+#elif defined GNULIB_POSIXCHECK
+# undef towctrans
+# if HAVE_RAW_DECL_TOWCTRANS
+_GL_WARN_ON_USE (towctrans, "towctrans is unportable - "
+                 "use gnulib module towctrans for portability");
+# endif
+#endif
+
 
-#endif /* _GL_WCTYPE_H */
-#endif /* _GL_WCTYPE_H */
+#endif /* _ at GUARD_PREFIX@_WCTYPE_H */
+#endif /* _ at GUARD_PREFIX@_WCTYPE_H */
diff --git a/gse.lex b/gse.lex
deleted file mode 100644
index 29c4f2c..0000000
--- a/gse.lex
+++ /dev/null
@@ -1,174 +0,0 @@
-
-/*
- -*- mode: c++; c-basic-offset:4 -*-
-
- This file is part of libdap, A C++ implementation of the OPeNDAP Data
- Access Protocol.
-
- Copyright (c) 2002,2003 OPeNDAP, Inc.
- Author: James Gallagher <jgallagher at opendap.org>
-
- This 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.
- 
- This 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 this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
- You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
- (c) COPYRIGHT URI/MIT 1999
-*/ 
-
-/*
-  Scanner for grid selection sub-expressions. The scanner is not reentrant,
-  but can share a name space with other scanners.
-
-   Note:
-   1) The `defines' file gse.tab.h is built using `bison -d'.
-   2) Define YY_DECL such that the scanner is called `gse_lex'.
-   3) When bison builds the gse.tab.h file, it uses `gse_' instead
-   of `yy' for variable name prefixes (e.g., yylval --> gse_lval).
-
-   1/13/99 jhrg
-*/
-
-%{
-
-#include "config_dap.h"
-
-static char rcsid[] not_used = {"$Id: gse.lex 25112 2011-12-29 21:44:54Z jimg $"};
-
-#include <string>
-#include <cstring>
-
-#include "Error.h"
-
-#ifndef YY_PROTO
-#define YY_PROTO(proto) proto
-#endif
-
-#define YY_DECL int gse_lex YY_PROTO(( void ))
-#define ID_MAX 256
-#define YY_NO_UNPUT 1
-#define YY_NO_INPUT 1
-#define YY_FATAL_ERROR(msg) {\
-    throw(Error(string("Error scanning grid constraint expression text: ") + string(msg))); \
-}
-
-#include "gse.tab.hh"
-
-using namespace std;
-using namespace libdap;
-
-static void store_int32();
-static void store_float64();
-static void store_id();
-static void store_op(int op);
-
-%}
-
-%option noyywrap
-%option nounput
-%option prefix="gse_"
-%option outfile="lex.gse_.cc"
-
-NAN     [Nn][Aa][Nn]
-INF     [Ii][Nn][Ff]
-
-SCAN_INT	[-+]?[0-9]+
-
-SCAN_MANTISA	([0-9]+\.?[0-9]*)|([0-9]*\.?[0-9]+)
-SCAN_EXPONENT	(E|e)[-+]?[0-9]+
-
-SCAN_FLOAT	([-+]?{SCAN_MANTISA}{SCAN_EXPONENT}?)|({NAN})|({INF})
-
-/* See das.lex for comments about the characters allowed in a WORD.
-   10/31/2001 jhrg */
-
-SCAN_WORD	[-+a-zA-Z0-9_/%.\\][-+a-zA-Z0-9_/%.\\#]*
-
-SCAN_EQUAL	=
-SCAN_NOT_EQUAL	!=
-SCAN_GREATER	>
-SCAN_GREATER_EQL >=
-SCAN_LESS	<
-SCAN_LESS_EQL	<=
-
-NEVER		[^a-zA-Z0-9_/%.#:+\-,]
-
-%%
-
-{SCAN_INT}	store_int32(); return SCAN_INT;
-{SCAN_FLOAT}	store_float64(); return SCAN_FLOAT;
-
-{SCAN_WORD}	store_id(); return SCAN_WORD;
-
-{SCAN_EQUAL}	store_op(SCAN_EQUAL); return SCAN_EQUAL;
-{SCAN_NOT_EQUAL} store_op(SCAN_NOT_EQUAL); return SCAN_NOT_EQUAL;
-{SCAN_GREATER}	store_op(SCAN_GREATER); return SCAN_GREATER;
-{SCAN_GREATER_EQL} store_op(SCAN_GREATER_EQL); return SCAN_GREATER_EQL;
-{SCAN_LESS}	store_op(SCAN_LESS); return SCAN_LESS;
-{SCAN_LESS_EQL}	store_op(SCAN_LESS_EQL); return SCAN_LESS_EQL;
-
-%%
-
-// Three glue routines for string scanning. These are not declared in the
-// header gse.tab.h nor is YY_BUFFER_STATE. Including these here allows them
-// to see the type definitions in lex.gse.c (where YY_BUFFER_STATE is
-// defined) and allows callers to declare them (since callers outside of this
-// file cannot declare YY_BUFFER_STATE variable).
-
-void *
-gse_string(const char *str)
-{
-    return (void *)gse__scan_string(str);
-}
-
-void
-gse_switch_to_buffer(void *buf)
-{
-    gse__switch_to_buffer((YY_BUFFER_STATE)buf);
-}
-
-void
-gse_delete_buffer(void *buf)
-{
-    gse__delete_buffer((YY_BUFFER_STATE)buf);
-}
-
-// Note that the grid() CE function only deals with numeric maps (8/28/2001
-// jhrg) and that all comparisons are done using doubles. 
-
-static void
-store_int32()
-{
-    gse_lval.val = atof(yytext);
-}
-
-static void
-store_float64()
-{
-    gse_lval.val = atof(yytext);
-}
-
-static void
-store_id()
-{
-    strncpy(gse_lval.id, yytext, ID_MAX-1);
-    gse_lval.id[ID_MAX-1] = '\0';
-}
-
-static void
-store_op(int op)
-{
-    gse_lval.op = op;
-}
-
diff --git a/gse.tab.cc b/gse.tab.cc
deleted file mode 100644
index e935a7d..0000000
--- a/gse.tab.cc
+++ /dev/null
@@ -1,1716 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
-
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
-
-/* 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.3"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-/* Substitute the variable and function names.  */
-#define yyparse gse_parse
-#define yylex   gse_lex
-#define yyerror gse_error
-#define yylval  gse_lval
-#define yychar  gse_char
-#define yydebug gse_debug
-#define yynerrs gse_nerrs
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     SCAN_INT = 258,
-     SCAN_FLOAT = 259,
-     SCAN_WORD = 260,
-     SCAN_FIELD = 261,
-     SCAN_EQUAL = 262,
-     SCAN_NOT_EQUAL = 263,
-     SCAN_GREATER = 264,
-     SCAN_GREATER_EQL = 265,
-     SCAN_LESS = 266,
-     SCAN_LESS_EQL = 267
-   };
-#endif
-/* Tokens.  */
-#define SCAN_INT 258
-#define SCAN_FLOAT 259
-#define SCAN_WORD 260
-#define SCAN_FIELD 261
-#define SCAN_EQUAL 262
-#define SCAN_NOT_EQUAL 263
-#define SCAN_GREATER 264
-#define SCAN_GREATER_EQL 265
-#define SCAN_LESS 266
-#define SCAN_LESS_EQL 267
-
-
-
-
-/* Copy the first part of user declarations.  */
-#line 35 "gse.y"
-
-
-#include "config_dap.h"
-
-static char rcsid[] not_used = {"$Id: gse.y 17856 2008-02-02 21:25:59Z pwest $"};
-
-#include <iostream>
-
-#include "Error.h"
-#include "GSEClause.h"
-#include "gse_parser.h"
-
-using std::cerr;
-using std::endl;
-using namespace libdap;
-
-// This macro is used to access the instance of a gse_arg class which is
-// passed to the parser through a void *. See parser.h.
-
-#define gse_arg(arg) ((gse_arg *)(arg))
-
-// Assume bison 1.25
-#define YYPARSE_PARAM arg
-
-int gse_lex(void);
-void gse_error(const char *str);
-GSEClause *build_gse_clause(gse_arg *arg, char id[ID_MAX], int op, double val);
-GSEClause *build_rev_gse_clause(gse_arg *arg, char id[ID_MAX], int op,
-				double val);
-GSEClause *
-build_dual_gse_clause(gse_arg *arg, char id[ID_MAX], int op1, double val1, 
-		      int op2, double val2);
-
-
-
-/* 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
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 70 "gse.y"
-{
-    bool boolean;
-
-    int op;
-    char id[ID_MAX];
-    double val;
-}
-/* Line 193 of yacc.c.  */
-#line 171 "gse.tab.cc"
-	YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 216 of yacc.c.  */
-#line 184 "gse.tab.cc"
-
-#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 i)
-#else
-static int
-YYID (i)
-    int i;
-#endif
-{
-  return i;
-}
-#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 _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
-#     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 _STDLIB_H \
-       && ! ((defined YYMALLOC || defined malloc) \
-	     && (defined YYFREE || defined free)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (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 _STDLIB_H && (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;
-  YYSTYPE yyvs;
-  };
-
-/* 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)
-
-/* 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
-
-/* 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)					\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (YYID (0))
-
-#endif
-
-/* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  7
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   17
-
-/* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  13
-/* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  5
-/* YYNRULES -- Number of rules.  */
-#define YYNRULES  13
-/* YYNRULES -- Number of states.  */
-#define YYNSTATES  20
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   267
-
-#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
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const yytype_uint8 yyprhs[] =
-{
-       0,     0,     3,     7,    11,    17,    19,    21,    23,    25,
-      27,    29,    31,    33
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int8 yyrhs[] =
-{
-      14,     0,    -1,    15,    17,    16,    -1,    16,    17,    15,
-      -1,    16,    17,    15,    17,    16,    -1,     5,    -1,     3,
-      -1,     4,    -1,     7,    -1,     8,    -1,     9,    -1,    10,
-      -1,    11,    -1,    12,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const yytype_uint8 yyrline[] =
-{
-       0,    98,    98,   104,   110,   119,   122,   123,   126,   127,
-     128,   129,   130,   131
-};
-#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[] =
-{
-  "$end", "error", "$undefined", "SCAN_INT", "SCAN_FLOAT", "SCAN_WORD",
-  "SCAN_FIELD", "SCAN_EQUAL", "SCAN_NOT_EQUAL", "SCAN_GREATER",
-  "SCAN_GREATER_EQL", "SCAN_LESS", "SCAN_LESS_EQL", "$accept", "clause",
-  "identifier", "constant", "relop", 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
-};
-# 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,
-      17,    17,    17,    17
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
-{
-       0,     2,     3,     3,     5,     1,     1,     1,     1,     1,
-       1,     1,     1,     1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const yytype_uint8 yydefact[] =
-{
-       0,     6,     7,     5,     0,     0,     0,     1,     8,     9,
-      10,    11,    12,    13,     0,     0,     2,     3,     0,     4
-};
-
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int8 yydefgoto[] =
-{
-      -1,     4,     5,     6,    14
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -7
-static const yytype_int8 yypact[] =
-{
-      12,    -7,    -7,    -7,     1,    -5,    -5,    -7,    -7,    -7,
-      -7,    -7,    -7,    -7,     5,     7,    -7,    -5,     5,    -7
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int8 yypgoto[] =
-{
-      -7,    -7,    -2,    -4,    -6
-};
-
-/* 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 zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
-{
-      15,     7,     8,     9,    10,    11,    12,    13,     1,     2,
-      16,    18,     3,    17,    19,     1,     2,     3
-};
-
-static const yytype_uint8 yycheck[] =
-{
-       6,     0,     7,     8,     9,    10,    11,    12,     3,     4,
-      14,    17,     5,    15,    18,     3,     4,     5
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const yytype_uint8 yystos[] =
-{
-       0,     3,     4,     5,    14,    15,    16,     0,     7,     8,
-       9,    10,    11,    12,    17,    17,    16,    15,    17,    16
-};
-
-#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.  */
-
-#define YYFAIL		goto yyerrlab
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
-      yyerror (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
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
-#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#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); \
-      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)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
-{
-  if (!yyvaluep)
-    return;
-# 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)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
-{
-  if (yytype < YYNTOKENS)
-    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
-  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 *bottom, yytype_int16 *top)
-#else
-static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
-  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)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
-    YYSTYPE *yyvsp;
-    int yyrule;
-#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++)
-    {
-      fprintf (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       		       );
-      fprintf (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (yyvsp, Rule); \
-} 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 YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
-
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      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 yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
-
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
-
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
-
-      if (yyresult)
-	{
-	  /* 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 = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
-    }
-}
-#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)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  YYUSE (yyvaluep);
-
-  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 (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-/* The look-ahead symbol.  */
-int yychar;
-
-/* The semantic value of the look-ahead symbol.  */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-/*----------.
-| 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 (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-  
-  int yystate;
-  int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
-
-
-
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
-
-  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);
-	YYSTACK_RELOCATE (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));
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-  /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to look-ahead token.  */
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a look-ahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead 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 (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the look-ahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    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:
-#line 99 "gse.y"
-    {
-		    ((gse_arg *)arg)->set_gsec(
-			build_gse_clause((gse_arg *)(arg), (yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].val)));
-		    (yyval.boolean) = true;
-		;}
-    break;
-
-  case 3:
-#line 105 "gse.y"
-    {
-		    ((gse_arg *)arg)->set_gsec(
-		       build_rev_gse_clause((gse_arg *)(arg), (yyvsp[(3) - (3)].id), (yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].val)));
-		    (yyval.boolean) = true;
-		;}
-    break;
-
-  case 4:
-#line 111 "gse.y"
-    {
-		    ((gse_arg *)arg)->set_gsec(
-		       build_dual_gse_clause((gse_arg *)(arg), (yyvsp[(3) - (5)].id), (yyvsp[(2) - (5)].op), (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].op),
-					     (yyvsp[(5) - (5)].val)));
-		    (yyval.boolean) = true;
-		;}
-    break;
-
-
-/* Line 1267 of yacc.c.  */
-#line 1407 "gse.tab.cc"
-      default: break;
-    }
-  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:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if ! YYERROR_VERBOSE
-      yyerror (YY_("syntax error"));
-#else
-      {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
-      }
-#endif
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse look-ahead 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);
-	  yychar = YYEMPTY;
-	}
-    }
-
-  /* Else will try to reuse look-ahead 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 (yyn != YYPACT_NINF)
-	{
-	  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);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  *++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;
-
-#ifndef yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
-  yyerror (YY_("memory exhausted"));
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
-  /* 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);
-      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);
-}
-
-
-#line 134 "gse.y"
-
-
-void
-gse_error(const char *)
-{
-    throw Error(
-"An expression passed to the grid() function could not be parsed.\n\
-Examples of expressions that will work are: \"i>=10.0\" or \"23.6<i<56.0\"\n\
-where \"i\" is the name of one of the Grid's map vectors.");
-}
-
-static relop
-decode_relop(int op)
-{
-    switch (op) {
-      case SCAN_GREATER:
-	return dods_greater_op;
-      case SCAN_GREATER_EQL:
-	return dods_greater_equal_op;
-      case SCAN_LESS:
-	return dods_less_op;
-      case SCAN_LESS_EQL:
-	return dods_less_equal_op;
-      case SCAN_EQUAL:
-	return dods_equal_op;
-      default:
-	throw Error(malformed_expr, "Unrecognized relational operator");
-    }
-}
-
-static relop
-decode_inverse_relop(int op)
-{
-    switch (op) {
-      case SCAN_GREATER:
-	return dods_less_op;
-      case SCAN_GREATER_EQL:
-	return dods_less_equal_op;
-      case SCAN_LESS:
-	return dods_greater_op;
-      case SCAN_LESS_EQL:
-	return dods_greater_equal_op;
-      case SCAN_EQUAL:
-	return dods_equal_op;
-      default:
-	throw Error(malformed_expr, "Unrecognized relational operator");
-    }
-}
-
-GSEClause *
-build_gse_clause(gse_arg *arg, char id[ID_MAX], int op, double val)
-{
-    return new GSEClause(arg->get_grid(), (string)id, val, decode_relop(op));
-}
-
-// Build a GSE Clause given that the operands are reversed.
-
-GSEClause *
-build_rev_gse_clause(gse_arg *arg, char id[ID_MAX], int op, double val)
-{
-    return new GSEClause(arg->get_grid(), (string)id, val, 
-			 decode_inverse_relop(op));
-}
-
-GSEClause *
-build_dual_gse_clause(gse_arg *arg, char id[ID_MAX], int op1, double val1, 
-		      int op2, double val2)
-{
-    // Check that the operands (op1 and op2) and the values (val1 and val2)
-    // describe a monotonic interval.
-    relop rop1 = decode_inverse_relop(op1);
-    relop rop2 = decode_relop(op2);
-
-    switch (rop1) {
-      case dods_less_op:
-      case dods_less_equal_op:
-	if (rop2 == dods_less_op || rop2 == dods_less_equal_op)
-	    throw Error(malformed_expr, 
-"GSE Clause operands must define a monotonic interval.");
-	break;
-      case dods_greater_op:
-      case dods_greater_equal_op:
-	if (rop2 == dods_greater_op || rop2 == dods_greater_equal_op)
-	    throw Error(malformed_expr, 
-"GSE Clause operands must define a monotonic interval.");
-	break;
-      case dods_equal_op:
-	break;
-      default:
-	throw Error(malformed_expr, "Unrecognized relational operator.");
-    }
-
-    return new GSEClause(arg->get_grid(), (string)id, val1, rop1, val2, rop2);
-}
-
-
diff --git a/gse.tab.hh b/gse.tab.hh
deleted file mode 100644
index 62e3e46..0000000
--- a/gse.tab.hh
+++ /dev/null
@@ -1,88 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
-
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
-
-/* 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 {
-     SCAN_INT = 258,
-     SCAN_FLOAT = 259,
-     SCAN_WORD = 260,
-     SCAN_FIELD = 261,
-     SCAN_EQUAL = 262,
-     SCAN_NOT_EQUAL = 263,
-     SCAN_GREATER = 264,
-     SCAN_GREATER_EQL = 265,
-     SCAN_LESS = 266,
-     SCAN_LESS_EQL = 267
-   };
-#endif
-/* Tokens.  */
-#define SCAN_INT 258
-#define SCAN_FLOAT 259
-#define SCAN_WORD 260
-#define SCAN_FIELD 261
-#define SCAN_EQUAL 262
-#define SCAN_NOT_EQUAL 263
-#define SCAN_GREATER 264
-#define SCAN_GREATER_EQL 265
-#define SCAN_LESS 266
-#define SCAN_LESS_EQL 267
-
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 70 "gse.y"
-{
-    bool boolean;
-
-    int op;
-    char id[ID_MAX];
-    double val;
-}
-/* Line 1529 of yacc.c.  */
-#line 81 "gse.tab.hh"
-	YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-extern YYSTYPE gse_lval;
-
diff --git a/gse.y b/gse.y
deleted file mode 100644
index 9dbc926..0000000
--- a/gse.y
+++ /dev/null
@@ -1,228 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-// 
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
- 
-// (c) COPYRIGHT URI/MIT 1999
-// Please read the full copyright statement in the file COPYRIGHT_URI.
-//
-// Authors:
-//      jhrg,jimg       James Gallagher <jgallagher at gso.uri.edu>
-
-// Parse a Grid selection expression. This parser is a little different than
-// the other parsers and uses its own argument class. See parser.h.
-
-%{
-
-#include "config_dap.h"
-
-static char rcsid[] not_used = {"$Id: gse.y 17856 2008-02-02 21:25:59Z pwest $"};
-
-#include <iostream>
-
-#include "Error.h"
-#include "GSEClause.h"
-#include "gse_parser.h"
-
-using std::cerr;
-using std::endl;
-using namespace libdap;
-
-// This macro is used to access the instance of a gse_arg class which is
-// passed to the parser through a void *. See parser.h.
-
-#define gse_arg(arg) ((gse_arg *)(arg))
-
-// Assume bison 1.25
-#define YYPARSE_PARAM arg
-
-int gse_lex(void);
-void gse_error(const char *str);
-GSEClause *build_gse_clause(gse_arg *arg, char id[ID_MAX], int op, double val);
-GSEClause *build_rev_gse_clause(gse_arg *arg, char id[ID_MAX], int op,
-				double val);
-GSEClause *
-build_dual_gse_clause(gse_arg *arg, char id[ID_MAX], int op1, double val1, 
-		      int op2, double val2);
-
-%}
-
-%union {
-    bool boolean;
-
-    int op;
-    char id[ID_MAX];
-    double val;
-}
-
-%token <val> SCAN_INT
-%token <val> SCAN_FLOAT
-
-%token <id> SCAN_WORD
-%token <id> SCAN_FIELD
-
-%token <op> SCAN_EQUAL
-%token <op> SCAN_NOT_EQUAL
-%token <op> SCAN_GREATER
-%token <op> SCAN_GREATER_EQL
-%token <op> SCAN_LESS
-%token <op> SCAN_LESS_EQL
-
-%type <boolean> clause
-%type <id> identifier
-%type <op> relop
-%type <val> constant
-
-%%
-
-clause:		identifier relop constant
-                {
-		    ((gse_arg *)arg)->set_gsec(
-			build_gse_clause((gse_arg *)(arg), $1, $2, $3));
-		    $$ = true;
-		}
-		| constant relop identifier
-                {
-		    ((gse_arg *)arg)->set_gsec(
-		       build_rev_gse_clause((gse_arg *)(arg), $3, $2, $1));
-		    $$ = true;
-		}
-		| constant relop identifier relop constant
-                {
-		    ((gse_arg *)arg)->set_gsec(
-		       build_dual_gse_clause((gse_arg *)(arg), $3, $2, $1, $4,
-					     $5));
-		    $$ = true;
-		}
-;
-
-identifier:	SCAN_WORD 
-;
-
-constant:       SCAN_INT
-		| SCAN_FLOAT
-;
-
-relop:		SCAN_EQUAL
-                | SCAN_NOT_EQUAL
-		| SCAN_GREATER
-		| SCAN_GREATER_EQL
-		| SCAN_LESS
-		| SCAN_LESS_EQL
-;
-
-%%
-
-void
-gse_error(const char *)
-{
-    throw Error(
-"An expression passed to the grid() function could not be parsed.\n\
-Examples of expressions that will work are: \"i>=10.0\" or \"23.6<i<56.0\"\n\
-where \"i\" is the name of one of the Grid's map vectors.");
-}
-
-static relop
-decode_relop(int op)
-{
-    switch (op) {
-      case SCAN_GREATER:
-	return dods_greater_op;
-      case SCAN_GREATER_EQL:
-	return dods_greater_equal_op;
-      case SCAN_LESS:
-	return dods_less_op;
-      case SCAN_LESS_EQL:
-	return dods_less_equal_op;
-      case SCAN_EQUAL:
-	return dods_equal_op;
-      default:
-	throw Error(malformed_expr, "Unrecognized relational operator");
-    }
-}
-
-static relop
-decode_inverse_relop(int op)
-{
-    switch (op) {
-      case SCAN_GREATER:
-	return dods_less_op;
-      case SCAN_GREATER_EQL:
-	return dods_less_equal_op;
-      case SCAN_LESS:
-	return dods_greater_op;
-      case SCAN_LESS_EQL:
-	return dods_greater_equal_op;
-      case SCAN_EQUAL:
-	return dods_equal_op;
-      default:
-	throw Error(malformed_expr, "Unrecognized relational operator");
-    }
-}
-
-GSEClause *
-build_gse_clause(gse_arg *arg, char id[ID_MAX], int op, double val)
-{
-    return new GSEClause(arg->get_grid(), (string)id, val, decode_relop(op));
-}
-
-// Build a GSE Clause given that the operands are reversed.
-
-GSEClause *
-build_rev_gse_clause(gse_arg *arg, char id[ID_MAX], int op, double val)
-{
-    return new GSEClause(arg->get_grid(), (string)id, val, 
-			 decode_inverse_relop(op));
-}
-
-GSEClause *
-build_dual_gse_clause(gse_arg *arg, char id[ID_MAX], int op1, double val1, 
-		      int op2, double val2)
-{
-    // Check that the operands (op1 and op2) and the values (val1 and val2)
-    // describe a monotonic interval.
-    relop rop1 = decode_inverse_relop(op1);
-    relop rop2 = decode_relop(op2);
-
-    switch (rop1) {
-      case dods_less_op:
-      case dods_less_equal_op:
-	if (rop2 == dods_less_op || rop2 == dods_less_equal_op)
-	    throw Error(malformed_expr, 
-"GSE Clause operands must define a monotonic interval.");
-	break;
-      case dods_greater_op:
-      case dods_greater_equal_op:
-	if (rop2 == dods_greater_op || rop2 == dods_greater_equal_op)
-	    throw Error(malformed_expr, 
-"GSE Clause operands must define a monotonic interval.");
-	break;
-      case dods_equal_op:
-	break;
-      default:
-	throw Error(malformed_expr, "Unrecognized relational operator.");
-    }
-
-    return new GSEClause(arg->get_grid(), (string)id, val1, rop1, val2, rop2);
-}
-
diff --git a/gse_parser.h b/gse_parser.h
deleted file mode 100644
index 8a7c2c4..0000000
--- a/gse_parser.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2006 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-#ifndef _gseclause_h
-#include "GSEClause.h"
-#endif
-
-#define YYDEBUG 1
-#undef YYERROR_VERBOSE
-#define YY_NO_UNPUT 1
-
-#define ID_MAX 256
-
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
-namespace libdap
-{
-
-/** Argument to the GSE parser. Assumes all errors will be signaled by
-    throws; Error objects are not returned. */
-struct gse_arg
-{
-    GSEClause *_gsec;           // The gse parsed.
-    Grid *_grid;                // The Grid being constrained.
-    int _status;                // The parser's status.
-
-    gse_arg(): _gsec(0), _grid(0), _status(1)
-    {}
-    gse_arg(Grid *g): _gsec(0), _grid(g), _status(1)
-    {}
-    virtual ~gse_arg()
-    {}
-
-    void set_gsec(GSEClause *gsec)
-    {
-        _gsec = gsec;
-    }
-    GSEClause *get_gsec()
-    {
-        return _gsec;
-    }
-    void set_grid(Grid *g)
-    {
-        _grid = g;
-    }
-    Grid *get_grid()
-    {
-        return _grid;
-    }
-    void set_status(int stat)
-    {
-        _status = stat;
-    }
-    int get_status()
-    {
-        return _status;
-    }
-};
-
-} // namespace libdap
diff --git a/lex.Error.cc b/lex.Error.cc
index 7091a43..58c7187 100644
--- a/lex.Error.cc
+++ b/lex.Error.cc
@@ -559,7 +559,7 @@ char *Errortext;
 
 #include "config_dap.h"
 
-static char rcsid[] not_used = {"$Id: Error.lex 25112 2011-12-29 21:44:54Z jimg $"};
+static char rcsid[] not_used = {"$Id: Error.lex 27157 2013-09-28 21:22:52Z jimg $"};
 
 #include <cstdlib>
 #include <cassert>
@@ -581,6 +581,7 @@ using namespace libdap;
 
 #define YY_FATAL_ERROR(msg) {\
     throw(Error(string("Error scanning the error response: ") + string(msg))); \
+    yy_fatal_error(msg); /* see das.lex */ \
 }
 
 int error_line_num = 1;
@@ -589,9 +590,10 @@ static int start_line;		/* used in quote and comment error handlers */
 void store_integer();
 void store_string();
 
+#define YY_NO_INPUT 1
 
 
-#line 595 "lex.Error.cc"
+#line 597 "lex.Error.cc"
 
 #define INITIAL 0
 #define quote 1
@@ -680,7 +682,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( Errortext, Errorleng, 1, Errorout )
+#define ECHO do { if (fwrite( Errortext, Errorleng, 1, Errorout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -691,7 +693,7 @@ static int input (void );
 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 		{ \
 		int c = '*'; \
-		yy_size_t n; \
+		unsigned n; \
 		for ( n = 0; n < max_size && \
 			     (c = getc( Errorin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
@@ -773,11 +775,11 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
     
-#line 93 "Error.lex"
+#line 96 "Error.lex"
 
 
 
-#line 781 "lex.Error.cc"
+#line 783 "lex.Error.cc"
 
 	if ( !(yy_init) )
 		{
@@ -868,103 +870,103 @@ do_action:	/* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 96 "Error.lex"
+#line 99 "Error.lex"
 store_string(); return SCAN_ERROR;
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 98 "Error.lex"
+#line 101 "Error.lex"
 store_string(); return SCAN_CODE;
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 99 "Error.lex"
+#line 102 "Error.lex"
 store_string(); return SCAN_MSG;
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 101 "Error.lex"
+#line 104 "Error.lex"
 store_integer(); return SCAN_INT;
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 103 "Error.lex"
+#line 106 "Error.lex"
 return (int)*Errortext;
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 104 "Error.lex"
+#line 107 "Error.lex"
 return (int)*Errortext;
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 105 "Error.lex"
+#line 108 "Error.lex"
 return (int)*Errortext;
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 106 "Error.lex"
+#line 109 "Error.lex"
 return (int)*Errortext;
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 108 "Error.lex"
+#line 111 "Error.lex"
 
 	YY_BREAK
 case 10:
 /* rule 10 can match eol */
 YY_RULE_SETUP
-#line 109 "Error.lex"
+#line 112 "Error.lex"
 ++error_line_num;
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 110 "Error.lex"
+#line 113 "Error.lex"
 yy_init = 1; error_line_num = 1; yyterminate();
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 112 "Error.lex"
+#line 115 "Error.lex"
 BEGIN(comment);
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 113 "Error.lex"
+#line 116 "Error.lex"
 
 	YY_BREAK
 case 13:
 /* rule 13 can match eol */
 YY_RULE_SETUP
-#line 114 "Error.lex"
+#line 117 "Error.lex"
 ++error_line_num; BEGIN(INITIAL);
 	YY_BREAK
 case YY_STATE_EOF(comment):
-#line 115 "Error.lex"
+#line 118 "Error.lex"
 yy_init = 1; error_line_num = 1; yyterminate();
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 117 "Error.lex"
+#line 120 "Error.lex"
 BEGIN(quote); start_line = error_line_num; yymore();
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 118 "Error.lex"
+#line 121 "Error.lex"
 yymore();
 	YY_BREAK
 case 16:
 /* rule 16 can match eol */
 YY_RULE_SETUP
-#line 119 "Error.lex"
+#line 122 "Error.lex"
 yymore(); ++error_line_num;
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 120 "Error.lex"
+#line 123 "Error.lex"
 yymore();
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 121 "Error.lex"
+#line 124 "Error.lex"
 { 
     			  BEGIN(INITIAL); 
 			  store_string();
@@ -972,7 +974,7 @@ YY_RULE_SETUP
                         }
 	YY_BREAK
 case YY_STATE_EOF(quote):
-#line 126 "Error.lex"
+#line 129 "Error.lex"
 {
                           char msg[256];
 			  snprintf(msg, 255,
@@ -984,7 +986,7 @@ case YY_STATE_EOF(quote):
 case 19:
 /* rule 19 can match eol */
 YY_RULE_SETUP
-#line 134 "Error.lex"
+#line 137 "Error.lex"
 {
                           if (Errortext) {	/* suppress msgs about `' chars */
                             fprintf(stderr, "Character `%c' is not", *Errortext);
@@ -995,10 +997,10 @@ YY_RULE_SETUP
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 141 "Error.lex"
+#line 144 "Error.lex"
 ECHO;
 	YY_BREAK
-#line 1002 "lex.Error.cc"
+#line 1004 "lex.Error.cc"
 
 	case YY_END_OF_BUFFER:
 		{
@@ -1957,7 +1959,7 @@ void Errorfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 141 "Error.lex"
+#line 144 "Error.lex"
 
 
 
diff --git a/lex.ce_expr.cc b/lex.ce_expr.cc
index fe852fb..8d2a9d6 100644
--- a/lex.ce_expr.cc
+++ b/lex.ce_expr.cc
@@ -383,8 +383,8 @@ static void yy_fatal_error (yyconst char msg[]  );
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 24
-#define YY_END_OF_BUFFER 25
+#define YY_NUM_RULES 32
+#define YY_END_OF_BUFFER 33
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -392,12 +392,15 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[36] =
+static yyconst flex_int16_t yy_accept[66] =
     {   0,
-        0,    0,   20,   20,   25,   23,   18,   23,   19,   24,
-       10,    5,    6,    7,    4,    3,   15,   11,   13,    1,
-        2,    8,    9,   20,   22,   24,   18,   12,   10,   16,
-       17,   14,   20,   21,    0
+        0,    0,   28,   28,   33,   31,   26,   31,   27,   31,
+       10,    5,    6,    7,   18,    4,    3,   15,   11,   13,
+        1,    2,    8,    9,   32,   28,   30,   32,   26,   12,
+        0,    0,    0,    0,   10,   16,   17,   14,   28,   29,
+        0,    0,    0,    0,    0,    0,    0,    0,   19,    0,
+        0,    0,    0,    0,   20,   22,    0,    0,    0,    0,
+       21,   23,   24,   25,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -405,17 +408,17 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    4,    5,    6,    1,    7,    8,    1,    9,
-       10,    1,    7,   11,    7,    7,    7,    7,    7,    7,
-        7,    7,    7,    7,    7,    7,    7,   12,    1,   13,
-       14,   15,    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,
-       16,   17,   18,    1,    7,    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,   19,    1,   20,   21,    1,    1,    1,    1,
+        1,    2,    4,    5,    6,    7,    8,    9,    1,   10,
+       11,   12,    8,   13,    8,    8,    8,    8,   14,   15,
+       16,   17,    8,   18,    8,    8,    8,   19,    1,   20,
+       21,   22,    1,    1,    8,   23,    8,    8,    8,   24,
+        8,    8,   25,    8,    8,    8,    8,    8,    8,    8,
+        8,    8,    8,    8,   26,    8,    8,    8,    8,    8,
+       27,   28,   29,    1,    8,    1,   30,    8,    8,    8,
+
+       31,    8,    8,    8,    8,    8,    8,   32,    8,   33,
+       34,    8,    8,    8,    8,   35,    8,    8,    8,    8,
+       36,    8,   37,    1,   38,   39,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -432,51 +435,72 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[22] =
+static yyconst flex_int32_t yy_meta[40] =
     {   0,
-        1,    1,    2,    1,    3,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    3,    1,    1,    1,
-        1
+        1,    1,    2,    1,    3,    4,    1,    4,    1,    1,
+        1,    1,    1,    4,    4,    4,    4,    4,    1,    1,
+        1,    1,    4,    4,    4,    4,    1,    5,    1,    4,
+        4,    4,    4,    4,    4,    4,    1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[39] =
+static yyconst flex_int16_t yy_base[70] =
     {   0,
-        0,    0,   17,   18,   39,   50,   22,   24,   50,   50,
-       20,   50,   50,   50,   50,   50,   22,   12,   18,   50,
-       50,   50,   50,    0,   50,    0,   26,   50,   24,   50,
-       50,   50,    0,   50,   50,   41,   44,   46
+        0,    0,   35,   36,   94,   95,   40,   72,   95,   21,
+        0,   95,   95,   95,   95,   95,   95,   71,   52,   69,
+       95,   95,   95,   95,   95,    0,   95,    0,   46,   95,
+       53,   56,   54,   61,    0,   95,   95,   95,    0,   95,
+       50,   50,   48,   49,   50,   47,   36,   39,   95,   27,
+       43,   45,   37,   38,   95,   95,   41,   43,   42,   38,
+       95,   95,   95,   95,   95,   64,   66,   71,   75
     } ;
 
-static yyconst flex_int16_t yy_def[39] =
+static yyconst flex_int16_t yy_def[70] =
     {   0,
-       35,    1,   36,   36,   35,   35,   35,   35,   35,   35,
-       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
-       35,   35,   35,   37,   35,   38,   35,   35,   35,   35,
-       35,   35,   37,   35,    0,   35,   35,   35
+       65,    1,   66,   66,   65,   65,   65,   65,   65,   65,
+       67,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   68,   65,   69,   65,   65,
+       65,   65,   65,   65,   67,   65,   65,   65,   68,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,    0,   65,   65,   65,   65
     } ;
 
-static yyconst flex_int16_t yy_nxt[72] =
+static yyconst flex_int16_t yy_nxt[135] =
     {   0,
-        6,    7,    7,    8,    9,   10,   11,   12,   13,   14,
-       15,   16,   17,   18,   19,   20,   11,   21,   22,   23,
-       10,   25,   25,   27,   27,   29,   29,   27,   27,   29,
-       29,   32,   31,   26,   26,   30,   29,   28,   35,   35,
-       29,   24,   24,   24,   33,   33,   34,   35,   34,    5,
-       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
-       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
-       35
+        6,    7,    7,    8,    9,    6,   10,   11,   12,   13,
+       14,   15,   16,   11,   11,   11,   11,   11,   17,   18,
+       19,   20,   11,   11,   11,   11,   21,   11,   22,   11,
+       11,   11,   11,   11,   11,   11,   23,   24,   25,   27,
+       27,   29,   29,   31,   32,   33,   34,   29,   29,   51,
+       57,   52,   58,   59,   64,   60,   63,   62,   61,   56,
+       55,   54,   28,   28,   26,   26,   26,   26,   26,   35,
+       35,   39,   39,   53,   39,   40,   50,   40,   40,   40,
+       49,   48,   47,   46,   45,   44,   43,   42,   41,   38,
+       37,   36,   30,   65,    5,   65,   65,   65,   65,   65,
+
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65
     } ;
 
-static yyconst flex_int16_t yy_chk[72] =
+static yyconst flex_int16_t yy_chk[135] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    3,    4,    7,    7,   11,   11,   27,   27,   29,
-       29,   19,   18,    3,    4,   17,   11,    8,    5,    0,
-       29,   36,   36,   36,   37,   37,   38,    0,   38,   35,
-       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
-       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
-       35
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    3,
+        4,    7,    7,   10,   10,   10,   10,   29,   29,   47,
+       53,   47,   53,   54,   60,   54,   59,   58,   57,   52,
+       51,   50,    3,    4,   66,   66,   66,   66,   66,   67,
+       67,   68,   68,   48,   68,   69,   46,   69,   69,   69,
+       45,   44,   43,   42,   41,   34,   33,   32,   31,   20,
+       19,   18,    8,    5,   65,   65,   65,   65,   65,   65,
+
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -543,7 +567,7 @@ char *ce_exprtext;
 
 #include "config.h"
 
-static char rcsid[] not_used = {"$Id: ce_expr.lex 25112 2011-12-29 21:44:54Z jimg $"};
+static char rcsid[] not_used = {"$Id: ce_expr.lex 27157 2013-09-28 21:22:52Z jimg $"};
 
 #include <cstdio>
 #include <string>
@@ -556,6 +580,7 @@ static char rcsid[] not_used = {"$Id: ce_expr.lex 25112 2011-12-29 21:44:54Z jim
 #define YY_DECL int ce_exprlex YY_PROTO(( void ))
 #define YY_FATAL_ERROR(msg) {\
     throw(Error(string("Error scanning constraint expression text: ") + string(msg))); \
+    yy_fatal_error(msg); /* see das.lex */ \
 }
 
 #include "Error.h"
@@ -571,6 +596,7 @@ static void store_id();
 static void store_str();
 static void store_op(int op);
 
+#define YY_NO_INPUT 1
 
 /* In the DAS and DDS parsers I removed the INT and FLOAT lexemes. However,
    not having them here complicates parsing since you must check to see if a
@@ -587,7 +613,7 @@ static void store_op(int op);
    scanners, but not here because it'll conflict with the url dereference
    operator. 6/10/2002 jhrg
 */
-#line 591 "lex.ce_expr.cc"
+#line 617 "lex.ce_expr.cc"
 
 #define INITIAL 0
 #define quote 1
@@ -675,7 +701,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( ce_exprtext, ce_exprleng, 1, ce_exprout )
+#define ECHO do { if (fwrite( ce_exprtext, ce_exprleng, 1, ce_exprout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -686,7 +712,7 @@ static int input (void );
 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 		{ \
 		int c = '*'; \
-		yy_size_t n; \
+		unsigned n; \
 		for ( n = 0; n < max_size && \
 			     (c = getc( ce_exprin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
@@ -768,10 +794,10 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
     
-#line 119 "ce_expr.lex"
+#line 132 "ce_expr.lex"
 
 
-#line 775 "lex.ce_expr.cc"
+#line 801 "lex.ce_expr.cc"
 
 	if ( !(yy_init) )
 		{
@@ -830,13 +856,13 @@ yy_match:
 			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 >= 36 )
+				if ( yy_current_state >= 66 )
 					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_base[yy_current_state] != 50 );
+		while ( yy_base[yy_current_state] != 95 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -862,149 +888,190 @@ do_action:	/* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 121 "ce_expr.lex"
+#line 134 "ce_expr.lex"
 return (int)*ce_exprtext;
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 122 "ce_expr.lex"
+#line 135 "ce_expr.lex"
 return (int)*ce_exprtext;
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 123 "ce_expr.lex"
+#line 136 "ce_expr.lex"
 return (int)*ce_exprtext;
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 124 "ce_expr.lex"
+#line 137 "ce_expr.lex"
 return (int)*ce_exprtext;
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 125 "ce_expr.lex"
+#line 138 "ce_expr.lex"
 return (int)*ce_exprtext;
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 126 "ce_expr.lex"
+#line 139 "ce_expr.lex"
 return (int)*ce_exprtext;
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 127 "ce_expr.lex"
+#line 140 "ce_expr.lex"
 return (int)*ce_exprtext;
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 128 "ce_expr.lex"
+#line 141 "ce_expr.lex"
 return (int)*ce_exprtext;
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 129 "ce_expr.lex"
+#line 142 "ce_expr.lex"
 return (int)*ce_exprtext;
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 131 "ce_expr.lex"
+#line 144 "ce_expr.lex"
 store_id(); return SCAN_WORD;
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 133 "ce_expr.lex"
+#line 146 "ce_expr.lex"
 store_op(SCAN_EQUAL); return SCAN_EQUAL;
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 134 "ce_expr.lex"
+#line 147 "ce_expr.lex"
 store_op(SCAN_NOT_EQUAL); return SCAN_NOT_EQUAL;
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 135 "ce_expr.lex"
+#line 148 "ce_expr.lex"
 store_op(SCAN_GREATER); return SCAN_GREATER;
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 136 "ce_expr.lex"
+#line 149 "ce_expr.lex"
 store_op(SCAN_GREATER_EQL); return SCAN_GREATER_EQL;
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 137 "ce_expr.lex"
+#line 150 "ce_expr.lex"
 store_op(SCAN_LESS); return SCAN_LESS;
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 138 "ce_expr.lex"
+#line 151 "ce_expr.lex"
 store_op(SCAN_LESS_EQL); return SCAN_LESS_EQL;
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 139 "ce_expr.lex"
+#line 152 "ce_expr.lex"
 store_op(SCAN_REGEXP); return SCAN_REGEXP;
 	YY_BREAK
 case 18:
-/* rule 18 can match eol */
 YY_RULE_SETUP
-#line 141 "ce_expr.lex"
+#line 154 "ce_expr.lex"
+store_op(SCAN_STAR); return SCAN_STAR;
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 156 "ce_expr.lex"
+return SCAN_HASH_BYTE;
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 157 "ce_expr.lex"
+return SCAN_HASH_INT16;
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 158 "ce_expr.lex"
+return SCAN_HASH_UINT16;
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 159 "ce_expr.lex"
+return SCAN_HASH_INT32;
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 160 "ce_expr.lex"
+return SCAN_HASH_UINT32;
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 161 "ce_expr.lex"
+return SCAN_HASH_FLOAT32;
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 162 "ce_expr.lex"
+return SCAN_HASH_FLOAT64;
+	YY_BREAK
+case 26:
+/* rule 26 can match eol */
+YY_RULE_SETUP
+#line 164 "ce_expr.lex"
 
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 142 "ce_expr.lex"
+#line 165 "ce_expr.lex"
 yy_init = 1; yyterminate();
 	YY_BREAK
-case 19:
+case 27:
 YY_RULE_SETUP
-#line 144 "ce_expr.lex"
+#line 167 "ce_expr.lex"
 BEGIN(quote); yymore();
 	YY_BREAK
-case 20:
-/* rule 20 can match eol */
+case 28:
+/* rule 28 can match eol */
 YY_RULE_SETUP
-#line 145 "ce_expr.lex"
+#line 169 "ce_expr.lex"
 yymore(); /*"*/
 	YY_BREAK
-case 21:
+case 29:
 YY_RULE_SETUP
-#line 146 "ce_expr.lex"
+#line 171 "ce_expr.lex"
 yymore();
 	YY_BREAK
-case 22:
+case 30:
 YY_RULE_SETUP
-#line 147 "ce_expr.lex"
+#line 173 "ce_expr.lex"
 { 
     		  BEGIN(INITIAL); 
-                  store_str();
-		  return SCAN_STR;
-                }
+              store_str();
+              return SCAN_STR;
+            }
 	YY_BREAK
 case YY_STATE_EOF(quote):
-#line 152 "ce_expr.lex"
+#line 179 "ce_expr.lex"
 {
+                  BEGIN(INITIAL);   /* resetting the state is needed for reentrant parsers */
                   char msg[256];
-		  sprintf(msg, "Unterminated quote\n");
-		  YY_FATAL_ERROR(msg);
+                  sprintf(msg, "Unterminated quote\n");
+                  YY_FATAL_ERROR(msg);
                 }
 	YY_BREAK
-case 23:
-/* rule 23 can match eol */
+case 31:
+/* rule 31 can match eol */
 YY_RULE_SETUP
-#line 158 "ce_expr.lex"
+#line 186 "ce_expr.lex"
 {
                   if (ce_exprtext) {	/* suppress msgs about `' chars */
                     fprintf(stderr, "Character `%c' is not", *ce_exprtext);
                     fprintf(stderr, " allowed and has been ignored\n");
-		  }
-		}
+                  }
+		        }
 	YY_BREAK
-case 24:
+case 32:
 YY_RULE_SETUP
-#line 164 "ce_expr.lex"
+#line 192 "ce_expr.lex"
 ECHO;
 	YY_BREAK
-#line 1008 "lex.ce_expr.cc"
+#line 1075 "lex.ce_expr.cc"
 
 	case YY_END_OF_BUFFER:
 		{
@@ -1294,7 +1361,7 @@ static int yy_get_next_buffer (void)
 		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 >= 36 )
+			if ( yy_current_state >= 66 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1322,11 +1389,11 @@ static int yy_get_next_buffer (void)
 	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 >= 36 )
+		if ( yy_current_state >= 66 )
 			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 == 35);
+	yy_is_jam = (yy_current_state == 65);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -1963,7 +2030,7 @@ void ce_exprfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 164 "ce_expr.lex"
+#line 192 "ce_expr.lex"
 
 
 
@@ -1996,7 +2063,7 @@ ce_expr_delete_buffer(void *buf)
 static void
 store_id()
 {
-    strncpy(ce_exprlval.id, www2id(string(ce_exprtext)).c_str(), ID_MAX-1);
+    strncpy(ce_exprlval.id, ce_exprtext, ID_MAX-1);
     ce_exprlval.id[ID_MAX-1] = '\0';
 }
 
@@ -2004,7 +2071,7 @@ static void
 store_str()
 {
     // transform %20 to a space. 7/11/2001 jhrg
-    string *s = new string(www2id(string(ce_exprtext)));  // XXX memory leak?
+    string *s = new string(ce_exprtext); // move all calls of www2id into the parser. jhrg 7/5/13 www2id(string(ce_exprtext)));
 
     if (*s->begin() == '\"' && *(s->end()-1) == '\"') {
 	s->erase(s->begin());
diff --git a/lex.das.cc b/lex.das.cc
index 7be069b..b85c284 100644
--- a/lex.das.cc
+++ b/lex.das.cc
@@ -670,7 +670,7 @@ char *dastext;
 
 #include <cstdio>
 
-static char rcsid[] not_used ={"$Id: das.lex 25112 2011-12-29 21:44:54Z jimg $"};
+static char rcsid[] not_used ={"$Id: das.lex 27157 2013-09-28 21:22:52Z jimg $"};
 
 #ifndef _MSC_VER
 #include <string.h>
@@ -694,6 +694,7 @@ using namespace libdap ;
 #define YY_DECL int daslex YY_PROTO(( void ))
 #define YY_FATAL_ERROR(msg) {\
     throw(Error(string("Error scanning DAS object text: ") + string(msg))); \
+    yy_fatal_error(msg); /* This will never be run but putting it here removes a warning that the funtion is never used. */ \
 }
 
 #include "das.tab.hh"
@@ -701,6 +702,7 @@ using namespace libdap ;
 int das_line_num = 1;
 static int start_line;		/* used in quote and comment error handlers */
 
+#define YY_NO_INPUT 1
 
 
 
@@ -709,7 +711,7 @@ static int start_line;		/* used in quote and comment error handlers */
    parens and colons while the DDS and expr scanners don't. It's too hard to
    disambiguate functions when IDs have parens in them and adding colons
    makes parsing the array projections hard. 10/31/2001 jhrg */
-#line 713 "lex.das.cc"
+#line 715 "lex.das.cc"
 
 #define INITIAL 0
 #define quote 1
@@ -799,7 +801,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( dastext, dasleng, 1, dasout )
+#define ECHO do { if (fwrite( dastext, dasleng, 1, dasout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -810,7 +812,7 @@ static int input (void );
 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 		{ \
 		int c = '*'; \
-		yy_size_t n; \
+		unsigned n; \
 		for ( n = 0; n < max_size && \
 			     (c = getc( dasin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
@@ -892,10 +894,10 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
     
-#line 133 "das.lex"
+#line 136 "das.lex"
 
 
-#line 899 "lex.das.cc"
+#line 901 "lex.das.cc"
 
 	if ( !(yy_init) )
 		{
@@ -986,67 +988,67 @@ do_action:	/* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 135 "das.lex"
+#line 138 "das.lex"
 daslval = dastext; return SCAN_ATTR;
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 137 "das.lex"
+#line 140 "das.lex"
 daslval = dastext; return SCAN_ALIAS;
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 138 "das.lex"
+#line 141 "das.lex"
 daslval = dastext; return SCAN_BYTE;
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 139 "das.lex"
+#line 142 "das.lex"
 daslval = dastext; return SCAN_INT16;
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 140 "das.lex"
+#line 143 "das.lex"
 daslval = dastext; return SCAN_UINT16;
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 141 "das.lex"
+#line 144 "das.lex"
 daslval = dastext; return SCAN_INT32;
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 142 "das.lex"
+#line 145 "das.lex"
 daslval = dastext; return SCAN_UINT32;
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 143 "das.lex"
+#line 146 "das.lex"
 daslval = dastext; return SCAN_FLOAT32;
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 144 "das.lex"
+#line 147 "das.lex"
 daslval = dastext; return SCAN_FLOAT64;
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 145 "das.lex"
+#line 148 "das.lex"
 daslval = dastext; return SCAN_STRING;
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 146 "das.lex"
+#line 149 "das.lex"
 daslval = dastext; return SCAN_URL;
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 147 "das.lex"
+#line 150 "das.lex"
 daslval = dastext; return SCAN_XML;
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 149 "das.lex"
+#line 152 "das.lex"
 {
 			    daslval = dastext; 
 			    DBG(cerr << "WORD: " << dastext << endl); 
@@ -1055,95 +1057,95 @@ YY_RULE_SETUP
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 155 "das.lex"
+#line 158 "das.lex"
 return (int)*dastext;
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 156 "das.lex"
+#line 159 "das.lex"
 return (int)*dastext;
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 157 "das.lex"
+#line 160 "das.lex"
 return (int)*dastext;
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 158 "das.lex"
+#line 161 "das.lex"
 return (int)*dastext;
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 160 "das.lex"
+#line 163 "das.lex"
 
 	YY_BREAK
 case 19:
 /* rule 19 can match eol */
 YY_RULE_SETUP
-#line 161 "das.lex"
+#line 164 "das.lex"
 ++das_line_num;
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 162 "das.lex"
+#line 165 "das.lex"
 yy_init = 1; das_line_num = 1; yyterminate();
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 164 "das.lex"
+#line 167 "das.lex"
 BEGIN(comment);
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 165 "das.lex"
+#line 168 "das.lex"
 
 	YY_BREAK
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 166 "das.lex"
+#line 169 "das.lex"
 ++das_line_num; BEGIN(INITIAL);
 	YY_BREAK
 case 23:
 /* rule 23 can match eol */
 YY_RULE_SETUP
-#line 167 "das.lex"
+#line 170 "das.lex"
 ++das_line_num; BEGIN(INITIAL);
 	YY_BREAK
 case YY_STATE_EOF(comment):
-#line 168 "das.lex"
+#line 171 "das.lex"
 yy_init = 1; das_line_num = 1; yyterminate();
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 170 "das.lex"
+#line 173 "das.lex"
 BEGIN(quote); start_line = das_line_num; yymore();
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 171 "das.lex"
+#line 174 "das.lex"
 yymore();
 	YY_BREAK
 case 26:
 /* rule 26 can match eol */
 YY_RULE_SETUP
-#line 172 "das.lex"
+#line 175 "das.lex"
 yymore(); ++das_line_num;
 	YY_BREAK
 case 27:
 /* rule 27 can match eol */
 YY_RULE_SETUP
-#line 173 "das.lex"
+#line 176 "das.lex"
 yymore(); ++das_line_num;
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 174 "das.lex"
+#line 177 "das.lex"
 yymore();
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 175 "das.lex"
+#line 178 "das.lex"
 { 
                           BEGIN(INITIAL); 
 
@@ -1153,7 +1155,7 @@ YY_RULE_SETUP
                         }
 	YY_BREAK
 case YY_STATE_EOF(quote):
-#line 182 "das.lex"
+#line 185 "das.lex"
 {
                           char msg[256];
                           sprintf(msg,
@@ -1165,7 +1167,7 @@ case YY_STATE_EOF(quote):
 case 30:
 /* rule 30 can match eol */
 YY_RULE_SETUP
-#line 190 "das.lex"
+#line 193 "das.lex"
 {
                           if (dastext) {
                             fprintf(stderr, "Character '%c' (%d) is not",
@@ -1176,10 +1178,10 @@ YY_RULE_SETUP
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 197 "das.lex"
+#line 200 "das.lex"
 ECHO;
 	YY_BREAK
-#line 1183 "lex.das.cc"
+#line 1185 "lex.das.cc"
 case YY_STATE_EOF(xml):
 	yyterminate();
 
@@ -2140,7 +2142,7 @@ void dasfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 197 "das.lex"
+#line 200 "das.lex"
 
 
 
diff --git a/lex.dds.cc b/lex.dds.cc
index be82528..3992803 100644
--- a/lex.dds.cc
+++ b/lex.dds.cc
@@ -650,8 +650,6 @@ char *ddstext;
 #include <cstdio>
 #include <cstring>
 
-static char rcsid[] not_used = {"$Id: dds.lex 25112 2011-12-29 21:44:54Z jimg $"};
-
 #include "parser.h"
 #include "dds.tab.hh"
 #include "escaping.h"
@@ -674,12 +672,14 @@ using namespace libdap ;
 
 #define YY_FATAL_ERROR(msg) {\
     throw(Error(string("Error scanning DDS object text: ") + string(msg))); \
+    yy_fatal_error(msg); /* see das.lex */ \
 }
 
 int dds_line_num = 1;
 
 static void store_word();
 
+#define YY_NO_INPUT 1
 
 /* See das.lex for comments about the characters allowed in a WORD.
    10/31/2001 jhrg */
@@ -771,7 +771,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( ddstext, ddsleng, 1, ddsout )
+#define ECHO do { if (fwrite( ddstext, ddsleng, 1, ddsout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -782,7 +782,7 @@ static int input (void );
 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 		{ \
 		int c = '*'; \
-		yy_size_t n; \
+		unsigned n; \
 		for ( n = 0; n < max_size && \
 			     (c = getc( ddsin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
@@ -864,7 +864,7 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
     
-#line 119 "dds.lex"
+#line 120 "dds.lex"
 
 
 #line 871 "lex.dds.cc"
@@ -952,165 +952,165 @@ do_action:	/* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 121 "dds.lex"
+#line 122 "dds.lex"
 return (int)*ddstext;
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 122 "dds.lex"
+#line 123 "dds.lex"
 return (int)*ddstext;
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 123 "dds.lex"
+#line 124 "dds.lex"
 return (int)*ddstext;
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 124 "dds.lex"
+#line 125 "dds.lex"
 return (int)*ddstext;
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 125 "dds.lex"
+#line 126 "dds.lex"
 return (int)*ddstext;
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 126 "dds.lex"
+#line 127 "dds.lex"
 return (int)*ddstext;
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 127 "dds.lex"
+#line 128 "dds.lex"
 return (int)*ddstext;
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 129 "dds.lex"
+#line 130 "dds.lex"
 store_word(); return SCAN_DATASET;
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 130 "dds.lex"
+#line 131 "dds.lex"
 store_word(); return SCAN_LIST;
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 131 "dds.lex"
+#line 132 "dds.lex"
 store_word(); return SCAN_SEQUENCE;
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 132 "dds.lex"
+#line 133 "dds.lex"
 store_word(); return SCAN_STRUCTURE;
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 133 "dds.lex"
+#line 134 "dds.lex"
 store_word(); return SCAN_GRID;
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 134 "dds.lex"
+#line 135 "dds.lex"
 store_word(); return SCAN_BYTE;
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 135 "dds.lex"
+#line 136 "dds.lex"
 store_word(); return SCAN_INT16;
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 136 "dds.lex"
+#line 137 "dds.lex"
 store_word(); return SCAN_UINT16;
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 137 "dds.lex"
+#line 138 "dds.lex"
 store_word(); return SCAN_INT32;
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 138 "dds.lex"
+#line 139 "dds.lex"
 store_word(); return SCAN_UINT32;
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 139 "dds.lex"
+#line 140 "dds.lex"
 store_word(); return SCAN_FLOAT32;
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 140 "dds.lex"
+#line 141 "dds.lex"
 store_word(); return SCAN_FLOAT64;
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 141 "dds.lex"
+#line 142 "dds.lex"
 store_word(); return SCAN_STRING;
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 142 "dds.lex"
+#line 143 "dds.lex"
 store_word(); return SCAN_URL;
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 144 "dds.lex"
+#line 145 "dds.lex"
 store_word(); return SCAN_WORD;
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 146 "dds.lex"
+#line 147 "dds.lex"
 
 	YY_BREAK
 case 24:
 /* rule 24 can match eol */
 YY_RULE_SETUP
-#line 147 "dds.lex"
+#line 148 "dds.lex"
 ++dds_line_num;
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 148 "dds.lex"
+#line 149 "dds.lex"
 yy_init = 1; dds_line_num = 1; yyterminate();
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 150 "dds.lex"
+#line 151 "dds.lex"
 BEGIN(comment);
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 151 "dds.lex"
+#line 152 "dds.lex"
 
 	YY_BREAK
 case 27:
 /* rule 27 can match eol */
 YY_RULE_SETUP
-#line 152 "dds.lex"
+#line 153 "dds.lex"
 ++dds_line_num; BEGIN(INITIAL);
 	YY_BREAK
 case YY_STATE_EOF(comment):
-#line 153 "dds.lex"
+#line 154 "dds.lex"
 yy_init = 1; dds_line_num = 1; yyterminate();
 	YY_BREAK
 case 28:
 /* rule 28 can match eol */
 YY_RULE_SETUP
-#line 155 "dds.lex"
+#line 156 "dds.lex"
 yyterminate();
 	YY_BREAK
 case 29:
 /* rule 29 can match eol */
 YY_RULE_SETUP
-#line 156 "dds.lex"
+#line 157 "dds.lex"
 yyterminate();
 	YY_BREAK
 case 30:
 /* rule 30 can match eol */
 YY_RULE_SETUP
-#line 158 "dds.lex"
+#line 159 "dds.lex"
 {
             if (ddstext) {	/* suppress msgs about `' chars */
                 fprintf(stderr, "Character `%c' is not", *ddstext);
@@ -1120,7 +1120,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 164 "dds.lex"
+#line 165 "dds.lex"
 ECHO;
 	YY_BREAK
 #line 1127 "lex.dds.cc"
@@ -2082,7 +2082,7 @@ void ddsfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 164 "dds.lex"
+#line 165 "dds.lex"
 
 
 
diff --git a/lex.gse_.cc b/lex.gse_.cc
deleted file mode 100644
index 7b55b63..0000000
--- a/lex.gse_.cc
+++ /dev/null
@@ -1,1898 +0,0 @@
-#line 2 "lex.gse_.cc"
-
-#line 4 "lex.gse_.cc"
-
-#define  YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define yy_create_buffer gse__create_buffer
-#define yy_delete_buffer gse__delete_buffer
-#define yy_flex_debug gse__flex_debug
-#define yy_init_buffer gse__init_buffer
-#define yy_flush_buffer gse__flush_buffer
-#define yy_load_buffer_state gse__load_buffer_state
-#define yy_switch_to_buffer gse__switch_to_buffer
-#define yyin gse_in
-#define yyleng gse_leng
-#define yylex gse_lex
-#define yylineno gse_lineno
-#define yyout gse_out
-#define yyrestart gse_restart
-#define yytext gse_text
-#define yywrap gse_wrap
-#define yyalloc gse_alloc
-#define yyrealloc gse_realloc
-#define yyfree gse_free
-
-#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)
-
-/* 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 (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 (((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 gse_restart(gse_in  )
-
-#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
-
-extern int gse_leng;
-
-extern FILE *gse_in, *gse_out;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-    #define YY_LESS_LINENO(n)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up gse_text. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		*yy_cp = (yy_hold_char); \
-		YY_RESTORE_YY_MORE_OFFSET \
-		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up gse_text again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, (yytext_ptr)  )
-
-#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 gse_restart()), so that the user can continue scanning by
-	 * just pointing gse_in at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-
-	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
-
-/* 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 ( (yy_buffer_stack) \
-                          ? (yy_buffer_stack)[(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 (yy_buffer_stack)[(yy_buffer_stack_top)]
-
-/* yy_hold_char holds the character lost when gse_text is formed. */
-static char yy_hold_char;
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-int gse_leng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 0;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow gse_wrap()'s to do buffer switches
- * instead of setting up a fresh gse_in.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void gse_restart (FILE *input_file  );
-void gse__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE gse__create_buffer (FILE *file,int size  );
-void gse__delete_buffer (YY_BUFFER_STATE b  );
-void gse__flush_buffer (YY_BUFFER_STATE b  );
-void gse_push_buffer_state (YY_BUFFER_STATE new_buffer  );
-void gse_pop_buffer_state (void );
-
-static void gse_ensure_buffer_stack (void );
-static void gse__load_buffer_state (void );
-static void gse__init_buffer (YY_BUFFER_STATE b,FILE *file  );
-
-#define YY_FLUSH_BUFFER gse__flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE gse__scan_buffer (char *base,yy_size_t size  );
-YY_BUFFER_STATE gse__scan_string (yyconst char *yy_str  );
-YY_BUFFER_STATE gse__scan_bytes (yyconst char *bytes,int len  );
-
-void *gse_alloc (yy_size_t  );
-void *gse_realloc (void *,yy_size_t  );
-void gse_free (void *  );
-
-#define yy_new_buffer gse__create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){ \
-        gse_ensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            gse__create_buffer(gse_in,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){\
-        gse_ensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            gse__create_buffer(gse_in,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-#define gse_wrap(n) 1
-#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
-
-FILE *gse_in = (FILE *) 0, *gse_out = (FILE *) 0;
-
-typedef int yy_state_type;
-
-extern int gse_lineno;
-
-int gse_lineno = 1;
-
-extern char *gse_text;
-#define yytext_ptr gse_text
-
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[]  );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up gse_text.
- */
-#define YY_DO_BEFORE_ACTION \
-	(yytext_ptr) = yy_bp; \
-	gse_leng = (size_t) (yy_cp - yy_bp); \
-	(yy_hold_char) = *yy_cp; \
-	*yy_cp = '\0'; \
-	(yy_c_buf_p) = yy_cp;
-
-#define YY_NUM_RULES 10
-#define YY_END_OF_BUFFER 11
-/* 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[32] =
-    {   0,
-        0,    0,   11,   10,   10,    3,    3,    3,    1,    8,
-        4,    6,    3,    3,    5,    3,    3,    1,    2,    2,
-        1,    3,    9,    7,    3,    3,    2,    3,    2,    2,
-        0
-    } ;
-
-static yyconst flex_int32_t yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    2,    1,    3,    1,    4,    1,    1,    1,
-        1,    1,    5,    1,    5,    6,    4,    7,    7,    7,
-        7,    7,    7,    7,    7,    7,    7,    1,    1,    8,
-        9,   10,    1,    1,   11,    4,    4,    4,   12,   13,
-        4,    4,   14,    4,    4,    4,    4,   15,    4,    4,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        1,    4,    1,    1,    4,    1,   11,    4,    4,    4,
-
-       16,   13,    4,    4,   14,    4,    4,    4,    4,   15,
-        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
-        4,    4,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst flex_int32_t yy_meta[17] =
-    {   0,
-        1,    1,    2,    2,    2,    2,    2,    1,    1,    1,
-        2,    2,    2,    2,    2,    2
-    } ;
-
-static yyconst flex_int16_t yy_base[33] =
-    {   0,
-        0,    0,   43,   44,   33,    0,   11,   34,   13,   31,
-       44,   30,   23,   26,   44,    0,   29,    0,   15,   17,
-        0,   21,   44,   44,   22,   19,   24,   26,   25,    0,
-       44,   25
-    } ;
-
-static yyconst flex_int16_t yy_def[33] =
-    {   0,
-       31,    1,   31,   31,   31,   32,   32,   32,   32,   31,
-       31,   31,   32,   32,   31,   32,   32,    9,    9,    9,
-        9,   32,   31,   31,   32,   32,    9,   32,   32,   32,
-        0,   31
-    } ;
-
-static yyconst flex_int16_t yy_nxt[61] =
-    {   0,
-        4,    5,    4,    6,    7,    8,    9,   10,   11,   12,
-        6,    6,    6,   13,   14,    6,   17,   18,   20,   21,
-       16,   19,   16,   27,   22,   28,   16,   29,   22,   16,
-       27,   29,   29,   30,   30,   19,   26,   25,   24,   23,
-       19,   15,   31,    3,   31,   31,   31,   31,   31,   31,
-       31,   31,   31,   31,   31,   31,   31,   31,   31,   31
-    } ;
-
-static yyconst flex_int16_t yy_chk[61] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    7,    7,    9,    9,
-       19,   19,   20,   20,    9,   22,   32,   22,    9,   27,
-       27,   29,   28,   26,   25,   17,   14,   13,   12,   10,
-        8,    5,    3,   31,   31,   31,   31,   31,   31,   31,
-       31,   31,   31,   31,   31,   31,   31,   31,   31,   31
-    } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-extern int gse__flex_debug;
-int gse__flex_debug = 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
-char *gse_text;
-#line 1 "gse.lex"
-/*
- -*- mode: c++; c-basic-offset:4 -*-
-
- This file is part of libdap, A C++ implementation of the OPeNDAP Data
- Access Protocol.
-
- Copyright (c) 2002,2003 OPeNDAP, Inc.
- Author: James Gallagher <jgallagher at opendap.org>
-
- This 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.
- 
- This 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 this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
- You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
- (c) COPYRIGHT URI/MIT 1999
-*/ 
-/*
-  Scanner for grid selection sub-expressions. The scanner is not reentrant,
-  but can share a name space with other scanners.
-
-   Note:
-   1) The `defines' file gse.tab.h is built using `bison -d'.
-   2) Define YY_DECL such that the scanner is called `gse_lex'.
-   3) When bison builds the gse.tab.h file, it uses `gse_' instead
-   of `yy' for variable name prefixes (e.g., yylval --> gse_lval).
-
-   1/13/99 jhrg
-*/
-#line 44 "gse.lex"
-
-#include "config_dap.h"
-
-static char rcsid[] not_used = {"$Id: gse.lex 25112 2011-12-29 21:44:54Z jimg $"};
-
-#include <string>
-#include <cstring>
-
-#include "Error.h"
-
-#ifndef YY_PROTO
-#define YY_PROTO(proto) proto
-#endif
-
-#define YY_DECL int gse_lex YY_PROTO(( void ))
-#define ID_MAX 256
-#define YY_NO_UNPUT 1
-#define YY_NO_INPUT 1
-#define YY_FATAL_ERROR(msg) {\
-    throw(Error(string("Error scanning grid constraint expression text: ") + string(msg))); \
-}
-
-#include "gse.tab.hh"
-
-using namespace std;
-using namespace libdap;
-
-static void store_int32();
-static void store_float64();
-static void store_id();
-static void store_op(int op);
-
-/* See das.lex for comments about the characters allowed in a WORD.
-   10/31/2001 jhrg */
-#line 566 "lex.gse_.cc"
-
-#define INITIAL 0
-
-#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
-
-static int yy_init_globals (void );
-
-/* Accessor methods to globals.
-   These are made visible to non-reentrant scanners for convenience. */
-
-int gse_lex_destroy (void );
-
-int gse_get_debug (void );
-
-void gse_set_debug (int debug_flag  );
-
-YY_EXTRA_TYPE gse_get_extra (void );
-
-void gse_set_extra (YY_EXTRA_TYPE user_defined  );
-
-FILE *gse_get_in (void );
-
-void gse_set_in  (FILE * in_str  );
-
-FILE *gse_get_out (void );
-
-void gse_set_out  (FILE * out_str  );
-
-int gse_get_leng (void );
-
-char *gse_get_text (void );
-
-int gse_get_lineno (void );
-
-void gse_set_lineno (int line_number  );
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int gse_wrap (void );
-#else
-extern int gse_wrap (void );
-#endif
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
-#endif
-
-#ifndef YY_NO_INPUT
-
-#ifdef __cplusplus
-static int yyinput (void );
-#else
-static int input (void );
-#endif
-
-#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
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO fwrite( gse_text, gse_leng, 1, gse_out )
-#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 = '*'; \
-		yy_size_t n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( gse_in )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( gse_in ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else \
-		{ \
-		errno=0; \
-		while ( (result = fread(buf, 1, max_size, gse_in))==0 && ferror(gse_in)) \
-			{ \
-			if( errno != EINTR) \
-				{ \
-				YY_FATAL_ERROR( "input in flex scanner failed" ); \
-				break; \
-				} \
-			errno=0; \
-			clearerr(gse_in); \
-			} \
-		}\
-\
-
-#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 )
-#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 gse_lex (void);
-
-#define YY_DECL int gse_lex (void)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after gse_text and gse_leng
- * 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;
-    
-#line 107 "gse.lex"
-
-
-#line 749 "lex.gse_.cc"
-
-	if ( !(yy_init) )
-		{
-		(yy_init) = 1;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! (yy_start) )
-			(yy_start) = 1;	/* first start state */
-
-		if ( ! gse_in )
-			gse_in = stdin;
-
-		if ( ! gse_out )
-			gse_out = stdout;
-
-		if ( ! YY_CURRENT_BUFFER ) {
-			gse_ensure_buffer_stack ();
-			YY_CURRENT_BUFFER_LVALUE =
-				gse__create_buffer(gse_in,YY_BUF_SIZE );
-		}
-
-		gse__load_buffer_state( );
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = (yy_c_buf_p);
-
-		/* Support of gse_text. */
-		*yy_cp = (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 = (yy_start);
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				(yy_last_accepting_state) = yy_current_state;
-				(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 >= 32 )
-					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_base[yy_current_state] != 44 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = (yy_last_accepting_cpos);
-			yy_current_state = (yy_last_accepting_state);
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-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 = (yy_hold_char);
-			yy_cp = (yy_last_accepting_cpos);
-			yy_current_state = (yy_last_accepting_state);
-			goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 109 "gse.lex"
-store_int32(); return SCAN_INT;
-	YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 110 "gse.lex"
-store_float64(); return SCAN_FLOAT;
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 112 "gse.lex"
-store_id(); return SCAN_WORD;
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 114 "gse.lex"
-store_op(SCAN_EQUAL); return SCAN_EQUAL;
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 115 "gse.lex"
-store_op(SCAN_NOT_EQUAL); return SCAN_NOT_EQUAL;
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 116 "gse.lex"
-store_op(SCAN_GREATER); return SCAN_GREATER;
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 117 "gse.lex"
-store_op(SCAN_GREATER_EQL); return SCAN_GREATER_EQL;
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 118 "gse.lex"
-store_op(SCAN_LESS); return SCAN_LESS;
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 119 "gse.lex"
-store_op(SCAN_LESS_EQL); return SCAN_LESS_EQL;
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 121 "gse.lex"
-ECHO;
-	YY_BREAK
-#line 882 "lex.gse_.cc"
-case YY_STATE_EOF(INITIAL):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = (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 gse_in at a new source and called
-			 * gse_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.
-			 */
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = gse_in;
-			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 ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state(  );
-
-			/* 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 );
-
-			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++(yy_c_buf_p);
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = (yy_c_buf_p);
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer(  ) )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				(yy_did_buffer_switch_on_eof) = 0;
-
-				if ( gse_wrap( ) )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * gse_text, 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.
-					 */
-					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! (yy_did_buffer_switch_on_eof) )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				(yy_c_buf_p) =
-					(yytext_ptr) + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state(  );
-
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				(yy_c_buf_p) =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
-
-				yy_current_state = yy_get_previous_state(  );
-
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (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 gse_lex */
-
-/* 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 (void)
-{
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = (yytext_ptr);
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(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 ( (yy_c_buf_p) - (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) ((yy_c_buf_p) - (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 = (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) ((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. */
-					gse_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
-				}
-			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" );
-
-			(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]),
-			(yy_n_chars), (size_t) num_to_read );
-
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	if ( (yy_n_chars) == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			gse_restart(gse_in  );
-			}
-
-		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) ((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 = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) gse_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
-		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-	}
-
-	(yy_n_chars) += number_to_move;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
-
-	(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 (void)
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-    
-	yy_current_state = (yy_start);
-
-	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (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] )
-			{
-			(yy_last_accepting_state) = yy_current_state;
-			(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 >= 32 )
-				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 )
-{
-	register int yy_is_jam;
-    	register char *yy_cp = (yy_c_buf_p);
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		(yy_last_accepting_state) = yy_current_state;
-		(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 >= 32 )
-			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 == 31);
-
-	return yy_is_jam ? 0 : yy_current_state;
-}
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-    static int yyinput (void)
-#else
-    static int input  (void)
-#endif
-
-{
-	int c;
-    
-	*(yy_c_buf_p) = (yy_hold_char);
-
-	if ( *(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 ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-			/* This was really a NUL. */
-			*(yy_c_buf_p) = '\0';
-
-		else
-			{ /* need more input */
-			int offset = (yy_c_buf_p) - (yytext_ptr);
-			++(yy_c_buf_p);
-
-			switch ( yy_get_next_buffer(  ) )
-				{
-				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. */
-					gse_restart(gse_in );
-
-					/*FALLTHROUGH*/
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( gse_wrap( ) )
-						return EOF;
-
-					if ( ! (yy_did_buffer_switch_on_eof) )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					(yy_c_buf_p) = (yytext_ptr) + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
-	*(yy_c_buf_p) = '\0';	/* preserve gse_text */
-	(yy_hold_char) = *++(yy_c_buf_p);
-
-	return c;
-}
-#endif	/* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * 
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void gse_restart  (FILE * input_file )
-{
-    
-	if ( ! YY_CURRENT_BUFFER ){
-        gse_ensure_buffer_stack ();
-		YY_CURRENT_BUFFER_LVALUE =
-            gse__create_buffer(gse_in,YY_BUF_SIZE );
-	}
-
-	gse__init_buffer(YY_CURRENT_BUFFER,input_file );
-	gse__load_buffer_state( );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * 
- */
-    void gse__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
-{
-    
-	/* TODO. We should be able to replace this entire function body
-	 * with
-	 *		gse_pop_buffer_state();
-	 *		gse_push_buffer_state(new_buffer);
-     */
-	gse_ensure_buffer_stack ();
-	if ( YY_CURRENT_BUFFER == new_buffer )
-		return;
-
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	gse__load_buffer_state( );
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (gse_wrap()) processing, but the only time this flag
-	 * is looked at is after gse_wrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-static void gse__load_buffer_state  (void)
-{
-    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	gse_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-	(yy_hold_char) = *(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.
- * 
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE gse__create_buffer  (FILE * file, int  size )
-{
-	YY_BUFFER_STATE b;
-    
-	b = (YY_BUFFER_STATE) gse_alloc(sizeof( struct yy_buffer_state )  );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in gse__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 *) gse_alloc(b->yy_buf_size + 2  );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in gse__create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	gse__init_buffer(b,file );
-
-	return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with gse__create_buffer()
- * 
- */
-    void gse__delete_buffer (YY_BUFFER_STATE  b )
-{
-    
-	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 )
-		gse_free((void *) b->yy_ch_buf  );
-
-	gse_free((void *) b  );
-}
-
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-    
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a gse_restart() or at EOF.
- */
-    static void gse__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
-
-{
-	int oerrno = errno;
-    
-	gse__flush_buffer(b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-    /* If b is the current buffer, then gse__init_buffer was _probably_
-     * called from gse_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;
-    }
-
-        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 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.
- * 
- */
-    void gse__flush_buffer (YY_BUFFER_STATE  b )
-{
-    	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 )
-		gse__load_buffer_state( );
-}
-
-/** 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.
- *  
- */
-void gse_push_buffer_state (YY_BUFFER_STATE new_buffer )
-{
-    	if (new_buffer == NULL)
-		return;
-
-	gse_ensure_buffer_stack();
-
-	/* This block is copied from gse__switch_to_buffer. */
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	/* Only push if top exists. Otherwise, replace top. */
-	if (YY_CURRENT_BUFFER)
-		(yy_buffer_stack_top)++;
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-	/* copied from gse__switch_to_buffer. */
-	gse__load_buffer_state( );
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  
- */
-void gse_pop_buffer_state (void)
-{
-    	if (!YY_CURRENT_BUFFER)
-		return;
-
-	gse__delete_buffer(YY_CURRENT_BUFFER );
-	YY_CURRENT_BUFFER_LVALUE = NULL;
-	if ((yy_buffer_stack_top) > 0)
-		--(yy_buffer_stack_top);
-
-	if (YY_CURRENT_BUFFER) {
-		gse__load_buffer_state( );
-		(yy_did_buffer_switch_on_eof) = 1;
-	}
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void gse_ensure_buffer_stack (void)
-{
-	int num_to_alloc;
-    
-	if (!(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;
-		(yy_buffer_stack) = (struct yy_buffer_state**)gse_alloc
-								(num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in gse_ensure_buffer_stack()" );
-								  
-		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-				
-		(yy_buffer_stack_max) = num_to_alloc;
-		(yy_buffer_stack_top) = 0;
-		return;
-	}
-
-	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
-		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
-
-		num_to_alloc = (yy_buffer_stack_max) + grow_size;
-		(yy_buffer_stack) = (struct yy_buffer_state**)gse_realloc
-								((yy_buffer_stack),
-								num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in gse_ensure_buffer_stack()" );
-
-		/* zero only the new slots.*/
-		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
-		(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
- * 
- * @return the newly allocated buffer state object. 
- */
-YY_BUFFER_STATE gse__scan_buffer  (char * base, yy_size_t  size )
-{
-	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) gse_alloc(sizeof( struct yy_buffer_state )  );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in gse__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;
-
-	gse__switch_to_buffer(b  );
-
-	return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to gse_lex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- * 
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       gse__scan_bytes() instead.
- */
-YY_BUFFER_STATE gse__scan_string (yyconst char * yystr )
-{
-    
-	return gse__scan_bytes(yystr,strlen(yystr) );
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to gse_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.
- * 
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE gse__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
-{
-	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 *) gse_alloc(n  );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in gse__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 = gse__scan_buffer(buf,n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in gse__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;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yy_fatal_error (yyconst char* msg )
-{
-    	(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 gse_text. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		gse_text[gse_leng] = (yy_hold_char); \
-		(yy_c_buf_p) = gse_text + yyless_macro_arg; \
-		(yy_hold_char) = *(yy_c_buf_p); \
-		*(yy_c_buf_p) = '\0'; \
-		gse_leng = yyless_macro_arg; \
-		} \
-	while ( 0 )
-
-/* Accessor  methods (get/set functions) to struct members. */
-
-/** Get the current line number.
- * 
- */
-int gse_get_lineno  (void)
-{
-        
-    return gse_lineno;
-}
-
-/** Get the input stream.
- * 
- */
-FILE *gse_get_in  (void)
-{
-        return gse_in;
-}
-
-/** Get the output stream.
- * 
- */
-FILE *gse_get_out  (void)
-{
-        return gse_out;
-}
-
-/** Get the length of the current token.
- * 
- */
-int gse_get_leng  (void)
-{
-        return gse_leng;
-}
-
-/** Get the current token.
- * 
- */
-
-char *gse_get_text  (void)
-{
-        return gse_text;
-}
-
-/** Set the current line number.
- * @param line_number
- * 
- */
-void gse_set_lineno (int  line_number )
-{
-    
-    gse_lineno = line_number;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * 
- * @see gse__switch_to_buffer
- */
-void gse_set_in (FILE *  in_str )
-{
-        gse_in = in_str ;
-}
-
-void gse_set_out (FILE *  out_str )
-{
-        gse_out = out_str ;
-}
-
-int gse_get_debug  (void)
-{
-        return gse__flex_debug;
-}
-
-void gse_set_debug (int  bdebug )
-{
-        gse__flex_debug = bdebug ;
-}
-
-static int yy_init_globals (void)
-{
-        /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from gse_lex_destroy(), so don't allocate here.
-     */
-
-    (yy_buffer_stack) = 0;
-    (yy_buffer_stack_top) = 0;
-    (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = (char *) 0;
-    (yy_init) = 0;
-    (yy_start) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    gse_in = stdin;
-    gse_out = stdout;
-#else
-    gse_in = (FILE *) 0;
-    gse_out = (FILE *) 0;
-#endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * gse_lex_init()
-     */
-    return 0;
-}
-
-/* gse_lex_destroy is for both reentrant and non-reentrant scanners. */
-int gse_lex_destroy  (void)
-{
-    
-    /* Pop the buffer stack, destroying each element. */
-	while(YY_CURRENT_BUFFER){
-		gse__delete_buffer(YY_CURRENT_BUFFER  );
-		YY_CURRENT_BUFFER_LVALUE = NULL;
-		gse_pop_buffer_state();
-	}
-
-	/* Destroy the stack itself. */
-	gse_free((yy_buffer_stack) );
-	(yy_buffer_stack) = NULL;
-
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * gse_lex() is called, initialization will occur. */
-    yy_init_globals( );
-
-    return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
-	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 )
-{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-}
-#endif
-
-void *gse_alloc (yy_size_t  size )
-{
-	return (void *) malloc( size );
-}
-
-void *gse_realloc  (void * ptr, yy_size_t  size )
-{
-	/* 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 gse_free (void * ptr )
-{
-	free( (char *) ptr );	/* see gse_realloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#line 121 "gse.lex"
-
-
-
-// Three glue routines for string scanning. These are not declared in the
-// header gse.tab.h nor is YY_BUFFER_STATE. Including these here allows them
-// to see the type definitions in lex.gse.c (where YY_BUFFER_STATE is
-// defined) and allows callers to declare them (since callers outside of this
-// file cannot declare YY_BUFFER_STATE variable).
-
-void *
-gse_string(const char *str)
-{
-    return (void *)gse__scan_string(str);
-}
-
-void
-gse_switch_to_buffer(void *buf)
-{
-    gse__switch_to_buffer((YY_BUFFER_STATE)buf);
-}
-
-void
-gse_delete_buffer(void *buf)
-{
-    gse__delete_buffer((YY_BUFFER_STATE)buf);
-}
-
-// Note that the grid() CE function only deals with numeric maps (8/28/2001
-// jhrg) and that all comparisons are done using doubles. 
-
-static void
-store_int32()
-{
-    gse_lval.val = atof(gse_text);
-}
-
-static void
-store_float64()
-{
-    gse_lval.val = atof(gse_text);
-}
-
-static void
-store_id()
-{
-    strncpy(gse_lval.id, gse_text, ID_MAX-1);
-    gse_lval.id[ID_MAX-1] = '\0';
-}
-
-static void
-store_op(int op)
-{
-    gse_lval.op = op;
-}
-
-
diff --git a/libdap.spec b/libdap.spec
index e4cca8f..97b6d45 100644
--- a/libdap.spec
+++ b/libdap.spec
@@ -1,6 +1,6 @@
 Name: libdap
 Summary: The C++ DAP2 library from OPeNDAP
-Version: 3.11.7
+Version: 3.12.0
 Release: 1
 
 License: LGPLv2+
@@ -83,6 +83,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root,-)
 %{_bindir}/getdap
 %{_libdir}/libdap.so.*
+%{_libdir}/libtest-types.a
 %{_libdir}/libdapclient.so.*
 %{_libdir}/libdapserver.so.*
 %doc README NEWS COPYING COPYRIGHT_URI README.dodsrc
@@ -91,6 +92,7 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(-,root,root,-)
 %{_libdir}/libdap.so
+%{_libdir}/libtest-types.a
 %{_libdir}/libdapclient.so
 %{_libdir}/libdapserver.so
 %{_libdir}/pkgconfig/libdap*.pc
diff --git a/mime_util.cc b/mime_util.cc
index 82bdbe8..b8cd473 100644
--- a/mime_util.cc
+++ b/mime_util.cc
@@ -20,7 +20,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -36,11 +36,6 @@
 // ReZa 9/30/94
 
 #include "config.h"
-#undef FILE_METHODS
-
-static char rcsid[] not_used =
-    {"$Id: mime_util.cc 25921 2012-10-24 21:07:05Z jimg $"
-    };
 
 #include <cstring>
 #include <cstdio>
@@ -159,6 +154,9 @@ string
 rfc822_date(const time_t t)
 {
     struct tm *stm = gmtime(&t);
+    if (!stm)
+    	return "";
+
     char d[256];
 
     snprintf(d, 255, "%s, %02d %s %4d %02d:%02d:%02d GMT", days[stm->tm_wday],
@@ -170,7 +168,7 @@ rfc822_date(const time_t t)
 }
 
 static const int TimLen = 26; // length of string from asctime()
-static const int CLUMP_SIZE = 1024; // size of clumps to new in fmakeword()
+//static const int CLUMP_SIZE = 1024; // size of clumps to new in fmakeword()
 
 /** This sends a formatted block of text to the client, containing
     version information about various aspects of the server.  The
@@ -227,8 +225,17 @@ ErrMsgT(const string &Msgt)
     if (time(&TimBin) == (time_t) - 1)
         strncpy(TimStr, "time() error           ", TimLen-1);
     else {
-        strncpy(TimStr, ctime(&TimBin), TimLen-1);
-        TimStr[TimLen - 2] = '\0'; // overwrite the \n
+    	char *ctime_value = ctime(&TimBin);
+    	if (!ctime_value)
+    		strncpy(TimStr, "Unknown", TimLen-1);
+    	else {
+    		strncpy(TimStr, ctime_value, TimLen-1);
+    		TimStr[TimLen - 2] = '\0'; // overwrite the \n
+    	}
+#if 0
+    	strncpy(TimStr, ctime(&TimBin), TimLen-1);
+    	TimStr[TimLen - 2] = '\0'; // overwrite the \n
+#endif
     }
 
     cerr << "[" << TimStr << "] DAP server error: " << Msgt << endl;
@@ -358,7 +365,6 @@ get_description_type(const string &value)
         return unknown_type;
 }
 
-#if FILE_METHODS
 /** Generate an HTTP 1.0 response header for a text document. This is used
     when returning a serialized DAS or DDS object.
 
@@ -376,43 +382,10 @@ void
 set_mime_text(FILE *out, ObjectType type, const string &ver,
               EncodingType enc, const time_t last_modified)
 {
-    fprintf(out, "HTTP/1.0 200 OK%s", CRLF) ;
-    if (ver == "") {
-        fprintf(out, "XDODS-Server: %s%s", DVR, CRLF) ;
-        fprintf(out, "XOPeNDAP-Server: %s%s", DVR, CRLF) ;
-    }
-    else {
-        fprintf(out, "XDODS-Server: %s%s", ver.c_str(), CRLF) ;
-        fprintf(out, "XOPeNDAP-Server: %s%s", ver.c_str(), CRLF) ;
-    }
-    fprintf(out, "XDAP: %s%s", DAP_PROTOCOL_VERSION, CRLF) ;
-
-    const time_t t = time(0);
-    fprintf(out, "Date: %s%s", rfc822_date(t).c_str(), CRLF) ;
-
-    fprintf(out, "Last-Modified: ") ;
-    if (last_modified > 0)
-        fprintf(out, "%s%s", rfc822_date(last_modified).c_str(), CRLF) ;
-    else
-        fprintf(out, "%s%s", rfc822_date(t).c_str(), CRLF) ;
-
-    if (type == dap4_ddx)
-        fprintf(out, "Content-Type: text/xml%s", CRLF) ;
-    else
-        fprintf(out, "Content-Type: text/plain%s", CRLF) ;
-
-    // Note that Content-Description is from RFC 2045 (MIME, pt 1), not 2616.
-    // jhrg 12/23/05
-    fprintf(out, "Content-Description: %s%s", descrip[type], CRLF) ;
-    if (type == dods_error) // don't cache our error responses.
-        fprintf(out, "Cache-Control: no-cache%s", CRLF) ;
-    // Don't write a Content-Encoding header for x-plain since that breaks
-    // Netscape on NT. jhrg 3/23/97
-    if (enc != x_plain)
-        fprintf(out, "Content-Encoding: %s%s", encoding[enc], CRLF) ;
-    fprintf(out, CRLF) ;
+    ostringstream oss;
+    set_mime_text(oss, type, ver, enc, last_modified);
+    fwrite(oss.str().data(), 1, oss.str().length(), out);
 }
-#endif
 
 /** Generate an HTTP 1.0 response header for a text document. This is used
     when returning a serialized DAS or DDS object.
@@ -468,7 +441,60 @@ set_mime_text(ostream &strm, ObjectType type, const string &ver,
     strm << CRLF ;
 }
 
-#if FILE_METHODS
+/** Generate an HTTP 1.0 response header for a text document. This is used
+ when returning a serialized DAS or DDS object.
+
+ @note In Hyrax these headers are not used. Instead the front end of the
+ server will build the response headers
+
+ @param strm Write the MIME header to this stream.
+ @param type The type of this this response. Defaults to
+ application/octet-stream.
+ @param ver The version string; denotes the libdap implementation
+ version.
+ @param enc How is this response encoded? Can be plain or deflate or the
+ x_... versions of those. Default is x_plain.
+ @param last_modified The time to use for the Last-Modified header value.
+ Default is zero which means use the current time. */
+void set_mime_text(ostream &strm, ObjectType type, EncodingType enc, const time_t last_modified,
+        const string &protocol)
+{
+    strm << "HTTP/1.0 200 OK" << CRLF;
+
+    strm << "XDODS-Server: " << DVR<< CRLF;
+    strm << "XOPeNDAP-Server: " << DVR<< CRLF;
+
+    if (protocol == "")
+        strm << "XDAP: " << DAP_PROTOCOL_VERSION << CRLF;
+    else
+        strm << "XDAP: " << protocol << CRLF;
+
+    const time_t t = time(0);
+    strm << "Date: " << rfc822_date(t).c_str() << CRLF;
+
+    strm << "Last-Modified: ";
+    if (last_modified > 0)
+        strm << rfc822_date(last_modified).c_str() << CRLF;
+    else
+        strm << rfc822_date(t).c_str() << CRLF;
+
+    if (type == dap4_ddx)
+        strm << "Content-Type: text/xml" << CRLF;
+    else
+        strm << "Content-Type: text/plain" << CRLF;
+
+    // Note that Content-Description is from RFC 2045 (MIME, pt 1), not 2616.
+    // jhrg 12/23/05
+    strm << "Content-Description: " << descrip[type] << CRLF;
+    if (type == dods_error) // don't cache our error responses.
+        strm << "Cache-Control: no-cache" << CRLF;
+    // Don't write a Content-Encoding header for x-plain since that breaks
+    // Netscape on NT. jhrg 3/23/97
+    if (enc != x_plain)
+        strm << "Content-Encoding: " << encoding[enc] << CRLF;
+    strm << CRLF;
+}
+
 /** Generate an HTTP 1.0 response header for a html document.
 
     @deprecated
@@ -484,38 +510,10 @@ void
 set_mime_html(FILE *out, ObjectType type, const string &ver,
               EncodingType enc, const time_t last_modified)
 {
-    fprintf(out, "HTTP/1.0 200 OK%s", CRLF) ;
-    if (ver == "") {
-        fprintf(out, "XDODS-Server: %s%s", DVR, CRLF) ;
-        fprintf(out, "XOPeNDAP-Server: %s%s", DVR, CRLF) ;
-    }
-    else {
-        fprintf(out, "XDODS-Server: %s%s", ver.c_str(), CRLF) ;
-        fprintf(out, "XOPeNDAP-Server: %s%s", ver.c_str(), CRLF) ;
-    }
-    fprintf(out, "XDAP: %s%s", DAP_PROTOCOL_VERSION, CRLF) ;
-
-    const time_t t = time(0);
-    fprintf(out, "Date: %s%s", rfc822_date(t).c_str(), CRLF) ;
-
-    fprintf(out, "Last-Modified: ") ;
-    if (last_modified > 0)
-        fprintf(out, "%s%s", rfc822_date(last_modified).c_str(), CRLF) ;
-    else
-        fprintf(out, "%s%s", rfc822_date(t).c_str(), CRLF) ;
-
-    fprintf(out, "Content-type: text/html%s", CRLF) ;
-    // See note above about Content-Description header. jhrg 12/23/05
-    fprintf(out, "Content-Description: %s%s", descrip[type], CRLF) ;
-    if (type == dods_error) // don't cache our error responses.
-        fprintf(out, "Cache-Control: no-cache%s", CRLF) ;
-    // Don't write a Content-Encoding header for x-plain since that breaks
-    // Netscape on NT. jhrg 3/23/97
-    if (enc != x_plain)
-        fprintf(out, "Content-Encoding: %s%s", encoding[enc], CRLF) ;
-    fprintf(out, CRLF) ;
+    ostringstream oss;
+    set_mime_html(oss, type, ver, enc, last_modified);
+    fwrite(oss.str().data(), 1, oss.str().length(), out);
 }
-#endif
 
 /** Generate an HTTP 1.0 response header for a html document.
 
@@ -564,7 +562,50 @@ set_mime_html(ostream &strm, ObjectType type, const string &ver,
     strm << CRLF ;
 }
 
-#if FILE_METHODS
+/** Generate an HTTP 1.0 response header for a html document.
+
+ @param strm Write the MIME header to this stream.
+ @param type The type of this this response.
+ @param ver The version string; denotes the libdap implementation
+ version.
+ @param enc How is this response encoded? Can be plain or deflate or the
+ x_... versions of those. Default is x_plain.
+ @param last_modified The time to use for the Last-Modified header value.
+ Default is zero which means use the current time. */
+void set_mime_html(ostream &strm, ObjectType type, EncodingType enc, const time_t last_modified,
+        const string &protocol)
+{
+    strm << "HTTP/1.0 200 OK" << CRLF;
+
+    strm << "XDODS-Server: " << DVR<< CRLF;
+    strm << "XOPeNDAP-Server: " << DVR<< CRLF;
+
+    if (protocol == "")
+        strm << "XDAP: " << DAP_PROTOCOL_VERSION << CRLF;
+    else
+        strm << "XDAP: " << protocol << CRLF;
+
+    const time_t t = time(0);
+    strm << "Date: " << rfc822_date(t).c_str() << CRLF;
+
+    strm << "Last-Modified: ";
+    if (last_modified > 0)
+        strm << rfc822_date(last_modified).c_str() << CRLF;
+    else
+        strm << rfc822_date(t).c_str() << CRLF;
+
+    strm << "Content-type: text/html" << CRLF;
+    // See note above about Content-Description header. jhrg 12/23/05
+    strm << "Content-Description: " << descrip[type] << CRLF;
+    if (type == dods_error) // don't cache our error responses.
+        strm << "Cache-Control: no-cache" << CRLF;
+    // Don't write a Content-Encoding header for x-plain since that breaks
+    // Netscape on NT. jhrg 3/23/97
+    if (enc != x_plain)
+        strm << "Content-Encoding: " << encoding[enc] << CRLF;
+    strm << CRLF;
+}
+
 /** Write an HTTP 1.0 response header for our binary response document (i.e.,
     the DataDDS object).
 
@@ -583,34 +624,10 @@ void
 set_mime_binary(FILE *out, ObjectType type, const string &ver,
                 EncodingType enc, const time_t last_modified)
 {
-    fprintf(out, "HTTP/1.0 200 OK%s", CRLF) ;
-    if (ver == "") {
-        fprintf(out, "XDODS-Server: %s%s", DVR, CRLF) ;
-        fprintf(out, "XOPeNDAP-Server: %s%s", DVR, CRLF) ;
-    }
-    else {
-        fprintf(out, "XDODS-Server: %s%s", ver.c_str(), CRLF) ;
-        fprintf(out, "XOPeNDAP-Server: %s%s", ver.c_str(), CRLF) ;
-    }
-    fprintf(out, "XDAP: %s%s", DAP_PROTOCOL_VERSION, CRLF) ;
-
-    const time_t t = time(0);
-    fprintf(out, "Date: %s%s", rfc822_date(t).c_str(), CRLF) ;
-
-    fprintf(out, "Last-Modified: ") ;
-    if (last_modified > 0)
-        fprintf(out, "%s%s", rfc822_date(last_modified).c_str(), CRLF) ;
-    else
-        fprintf(out, "%s%s", rfc822_date(t).c_str(), CRLF) ;
-
-    fprintf(out, "Content-Type: application/octet-stream%s", CRLF) ;
-    fprintf(out, "Content-Description: %s%s", descrip[type], CRLF) ;
-    if (enc != x_plain)
-        fprintf(out, "Content-Encoding: %s%s", encoding[enc], CRLF) ;
-
-    fprintf(out, CRLF) ;
+    ostringstream oss;
+    set_mime_binary(oss, type, ver, enc, last_modified);
+    fwrite(oss.str().data(), 1, oss.str().length(), out);
 }
-#endif
 
 /** Write an HTTP 1.0 response header for our binary response document (i.e.,
     the DataDDS object).
@@ -658,6 +675,49 @@ set_mime_binary(ostream &strm, ObjectType type, const string &ver,
     strm << CRLF ;
 }
 
+/** Write an HTTP 1.0 response header for our binary response document (i.e.,
+ the DataDDS object).
+
+ @param strm Write the MIME header to this stream.
+ @param type The type of this this response. Defaults to
+ application/octet-stream.
+ @param ver The version string; denotes the libdap implementation
+ version.
+ @param enc How is this response encoded? Can be plain or deflate or the
+ x_... versions of those. Default is x_plain.
+ @param last_modified The time to use for the Last-Modified header value.
+ Default is zero which means use the current time.
+ */
+void set_mime_binary(ostream &strm, ObjectType type, EncodingType enc, const time_t last_modified,
+        const string &protocol)
+{
+    strm << "HTTP/1.0 200 OK" << CRLF;
+
+    strm << "XDODS-Server: " << DVR << CRLF;
+    strm << "XOPeNDAP-Server: " << DVR << CRLF;
+
+    if (protocol == "")
+        strm << "XDAP: " << DAP_PROTOCOL_VERSION << CRLF;
+    else
+        strm << "XDAP: " << protocol << CRLF;
+
+    const time_t t = time(0);
+    strm << "Date: " << rfc822_date(t).c_str() << CRLF;
+
+    strm << "Last-Modified: ";
+    if (last_modified > 0)
+        strm << rfc822_date(last_modified).c_str() << CRLF;
+    else
+        strm << rfc822_date(t).c_str() << CRLF;
+
+    strm << "Content-Type: application/octet-stream" << CRLF;
+    strm << "Content-Description: " << descrip[type] << CRLF;
+    if (enc != x_plain)
+        strm << "Content-Encoding: " << encoding[enc] << CRLF;
+
+    strm << CRLF;
+}
+
 void set_mime_multipart(ostream &strm, const string &boundary,
 	const string &start, ObjectType type,
         const string &version, EncodingType enc,
@@ -692,6 +752,46 @@ void set_mime_multipart(ostream &strm, const string &boundary,
     strm << CRLF ;
 }
 
+/** Build the initial headers for the DAP4 data response */
+
+void set_mime_multipart(ostream &strm, const string &boundary, const string &start, ObjectType type, EncodingType enc,
+        const time_t last_modified, const string &protocol, const string &url)
+{
+    strm << "HTTP/1.1 200 OK" << CRLF;
+
+    const time_t t = time(0);
+    strm << "Date: " << rfc822_date(t).c_str() << CRLF;
+
+    strm << "Last-Modified: ";
+    if (last_modified > 0)
+        strm << rfc822_date(last_modified).c_str() << CRLF;
+    else
+        strm << rfc822_date(t).c_str() << CRLF;
+
+    strm << "Content-Type: multipart/related; boundary=" << boundary << "; start=\"<" << start
+            << ">\"; type=\"text/xml\"" << CRLF;
+
+    // data-ddx;"; removed as a result of the merge of the hyrax 1.8 release
+    // branch.
+    strm << "Content-Description: " << descrip[type] << ";";
+    if (!url.empty())
+        strm << " url=\"" << url << "\"" << CRLF;
+    else
+        strm << CRLF;
+
+    if (enc != x_plain)
+        strm << "Content-Encoding: " << encoding[enc] << CRLF;
+
+    if (protocol == "")
+        strm << "X-DAP: " << DAP_PROTOCOL_VERSION << CRLF;
+    else
+        strm << "X-DAP: " << protocol << CRLF;
+
+    strm << "X-OPeNDAP-Server: " << DVR<< CRLF;
+
+    strm << CRLF;
+}
+
 void set_mime_ddx_boundary(ostream &strm, const string &boundary,
 	const string &cid, ObjectType type, EncodingType enc)
 {
@@ -723,7 +823,7 @@ const size_t line_length = 1024;
 /** Read the next MIME header from the input stream and return it in a string
     object. This function consumes any leading whitespace before the next
     header. It returns an empty string when the blank line that separates
-    the headers from the body is found. this function works for header and
+    the headers from the body is found. This function works for header and
     separator lines that use either a CRLF pair (the correct line ending) or
     just a newline (a common error).
 
@@ -755,6 +855,40 @@ string get_next_mime_header(FILE *in)
     throw Error("I expected to find a MIME header, but got EOF instead.");
 }
 
+string get_next_mime_header(istream &in)
+{
+#if 0
+    // Get the header line and strip \r\n. Some headers end with just \n.
+    // If a blank line is found, return an empty string.
+	char line[line_length];
+	while (!in.eof()) {
+		in.getline(line, line_length);
+		if (strncmp(line, CRLF, 2) == 0 || line[0] == '\n') {
+			return "";
+		}
+		else {
+			size_t slen = min(strlen(line), line_length); // Never > line_length
+			line[slen - 1] = '\0'; // remove the newline
+			if (line[slen - 2] == '\r') // ...and the preceding carriage return
+				line[slen - 2] = '\0';
+			return string(line);
+		}
+	}
+#endif
+    // Get the header line and strip \r\n. Some headers end with just \n.
+    // If a blank line is found, return an empty string.
+	char raw_line[line_length];
+	while (!in.eof()) {
+		in.getline(raw_line, line_length); // strips the trailing newline; terminates with null
+		string line = raw_line;
+		if (line.find('\r') != string::npos)
+			line = line.substr(0, line.size()-1);
+		return line;
+	}
+
+	throw Error("I expected to find a MIME header, but got EOF instead.");
+}
+
 /** Given a string that contains a MIME header line, parse it into the
     the header (name) and its value. Both are downcased.
 
@@ -821,6 +955,20 @@ string read_multipart_boundary(FILE *in, const string &boundary)
     return boundary_line;
 }
 
+string read_multipart_boundary(istream &in, const string &boundary)
+{
+    string boundary_line = get_next_mime_header(in);
+    // If the caller passed in a value for the boundary, test for that value,
+    // else just see that this line starts with '--'.
+    // The value of 'boundary_line' is returned by this function.
+    if ((!boundary.empty() && is_boundary(boundary_line.c_str(), boundary))
+	    || boundary_line.find("--") != 0)
+	throw Error(
+		"The DAP4 data response document is broken - missing or malformed boundary.");
+
+    return boundary_line;
+}
+
 /** Consume the Multipart MIME headers that prefix the DDX in a DataDDX
     response. The stream pointer is advanced to the start of the DDX. It might
     seem odd that this function both takes the value of the MPM boundary as
@@ -841,39 +989,70 @@ string read_multipart_boundary(FILE *in, const string &boundary)
     header values don't match. The optional values are tested only if they
     are given (the default values are not tested).
  */
-void read_multipart_headers(FILE *in, const string &content_type,
-	const ObjectType object_type, const string &cid)
+void read_multipart_headers(FILE *in, const string &content_type, const ObjectType object_type, const string &cid)
 {
-    bool ct = false, cd = false, ci = false;
+	bool ct = false, cd = false, ci = false;
+
+	string header = get_next_mime_header(in);
+	while (!header.empty()) {
+		string name, value;
+		parse_mime_header(header, name, value);
+
+		if (name == "content-type") {
+			ct = true;
+			if (value.find(content_type) == string::npos)
+				throw Error("Content-Type for this part of a DAP4 data response must be " + content_type + ".");
+		}
+		else if (name == "content-description") {
+			cd = true;
+			if (get_description_type(value) != object_type)
+				throw Error(
+						"Content-Description for this part of a DAP4 data response must be dap4-ddx or dap4-data-ddx");
+		}
+		else if (name == "content-id") {
+			ci = true;
+			if (!cid.empty() && value != cid)
+				throw Error("Content-Id mismatch. Expected: " + cid + ", but got: " + value);
+		}
+
+		header = get_next_mime_header(in);
+	}
 
-    string header = get_next_mime_header(in);
-    while (!header.empty()) {
-	string name, value;
-	parse_mime_header(header, name, value);
+	if (!(ct && cd && ci)) throw Error("The DAP4 data response document is broken - missing header.");
+}
 
-	if (name =="content-type") {
-	    ct = true;
-	    if (value.find(content_type) == string::npos)
-		throw Error("Content-Type for this part of a DAP4 data response must be " + content_type + ".");
-	}
-	else if (name == "content-description") {
-	    cd = true;
-	    if (get_description_type(value) != object_type)
-		throw Error("Content-Description for this part of a DAP4 data response must be dap4-ddx or dap4-data-ddx");
-	}
-	else if (name == "content-id") {
-	    ci = true;
-	    if (!cid.empty() && value != cid)
-		throw Error("Content-Id mismatch. Expected: " + cid
-			+ ", but got: " + value);
+void read_multipart_headers(istream &in, const string &content_type, const ObjectType object_type, const string &cid)
+{
+	bool ct = false, cd = false, ci = false;
+
+	string header = get_next_mime_header(in);
+	while (!header.empty()) {
+		string name, value;
+		parse_mime_header(header, name, value);
+
+		if (name == "content-type") {
+			ct = true;
+			if (value.find(content_type) == string::npos)
+				throw Error("Content-Type for this part of a DAP4 data response must be " + content_type + ".");
+		}
+		else if (name == "content-description") {
+			cd = true;
+			if (get_description_type(value) != object_type)
+				throw Error(
+						"Content-Description for this part of a DAP4 data response must be dap4-ddx or dap4-data-ddx");
+		}
+		else if (name == "content-id") {
+			ci = true;
+			if (!cid.empty() && value != cid)
+				throw Error("Content-Id mismatch. Expected: " + cid + ", but got: " + value);
+		}
+
+		header = get_next_mime_header(in);
 	}
 
-	header = get_next_mime_header(in);
-    }
-
-    if (!(ct && cd && ci))
-	throw Error("The DAP4 data response document is broken - missing header.");
+	if (!(ct && cd && ci)) throw Error("The DAP4 data response document is broken - missing header.");
 }
+
 /** Given a Content-Id read from the DDX, return the value to look for in a
     MPM Content-Id header. This function downcases the CID to match the value
     returned by parse_mime_header.
@@ -896,7 +1075,6 @@ string cid_to_header_value(const string &cid)
     return value;
 }
 
-#if FILE_METHODS
 /** Generate an HTTP 1.0 response header for an Error object.
 
     @deprecated
@@ -909,23 +1087,10 @@ void
 set_mime_error(FILE *out, int code, const string &reason,
                const string &version)
 {
-    fprintf(out, "HTTP/1.0 %d %s%s", code, reason.c_str(), CRLF) ;
-    if (version == "") {
-        fprintf(out, "XDODS-Server: %s%s", DVR, CRLF) ;
-        fprintf(out, "XOPeNDAP-Server: %s%s", DVR, CRLF) ;
-    }
-    else {
-        fprintf(out, "XDODS-Server: %s%s", version.c_str(), CRLF) ;
-        fprintf(out, "XOPeNDAP-Server: %s%s", version.c_str(), CRLF) ;
-    }
-    fprintf(out, "XDAP: %s%s", DAP_PROTOCOL_VERSION, CRLF) ;
-
-    const time_t t = time(0);
-    fprintf(out, "Date: %s%s", rfc822_date(t).c_str(), CRLF) ;
-    fprintf(out, "Cache-Control: no-cache%s", CRLF) ;
-    fprintf(out, CRLF) ;
+    ostringstream oss;
+    set_mime_error(oss, code, reason, version);
+    fwrite(oss.str().data(), 1, oss.str().length(), out);
 }
-#endif
 
 /** Generate an HTTP 1.0 response header for an Error object.
 
@@ -956,7 +1121,6 @@ set_mime_error(ostream &strm, int code, const string &reason,
     strm << CRLF ;
 }
 
-#if FILE_METHODS
 /** Use this function to create a response signaling that the target of a
     conditional get has not been modified relative to the condition given in
     the request. This will have to be a date until the servers support ETags.
@@ -967,12 +1131,10 @@ set_mime_error(ostream &strm, int code, const string &reason,
 void
 set_mime_not_modified(FILE *out)
 {
-    fprintf(out, "HTTP/1.0 304 NOT MODIFIED%s", CRLF) ;
-    const time_t t = time(0);
-    fprintf(out, "Date: %s%s", rfc822_date(t).c_str(), CRLF) ;
-    fprintf(out, CRLF) ;
+    ostringstream oss;
+    set_mime_not_modified(oss);
+    fwrite(oss.str().data(), 1, oss.str().length(), out);
 }
-#endif
 
 /** Use this function to create a response signaling that the target of a
     conditional get has not been modified relative to the condition given in
@@ -991,6 +1153,9 @@ set_mime_not_modified(ostream &strm)
 }
 
 #if 0
+
+// This was removed because it's not being used by our server.
+
 /** Look for the override file by taking the dataset name and
     appending `.ovr' to it. If such a file exists, then read it in and
     store the contents in <tt>doc</tt>. Note that the file contents
diff --git a/mime_util.h b/mime_util.h
index b7298d7..4111660 100644
--- a/mime_util.h
+++ b/mime_util.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -73,16 +73,26 @@ time_t last_modified_time(const string &name);
 ObjectType get_description_type(const string &value);
 bool is_boundary(const char *line, const string &boundary);
 string cid_to_header_value(const string &cid);
-string read_multipart_boundary(FILE *in, const string &boundary = "");
+
+string read_multipart_boundary(istream &in, const string &boundary = "");
+
 void parse_mime_header(const string &header, string &name, string &value);
 string name_path(const string &path);
+string get_next_mime_header(istream &in);
+
+void read_multipart_headers(istream &in, const string &content_type,
+	const ObjectType object_type, const string &cid = "");
 
 // All of these are deprecated
+string read_multipart_boundary(FILE *in, const string &boundary = "");
+void read_multipart_headers(FILE *in, const string &content_type,
+	const ObjectType object_type, const string &cid = "");
 bool do_version(const string &script_ver, const string &dataset_ver);
 void ErrMsgT(const string &Msgt);
-ObjectType get_type(const string &value); // deprecated
+ObjectType get_type(const string &value);
 bool remove_mime_header(FILE *in);
 string get_next_mime_header(FILE *in);
+
 #if 0
 bool found_override(string name, string &doc);
 #endif
@@ -106,6 +116,10 @@ void set_mime_text(FILE *out, ObjectType type = unknown_type,
 void set_mime_text(ostream &out, ObjectType type = unknown_type,
                    const string &version = "", EncodingType enc = x_plain,
                    const time_t last_modified = 0);
+void set_mime_text(std::ostream &out, ObjectType type = unknown_type,
+                   EncodingType enc = x_plain,
+                   const time_t last_modified = 0,
+                   const std::string &protocol = "");
 
 void set_mime_html(FILE *out, ObjectType type = unknown_type,
                    const string &version = "", EncodingType enc = x_plain,
@@ -113,6 +127,10 @@ void set_mime_html(FILE *out, ObjectType type = unknown_type,
 void set_mime_html(ostream &out, ObjectType type = unknown_type,
                    const string &version = "", EncodingType enc = x_plain,
                    const time_t last_modified = 0);
+void set_mime_html(std::ostream &out, ObjectType type = unknown_type,
+                   EncodingType enc = x_plain,
+                   const time_t last_modified = 0,
+                   const std::string &protocol = "");
 
 void set_mime_binary(FILE *out, ObjectType type = unknown_type,
                      const string &version = "", EncodingType enc = x_plain,
@@ -120,12 +138,21 @@ void set_mime_binary(FILE *out, ObjectType type = unknown_type,
 void set_mime_binary(ostream &out, ObjectType type = unknown_type,
                      const string &version = "", EncodingType enc = x_plain,
                      const time_t last_modified = 0);
+void set_mime_binary(std::ostream &out, ObjectType type = unknown_type,
+                     EncodingType enc = x_plain,
+                     const time_t last_modified = 0,
+                     const std::string &protocol = "");
 
 void set_mime_multipart(ostream &out, const string &boundary,
 	const string &start, ObjectType type = unknown_type,
         const string &version = "", EncodingType enc = x_plain,
         const time_t last_modified = 0);
 
+void set_mime_multipart(std::ostream &out, const std::string &boundary,
+	const std::string &start, ObjectType type = unknown_type, EncodingType enc = x_plain,
+	const time_t last_modified = 0, const std::string &protocol = "",
+	const std::string &url = "");
+
 void set_mime_ddx_boundary(ostream &out, const string &boundary,
 	const string &start, ObjectType type = unknown_type,
         EncodingType enc = x_plain);
@@ -134,9 +161,6 @@ void set_mime_data_boundary(ostream &out, const string &boundary,
 	const string &cid, ObjectType type = unknown_type,
         EncodingType enc = x_plain);
 
-void read_multipart_headers(FILE *in, const string &content_type,
-	const ObjectType object_type, const string &cid = "");
-
 void set_mime_error(FILE *out, int code = 404,
                     const string &reason = "Dataset not found",
                     const string &version = "");
diff --git a/parser-util.cc b/parser-util.cc
index c83fc08..dba8a00 100644
--- a/parser-util.cc
+++ b/parser-util.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -35,10 +35,6 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    { "$Id: parser-util.cc 22703 2010-05-11 18:10:01Z jimg $"
-    };
-
 #include <cerrno>
 #include <cassert>
 #include <cstring>
diff --git a/parser.h b/parser.h
index 6658c09..5d1caea 100644
--- a/parser.h
+++ b/parser.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/tests/DASTest b/tests/DASTest
index 726084d..2da5e9e 100755
--- a/tests/DASTest
+++ b/tests/DASTest
@@ -1,58 +1,78 @@
 #! /bin/sh
+# Generated from DASTest.at by GNU Autoconf 2.69.
+#
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
 # This test suite is free software; the Free Software Foundation gives
 # unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
   else
-    PATH_SEPARATOR=:
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
   fi
-  rm -f conf$$.sh
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
 
 
@@ -61,20 +81,19 @@ fi
 # there to prevent editors from complaining about space-tab.
 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
 # splitting by setting IFS to empty value.)
-as_nl='
-'
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -85,354 +104,341 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
 
 # CDPATH.
-$as_unset CDPATH
-
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
 else
-  as_have_required=no
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
 fi
-
-  if test $as_have_required = yes && 	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
 
 exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_have_required=no
 fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
 else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  case $as_dir in
+  as_found=:
+  case $as_dir in #(
 	 /*)
 	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
 	   done;;
        esac
+  as_found=false
 done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
 IFS=$as_save_IFS
 
 
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
 fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
 fi
-
 fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
 
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-        done
-        export CONFIG_SHELL
-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
 
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
 
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
 
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
-fi
 
-fi
+} # as_fn_mkdir_p
 
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
 
 
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
 
-exitcode=0
-if as_func_success; then
-  :
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
 else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
+  as_expr=false
 fi
 
-if as_func_ret_success; then
-  :
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
 else
-  exitcode=1
-  echo as_func_ret_success failed.
+  as_basename=false
 fi
 
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_dirname=false
 fi
 
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf at gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
-}
-
-
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
 
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
   sed -n '
     p
     /[$]LINENO/=
@@ -449,9 +455,12 @@ test \$exitcode = 0") || {
       s/-\n.*//
     ' >$as_me.lineno &&
   chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -460,84 +469,55 @@ test \$exitcode = 0") || {
   exit
 }
 
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
 -n*)
-  case `echo 'x\c'` in
+  case `echo 'xy\c'` in
   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
 else
   rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -547,32 +527,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 
+
+
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # How were we run?
 at_cli_args="$@"
 
-# Load the config file.
-for at_file in atconfig atlocal
-do
-  test -r $at_file || continue
-  . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
-   { (exit 1); exit 1; }; }
-done
-
-# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
-: ${at_top_build_prefix=$at_top_builddir}
-
-# atconfig delivers names relative to the directory the test suite is
-# in, but the groups themselves are run in testsuite-dir/group-dir.
-if test -n "$at_top_srcdir"; then
-  builddir=../..
-  for at_dir in srcdir top_srcdir top_build_prefix
-  do
-    at_val=`eval echo '${'at_$at_dir'}'`
-    eval "$at_dir=\$at_val/../.."
-  done
-fi
 
 # Not all shells have the 'times' builtin; the subshell is needed to make
 # sure we discard the 'times: not found' message from the shell.
@@ -583,9 +544,14 @@ at_times_p=false
 at_debug_args=
 # -e sets to true
 at_errexit_p=false
-# Shall we be verbose?
+# Shall we be verbose?  ':' means no, empty means yes.
 at_verbose=:
-at_quiet=echo
+at_quiet=
+# Running several jobs in parallel, 0 means as many as test groups.
+at_jobs=1
+at_traceon=:
+at_trace_echo=:
+at_check_filter_trace=:
 
 # Shall we keep the debug scripts?  Must be `:' when the suite is
 # run by a debug script, so that the script doesn't remove itself.
@@ -596,31 +562,29 @@ at_help_p=false
 at_version_p=false
 # List test groups?
 at_list_p=false
+# --clean
+at_clean=false
 # Test groups to run
 at_groups=
+# Whether to rerun failed tests.
+at_recheck=
+# Whether a write failure occurred
+at_write_fail=0
 
-# The directory we are in.
+# The directory we run the suite in.  Default to . if no -C option.
 at_dir=`pwd`
-# The directory the whole suite works in.
-# Should be absolutely to let the user `cd' at will.
-at_suite_dir=$at_dir/$as_me.dir
-# The file containing the suite.
-at_suite_log=$at_dir/$as_me.log
-# The file containing the location of the last AT_CHECK.
-at_check_line_file=$at_suite_dir/at-check-line
-# The file containing the exit status of the last command.
-at_status_file=$at_suite_dir/at-status
-# The files containing the output of the tested commands.
-at_stdout=$at_suite_dir/at-stdout
-at_stder1=$at_suite_dir/at-stder1
-at_stderr=$at_suite_dir/at-stderr
-# The file containing dates.
-at_times_file=$at_suite_dir/at-times
+# An absolute reference to this testsuite script.
+case $as_myself in
+  [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
+  * ) at_myself=$at_dir/$as_myself ;;
+esac
+# Whether -C is in effect.
+at_change_dir=false
 
+# Whether to enable colored test results.
+at_color=no
 # List of the tested programs.
 at_tested=''
-# List of the all the test groups.
-at_groups_all=' 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'
 # As many question marks as there are digits in the last test group number.
 # Used to normalize the test group numbers so that `ls' lists them in
 # numerical order.
@@ -667,6 +631,32 @@ at_help_all="1;DASTest.at:31;DAS \$abs_srcdir/das-testsuite/bad_value_test.1.das
 39;DASTest.at:69;DAS \$abs_srcdir/das-testsuite/test.8.das;das;
 40;DASTest.at:70;DAS \$abs_srcdir/das-testsuite/test.9.das;das;
 "
+# List of the all the test groups.
+at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
+
+# at_fn_validate_ranges NAME...
+# -----------------------------
+# Validate and normalize the test group number contained in each variable
+# NAME. Leading zeroes are treated as decimal.
+at_fn_validate_ranges ()
+{
+  for at_grp
+  do
+    eval at_value=\$$at_grp
+    if test $at_value -lt 1 || test $at_value -gt 40; then
+      $as_echo "invalid test group: $at_value" >&2
+      exit 1
+    fi
+    case $at_value in
+      0*) # We want to treat leading 0 as decimal, like expr and test, but
+	  # AS_VAR_ARITH treats it as octal if it uses $(( )).
+	  # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
+	  # expr fork, but it is not worth the effort to determine if the
+	  # shell supports XSI when the user can just avoid leading 0.
+	  eval $at_grp='`expr $at_value + 0`' ;;
+    esac
+  done
+}
 
 at_prev=
 for at_option
@@ -678,8 +668,8 @@ do
   fi
 
   case $at_option in
-  *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;;
-  *)   at_optarg= ;;
+  *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
+  *)    at_optarg= ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -698,10 +688,20 @@ do
 	;;
 
     --clean | -c )
-	test -d "$at_suite_dir" &&
-	  find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
-	rm -f -r "$at_suite_dir" "$at_suite_log"
-	exit 0
+	at_clean=:
+	;;
+
+    --color )
+	at_color=always
+	;;
+    --color=* )
+	case $at_optarg in
+	no | never | none) at_color=never ;;
+	auto | tty | if-tty) at_color=auto ;;
+	always | yes | force) at_color=always ;;
+	*) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
+	   as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
+	esac
 	;;
 
     --debug | -d )
@@ -714,30 +714,35 @@ do
 	;;
 
     --verbose | -v )
-	at_verbose=echo; at_quiet=:
+	at_verbose=; at_quiet=:
 	;;
 
     --trace | -x )
-	at_traceon='set -x'; at_traceoff='set +x'
+	at_traceon='set -x'
+	at_trace_echo=echo
+	at_check_filter_trace=at_fn_filter_trace
 	;;
 
     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
-	at_groups="$at_groups$at_option "
+	at_fn_validate_ranges at_option
+	as_fn_append at_groups "$at_option$as_nl"
 	;;
 
     # Ranges
     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
 	at_range_start=`echo $at_option |tr -d X-`
-	at_range=`echo " $at_groups_all " | \
-	  sed -e 's/^.* \('$at_range_start' \)/\1/'`
-	at_groups="$at_groups$at_range "
+	at_fn_validate_ranges at_range_start
+	at_range=`$as_echo "$at_groups_all" | \
+	  sed -ne '/^'$at_range_start'$/,$p'`
+	as_fn_append at_groups "$at_range$as_nl"
 	;;
 
     -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
 	at_range_end=`echo $at_option |tr -d X-`
-	at_range=`echo " $at_groups_all " | \
-	  sed -e 's/\( '$at_range_end'\) .*$/\1/'`
-	at_groups="$at_groups$at_range "
+	at_fn_validate_ranges at_range_end
+	at_range=`$as_echo "$at_groups_all" | \
+	  sed -ne '1,/^'$at_range_end'$/p'`
+	as_fn_append at_groups "$at_range$as_nl"
 	;;
 
     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
@@ -753,10 +758,38 @@ do
 	  at_range_end=$at_range_start
 	  at_range_start=$at_tmp
 	fi
-	at_range=`echo " $at_groups_all " | \
-	  sed -e 's/^.*\( '$at_range_start' \)/\1/' \
-	      -e 's/\( '$at_range_end'\) .*$/\1/'`
-	at_groups="$at_groups$at_range "
+	at_fn_validate_ranges at_range_start at_range_end
+	at_range=`$as_echo "$at_groups_all" | \
+	  sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
+	as_fn_append at_groups "$at_range$as_nl"
+	;;
+
+    # Directory selection.
+    --directory | -C )
+	at_prev=--directory
+	;;
+    --directory=* )
+	at_change_dir=:
+	at_dir=$at_optarg
+	if test x- = "x$at_dir" ; then
+	  at_dir=./-
+	fi
+	;;
+
+    # Parallel execution.
+    --jobs | -j )
+	at_jobs=0
+	;;
+    --jobs=* | -j[0-9]* )
+	if test -n "$at_optarg"; then
+	  at_jobs=$at_optarg
+	else
+	  at_jobs=`expr X$at_option : 'X-j\(.*\)'`
+	fi
+	case $at_jobs in *[!0-9]*)
+	  at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
+	  as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
+	esac
 	;;
 
     # Keywords.
@@ -780,85 +813,97 @@ do
 	    ;;
 	  esac
 	  # It is on purpose that we match the test group titles too.
-	  at_groups_selected=`echo "$at_groups_selected" |
+	  at_groups_selected=`$as_echo "$at_groups_selected" |
 	      grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
 	done
-	at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
-	# Smash the newlines.
-	at_groups="$at_groups`echo $at_groups_selected` "
+	# Smash the keywords.
+	at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
+	as_fn_append at_groups "$at_groups_selected$as_nl"
+	;;
+    --recheck)
+	at_recheck=:
 	;;
 
     *=*)
 	at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
 	# Reject names that are not valid shell variable names.
-	expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-	  { echo "$as_me: error: invalid variable name: $at_envvar" >&2
-   { (exit 1); exit 1; }; }
-	at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
-	eval "$at_envvar='$at_value'"
+	case $at_envvar in
+	  '' | [0-9]* | *[!_$as_cr_alnum]* )
+	    as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
+	esac
+	at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
+	# Export now, but save eval for later and for debug scripts.
 	export $at_envvar
-	# Propagate to debug scripts.
-	at_debug_args="$at_debug_args $at_envvar='$at_value'"
+	as_fn_append at_debug_args " $at_envvar='$at_value'"
 	;;
 
-     *) echo "$as_me: invalid option: $at_option" >&2
-	echo "Try \`$0 --help' for more information." >&2
+     *) $as_echo "$as_me: invalid option: $at_option" >&2
+	$as_echo "Try \`$0 --help' for more information." >&2
 	exit 1
 	;;
   esac
 done
 
+# Verify our last option didn't require an argument
+if test -n "$at_prev"; then :
+  as_fn_error $? "\`$at_prev' requires an argument"
+fi
+
+# The file containing the suite.
+at_suite_log=$at_dir/$as_me.log
+
 # Selected test groups.
-if test -z "$at_groups"; then
+if test -z "$at_groups$at_recheck"; then
   at_groups=$at_groups_all
 else
-  # Sort the tests, removing duplicates:
-  at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu`
-  # and add banners.  (Passing at_groups_all is tricky--see the comment
-  # starting with "Passing at_groups is tricky.")
-  at_groups=`echo "$at_groups$as_nl $at_groups_all" |
-    awk 'BEGIN { FS = "@" } # Effectively switch off field splitting.
-	/^$/ { next }  # Ignore the empty line.
-	!/ / { groups++; selected[$ 0] = 1; next }
-	# The last line, containing at_groups_all.
-	{
-		n = split($ 0, a, " ")
-		# If there are several tests, select their banners:
-		if (groups > 1) {
-			for (i = 1; i <= n; i++) {
-				if (a[i] ~ /^banner-/)
-					banner = a[i]
-				else if (banner != "" && selected[a[i]] == 1)
-					selected[banner] = 1
-			}
-		}
-		for (i = 1; i <= n; i++)
-			if (selected[a[i]] == 1)
-				list = list " " a[i]
-		print list
-	}'`
+  if test -n "$at_recheck" && test -r "$at_suite_log"; then
+    at_oldfails=`sed -n '
+      /^Failed tests:$/,/^Skipped tests:$/{
+	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
+      }
+      /^Unexpected passes:$/,/^## Detailed failed tests/{
+	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
+      }
+      /^## Detailed failed tests/q
+      ' "$at_suite_log"`
+    as_fn_append at_groups "$at_oldfails$as_nl"
+  fi
+  # Sort the tests, removing duplicates.
+  at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
+fi
+
+if test x"$at_color" = xalways \
+   || { test x"$at_color" = xauto && test -t 1; }; then
+  at_red=`printf '\033[0;31m'`
+  at_grn=`printf '\033[0;32m'`
+  at_lgn=`printf '\033[1;32m'`
+  at_blu=`printf '\033[1;34m'`
+  at_std=`printf '\033[m'`
+else
+  at_red= at_grn= at_lgn= at_blu= at_std=
 fi
 
 # Help message.
 if $at_help_p; then
-  cat <<_ATEOF
+  cat <<_ATEOF || at_write_fail=1
 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
 
 Run all the tests, or the selected TESTS, given by numeric ranges, and
 save a detailed log file.  Upon failure, create debugging scripts.
 
-You should not change environment variables unless explicitly passed
-as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
+Do not change environment variables directly.  Instead, set them via
+command line arguments.  Set \`AUTOTEST_PATH' to select the executables
 to exercise.  Each relative directory is expanded as build and source
-directories relatively to the top level of this distribution.  E.g.,
+directories relative to the top level of this distribution.
+E.g., from within the build directory /tmp/foo-1.0, invoking this:
 
   $ $0 AUTOTEST_PATH=bin
 
-possibly amounts into
+is equivalent to the following, assuming the source directory is /src/foo-1.0:
 
-  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
+  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
 _ATEOF
-cat <<_ATEOF
+cat <<_ATEOF || at_write_fail=1
 
 Operation modes:
   -h, --help     print the help message, then exit
@@ -866,95 +911,211 @@ Operation modes:
   -c, --clean    remove all the files this test suite might create and exit
   -l, --list     describes all the tests, or the selected TESTS
 _ATEOF
-cat <<_ATEOF
+cat <<_ATEOF || at_write_fail=1
 
 Execution tuning:
+  -C, --directory=DIR
+                 change to directory DIR before starting
+      --color[=never|auto|always]
+                 enable colored test results on terminal, or always
+  -j, --jobs[=N]
+                 Allow N jobs at once; infinite jobs with no arg (default 1)
   -k, --keywords=KEYWORDS
-	         select the tests matching all the comma-separated KEYWORDS
-	         multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
+                 select the tests matching all the comma-separated KEYWORDS
+                 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
+      --recheck  select all tests that failed or passed unexpectedly last time
   -e, --errexit  abort as soon as a test fails; implies --debug
   -v, --verbose  force more detailed output
-	         default for debugging scripts
+                 default for debugging scripts
   -d, --debug    inhibit clean up and top-level logging
-	         default for debugging scripts
+                 default for debugging scripts
   -x, --trace    enable tests shell tracing
 _ATEOF
-cat <<_ATEOF
+cat <<_ATEOF || at_write_fail=1
 
 Report bugs to <opendap-tech at opendap.org>.
 _ATEOF
-  exit 0
+  exit $at_write_fail
 fi
 
 # List of tests.
 if $at_list_p; then
-  cat <<_ATEOF
-libdap 3.11.6 test suite: das-test test groups:
+  cat <<_ATEOF || at_write_fail=1
+libdap 3.12.0 test suite: das-test test groups:
 
  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
       KEYWORDS
 
 _ATEOF
-  # Passing at_groups is tricky.  We cannot use it to form a literal string
-  # or regexp because of the limitation of AIX awk.  And Solaris' awk
-  # doesn't grok more than 99 fields in a record, so we have to use `split'.
-  echo "$at_groups$as_nl$at_help_all" |
-    awk 'BEGIN { FS = ";" }
-	 NR == 1 {
-	   for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1
+  # Pass an empty line as separator between selected groups and help.
+  $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
+    awk 'NF == 1 && FS != ";" {
+	   selected[$ 1] = 1
 	   next
 	 }
-	 {
+	 /^$/ { FS = ";" }
+	 NF > 0 {
 	   if (selected[$ 1]) {
 	     printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
-	     if ($ 4) printf "      %s\n", $ 4
+	     if ($ 4) {
+	       lmax = 79
+	       indent = "     "
+	       line = indent
+	       len = length (line)
+	       n = split ($ 4, a, " ")
+	       for (i = 1; i <= n; i++) {
+		 l = length (a[i]) + 1
+		 if (i > 1 && len + l > lmax) {
+		   print line
+		   line = indent " " a[i]
+		   len = length (line)
+		 } else {
+		   line = line " " a[i]
+		   len += l
+		 }
+	       }
+	       if (n)
+		 print line
+	     }
 	   }
-	 }'
-  exit 0
+	 }' || at_write_fail=1
+  exit $at_write_fail
 fi
 if $at_version_p; then
-  echo "$as_me (libdap 3.11.6)"
-  cat <<\_ACEOF
+  $as_echo "$as_me (libdap 3.12.0)" &&
+  cat <<\_ATEOF || at_write_fail=1
 
-Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
-Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This test suite is free software; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit 0
+_ATEOF
+  exit $at_write_fail
+fi
+
+# Should we print banners?  Yes if more than one test is run.
+case $at_groups in #(
+  *$as_nl* )
+      at_print_banners=: ;; #(
+  * ) at_print_banners=false ;;
+esac
+# Text for banner N, set to a single space once printed.
+
+# Take any -C into account.
+if $at_change_dir ; then
+  test x != "x$at_dir" && cd "$at_dir" \
+    || as_fn_error $? "unable to change directory"
+  at_dir=`pwd`
+fi
+
+# Load the config files for any default variable assignments.
+for at_file in atconfig atlocal
+do
+  test -r $at_file || continue
+  . ./$at_file || as_fn_error $? "invalid content: $at_file"
+done
+
+# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
+: "${at_top_build_prefix=$at_top_builddir}"
+
+# Perform any assignments requested during argument parsing.
+eval "$at_debug_args"
+
+# atconfig delivers names relative to the directory the test suite is
+# in, but the groups themselves are run in testsuite-dir/group-dir.
+if test -n "$at_top_srcdir"; then
+  builddir=../..
+  for at_dir_var in srcdir top_srcdir top_build_prefix
+  do
+    eval at_val=\$at_$at_dir_var
+    case $at_val in
+      [\\/$]* | ?:[\\/]* ) at_prefix= ;;
+      *) at_prefix=../../ ;;
+    esac
+    eval "$at_dir_var=\$at_prefix\$at_val"
+  done
+fi
+
+## -------------------- ##
+## Directory structure. ##
+## -------------------- ##
+
+# This is the set of directories and files used by this script
+# (non-literals are capitalized):
+#
+# TESTSUITE         - the testsuite
+# TESTSUITE.log     - summarizes the complete testsuite run
+# TESTSUITE.dir/    - created during a run, remains after -d or failed test
+# + at-groups/      - during a run: status of all groups in run
+# | + NNN/          - during a run: meta-data about test group NNN
+# | | + check-line  - location (source file and line) of current AT_CHECK
+# | | + status      - exit status of current AT_CHECK
+# | | + stdout      - stdout of current AT_CHECK
+# | | + stder1      - stderr, including trace
+# | | + stderr      - stderr, with trace filtered out
+# | | + test-source - portion of testsuite that defines group
+# | | + times       - timestamps for computing duration
+# | | + pass        - created if group passed
+# | | + xpass       - created if group xpassed
+# | | + fail        - created if group failed
+# | | + xfail       - created if group xfailed
+# | | + skip        - created if group skipped
+# + at-stop         - during a run: end the run if this file exists
+# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
+# + 0..NNN/         - created for each group NNN, remains after -d or failed test
+# | + TESTSUITE.log - summarizes the group results
+# | + ...           - files created during the group
+
+# The directory the whole suite works in.
+# Should be absolute to let the user `cd' at will.
+at_suite_dir=$at_dir/$as_me.dir
+# The file containing the suite ($at_dir might have changed since earlier).
+at_suite_log=$at_dir/$as_me.log
+# The directory containing helper files per test group.
+at_helper_dir=$at_suite_dir/at-groups
+# Stop file: if it exists, do not start new jobs.
+at_stop_file=$at_suite_dir/at-stop
+# The fifo used for the job dispatcher.
+at_job_fifo=$at_suite_dir/at-job-fifo
+
+if $at_clean; then
+  test -d "$at_suite_dir" &&
+    find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+  rm -f -r "$at_suite_dir" "$at_suite_log"
+  exit $?
 fi
 
 # Don't take risks: use only absolute directories in PATH.
 #
-# For stand-alone test suites, AUTOTEST_PATH is relative to `.'.
+# For stand-alone test suites (ie. atconfig was not found),
+# AUTOTEST_PATH is relative to `.'.
 #
 # For embedded test suites, AUTOTEST_PATH is relative to the top level
 # of the package.  Then expand it into build/src parts, since users
 # may create executables in both places.
-AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"`
+AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
 at_path=
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $AUTOTEST_PATH $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR
+    test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
 case $as_dir in
   [\\/]* | ?:[\\/]* )
-    at_path=$at_path$as_dir
+    as_fn_append at_path "$as_dir"
     ;;
   * )
     if test -z "$at_top_build_prefix"; then
       # Stand-alone test suite.
-      at_path=$at_path$as_dir
+      as_fn_append at_path "$as_dir"
     else
       # Embedded test suite.
-      at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
-      at_path=$at_path$at_top_srcdir/$as_dir
+      as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
+      as_fn_append at_path "$at_top_srcdir/$as_dir"
     fi
     ;;
 esac
-done
+  done
 IFS=$as_save_IFS
 
 
@@ -962,31 +1123,33 @@ IFS=$as_save_IFS
 #
 # There might be directories that don't exist, but don't redirect
 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
-PATH=
+at_new_path=
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $at_path
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
-test -d "$as_dir" || continue
-case $PATH in
-	          $as_dir                 | \
-	          $as_dir$PATH_SEPARATOR* | \
-  *$PATH_SEPARATOR$as_dir                 | \
-  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;
-
-  '') PATH=$as_dir ;;
-   *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
+    test -d "$as_dir" || continue
+case $as_dir in
+  [\\/]* | ?:[\\/]* ) ;;
+  * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
 esac
-done
+case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
+  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
+  $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
+  *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
+esac
+  done
 IFS=$as_save_IFS
 
+PATH=$at_new_path
 export PATH
 
 # Setting up the FDs.
-# 5 is the log file.  Not to be overwritten if `-d'.
 
+
+
+# 5 is the log file.  Not to be overwritten if `-d'.
 if $at_debug_p; then
   at_suite_log=/dev/null
 else
@@ -995,42 +1158,31 @@ fi
 exec 5>>"$at_suite_log"
 
 # Banners and logs.
-cat <<\_ASBOX
-## ----------------------------------- ##
-## libdap 3.11.6 test suite: das-test. ##
-## ----------------------------------- ##
-_ASBOX
+$as_echo "## ----------------------------------- ##
+## libdap 3.12.0 test suite: das-test. ##
+## ----------------------------------- ##"
 {
-  cat <<\_ASBOX
-## ----------------------------------- ##
-## libdap 3.11.6 test suite: das-test. ##
-## ----------------------------------- ##
-_ASBOX
+  $as_echo "## ----------------------------------- ##
+## libdap 3.12.0 test suite: das-test. ##
+## ----------------------------------- ##"
   echo
 
-  echo "$as_me: command line was:"
-  echo "  $ $0 $at_cli_args"
+  $as_echo "$as_me: command line was:"
+  $as_echo "  \$ $0 $at_cli_args"
   echo
 
-  # Try to find a few ChangeLogs in case it might help determining the
-  # exact version.  Use the relative dir: if the top dir is a symlink,
-  # find will not follow it (and options to follow the links are not
-  # portable), which would result in no output here.
-  if test -n "$at_top_srcdir"; then
-    cat <<\_ASBOX
-## ----------- ##
-## ChangeLogs. ##
-## ----------- ##
-_ASBOX
+  # If ChangeLog exists, list a few lines in case it might help determining
+  # the exact version.
+  if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
+    $as_echo "## ---------- ##
+## ChangeLog. ##
+## ---------- ##"
     echo
-    for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
-    do
-      echo "$as_me: $at_file:"
-      sed 's/^/| /;10q' $at_file
-      echo
-    done
+    sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
+    echo
+  fi
 
-    {
+  {
 cat <<_ASUNAME
 ## --------- ##
 ## Platform. ##
@@ -1060,28 +1212,179 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
+    $as_echo "PATH: $as_dir"
+  done
 IFS=$as_save_IFS
 
 }
-    echo
-  fi
+  echo
 
   # Contents of the config files.
   for at_file in atconfig atlocal
   do
     test -r $at_file || continue
-    echo "$as_me: $at_file:"
+    $as_echo "$as_me: $at_file:"
     sed 's/^/| /' $at_file
     echo
   done
+} >&5
+
+
+## ------------------------- ##
+## Autotest shell functions. ##
+## ------------------------- ##
+
+# at_fn_banner NUMBER
+# -------------------
+# Output banner NUMBER, provided the testsuite is running multiple groups and
+# this particular banner has not yet been printed.
+at_fn_banner ()
+{
+  $at_print_banners || return 0
+  eval at_banner_text=\$at_banner_text_$1
+  test "x$at_banner_text" = "x " && return 0
+  eval "at_banner_text_$1=\" \""
+  if test -z "$at_banner_text"; then
+    $at_first || echo
+  else
+    $as_echo "$as_nl$at_banner_text$as_nl"
+  fi
+} # at_fn_banner
+
+# at_fn_check_prepare_notrace REASON LINE
+# ---------------------------------------
+# Perform AT_CHECK preparations for the command at LINE for an untraceable
+# command; REASON is the reason for disabling tracing.
+at_fn_check_prepare_notrace ()
+{
+  $at_trace_echo "Not enabling shell tracing (command contains $1)"
+  $as_echo "$2" >"$at_check_line_file"
+  at_check_trace=: at_check_filter=:
+  : >"$at_stdout"; : >"$at_stderr"
+}
+
+# at_fn_check_prepare_trace LINE
+# ------------------------------
+# Perform AT_CHECK preparations for the command at LINE for a traceable
+# command.
+at_fn_check_prepare_trace ()
+{
+  $as_echo "$1" >"$at_check_line_file"
+  at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
+  : >"$at_stdout"; : >"$at_stderr"
+}
+
+# at_fn_check_prepare_dynamic COMMAND LINE
+# ----------------------------------------
+# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
+# preparation function.
+at_fn_check_prepare_dynamic ()
+{
+  case $1 in
+    *$as_nl*)
+      at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
+    *)
+      at_fn_check_prepare_trace "$2" ;;
+  esac
+}
+
+# at_fn_filter_trace
+# ------------------
+# Remove the lines in the file "$at_stderr" generated by "set -x" and print
+# them to stderr.
+at_fn_filter_trace ()
+{
+  mv "$at_stderr" "$at_stder1"
+  grep '^ *+' "$at_stder1" >&2
+  grep -v '^ *+' "$at_stder1" >"$at_stderr"
+}
+
+# at_fn_log_failure FILE-LIST
+# ---------------------------
+# Copy the files in the list on stdout with a "> " prefix, and exit the shell
+# with a failure exit code.
+at_fn_log_failure ()
+{
+  for file
+    do $as_echo "$file:"; sed 's/^/> /' "$file"; done
+  echo 1 > "$at_status_file"
+  exit 1
+}
+
+# at_fn_check_skip EXIT-CODE LINE
+# -------------------------------
+# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
+# the test group subshell with that same exit code. Use LINE in any report
+# about test failure.
+at_fn_check_skip ()
+{
+  case $1 in
+    99) echo 99 > "$at_status_file"; at_failed=:
+	$as_echo "$2: hard failure"; exit 99;;
+    77) echo 77 > "$at_status_file"; exit 77;;
+  esac
+}
+
+# at_fn_check_status EXPECTED EXIT-CODE LINE
+# ------------------------------------------
+# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
+# Otherwise, if it is 77 or 99, exit the test group subshell with that same
+# exit code; if it is anything else print an error message referring to LINE,
+# and fail the test.
+at_fn_check_status ()
+{
+  case $2 in
+    $1 ) ;;
+    77) echo 77 > "$at_status_file"; exit 77;;
+    99) echo 99 > "$at_status_file"; at_failed=:
+	$as_echo "$3: hard failure"; exit 99;;
+    *) $as_echo "$3: exit code was $2, expected $1"
+      at_failed=:;;
+  esac
+}
+
+# at_fn_diff_devnull FILE
+# -----------------------
+# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
+# invocations.
+at_fn_diff_devnull ()
+{
+  test -s "$1" || return 0
+  $at_diff "$at_devnull" "$1"
+}
+
+# at_fn_test NUMBER
+# -----------------
+# Parse out test NUMBER from the tail of this file.
+at_fn_test ()
+{
+  eval at_sed=\$at_sed$1
+  sed "$at_sed" "$at_myself" > "$at_test_source"
+}
 
-  cat <<\_ASBOX
-## ---------------- ##
+# at_fn_create_debugging_script
+# -----------------------------
+# Create the debugging script $at_group_dir/run which will reproduce the
+# current test group.
+at_fn_create_debugging_script ()
+{
+  {
+    echo "#! /bin/sh" &&
+    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
+    $as_echo "cd '$at_dir'" &&
+    $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
+    echo 'exit 1'
+  } >"$at_group_dir/run" &&
+  chmod +x "$at_group_dir/run"
+}
+
+## -------------------------------- ##
+## End of autotest shell functions. ##
+## -------------------------------- ##
+{
+  $as_echo "## ---------------- ##
 ## Tested programs. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
   echo
 } >&5
 
@@ -1089,52 +1392,44 @@ _ASBOX
 for at_program in : $at_tested
 do
   test "$at_program" = : && continue
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $at_program in
+    [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
+    * )
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -f "$as_dir/$at_program" && break
-done
+    test -f "$as_dir/$at_program" && break
+  done
 IFS=$as_save_IFS
 
-  if test -f "$as_dir/$at_program"; then
+    at_program_=$as_dir/$at_program ;;
+  esac
+  if test -f "$at_program_"; then
     {
-      echo "$at_srcdir/DASTest.at:7: $as_dir/$at_program --version"
-      "$as_dir/$at_program" --version
+      $as_echo "$at_srcdir/DASTest.at:7: $at_program_ --version"
+      "$at_program_" --version </dev/null
       echo
     } >&5 2>&1
   else
-    { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5
-echo "$as_me: error: cannot find $at_program" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "cannot find $at_program" "$LINENO" 5
   fi
 done
 
 {
-  cat <<\_ASBOX
-## ------------------ ##
+  $as_echo "## ------------------ ##
 ## Running the tests. ##
-## ------------------ ##
-_ASBOX
+## ------------------ ##"
 } >&5
 
 at_start_date=`date`
 at_start_time=`date +%s 2>/dev/null`
-echo "$as_me: starting at: $at_start_date" >&5
-at_xpass_list=
-at_xfail_list=
-at_pass_list=
-at_fail_list=
-at_skip_list=
-at_group_count=0
+$as_echo "$as_me: starting at: $at_start_date" >&5
 
 # Create the master directory if it doesn't already exist.
-test -d "$at_suite_dir" ||
-  mkdir "$at_suite_dir" ||
-  { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
-echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
-   { (exit 1); exit 1; }; }
+as_dir="$at_suite_dir"; as_fn_mkdir_p ||
+  as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
 
 # Can we diff with `/dev/null'?  DU 5.0 refuses.
 if diff /dev/null /dev/null >/dev/null 2>&1; then
@@ -1152,4518 +1447,2337 @@ else
   at_diff=diff
 fi
 
+# Get the last needed group.
+for at_group in : $at_groups; do :; done
+
+# Extract the start and end lines of each test group at the tail
+# of this file
+awk '
+BEGIN { FS="" }
+/^#AT_START_/ {
+  start = NR
+}
+/^#AT_STOP_/ {
+  test = substr ($ 0, 10)
+  print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
+  if (test == "'"$at_group"'") exit
+}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
+. "$at_suite_dir/at-source-lines" ||
+  as_fn_error $? "cannot create test line number cache" "$LINENO" 5
+rm -f "$at_suite_dir/at-source-lines"
+
+# Set number of jobs for `-j'; avoid more jobs than test groups.
+set X $at_groups; shift; at_max_jobs=$#
+if test $at_max_jobs -eq 0; then
+  at_jobs=1
+fi
+if test $at_jobs -ne 1 &&
+   { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
+  at_jobs=$at_max_jobs
+fi
+
+# If parallel mode, don't output banners, don't split summary lines.
+if test $at_jobs -ne 1; then
+  at_print_banners=false
+  at_quiet=:
+fi
+
+# Set up helper dirs.
+rm -rf "$at_helper_dir" &&
+mkdir "$at_helper_dir" &&
+cd "$at_helper_dir" &&
+{ test -z "$at_groups" || mkdir $at_groups; } ||
+as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
+
+# Functions for running a test group.  We leave the actual
+# test group execution outside of a shell function in order
+# to avoid hitting zsh 4.x exit status bugs.
+
+# at_fn_group_prepare
+# -------------------
+# Prepare for running a test group.
+at_fn_group_prepare ()
+{
+  # The directory for additional per-group helper files.
+  at_job_dir=$at_helper_dir/$at_group
+  # The file containing the location of the last AT_CHECK.
+  at_check_line_file=$at_job_dir/check-line
+  # The file containing the exit status of the last command.
+  at_status_file=$at_job_dir/status
+  # The files containing the output of the tested commands.
+  at_stdout=$at_job_dir/stdout
+  at_stder1=$at_job_dir/stder1
+  at_stderr=$at_job_dir/stderr
+  # The file containing the code for a test group.
+  at_test_source=$at_job_dir/test-source
+  # The file containing dates.
+  at_times_file=$at_job_dir/times
 
-for at_group in $at_groups
-do
   # Be sure to come back to the top test directory.
   cd "$at_suite_dir"
 
-  case $at_group in
-    banner-*)
-      at_group_log=$at_suite_log
-      ;;
+  # Clearly separate the test groups when verbose.
+  $at_first || $at_verbose echo
 
-    *)
-      at_group_normalized=$at_group
+  at_group_normalized=$at_group
 
-  while :; do
+  eval 'while :; do
     case $at_group_normalized in #(
-    $at_format*) break;;
+    '"$at_format"'*) break;;
     esac
     at_group_normalized=0$at_group_normalized
-  done
-
-
-      # Create a fresh directory for the next test group, and enter.
-      at_group_dir=$at_suite_dir/$at_group_normalized
-      at_group_log=$at_group_dir/$as_me.log
-      if test -d "$at_group_dir"; then
-	find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
-	rm -fr "$at_group_dir"
-      fi
-      # Be tolerant if the above `rm' was not able to remove the directory.
-      { as_dir=$at_group_dir
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-      cd $at_group_dir
-      ;;
-  esac
+  done'
+
+
+  # Create a fresh directory for the next test group, and enter.
+  # If one already exists, the user may have invoked ./run from
+  # within that directory; we remove the contents, but not the
+  # directory itself, so that we aren't pulling the rug out from
+  # under the shell's notion of the current directory.
+  at_group_dir=$at_suite_dir/$at_group_normalized
+  at_group_log=$at_group_dir/$as_me.log
+  if test -d "$at_group_dir"; then
+  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
+  rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
+fi ||
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
+$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
+  # Be tolerant if the above `rm' was not able to remove the directory.
+  as_dir="$at_group_dir"; as_fn_mkdir_p
 
   echo 0 > "$at_status_file"
 
-  # Clearly separate the test groups when verbose.
-  test $at_group_count != 0 && $at_verbose
-
   # In verbose mode, append to the log file *and* show on
-  # the standard output; in quiet mode only write to the log
-  if test $at_verbose = echo; then
+  # the standard output; in quiet mode only write to the log.
+  if test -z "$at_verbose"; then
     at_tee_pipe='tee -a "$at_group_log"'
   else
     at_tee_pipe='cat >> "$at_group_log"'
   fi
+}
 
-  case $at_group in
-  1 ) # 1. DASTest.at:31: DAS $abs_srcdir/das-testsuite/bad_value_test.1.das
-    at_setup_line='DASTest.at:31'
-    at_desc="DAS \$abs_srcdir/das-testsuite/bad_value_test.1.das"
-    $at_quiet $ECHO_N "  1: DAS \$abs_srcdir/das-testsuite/bad_value_test.1.das$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "1. DASTest.at:31: testing ..."
-      $at_traceon
+# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
+# -------------------------------------------------
+# Declare the test group ORDINAL, located at LINE with group description DESC,
+# and residing under BANNER. Use PAD to align the status column.
+at_fn_group_banner ()
+{
+  at_setup_line="$2"
+  test -n "$5" && at_fn_banner $5
+  at_desc="$3"
+  case $1 in
+    [0-9])      at_desc_line="  $1: ";;
+    [0-9][0-9]) at_desc_line=" $1: " ;;
+    *)          at_desc_line="$1: "  ;;
+  esac
+  as_fn_append at_desc_line "$3$4"
+  $at_quiet $as_echo_n "$at_desc_line"
+  echo "#                             -*- compilation -*-" >> "$at_group_log"
+}
 
+# at_fn_group_postprocess
+# -----------------------
+# Perform cleanup after running a test group.
+at_fn_group_postprocess ()
+{
+  # Be sure to come back to the suite directory, in particular
+  # since below we might `rm' the group directory we are in currently.
+  cd "$at_suite_dir"
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/bad_value_test.1.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:31: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/bad_value_test.1.das || true"
-echo DASTest.at:31 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/bad_value_test.1.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+  if test ! -f "$at_check_line_file"; then
+    sed "s/^ */$as_me: WARNING: /" <<_ATEOF
+      A failure happened in a test group before any test could be
+      run. This means that test suite is improperly designed.  Please
+      report this failure to <opendap-tech at opendap.org>.
+_ATEOF
+    $as_echo "$at_setup_line" >"$at_check_line_file"
+    at_status=99
+  fi
+  $at_verbose $as_echo_n "$at_group. $at_setup_line: "
+  $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
+  case $at_xfail:$at_status in
+    yes:0)
+	at_msg="UNEXPECTED PASS"
+	at_res=xpass
+	at_errexit=$at_errexit_p
+	at_color=$at_red
+	;;
+    no:0)
+	at_msg="ok"
+	at_res=pass
+	at_errexit=false
+	at_color=$at_grn
+	;;
+    *:77)
+	at_msg='skipped ('`cat "$at_check_line_file"`')'
+	at_res=skip
+	at_errexit=false
+	at_color=$at_blu
+	;;
+    no:* | *:99)
+	at_msg='FAILED ('`cat "$at_check_line_file"`')'
+	at_res=fail
+	at_errexit=$at_errexit_p
+	at_color=$at_red
+	;;
+    yes:*)
+	at_msg='expected failure ('`cat "$at_check_line_file"`')'
+	at_res=xfail
+	at_errexit=false
+	at_color=$at_lgn
+	;;
+  esac
+  echo "$at_res" > "$at_job_dir/$at_res"
+  # In parallel mode, output the summary line only afterwards.
+  if test $at_jobs -ne 1 && test -n "$at_verbose"; then
+    $as_echo "$at_desc_line $at_color$at_msg$at_std"
+  else
+    # Make sure there is a separator even with long titles.
+    $as_echo " $at_color$at_msg$at_std"
+  fi
+  at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
+  case $at_status in
+    0|77)
+      # $at_times_file is only available if the group succeeded.
+      # We're not including the group log, so the success message
+      # is written in the global log separately.  But we also
+      # write to the group log in case they're using -d.
+      if test -f "$at_times_file"; then
+	at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
+	rm -f "$at_times_file"
+      fi
+      $as_echo "$at_log_msg" >> "$at_group_log"
+      $as_echo "$at_log_msg" >&5
+
+      # Cleanup the group directory, unless the user wants the files
+      # or the success was unexpected.
+      if $at_debug_p || test $at_res = xpass; then
+	at_fn_create_debugging_script
+	if test $at_res = xpass && $at_errexit; then
+	  echo stop > "$at_stop_file"
+	fi
+      else
+	if test -d "$at_group_dir"; then
+	  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+	  rm -fr "$at_group_dir"
+	fi
+	rm -f "$at_test_source"
+      fi
+      ;;
+    *)
+      # Upon failure, include the log into the testsuite's global
+      # log.  The failure message is written in the group log.  It
+      # is later included in the global log.
+      $as_echo "$at_log_msg" >> "$at_group_log"
+
+      # Upon failure, keep the group directory for autopsy, and create
+      # the debugging script.  With -e, do not start any further tests.
+      at_fn_create_debugging_script
+      if $at_errexit; then
+	echo stop > "$at_stop_file"
+      fi
+      ;;
+  esac
+}
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/bad_value_test.1.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/bad_value_test.1.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
 
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:31: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+## ------------ ##
+## Driver loop. ##
+## ------------ ##
 
 
-  echo 1 > "$at_status_file"
-  exit 1
+if (set -m && set +m && set +b) >/dev/null 2>&1; then
+  set +b
+  at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
+else
+  at_job_control_on=: at_job_control_off=: at_job_group=
 fi
 
-$at_traceon
+for at_signal in 1 2 15; do
+  trap 'set +x; set +e
+	$at_job_control_off
+	at_signal='"$at_signal"'
+	echo stop > "$at_stop_file"
+	trap "" $at_signal
+	at_pgids=
+	for at_pgid in `jobs -p 2>/dev/null`; do
+	  at_pgids="$at_pgids $at_job_group$at_pgid"
+	done
+	test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
+	wait
+	if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
+	  echo >&2
+	fi
+	at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
+	set x $at_signame
+	test 1 -gt 2 && at_signame=$at_signal
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
+$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
+	as_fn_arith 128 + $at_signal && exit_status=$as_val
+	as_fn_exit $exit_status' $at_signal
+done
 
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:31: diff -b -B \$abs_srcdir/das-testsuite/bad_value_test.1.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/bad_value_test.1.das.base stderr"
-echo DASTest.at:31 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+rm -f "$at_stop_file"
+at_first=:
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+if test $at_jobs -ne 1 &&
+     rm -f "$at_job_fifo" &&
+     test -n "$at_job_group" &&
+     ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
+then
+  # FIFO job dispatcher.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:31: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+  trap 'at_pids=
+	for at_pid in `jobs -p`; do
+	  at_pids="$at_pids $at_job_group$at_pid"
+	done
+	if test -n "$at_pids"; then
+	  at_sig=TSTP
+	  test "${TMOUT+set}" = set && at_sig=STOP
+	  kill -$at_sig $at_pids 2>/dev/null
+	fi
+	kill -STOP $$
+	test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
 
+  echo
+  # Turn jobs into a list of numbers, starting from 1.
+  at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
 
-  echo 1 > "$at_status_file"
-  exit 1
+  set X $at_joblist
+  shift
+  for at_group in $at_groups; do
+    $at_job_control_on 2>/dev/null
+    (
+      # Start one test group.
+      $at_job_control_off
+      if $at_first; then
+	exec 7>"$at_job_fifo"
+      else
+	exec 6<&-
+      fi
+      trap 'set +x; set +e
+	    trap "" PIPE
+	    echo stop > "$at_stop_file"
+	    echo >&7
+	    as_fn_exit 141' PIPE
+      at_fn_group_prepare
+      if cd "$at_group_dir" &&
+	 at_fn_test $at_group &&
+	 . "$at_test_source"
+      then :; else
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
+	at_failed=:
+      fi
+      at_fn_group_postprocess
+      echo >&7
+    ) &
+    $at_job_control_off
+    if $at_first; then
+      at_first=false
+      exec 6<"$at_job_fifo" 7>"$at_job_fifo"
+    fi
+    shift # Consume one token.
+    if test $# -gt 0; then :; else
+      read at_token <&6 || break
+      set x $*
+    fi
+    test -f "$at_stop_file" && break
+  done
+  exec 7>&-
+  # Read back the remaining ($at_jobs - 1) tokens.
+  set X $at_joblist
+  shift
+  if test $# -gt 0; then
+    shift
+    for at_job
+    do
+      read at_token
+    done <&6
+  fi
+  exec 6<&-
+  wait
+else
+  # Run serially, avoid forks and other potential surprises.
+  for at_group in $at_groups; do
+    at_fn_group_prepare
+    if cd "$at_group_dir" &&
+       at_fn_test $at_group &&
+       . "$at_test_source"; then :; else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
+      at_failed=:
+    fi
+    at_fn_group_postprocess
+    test -f "$at_stop_file" && break
+    at_first=false
+  done
 fi
 
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+# Wrap up the test suite with summary statistics.
+cd "$at_helper_dir"
+
+# Use ?..???? when the list must remain sorted, the faster * otherwise.
+at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
+at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
+at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
+at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
+		 echo $f; done | sed '/?/d; s,/xpass,,'`
+at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
+		echo $f; done | sed '/?/d; s,/fail,,'`
+
+set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
+shift; at_group_count=$#
+set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
+set X $at_xfail_list; shift; at_xfail_count=$#
+set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
+set X $at_skip_list; shift; at_skip_count=$#
+
+as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
+as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
+as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
 
-  2 ) # 2. DASTest.at:32: DAS $abs_srcdir/das-testsuite/das.das
-    at_setup_line='DASTest.at:32'
-    at_desc="DAS \$abs_srcdir/das-testsuite/das.das"
-    $at_quiet $ECHO_N "  2: DAS \$abs_srcdir/das-testsuite/das.das         $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "2. DASTest.at:32: testing ..."
-      $at_traceon
+# Back to the top directory.
+cd "$at_dir"
+rm -rf "$at_helper_dir"
 
+# Compute the duration of the suite.
+at_stop_date=`date`
+at_stop_time=`date +%s 2>/dev/null`
+$as_echo "$as_me: ending at: $at_stop_date" >&5
+case $at_start_time,$at_stop_time in
+  [0-9]*,[0-9]*)
+    as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
+    as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
+    as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
+    as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
+    as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
+    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
+    $as_echo "$as_me: test suite duration: $at_duration" >&5
+    ;;
+esac
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/das.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:32: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/das.das || true"
-echo DASTest.at:32 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/das.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+echo
+$as_echo "## ------------- ##
+## Test results. ##
+## ------------- ##"
+echo
+{
+  echo
+  $as_echo "## ------------- ##
+## Test results. ##
+## ------------- ##"
+  echo
+} >&5
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/das.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+if test $at_run_count = 1; then
+  at_result="1 test"
+  at_were=was
 else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/das.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
+  at_result="$at_run_count tests"
+  at_were=were
 fi
+if $at_errexit_p && test $at_unexpected_count != 0; then
+  if test $at_xpass_count = 1; then
+    at_result="$at_result $at_were run, one passed"
+  else
+    at_result="$at_result $at_were run, one failed"
+  fi
+  at_result="$at_result unexpectedly and inhibited subsequent tests."
+  at_color=$at_red
+else
+  # Don't you just love exponential explosion of the number of cases?
+  at_color=$at_red
+  case $at_xpass_count:$at_fail_count:$at_xfail_count in
+    # So far, so good.
+    0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
+    0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
 
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:32: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+    # Some unexpected failures
+    0:*:0) at_result="$at_result $at_were run,
+$at_fail_count failed unexpectedly." ;;
 
+    # Some failures, both expected and unexpected
+    0:*:1) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+    0:*:*) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+    # No unexpected failures, but some xpasses
+    *:0:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly." ;;
 
-$at_traceon
+    # No expected failures, but failures and xpasses
+    *:1:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
+    *:*:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
 
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:32: diff -b -B \$abs_srcdir/das-testsuite/das.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/das.das.base stderr"
-echo DASTest.at:32 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/das.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/das.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+    # All of them.
+    *:*:1) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+    *:*:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
+  esac
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/das.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/das.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/das.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/das.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
+  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
+    at_result="All $at_result"
+  fi
 fi
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:32: exit code was $at_status, expected 0"
-      at_failed=:;;
+# Now put skips in the mix.
+case $at_skip_count in
+  0) ;;
+  1) at_result="$at_result
+1 test was skipped." ;;
+  *) at_result="$at_result
+$at_skip_count tests were skipped." ;;
 esac
-if $at_failed; then
 
+if test $at_unexpected_count = 0; then
+  echo "$at_color$at_result$at_std"
+  echo "$at_result" >&5
+else
+  echo "${at_color}ERROR: $at_result$at_std" >&2
+  echo "ERROR: $at_result" >&5
+  {
+    echo
+    $as_echo "## ------------------------ ##
+## Summary of the failures. ##
+## ------------------------ ##"
+
+    # Summary of failed and skipped tests.
+    if test $at_fail_count != 0; then
+      echo "Failed tests:"
+      $SHELL "$at_myself" $at_fail_list --list
+      echo
+    fi
+    if test $at_skip_count != 0; then
+      echo "Skipped tests:"
+      $SHELL "$at_myself" $at_skip_list --list
+      echo
+    fi
+    if test $at_xpass_count != 0; then
+      echo "Unexpected passes:"
+      $SHELL "$at_myself" $at_xpass_list --list
+      echo
+    fi
+    if test $at_fail_count != 0; then
+      $as_echo "## ---------------------- ##
+## Detailed failed tests. ##
+## ---------------------- ##"
+      echo
+      for at_group in $at_fail_list
+      do
+	at_group_normalized=$at_group
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+  eval 'while :; do
+    case $at_group_normalized in #(
+    '"$at_format"'*) break;;
+    esac
+    at_group_normalized=0$at_group_normalized
+  done'
 
-$at_traceon
+	cat "$at_suite_dir/$at_group_normalized/$as_me.log"
+	echo
+      done
+      echo
+    fi
+    if test -n "$at_top_srcdir"; then
+      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## ${at_top_build_prefix}config.log ##
+_ASBOX
+      sed 's/^/| /' ${at_top_build_prefix}config.log
+      echo
+    fi
+  } >&5
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## $as_me.log was created. ##
+_ASBOX
 
-  3 ) # 3. DASTest.at:33: DAS $abs_srcdir/das-testsuite/special.test.das
-    at_setup_line='DASTest.at:33'
-    at_desc="DAS \$abs_srcdir/das-testsuite/special.test.das"
-    $at_quiet $ECHO_N "  3: DAS \$abs_srcdir/das-testsuite/special.test.das$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "3. DASTest.at:33: testing ..."
-      $at_traceon
+  echo
+  if $at_debug_p; then
+    at_msg='per-test log files'
+  else
+    at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
+  fi
+  $as_echo "Please send $at_msg and all information you think might help:
 
+   To: <opendap-tech at opendap.org>
+   Subject: [libdap 3.12.0] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/special.test.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:33: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/special.test.das || true"
-echo DASTest.at:33 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
+You may investigate any problem if you feel able to do so, in which
+case the test suite provides a good starting point.  Its output may
+be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
+"
+  exit 1
 fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+exit 0
+
+## ------------- ##
+## Actual tests. ##
+## ------------- ##
+#AT_START_1
+at_fn_group_banner 1 'DASTest.at:31' \
+  "DAS \$abs_srcdir/das-testsuite/bad_value_test.1.das" ""
+at_xfail=no
+(
+  $as_echo "1. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-at_failed=false
+
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/bad_value_test.1.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:31: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/bad_value_test.1.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/bad_value_test.1.das || true" "DASTest.at:31"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/bad_value_test.1.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:33: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:31: diff -b -B \$abs_srcdir/das-testsuite/bad_value_test.1.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/bad_value_test.1.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stderr" "DASTest.at:31"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/bad_value_test.1.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:31"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_1
+#AT_START_2
+at_fn_group_banner 2 'DASTest.at:32' \
+  "DAS \$abs_srcdir/das-testsuite/das.das" "          "
+at_xfail=no
+(
+  $as_echo "2. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/das.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:32: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/das.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/das.das || true" "DASTest.at:32"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/das.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:33: diff -b -B \$abs_srcdir/das-testsuite/special.test.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/special.test.das.base stderr"
-echo DASTest.at:33 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:32: diff -b -B \$abs_srcdir/das-testsuite/das.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/das.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/das.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/das.das.base stderr" "DASTest.at:32"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/das.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/das.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:33: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:32"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_2
+#AT_START_3
+at_fn_group_banner 3 'DASTest.at:33' \
+  "DAS \$abs_srcdir/das-testsuite/special.test.das" " "
+at_xfail=no
+(
+  $as_echo "3. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/special.test.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:33: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/special.test.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.das || true" "DASTest.at:33"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  4 ) # 4. DASTest.at:34: DAS $abs_srcdir/das-testsuite/special.test.hdf.das
-    at_setup_line='DASTest.at:34'
-    at_desc="DAS \$abs_srcdir/das-testsuite/special.test.hdf.das"
-    $at_quiet $ECHO_N "  4: DAS \$abs_srcdir/das-testsuite/special.test.hdf.das$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "4. DASTest.at:34: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:33: diff -b -B \$abs_srcdir/das-testsuite/special.test.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/special.test.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stderr" "DASTest.at:33"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:33"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_3
+#AT_START_4
+at_fn_group_banner 4 'DASTest.at:34' \
+  "DAS \$abs_srcdir/das-testsuite/special.test.hdf.das" ""
+at_xfail=no
+(
+  $as_echo "4. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 #Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/special.test.hdf.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:34: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/special.test.hdf.das || true"
-echo DASTest.at:34 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.hdf.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.hdf.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.hdf.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:34: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/special.test.hdf.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.hdf.das || true" "DASTest.at:34"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/special.test.hdf.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:34: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:34: diff -b -B \$abs_srcdir/das-testsuite/special.test.hdf.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/special.test.hdf.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stderr" "DASTest.at:34"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_4
+#AT_START_5
+at_fn_group_banner 5 'DASTest.at:35' \
+  "DAS \$abs_srcdir/das-testsuite/test.1.das" "       "
+at_xfail=no
+(
+  $as_echo "5. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.1.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:35: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.1.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1.das || true" "DASTest.at:35"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:34: diff -b -B \$abs_srcdir/das-testsuite/special.test.hdf.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/special.test.hdf.das.base stderr"
-echo DASTest.at:34 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:35: diff -b -B \$abs_srcdir/das-testsuite/test.1.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.1.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stderr" "DASTest.at:35"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_5
+#AT_START_6
+at_fn_group_banner 6 'DASTest.at:36' \
+  "DAS \$abs_srcdir/das-testsuite/test.11.das" "      "
+at_xfail=no
+(
+  $as_echo "6. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/special.test.hdf.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:34: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
 
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.11.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:36: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.11.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.11.das || true" "DASTest.at:36"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.11.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:36: diff -b -B \$abs_srcdir/das-testsuite/test.11.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.11.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stderr" "DASTest.at:36"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_6
+#AT_START_7
+at_fn_group_banner 7 'DASTest.at:37' \
+  "DAS \$abs_srcdir/das-testsuite/test.12.das" "      "
+at_xfail=no
+(
+  $as_echo "7. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.12.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:37: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.12.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.12.das || true" "DASTest.at:37"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.12.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  5 ) # 5. DASTest.at:35: DAS $abs_srcdir/das-testsuite/test.1.das
-    at_setup_line='DASTest.at:35'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.1.das"
-    $at_quiet $ECHO_N "  5: DAS \$abs_srcdir/das-testsuite/test.1.das      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "5. DASTest.at:35: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:37: diff -b -B \$abs_srcdir/das-testsuite/test.12.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.12.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stderr" "DASTest.at:37"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_7
+#AT_START_8
+at_fn_group_banner 8 'DASTest.at:38' \
+  "DAS \$abs_srcdir/das-testsuite/test.13.das" "      "
+at_xfail=no
+(
+  $as_echo "8. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.1.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.13.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:35: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.1.das || true"
-echo DASTest.at:35 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:38: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.13.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.13.das || true" "DASTest.at:38"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.13.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:35: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:38"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:38: diff -b -B \$abs_srcdir/das-testsuite/test.13.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.13.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stderr" "DASTest.at:38"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:38"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_8
+#AT_START_9
+at_fn_group_banner 9 'DASTest.at:39' \
+  "DAS \$abs_srcdir/das-testsuite/test.14.das" "      "
+at_xfail=no
+(
+  $as_echo "9. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.14.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:39: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.14.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.14.das || true" "DASTest.at:39"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.14.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:35: diff -b -B \$abs_srcdir/das-testsuite/test.1.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.1.das.base stderr"
-echo DASTest.at:35 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:39: diff -b -B \$abs_srcdir/das-testsuite/test.14.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.14.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stderr" "DASTest.at:39"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:35: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_9
+#AT_START_10
+at_fn_group_banner 10 'DASTest.at:40' \
+  "DAS \$abs_srcdir/das-testsuite/test.15.das" "      "
+at_xfail=no
+(
+  $as_echo "10. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.15.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:40: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.15.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.15.das || true" "DASTest.at:40"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.15.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:40"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  6 ) # 6. DASTest.at:36: DAS $abs_srcdir/das-testsuite/test.11.das
-    at_setup_line='DASTest.at:36'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.11.das"
-    $at_quiet $ECHO_N "  6: DAS \$abs_srcdir/das-testsuite/test.11.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "6. DASTest.at:36: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:40: diff -b -B \$abs_srcdir/das-testsuite/test.15.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.15.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stderr" "DASTest.at:40"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:40"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_10
+#AT_START_11
+at_fn_group_banner 11 'DASTest.at:41' \
+  "DAS \$abs_srcdir/das-testsuite/test.16.das" "      "
+at_xfail=no
+(
+  $as_echo "11. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.11.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.16.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:36: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.11.das || true"
-echo DASTest.at:36 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.11.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.11.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.11.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:41: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.16.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.16.das || true" "DASTest.at:41"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.16.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:36: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:41"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:41: diff -b -B \$abs_srcdir/das-testsuite/test.16.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.16.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stderr" "DASTest.at:41"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:41"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_11
+#AT_START_12
+at_fn_group_banner 12 'DASTest.at:42' \
+  "DAS \$abs_srcdir/das-testsuite/test.17.das" "      "
+at_xfail=no
+(
+  $as_echo "12. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.17.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:42: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.17.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.17.das || true" "DASTest.at:42"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.17.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:42"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:36: diff -b -B \$abs_srcdir/das-testsuite/test.11.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.11.das.base stderr"
-echo DASTest.at:36 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.11.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:42: diff -b -B \$abs_srcdir/das-testsuite/test.17.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.17.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stderr" "DASTest.at:42"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:36: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:42"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_12
+#AT_START_13
+at_fn_group_banner 13 'DASTest.at:43' \
+  "DAS \$abs_srcdir/das-testsuite/test.18.das" "      "
+at_xfail=no
+(
+  $as_echo "13. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.18.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:43: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.18.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.18.das || true" "DASTest.at:43"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.18.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:43"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  7 ) # 7. DASTest.at:37: DAS $abs_srcdir/das-testsuite/test.12.das
-    at_setup_line='DASTest.at:37'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.12.das"
-    $at_quiet $ECHO_N "  7: DAS \$abs_srcdir/das-testsuite/test.12.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "7. DASTest.at:37: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:43: diff -b -B \$abs_srcdir/das-testsuite/test.18.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.18.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stderr" "DASTest.at:43"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:43"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_13
+#AT_START_14
+at_fn_group_banner 14 'DASTest.at:44' \
+  "DAS \$abs_srcdir/das-testsuite/test.19.das" "      "
+at_xfail=no
+(
+  $as_echo "14. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.12.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.19.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:37: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.12.das || true"
-echo DASTest.at:37 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.12.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.12.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.12.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:44: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.19.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.19.das || true" "DASTest.at:44"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.19.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:37: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:44"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:44: diff -b -B \$abs_srcdir/das-testsuite/test.19.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.19.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stderr" "DASTest.at:44"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:44"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_14
+#AT_START_15
+at_fn_group_banner 15 'DASTest.at:45' \
+  "DAS \$abs_srcdir/das-testsuite/test.1a.das" "      "
+at_xfail=no
+(
+  $as_echo "15. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.1a.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:45: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.1a.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1a.das || true" "DASTest.at:45"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1a.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:45"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:37: diff -b -B \$abs_srcdir/das-testsuite/test.12.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.12.das.base stderr"
-echo DASTest.at:37 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.12.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:45: diff -b -B \$abs_srcdir/das-testsuite/test.1a.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.1a.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stderr" "DASTest.at:45"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:37: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:45"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_15
+#AT_START_16
+at_fn_group_banner 16 'DASTest.at:46' \
+  "DAS \$abs_srcdir/das-testsuite/test.2.das" "       "
+at_xfail=no
+(
+  $as_echo "16. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.2.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:46: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.2.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.2.das || true" "DASTest.at:46"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.2.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:46"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  8 ) # 8. DASTest.at:38: DAS $abs_srcdir/das-testsuite/test.13.das
-    at_setup_line='DASTest.at:38'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.13.das"
-    $at_quiet $ECHO_N "  8: DAS \$abs_srcdir/das-testsuite/test.13.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "8. DASTest.at:38: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:46: diff -b -B \$abs_srcdir/das-testsuite/test.2.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.2.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stderr" "DASTest.at:46"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:46"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_16
+#AT_START_17
+at_fn_group_banner 17 'DASTest.at:47' \
+  "DAS \$abs_srcdir/das-testsuite/test.20.das" "      "
+at_xfail=no
+(
+  $as_echo "17. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.13.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.20.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:38: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.13.das || true"
-echo DASTest.at:38 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.13.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.13.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.13.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:47: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.20.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.20.das || true" "DASTest.at:47"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.20.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:38: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:47: diff -b -B \$abs_srcdir/das-testsuite/test.20.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.20.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stderr" "DASTest.at:47"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_17
+#AT_START_18
+at_fn_group_banner 18 'DASTest.at:48' \
+  "DAS \$abs_srcdir/das-testsuite/test.21.das" "      "
+at_xfail=no
+(
+  $as_echo "18. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.21.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:48: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.21.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.21.das || true" "DASTest.at:48"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.21.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:48"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:38: diff -b -B \$abs_srcdir/das-testsuite/test.13.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.13.das.base stderr"
-echo DASTest.at:38 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.13.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:48: diff -b -B \$abs_srcdir/das-testsuite/test.21.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.21.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stderr" "DASTest.at:48"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:38: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:48"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_18
+#AT_START_19
+at_fn_group_banner 19 'DASTest.at:49' \
+  "DAS \$abs_srcdir/das-testsuite/test.22.das" "      "
+at_xfail=no
+(
+  $as_echo "19. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.22.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:49: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.22.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.22.das || true" "DASTest.at:49"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.22.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:49"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:49: diff -b -B \$abs_srcdir/das-testsuite/test.22.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.22.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stderr" "DASTest.at:49"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:49"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_19
+#AT_START_20
+at_fn_group_banner 20 'DASTest.at:50' \
+  "DAS \$abs_srcdir/das-testsuite/test.23.das" "      "
+at_xfail=no
+(
+  $as_echo "20. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.23.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:50: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.23.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.23.das || true" "DASTest.at:50"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.23.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:50"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  9 ) # 9. DASTest.at:39: DAS $abs_srcdir/das-testsuite/test.14.das
-    at_setup_line='DASTest.at:39'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.14.das"
-    $at_quiet $ECHO_N "  9: DAS \$abs_srcdir/das-testsuite/test.14.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "9. DASTest.at:39: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:50: diff -b -B \$abs_srcdir/das-testsuite/test.23.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.23.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stderr" "DASTest.at:50"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:50"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_20
+#AT_START_21
+at_fn_group_banner 21 'DASTest.at:51' \
+  "DAS \$abs_srcdir/das-testsuite/test.24.das" "      "
+at_xfail=no
+(
+  $as_echo "21. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.14.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.24.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:39: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.14.das || true"
-echo DASTest.at:39 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.14.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:51: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.24.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.24.das || true" "DASTest.at:51"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.24.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:51"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:51: diff -b -B \$abs_srcdir/das-testsuite/test.24.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.24.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stderr" "DASTest.at:51"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:51"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_21
+#AT_START_22
+at_fn_group_banner 22 'DASTest.at:52' \
+  "DAS \$abs_srcdir/das-testsuite/test.25.das" "      "
+at_xfail=no
+(
+  $as_echo "22. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.14.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.14.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
 
-at_failed=false
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.25.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:52: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.25.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.25.das || true" "DASTest.at:52"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.25.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:39: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:52"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:52: diff -b -B \$abs_srcdir/das-testsuite/test.25.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.25.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stderr" "DASTest.at:52"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:52"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_22
+#AT_START_23
+at_fn_group_banner 23 'DASTest.at:53' \
+  "DAS \$abs_srcdir/das-testsuite/test.26.das" "      "
+at_xfail=no
+(
+  $as_echo "23. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.26.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:53: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.26.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.26.das || true" "DASTest.at:53"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.26.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:53"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:39: diff -b -B \$abs_srcdir/das-testsuite/test.14.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.14.das.base stderr"
-echo DASTest.at:39 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:53: diff -b -B \$abs_srcdir/das-testsuite/test.26.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.26.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stderr" "DASTest.at:53"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:53"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_23
+#AT_START_24
+at_fn_group_banner 24 'DASTest.at:54' \
+  "DAS \$abs_srcdir/das-testsuite/test.27.das" "      "
+at_xfail=no
+(
+  $as_echo "24. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.14.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.27.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:54: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.27.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.27.das || true" "DASTest.at:54"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.27.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:54"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:54: diff -b -B \$abs_srcdir/das-testsuite/test.27.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.27.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stderr" "DASTest.at:54"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:39: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:54"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_24
+#AT_START_25
+at_fn_group_banner 25 'DASTest.at:55' \
+  "DAS \$abs_srcdir/das-testsuite/test.28.das" "      "
+at_xfail=no
+(
+  $as_echo "25. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  10 ) # 10. DASTest.at:40: DAS $abs_srcdir/das-testsuite/test.15.das
-    at_setup_line='DASTest.at:40'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.15.das"
-    $at_quiet $ECHO_N " 10: DAS \$abs_srcdir/das-testsuite/test.15.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "10. DASTest.at:40: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.15.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.28.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:40: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.15.das || true"
-echo DASTest.at:40 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.15.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.15.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.15.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:55: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.28.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.28.das || true" "DASTest.at:55"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.28.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:40: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:55"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:40: diff -b -B \$abs_srcdir/das-testsuite/test.15.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.15.das.base stderr"
-echo DASTest.at:40 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.15.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:55: diff -b -B \$abs_srcdir/das-testsuite/test.28.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.28.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stderr" "DASTest.at:55"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:40: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:55"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_25
+#AT_START_26
+at_fn_group_banner 26 'DASTest.at:56' \
+  "DAS \$abs_srcdir/das-testsuite/test.29.das" "      "
+at_xfail=no
+(
+  $as_echo "26. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.29.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:56: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.29.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.29.das || true" "DASTest.at:56"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.29.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:56"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  11 ) # 11. DASTest.at:41: DAS $abs_srcdir/das-testsuite/test.16.das
-    at_setup_line='DASTest.at:41'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.16.das"
-    $at_quiet $ECHO_N " 11: DAS \$abs_srcdir/das-testsuite/test.16.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "11. DASTest.at:41: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:56: diff -b -B \$abs_srcdir/das-testsuite/test.29.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.29.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stderr" "DASTest.at:56"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:56"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_26
+#AT_START_27
+at_fn_group_banner 27 'DASTest.at:57' \
+  "DAS \$abs_srcdir/das-testsuite/test.3.das" "       "
+at_xfail=no
+(
+  $as_echo "27. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.16.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.3.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:41: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.16.das || true"
-echo DASTest.at:41 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.16.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.16.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.16.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:57: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.3.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.das || true" "DASTest.at:57"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:41: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:57"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:57: diff -b -B \$abs_srcdir/das-testsuite/test.3.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.3.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stderr" "DASTest.at:57"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:57"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_27
+#AT_START_28
+at_fn_group_banner 28 'DASTest.at:58' \
+  "DAS \$abs_srcdir/das-testsuite/test.3.Z.das" "     "
+at_xfail=no
+(
+  $as_echo "28. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.3.Z.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:58: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.3.Z.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.Z.das || true" "DASTest.at:58"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.Z.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:41: diff -b -B \$abs_srcdir/das-testsuite/test.16.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.16.das.base stderr"
-echo DASTest.at:41 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.16.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:58: diff -b -B \$abs_srcdir/das-testsuite/test.3.Z.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.3.Z.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stderr" "DASTest.at:58"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:41: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_28
+#AT_START_29
+at_fn_group_banner 29 'DASTest.at:59' \
+  "DAS \$abs_srcdir/das-testsuite/test.30.das" "      "
+at_xfail=no
+(
+  $as_echo "29. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.30.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:59: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.30.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.30.das || true" "DASTest.at:59"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.30.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:59"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  12 ) # 12. DASTest.at:42: DAS $abs_srcdir/das-testsuite/test.17.das
-    at_setup_line='DASTest.at:42'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.17.das"
-    $at_quiet $ECHO_N " 12: DAS \$abs_srcdir/das-testsuite/test.17.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "12. DASTest.at:42: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:59: diff -b -B \$abs_srcdir/das-testsuite/test.30.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.30.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stderr" "DASTest.at:59"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:59"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_29
+#AT_START_30
+at_fn_group_banner 30 'DASTest.at:60' \
+  "DAS \$abs_srcdir/das-testsuite/test.31.das" "      "
+at_xfail=no
+(
+  $as_echo "30. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.17.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.31.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:42: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.17.das || true"
-echo DASTest.at:42 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.17.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.17.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.17.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:60: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.31.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.31.das || true" "DASTest.at:60"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.31.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:42: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:60"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:60: diff -b -B \$abs_srcdir/das-testsuite/test.31.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.31.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stderr" "DASTest.at:60"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:60"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_30
+#AT_START_31
+at_fn_group_banner 31 'DASTest.at:61' \
+  "DAS \$abs_srcdir/das-testsuite/test.32.das" "      "
+at_xfail=no
+(
+  $as_echo "31. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.32.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:61: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.32.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.32.das || true" "DASTest.at:61"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.32.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:61"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:42: diff -b -B \$abs_srcdir/das-testsuite/test.17.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.17.das.base stderr"
-echo DASTest.at:42 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.17.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:61: diff -b -B \$abs_srcdir/das-testsuite/test.32.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.32.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stderr" "DASTest.at:61"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:42: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:61"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_31
+#AT_START_32
+at_fn_group_banner 32 'DASTest.at:62' \
+  "DAS \$abs_srcdir/das-testsuite/test.33.das" "      "
+at_xfail=no
+(
+  $as_echo "32. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.33.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:62: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.33.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.33.das || true" "DASTest.at:62"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.33.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:62"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  13 ) # 13. DASTest.at:43: DAS $abs_srcdir/das-testsuite/test.18.das
-    at_setup_line='DASTest.at:43'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.18.das"
-    $at_quiet $ECHO_N " 13: DAS \$abs_srcdir/das-testsuite/test.18.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "13. DASTest.at:43: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:62: diff -b -B \$abs_srcdir/das-testsuite/test.33.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.33.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stderr" "DASTest.at:62"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:62"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_32
+#AT_START_33
+at_fn_group_banner 33 'DASTest.at:63' \
+  "DAS \$abs_srcdir/das-testsuite/test.34.das" "      "
+at_xfail=no
+(
+  $as_echo "33. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.18.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.34.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:43: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.18.das || true"
-echo DASTest.at:43 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.18.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.18.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.18.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:63: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.34.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.34.das || true" "DASTest.at:63"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.34.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:43: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:63"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:63: diff -b -B \$abs_srcdir/das-testsuite/test.34.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.34.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stderr" "DASTest.at:63"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:63"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_33
+#AT_START_34
+at_fn_group_banner 34 'DASTest.at:64' \
+  "DAS \$abs_srcdir/das-testsuite/test.35.das" "      "
+at_xfail=no
+(
+  $as_echo "34. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.35.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:64: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.35.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.35.das || true" "DASTest.at:64"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.35.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:64"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:43: diff -b -B \$abs_srcdir/das-testsuite/test.18.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.18.das.base stderr"
-echo DASTest.at:43 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.18.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:64: diff -b -B \$abs_srcdir/das-testsuite/test.35.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.35.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stderr" "DASTest.at:64"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:43: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:64"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_34
+#AT_START_35
+at_fn_group_banner 35 'DASTest.at:65' \
+  "DAS \$abs_srcdir/das-testsuite/test.4.das" "       "
+at_xfail=no
+(
+  $as_echo "35. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.4.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:65: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.4.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.4.das || true" "DASTest.at:65"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.4.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:65"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  14 ) # 14. DASTest.at:44: DAS $abs_srcdir/das-testsuite/test.19.das
-    at_setup_line='DASTest.at:44'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.19.das"
-    $at_quiet $ECHO_N " 14: DAS \$abs_srcdir/das-testsuite/test.19.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "14. DASTest.at:44: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:65: diff -b -B \$abs_srcdir/das-testsuite/test.4.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.4.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stderr" "DASTest.at:65"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:65"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_35
+#AT_START_36
+at_fn_group_banner 36 'DASTest.at:66' \
+  "DAS \$abs_srcdir/das-testsuite/test.5.das" "       "
+at_xfail=no
+(
+  $as_echo "36. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.19.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.5.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:44: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.19.das || true"
-echo DASTest.at:44 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.19.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.19.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.19.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:66: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.5.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.5.das || true" "DASTest.at:66"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.5.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:44: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:66"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:66: diff -b -B \$abs_srcdir/das-testsuite/test.5.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.5.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stderr" "DASTest.at:66"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:66"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_36
+#AT_START_37
+at_fn_group_banner 37 'DASTest.at:67' \
+  "DAS \$abs_srcdir/das-testsuite/test.6.das" "       "
+at_xfail=no
+(
+  $as_echo "37. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.6.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:67: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.6.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.6.das || true" "DASTest.at:67"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.6.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:67"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:44: diff -b -B \$abs_srcdir/das-testsuite/test.19.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.19.das.base stderr"
-echo DASTest.at:44 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.19.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:67: diff -b -B \$abs_srcdir/das-testsuite/test.6.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.6.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stderr" "DASTest.at:67"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:44: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:67"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_37
+#AT_START_38
+at_fn_group_banner 38 'DASTest.at:68' \
+  "DAS \$abs_srcdir/das-testsuite/test.7.das" "       "
+at_xfail=no
+(
+  $as_echo "38. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.7.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:68: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.7.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.7.das || true" "DASTest.at:68"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.7.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:68"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  15 ) # 15. DASTest.at:45: DAS $abs_srcdir/das-testsuite/test.1a.das
-    at_setup_line='DASTest.at:45'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.1a.das"
-    $at_quiet $ECHO_N " 15: DAS \$abs_srcdir/das-testsuite/test.1a.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "15. DASTest.at:45: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:68: diff -b -B \$abs_srcdir/das-testsuite/test.7.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.7.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stderr" "DASTest.at:68"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:68"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_38
+#AT_START_39
+at_fn_group_banner 39 'DASTest.at:69' \
+  "DAS \$abs_srcdir/das-testsuite/test.8.das" "       "
+at_xfail=no
+(
+  $as_echo "39. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.1a.das needs to be true whether the
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.8.das needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:45: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.1a.das || true"
-echo DASTest.at:45 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1a.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1a.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.1a.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:69: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.8.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.8.das || true" "DASTest.at:69"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.8.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:45: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:69: diff -b -B \$abs_srcdir/das-testsuite/test.8.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.8.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stderr" "DASTest.at:69"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_39
+#AT_START_40
+at_fn_group_banner 40 'DASTest.at:70' \
+  "DAS \$abs_srcdir/das-testsuite/test.9.das" "       "
+at_xfail=no
+(
+  $as_echo "40. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.9.das needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:70: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.9.das || true"
+at_fn_check_prepare_dynamic "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.9.das || true" "DASTest.at:70"
+( $at_check_trace; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.9.das || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:70"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:45: diff -b -B \$abs_srcdir/das-testsuite/test.1a.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.1a.das.base stderr"
-echo DASTest.at:45 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.1a.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DASTest.at:70: diff -b -B \$abs_srcdir/das-testsuite/test.9.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.9.das.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stderr" "DASTest.at:70"
+( $at_check_trace; diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:45: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  16 ) # 16. DASTest.at:46: DAS $abs_srcdir/das-testsuite/test.2.das
-    at_setup_line='DASTest.at:46'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.2.das"
-    $at_quiet $ECHO_N " 16: DAS \$abs_srcdir/das-testsuite/test.2.das      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "16. DASTest.at:46: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.2.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:46: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.2.das || true"
-echo DASTest.at:46 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.2.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.2.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.2.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:46: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:46: diff -b -B \$abs_srcdir/das-testsuite/test.2.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.2.das.base stderr"
-echo DASTest.at:46 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.2.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:46: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  17 ) # 17. DASTest.at:47: DAS $abs_srcdir/das-testsuite/test.20.das
-    at_setup_line='DASTest.at:47'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.20.das"
-    $at_quiet $ECHO_N " 17: DAS \$abs_srcdir/das-testsuite/test.20.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "17. DASTest.at:47: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.20.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:47: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.20.das || true"
-echo DASTest.at:47 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.20.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.20.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.20.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:47: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:47: diff -b -B \$abs_srcdir/das-testsuite/test.20.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.20.das.base stderr"
-echo DASTest.at:47 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.20.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:47: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  18 ) # 18. DASTest.at:48: DAS $abs_srcdir/das-testsuite/test.21.das
-    at_setup_line='DASTest.at:48'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.21.das"
-    $at_quiet $ECHO_N " 18: DAS \$abs_srcdir/das-testsuite/test.21.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "18. DASTest.at:48: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.21.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:48: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.21.das || true"
-echo DASTest.at:48 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.21.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.21.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.21.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:48: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:48: diff -b -B \$abs_srcdir/das-testsuite/test.21.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.21.das.base stderr"
-echo DASTest.at:48 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.21.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:48: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  19 ) # 19. DASTest.at:49: DAS $abs_srcdir/das-testsuite/test.22.das
-    at_setup_line='DASTest.at:49'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.22.das"
-    $at_quiet $ECHO_N " 19: DAS \$abs_srcdir/das-testsuite/test.22.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "19. DASTest.at:49: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.22.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:49: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.22.das || true"
-echo DASTest.at:49 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.22.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.22.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.22.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:49: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:49: diff -b -B \$abs_srcdir/das-testsuite/test.22.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.22.das.base stderr"
-echo DASTest.at:49 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.22.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:49: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  20 ) # 20. DASTest.at:50: DAS $abs_srcdir/das-testsuite/test.23.das
-    at_setup_line='DASTest.at:50'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.23.das"
-    $at_quiet $ECHO_N " 20: DAS \$abs_srcdir/das-testsuite/test.23.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "20. DASTest.at:50: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.23.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:50: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.23.das || true"
-echo DASTest.at:50 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.23.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.23.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.23.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:50: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:50: diff -b -B \$abs_srcdir/das-testsuite/test.23.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.23.das.base stderr"
-echo DASTest.at:50 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.23.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:50: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  21 ) # 21. DASTest.at:51: DAS $abs_srcdir/das-testsuite/test.24.das
-    at_setup_line='DASTest.at:51'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.24.das"
-    $at_quiet $ECHO_N " 21: DAS \$abs_srcdir/das-testsuite/test.24.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "21. DASTest.at:51: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.24.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:51: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.24.das || true"
-echo DASTest.at:51 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.24.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.24.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.24.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:51: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:51: diff -b -B \$abs_srcdir/das-testsuite/test.24.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.24.das.base stderr"
-echo DASTest.at:51 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.24.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:51: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  22 ) # 22. DASTest.at:52: DAS $abs_srcdir/das-testsuite/test.25.das
-    at_setup_line='DASTest.at:52'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.25.das"
-    $at_quiet $ECHO_N " 22: DAS \$abs_srcdir/das-testsuite/test.25.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "22. DASTest.at:52: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.25.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:52: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.25.das || true"
-echo DASTest.at:52 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.25.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.25.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.25.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:52: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:52: diff -b -B \$abs_srcdir/das-testsuite/test.25.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.25.das.base stderr"
-echo DASTest.at:52 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.25.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:52: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  23 ) # 23. DASTest.at:53: DAS $abs_srcdir/das-testsuite/test.26.das
-    at_setup_line='DASTest.at:53'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.26.das"
-    $at_quiet $ECHO_N " 23: DAS \$abs_srcdir/das-testsuite/test.26.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "23. DASTest.at:53: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.26.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:53: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.26.das || true"
-echo DASTest.at:53 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.26.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.26.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.26.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:53: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:53: diff -b -B \$abs_srcdir/das-testsuite/test.26.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.26.das.base stderr"
-echo DASTest.at:53 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.26.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:53: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  24 ) # 24. DASTest.at:54: DAS $abs_srcdir/das-testsuite/test.27.das
-    at_setup_line='DASTest.at:54'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.27.das"
-    $at_quiet $ECHO_N " 24: DAS \$abs_srcdir/das-testsuite/test.27.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "24. DASTest.at:54: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.27.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:54: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.27.das || true"
-echo DASTest.at:54 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.27.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.27.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.27.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:54: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:54: diff -b -B \$abs_srcdir/das-testsuite/test.27.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.27.das.base stderr"
-echo DASTest.at:54 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.27.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:54: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  25 ) # 25. DASTest.at:55: DAS $abs_srcdir/das-testsuite/test.28.das
-    at_setup_line='DASTest.at:55'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.28.das"
-    $at_quiet $ECHO_N " 25: DAS \$abs_srcdir/das-testsuite/test.28.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "25. DASTest.at:55: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.28.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:55: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.28.das || true"
-echo DASTest.at:55 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.28.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.28.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.28.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:55: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:55: diff -b -B \$abs_srcdir/das-testsuite/test.28.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.28.das.base stderr"
-echo DASTest.at:55 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.28.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:55: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  26 ) # 26. DASTest.at:56: DAS $abs_srcdir/das-testsuite/test.29.das
-    at_setup_line='DASTest.at:56'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.29.das"
-    $at_quiet $ECHO_N " 26: DAS \$abs_srcdir/das-testsuite/test.29.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "26. DASTest.at:56: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.29.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:56: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.29.das || true"
-echo DASTest.at:56 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.29.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.29.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.29.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:56: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:56: diff -b -B \$abs_srcdir/das-testsuite/test.29.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.29.das.base stderr"
-echo DASTest.at:56 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.29.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:56: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  27 ) # 27. DASTest.at:57: DAS $abs_srcdir/das-testsuite/test.3.das
-    at_setup_line='DASTest.at:57'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.3.das"
-    $at_quiet $ECHO_N " 27: DAS \$abs_srcdir/das-testsuite/test.3.das      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "27. DASTest.at:57: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.3.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:57: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.3.das || true"
-echo DASTest.at:57 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:57: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:57: diff -b -B \$abs_srcdir/das-testsuite/test.3.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.3.das.base stderr"
-echo DASTest.at:57 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:57: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  28 ) # 28. DASTest.at:58: DAS $abs_srcdir/das-testsuite/test.3.Z.das
-    at_setup_line='DASTest.at:58'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.3.Z.das"
-    $at_quiet $ECHO_N " 28: DAS \$abs_srcdir/das-testsuite/test.3.Z.das    $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "28. DASTest.at:58: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.3.Z.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:58: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.3.Z.das || true"
-echo DASTest.at:58 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.Z.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.Z.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.3.Z.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:58: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:58: diff -b -B \$abs_srcdir/das-testsuite/test.3.Z.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.3.Z.das.base stderr"
-echo DASTest.at:58 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.3.Z.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:58: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  29 ) # 29. DASTest.at:59: DAS $abs_srcdir/das-testsuite/test.30.das
-    at_setup_line='DASTest.at:59'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.30.das"
-    $at_quiet $ECHO_N " 29: DAS \$abs_srcdir/das-testsuite/test.30.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "29. DASTest.at:59: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.30.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:59: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.30.das || true"
-echo DASTest.at:59 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.30.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.30.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.30.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:59: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:59: diff -b -B \$abs_srcdir/das-testsuite/test.30.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.30.das.base stderr"
-echo DASTest.at:59 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.30.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:59: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  30 ) # 30. DASTest.at:60: DAS $abs_srcdir/das-testsuite/test.31.das
-    at_setup_line='DASTest.at:60'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.31.das"
-    $at_quiet $ECHO_N " 30: DAS \$abs_srcdir/das-testsuite/test.31.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "30. DASTest.at:60: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.31.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:60: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.31.das || true"
-echo DASTest.at:60 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.31.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.31.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.31.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:60: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:60: diff -b -B \$abs_srcdir/das-testsuite/test.31.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.31.das.base stderr"
-echo DASTest.at:60 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.31.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:60: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  31 ) # 31. DASTest.at:61: DAS $abs_srcdir/das-testsuite/test.32.das
-    at_setup_line='DASTest.at:61'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.32.das"
-    $at_quiet $ECHO_N " 31: DAS \$abs_srcdir/das-testsuite/test.32.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "31. DASTest.at:61: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.32.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:61: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.32.das || true"
-echo DASTest.at:61 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.32.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.32.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.32.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:61: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:61: diff -b -B \$abs_srcdir/das-testsuite/test.32.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.32.das.base stderr"
-echo DASTest.at:61 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.32.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:61: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  32 ) # 32. DASTest.at:62: DAS $abs_srcdir/das-testsuite/test.33.das
-    at_setup_line='DASTest.at:62'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.33.das"
-    $at_quiet $ECHO_N " 32: DAS \$abs_srcdir/das-testsuite/test.33.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "32. DASTest.at:62: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.33.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:62: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.33.das || true"
-echo DASTest.at:62 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.33.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.33.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.33.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:62: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:62: diff -b -B \$abs_srcdir/das-testsuite/test.33.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.33.das.base stderr"
-echo DASTest.at:62 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.33.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:62: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  33 ) # 33. DASTest.at:63: DAS $abs_srcdir/das-testsuite/test.34.das
-    at_setup_line='DASTest.at:63'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.34.das"
-    $at_quiet $ECHO_N " 33: DAS \$abs_srcdir/das-testsuite/test.34.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "33. DASTest.at:63: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.34.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:63: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.34.das || true"
-echo DASTest.at:63 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.34.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.34.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.34.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:63: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:63: diff -b -B \$abs_srcdir/das-testsuite/test.34.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.34.das.base stderr"
-echo DASTest.at:63 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.34.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:63: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  34 ) # 34. DASTest.at:64: DAS $abs_srcdir/das-testsuite/test.35.das
-    at_setup_line='DASTest.at:64'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.35.das"
-    $at_quiet $ECHO_N " 34: DAS \$abs_srcdir/das-testsuite/test.35.das     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "34. DASTest.at:64: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.35.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:64: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.35.das || true"
-echo DASTest.at:64 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.35.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.35.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.35.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:64: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:64: diff -b -B \$abs_srcdir/das-testsuite/test.35.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.35.das.base stderr"
-echo DASTest.at:64 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.35.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:64: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  35 ) # 35. DASTest.at:65: DAS $abs_srcdir/das-testsuite/test.4.das
-    at_setup_line='DASTest.at:65'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.4.das"
-    $at_quiet $ECHO_N " 35: DAS \$abs_srcdir/das-testsuite/test.4.das      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "35. DASTest.at:65: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.4.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:65: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.4.das || true"
-echo DASTest.at:65 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.4.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.4.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.4.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:65: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:65: diff -b -B \$abs_srcdir/das-testsuite/test.4.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.4.das.base stderr"
-echo DASTest.at:65 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.4.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:65: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  36 ) # 36. DASTest.at:66: DAS $abs_srcdir/das-testsuite/test.5.das
-    at_setup_line='DASTest.at:66'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.5.das"
-    $at_quiet $ECHO_N " 36: DAS \$abs_srcdir/das-testsuite/test.5.das      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "36. DASTest.at:66: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.5.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:66: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.5.das || true"
-echo DASTest.at:66 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.5.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.5.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.5.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:66: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:66: diff -b -B \$abs_srcdir/das-testsuite/test.5.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.5.das.base stderr"
-echo DASTest.at:66 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.5.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:66: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  37 ) # 37. DASTest.at:67: DAS $abs_srcdir/das-testsuite/test.6.das
-    at_setup_line='DASTest.at:67'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.6.das"
-    $at_quiet $ECHO_N " 37: DAS \$abs_srcdir/das-testsuite/test.6.das      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "37. DASTest.at:67: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.6.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:67: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.6.das || true"
-echo DASTest.at:67 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.6.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.6.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.6.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:67: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:67: diff -b -B \$abs_srcdir/das-testsuite/test.6.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.6.das.base stderr"
-echo DASTest.at:67 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.6.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:67: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  38 ) # 38. DASTest.at:68: DAS $abs_srcdir/das-testsuite/test.7.das
-    at_setup_line='DASTest.at:68'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.7.das"
-    $at_quiet $ECHO_N " 38: DAS \$abs_srcdir/das-testsuite/test.7.das      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "38. DASTest.at:68: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.7.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:68: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.7.das || true"
-echo DASTest.at:68 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.7.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.7.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.7.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:68: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:68: diff -b -B \$abs_srcdir/das-testsuite/test.7.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.7.das.base stderr"
-echo DASTest.at:68 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.7.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:68: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  39 ) # 39. DASTest.at:69: DAS $abs_srcdir/das-testsuite/test.8.das
-    at_setup_line='DASTest.at:69'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.8.das"
-    $at_quiet $ECHO_N " 39: DAS \$abs_srcdir/das-testsuite/test.8.das      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "39. DASTest.at:69: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.8.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:69: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.8.das || true"
-echo DASTest.at:69 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.8.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.8.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.8.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:69: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:69: diff -b -B \$abs_srcdir/das-testsuite/test.8.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.8.das.base stderr"
-echo DASTest.at:69 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.8.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:69: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  40 ) # 40. DASTest.at:70: DAS $abs_srcdir/das-testsuite/test.9.das
-    at_setup_line='DASTest.at:70'
-    at_desc="DAS \$abs_srcdir/das-testsuite/test.9.das"
-    $at_quiet $ECHO_N " 40: DAS \$abs_srcdir/das-testsuite/test.9.das      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "40. DASTest.at:70: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/das-test -p < $abs_srcdir/das-testsuite/test.9.das needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DASTest.at:70: \$abs_builddir/das-test -p < \$abs_srcdir/das-testsuite/test.9.das || true"
-echo DASTest.at:70 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.9.das || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.9.das || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/das-test -p < $abs_srcdir/das-testsuite/test.9.das || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:70: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DASTest.at:70: diff -b -B \$abs_srcdir/das-testsuite/test.9.das.base stdout || diff -b -B \$abs_srcdir/das-testsuite/test.9.das.base stderr"
-echo DASTest.at:70 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stdout || diff -b -B $abs_srcdir/das-testsuite/test.9.das.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DASTest.at:70: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-
-  * )
-    echo "$as_me: no such test group: $at_group" >&2
-    continue
-    ;;
-  esac
-
-  # Be sure to come back to the suite directory, in particular
-  # since below we might `rm' the group directory we are in currently.
-  cd "$at_suite_dir"
-
-  case $at_group in
-    banner-*) ;;
-    *)
-      if test ! -f "$at_check_line_file"; then
-	sed "s/^ */$as_me: warning: /" <<_ATEOF
-	A failure happened in a test group before any test could be
-	run. This means that test suite is improperly designed.  Please
-	report this failure to <opendap-tech at opendap.org>.
-_ATEOF
-	echo "$at_setup_line" >"$at_check_line_file"
-      fi
-      at_group_count=`expr 1 + $at_group_count`
-      $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
-      echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log"
-      case $at_xfail:$at_status in
-	yes:0)
-	    at_msg="UNEXPECTED PASS"
-	    at_xpass_list="$at_xpass_list $at_group"
-	    at_errexit=$at_errexit_p
-	    ;;
-	no:0)
-	    at_msg="ok"
-	    at_pass_list="$at_pass_list $at_group"
-	    at_errexit=false
-	    ;;
-	*:77)
-	    at_msg='skipped ('`cat "$at_check_line_file"`')'
-	    at_skip_list="$at_skip_list $at_group"
-	    at_errexit=false
-	    ;;
-	yes:*)
-	    at_msg='expected failure ('`cat "$at_check_line_file"`')'
-	    at_xfail_list="$at_xfail_list $at_group"
-	    at_errexit=false
-	    ;;
-	no:*)
-	    at_msg='FAILED ('`cat "$at_check_line_file"`')'
-	    at_fail_list="$at_fail_list $at_group"
-	    at_errexit=$at_errexit_p
-	    ;;
-      esac
-      # Make sure there is a separator even with long titles.
-      echo " $at_msg"
-      at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
-      case $at_status in
-	0|77)
-	  # $at_times_file is only available if the group succeeded.
-	  # We're not including the group log, so the success message
-	  # is written in the global log separately.  But we also
-	  # write to the group log in case they're using -d.
-	  if test -f "$at_times_file"; then
-	    at_log_msg="$at_log_msg	("`sed 1d "$at_times_file"`')'
-	    rm -f "$at_times_file"
-          fi
-	  echo "$at_log_msg" >> "$at_group_log"
-	  echo "$at_log_msg" >&5
-
-	  # Cleanup the group directory, unless the user wants the files.
-	  if $at_debug_p ; then
-	    	  {
-	    echo "#! /bin/sh"
-	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
-	    echo "cd '$at_dir'"
-	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
-	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
-	    echo 'exit 1'
-	  } >$at_group_dir/run
-	  chmod +x $at_group_dir/run
-
-	  elif test -d "$at_group_dir"; then
-	    find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
-	    rm -fr "$at_group_dir"
-	  fi
-	  ;;
-	*)
-	  # Upon failure, include the log into the testsuite's global
-	  # log.  The failure message is written in the group log.  It
-	  # is later included in the global log.
-	  echo "$at_log_msg" >> "$at_group_log"
-
-	  # Upon failure, keep the group directory for autopsy, and
-	  # create the debugging script.
-	  	  {
-	    echo "#! /bin/sh"
-	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
-	    echo "cd '$at_dir'"
-	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
-	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
-	    echo 'exit 1'
-	  } >$at_group_dir/run
-	  chmod +x $at_group_dir/run
-
-	  $at_errexit && break
-	  ;;
-      esac
-      ;;
-  esac
-done
-
-# Back to the top directory.
-cd "$at_dir"
-
-# Compute the duration of the suite.
-at_stop_date=`date`
-at_stop_time=`date +%s 2>/dev/null`
-echo "$as_me: ending at: $at_stop_date" >&5
-case $at_start_time,$at_stop_time in
-  [0-9]*,[0-9]*)
-    at_duration_s=`expr $at_stop_time - $at_start_time`
-    at_duration_m=`expr $at_duration_s / 60`
-    at_duration_h=`expr $at_duration_m / 60`
-    at_duration_s=`expr $at_duration_s % 60`
-    at_duration_m=`expr $at_duration_m % 60`
-    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
-    echo "$as_me: test suite duration: $at_duration" >&5
-    ;;
-esac
-
-# Wrap up the test suite with summary statistics.
-at_skip_count=`set dummy $at_skip_list; shift; echo $#`
-at_fail_count=`set dummy $at_fail_list; shift; echo $#`
-at_xpass_count=`set dummy $at_xpass_list; shift; echo $#`
-at_xfail_count=`set dummy $at_xfail_list; shift; echo $#`
-
-at_run_count=`expr $at_group_count - $at_skip_count`
-at_unexpected_count=`expr $at_xpass_count + $at_fail_count`
-at_total_fail_count=`expr $at_xfail_count + $at_fail_count`
-
-echo
-cat <<\_ASBOX
-## ------------- ##
-## Test results. ##
-## ------------- ##
-_ASBOX
-echo
-{
-  echo
-  cat <<\_ASBOX
-## ------------- ##
-## Test results. ##
-## ------------- ##
-_ASBOX
-  echo
-} >&5
-
-if test $at_run_count = 1; then
-  at_result="1 test"
-  at_were=was
-else
-  at_result="$at_run_count tests"
-  at_were=were
-fi
-if $at_errexit_p && test $at_unexpected_count != 0; then
-  if test $at_xpass_count = 1; then
-    at_result="$at_result $at_were run, one passed"
-  else
-    at_result="$at_result $at_were run, one failed"
-  fi
-  at_result="$at_result unexpectedly and inhibited subsequent tests."
-else
-  # Don't you just love exponential explosion of the number of cases?
-  case $at_xpass_count:$at_fail_count:$at_xfail_count in
-    # So far, so good.
-    0:0:0) at_result="$at_result $at_were successful." ;;
-    0:0:*) at_result="$at_result behaved as expected." ;;
-
-    # Some unexpected failures
-    0:*:0) at_result="$at_result $at_were run,
-$at_fail_count failed unexpectedly." ;;
-
-    # Some failures, both expected and unexpected
-    0:*:1) at_result="$at_result $at_were run,
-$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
-    0:*:*) at_result="$at_result $at_were run,
-$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
-
-    # No unexpected failures, but some xpasses
-    *:0:*) at_result="$at_result $at_were run,
-$at_xpass_count passed unexpectedly." ;;
-
-    # No expected failures, but failures and xpasses
-    *:1:0) at_result="$at_result $at_were run,
-$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
-    *:*:0) at_result="$at_result $at_were run,
-$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
-
-    # All of them.
-    *:*:1) at_result="$at_result $at_were run,
-$at_xpass_count passed unexpectedly,
-$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
-    *:*:*) at_result="$at_result $at_were run,
-$at_xpass_count passed unexpectedly,
-$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
-  esac
-
-  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
-    at_result="All $at_result"
-  fi
-fi
-
-# Now put skips in the mix.
-case $at_skip_count in
-  0) ;;
-  1) at_result="$at_result
-1 test was skipped." ;;
-  *) at_result="$at_result
-$at_skip_count tests were skipped." ;;
-esac
-
-if test $at_unexpected_count = 0; then
-  echo "$at_result"
-  echo "$at_result" >&5
-else
-  echo "ERROR: $at_result" >&2
-  echo "ERROR: $at_result" >&5
-  {
-    echo
-    cat <<\_ASBOX
-## ------------------------ ##
-## Summary of the failures. ##
-## ------------------------ ##
-_ASBOX
-
-    # Summary of failed and skipped tests.
-    if test $at_fail_count != 0; then
-      echo "Failed tests:"
-      $SHELL "$0" $at_fail_list --list
-      echo
-    fi
-    if test $at_skip_count != 0; then
-      echo "Skipped tests:"
-      $SHELL "$0" $at_skip_list --list
-      echo
-    fi
-    if test $at_xpass_count != 0; then
-      echo "Unexpected passes:"
-      $SHELL "$0" $at_xpass_list --list
-      echo
-    fi
-    if test $at_fail_count != 0; then
-      cat <<\_ASBOX
-## ---------------------- ##
-## Detailed failed tests. ##
-## ---------------------- ##
-_ASBOX
-      echo
-      for at_group in $at_fail_list
-      do
-        at_group_normalized=$at_group
-
-  while :; do
-    case $at_group_normalized in #(
-    $at_format*) break;;
-    esac
-    at_group_normalized=0$at_group_normalized
-  done
-
-        cat "$at_suite_dir/$at_group_normalized/$as_me.log"
-        echo
-      done
-      echo
-    fi
-    if test -n "$at_top_srcdir"; then
-      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## ${at_top_build_prefix}config.log ##
-_ASBOX
-      sed 's/^/| /' ${at_top_build_prefix}config.log
-      echo
-    fi
-  } >&5
-
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## $as_me.log was created. ##
-_ASBOX
-
-  echo
-  echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:"
-  echo
-  echo "   To: <opendap-tech at opendap.org>"
-  echo "   Subject: [libdap 3.11.6] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}"
-  echo
-  if test $at_debug_p = false; then
-    echo
-    echo 'You may investigate any problem if you feel able to do so, in which'
-    echo 'case the test suite provides a good starting point.  Its output may'
-    echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
-    echo
-  fi
-    exit 1
-fi
-
-exit 0
-
-
-
+at_fn_check_status 0 $at_status "$at_srcdir/DASTest.at:70"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_40
diff --git a/tests/DDSTest b/tests/DDSTest
index abb5056..2d20b0a 100755
--- a/tests/DDSTest
+++ b/tests/DDSTest
@@ -1,58 +1,78 @@
 #! /bin/sh
+# Generated from DDSTest.at by GNU Autoconf 2.69.
+#
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
 # This test suite is free software; the Free Software Foundation gives
 # unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
   else
-    PATH_SEPARATOR=:
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
   fi
-  rm -f conf$$.sh
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
 
 
@@ -61,20 +81,19 @@ fi
 # there to prevent editors from complaining about space-tab.
 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
 # splitting by setting IFS to empty value.)
-as_nl='
-'
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -85,354 +104,341 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
 
 # CDPATH.
-$as_unset CDPATH
-
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
 else
-  as_have_required=no
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
 fi
-
-  if test $as_have_required = yes && 	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
 
 exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_have_required=no
 fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
 else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  case $as_dir in
+  as_found=:
+  case $as_dir in #(
 	 /*)
 	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
 	   done;;
        esac
+  as_found=false
 done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
 IFS=$as_save_IFS
 
 
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
 fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
 fi
-
 fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
 
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-        done
-        export CONFIG_SHELL
-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
 
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
 
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
 
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
-fi
 
-fi
+} # as_fn_mkdir_p
 
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
 
 
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
 
-exitcode=0
-if as_func_success; then
-  :
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
 else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
+  as_expr=false
 fi
 
-if as_func_ret_success; then
-  :
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
 else
-  exitcode=1
-  echo as_func_ret_success failed.
+  as_basename=false
 fi
 
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_dirname=false
 fi
 
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf at gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
-}
-
-
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
 
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
   sed -n '
     p
     /[$]LINENO/=
@@ -449,9 +455,12 @@ test \$exitcode = 0") || {
       s/-\n.*//
     ' >$as_me.lineno &&
   chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -460,84 +469,55 @@ test \$exitcode = 0") || {
   exit
 }
 
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
 -n*)
-  case `echo 'x\c'` in
+  case `echo 'xy\c'` in
   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
 else
   rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -547,32 +527,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 
+
+
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # How were we run?
 at_cli_args="$@"
 
-# Load the config file.
-for at_file in atconfig atlocal
-do
-  test -r $at_file || continue
-  . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
-   { (exit 1); exit 1; }; }
-done
-
-# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
-: ${at_top_build_prefix=$at_top_builddir}
-
-# atconfig delivers names relative to the directory the test suite is
-# in, but the groups themselves are run in testsuite-dir/group-dir.
-if test -n "$at_top_srcdir"; then
-  builddir=../..
-  for at_dir in srcdir top_srcdir top_build_prefix
-  do
-    at_val=`eval echo '${'at_$at_dir'}'`
-    eval "$at_dir=\$at_val/../.."
-  done
-fi
 
 # Not all shells have the 'times' builtin; the subshell is needed to make
 # sure we discard the 'times: not found' message from the shell.
@@ -583,9 +544,14 @@ at_times_p=false
 at_debug_args=
 # -e sets to true
 at_errexit_p=false
-# Shall we be verbose?
+# Shall we be verbose?  ':' means no, empty means yes.
 at_verbose=:
-at_quiet=echo
+at_quiet=
+# Running several jobs in parallel, 0 means as many as test groups.
+at_jobs=1
+at_traceon=:
+at_trace_echo=:
+at_check_filter_trace=:
 
 # Shall we keep the debug scripts?  Must be `:' when the suite is
 # run by a debug script, so that the script doesn't remove itself.
@@ -596,31 +562,29 @@ at_help_p=false
 at_version_p=false
 # List test groups?
 at_list_p=false
+# --clean
+at_clean=false
 # Test groups to run
 at_groups=
+# Whether to rerun failed tests.
+at_recheck=
+# Whether a write failure occurred
+at_write_fail=0
 
-# The directory we are in.
+# The directory we run the suite in.  Default to . if no -C option.
 at_dir=`pwd`
-# The directory the whole suite works in.
-# Should be absolutely to let the user `cd' at will.
-at_suite_dir=$at_dir/$as_me.dir
-# The file containing the suite.
-at_suite_log=$at_dir/$as_me.log
-# The file containing the location of the last AT_CHECK.
-at_check_line_file=$at_suite_dir/at-check-line
-# The file containing the exit status of the last command.
-at_status_file=$at_suite_dir/at-status
-# The files containing the output of the tested commands.
-at_stdout=$at_suite_dir/at-stdout
-at_stder1=$at_suite_dir/at-stder1
-at_stderr=$at_suite_dir/at-stderr
-# The file containing dates.
-at_times_file=$at_suite_dir/at-times
+# An absolute reference to this testsuite script.
+case $as_myself in
+  [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
+  * ) at_myself=$at_dir/$as_myself ;;
+esac
+# Whether -C is in effect.
+at_change_dir=false
 
+# Whether to enable colored test results.
+at_color=no
 # List of the tested programs.
 at_tested=''
-# List of the all the test groups.
-at_groups_all=' 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'
 # As many question marks as there are digits in the last test group number.
 # Used to normalize the test group numbers so that `ls' lists them in
 # numerical order.
@@ -656,6 +620,32 @@ at_help_all="1;DDSTest.at:34;DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked
 28;DDSTest.at:61;DDS \$abs_srcdir/dds-testsuite/test.8.dds;dds;
 29;DDSTest.at:62;DDS \$abs_srcdir/dds-testsuite/test.9.dds;dds;
 "
+# List of the all the test groups.
+at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
+
+# at_fn_validate_ranges NAME...
+# -----------------------------
+# Validate and normalize the test group number contained in each variable
+# NAME. Leading zeroes are treated as decimal.
+at_fn_validate_ranges ()
+{
+  for at_grp
+  do
+    eval at_value=\$$at_grp
+    if test $at_value -lt 1 || test $at_value -gt 29; then
+      $as_echo "invalid test group: $at_value" >&2
+      exit 1
+    fi
+    case $at_value in
+      0*) # We want to treat leading 0 as decimal, like expr and test, but
+	  # AS_VAR_ARITH treats it as octal if it uses $(( )).
+	  # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
+	  # expr fork, but it is not worth the effort to determine if the
+	  # shell supports XSI when the user can just avoid leading 0.
+	  eval $at_grp='`expr $at_value + 0`' ;;
+    esac
+  done
+}
 
 at_prev=
 for at_option
@@ -667,8 +657,8 @@ do
   fi
 
   case $at_option in
-  *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;;
-  *)   at_optarg= ;;
+  *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
+  *)    at_optarg= ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -687,10 +677,20 @@ do
 	;;
 
     --clean | -c )
-	test -d "$at_suite_dir" &&
-	  find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
-	rm -f -r "$at_suite_dir" "$at_suite_log"
-	exit 0
+	at_clean=:
+	;;
+
+    --color )
+	at_color=always
+	;;
+    --color=* )
+	case $at_optarg in
+	no | never | none) at_color=never ;;
+	auto | tty | if-tty) at_color=auto ;;
+	always | yes | force) at_color=always ;;
+	*) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
+	   as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
+	esac
 	;;
 
     --debug | -d )
@@ -703,30 +703,35 @@ do
 	;;
 
     --verbose | -v )
-	at_verbose=echo; at_quiet=:
+	at_verbose=; at_quiet=:
 	;;
 
     --trace | -x )
-	at_traceon='set -x'; at_traceoff='set +x'
+	at_traceon='set -x'
+	at_trace_echo=echo
+	at_check_filter_trace=at_fn_filter_trace
 	;;
 
     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
-	at_groups="$at_groups$at_option "
+	at_fn_validate_ranges at_option
+	as_fn_append at_groups "$at_option$as_nl"
 	;;
 
     # Ranges
     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
 	at_range_start=`echo $at_option |tr -d X-`
-	at_range=`echo " $at_groups_all " | \
-	  sed -e 's/^.* \('$at_range_start' \)/\1/'`
-	at_groups="$at_groups$at_range "
+	at_fn_validate_ranges at_range_start
+	at_range=`$as_echo "$at_groups_all" | \
+	  sed -ne '/^'$at_range_start'$/,$p'`
+	as_fn_append at_groups "$at_range$as_nl"
 	;;
 
     -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
 	at_range_end=`echo $at_option |tr -d X-`
-	at_range=`echo " $at_groups_all " | \
-	  sed -e 's/\( '$at_range_end'\) .*$/\1/'`
-	at_groups="$at_groups$at_range "
+	at_fn_validate_ranges at_range_end
+	at_range=`$as_echo "$at_groups_all" | \
+	  sed -ne '1,/^'$at_range_end'$/p'`
+	as_fn_append at_groups "$at_range$as_nl"
 	;;
 
     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
@@ -742,10 +747,38 @@ do
 	  at_range_end=$at_range_start
 	  at_range_start=$at_tmp
 	fi
-	at_range=`echo " $at_groups_all " | \
-	  sed -e 's/^.*\( '$at_range_start' \)/\1/' \
-	      -e 's/\( '$at_range_end'\) .*$/\1/'`
-	at_groups="$at_groups$at_range "
+	at_fn_validate_ranges at_range_start at_range_end
+	at_range=`$as_echo "$at_groups_all" | \
+	  sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
+	as_fn_append at_groups "$at_range$as_nl"
+	;;
+
+    # Directory selection.
+    --directory | -C )
+	at_prev=--directory
+	;;
+    --directory=* )
+	at_change_dir=:
+	at_dir=$at_optarg
+	if test x- = "x$at_dir" ; then
+	  at_dir=./-
+	fi
+	;;
+
+    # Parallel execution.
+    --jobs | -j )
+	at_jobs=0
+	;;
+    --jobs=* | -j[0-9]* )
+	if test -n "$at_optarg"; then
+	  at_jobs=$at_optarg
+	else
+	  at_jobs=`expr X$at_option : 'X-j\(.*\)'`
+	fi
+	case $at_jobs in *[!0-9]*)
+	  at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
+	  as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
+	esac
 	;;
 
     # Keywords.
@@ -769,85 +802,97 @@ do
 	    ;;
 	  esac
 	  # It is on purpose that we match the test group titles too.
-	  at_groups_selected=`echo "$at_groups_selected" |
+	  at_groups_selected=`$as_echo "$at_groups_selected" |
 	      grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
 	done
-	at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
-	# Smash the newlines.
-	at_groups="$at_groups`echo $at_groups_selected` "
+	# Smash the keywords.
+	at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
+	as_fn_append at_groups "$at_groups_selected$as_nl"
+	;;
+    --recheck)
+	at_recheck=:
 	;;
 
     *=*)
 	at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
 	# Reject names that are not valid shell variable names.
-	expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-	  { echo "$as_me: error: invalid variable name: $at_envvar" >&2
-   { (exit 1); exit 1; }; }
-	at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
-	eval "$at_envvar='$at_value'"
+	case $at_envvar in
+	  '' | [0-9]* | *[!_$as_cr_alnum]* )
+	    as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
+	esac
+	at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
+	# Export now, but save eval for later and for debug scripts.
 	export $at_envvar
-	# Propagate to debug scripts.
-	at_debug_args="$at_debug_args $at_envvar='$at_value'"
+	as_fn_append at_debug_args " $at_envvar='$at_value'"
 	;;
 
-     *) echo "$as_me: invalid option: $at_option" >&2
-	echo "Try \`$0 --help' for more information." >&2
+     *) $as_echo "$as_me: invalid option: $at_option" >&2
+	$as_echo "Try \`$0 --help' for more information." >&2
 	exit 1
 	;;
   esac
 done
 
+# Verify our last option didn't require an argument
+if test -n "$at_prev"; then :
+  as_fn_error $? "\`$at_prev' requires an argument"
+fi
+
+# The file containing the suite.
+at_suite_log=$at_dir/$as_me.log
+
 # Selected test groups.
-if test -z "$at_groups"; then
+if test -z "$at_groups$at_recheck"; then
   at_groups=$at_groups_all
 else
-  # Sort the tests, removing duplicates:
-  at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu`
-  # and add banners.  (Passing at_groups_all is tricky--see the comment
-  # starting with "Passing at_groups is tricky.")
-  at_groups=`echo "$at_groups$as_nl $at_groups_all" |
-    awk 'BEGIN { FS = "@" } # Effectively switch off field splitting.
-	/^$/ { next }  # Ignore the empty line.
-	!/ / { groups++; selected[$ 0] = 1; next }
-	# The last line, containing at_groups_all.
-	{
-		n = split($ 0, a, " ")
-		# If there are several tests, select their banners:
-		if (groups > 1) {
-			for (i = 1; i <= n; i++) {
-				if (a[i] ~ /^banner-/)
-					banner = a[i]
-				else if (banner != "" && selected[a[i]] == 1)
-					selected[banner] = 1
-			}
-		}
-		for (i = 1; i <= n; i++)
-			if (selected[a[i]] == 1)
-				list = list " " a[i]
-		print list
-	}'`
+  if test -n "$at_recheck" && test -r "$at_suite_log"; then
+    at_oldfails=`sed -n '
+      /^Failed tests:$/,/^Skipped tests:$/{
+	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
+      }
+      /^Unexpected passes:$/,/^## Detailed failed tests/{
+	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
+      }
+      /^## Detailed failed tests/q
+      ' "$at_suite_log"`
+    as_fn_append at_groups "$at_oldfails$as_nl"
+  fi
+  # Sort the tests, removing duplicates.
+  at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
+fi
+
+if test x"$at_color" = xalways \
+   || { test x"$at_color" = xauto && test -t 1; }; then
+  at_red=`printf '\033[0;31m'`
+  at_grn=`printf '\033[0;32m'`
+  at_lgn=`printf '\033[1;32m'`
+  at_blu=`printf '\033[1;34m'`
+  at_std=`printf '\033[m'`
+else
+  at_red= at_grn= at_lgn= at_blu= at_std=
 fi
 
 # Help message.
 if $at_help_p; then
-  cat <<_ATEOF
+  cat <<_ATEOF || at_write_fail=1
 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
 
 Run all the tests, or the selected TESTS, given by numeric ranges, and
 save a detailed log file.  Upon failure, create debugging scripts.
 
-You should not change environment variables unless explicitly passed
-as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
+Do not change environment variables directly.  Instead, set them via
+command line arguments.  Set \`AUTOTEST_PATH' to select the executables
 to exercise.  Each relative directory is expanded as build and source
-directories relatively to the top level of this distribution.  E.g.,
+directories relative to the top level of this distribution.
+E.g., from within the build directory /tmp/foo-1.0, invoking this:
 
   $ $0 AUTOTEST_PATH=bin
 
-possibly amounts into
+is equivalent to the following, assuming the source directory is /src/foo-1.0:
 
-  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
+  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
 _ATEOF
-cat <<_ATEOF
+cat <<_ATEOF || at_write_fail=1
 
 Operation modes:
   -h, --help     print the help message, then exit
@@ -855,95 +900,211 @@ Operation modes:
   -c, --clean    remove all the files this test suite might create and exit
   -l, --list     describes all the tests, or the selected TESTS
 _ATEOF
-cat <<_ATEOF
+cat <<_ATEOF || at_write_fail=1
 
 Execution tuning:
+  -C, --directory=DIR
+                 change to directory DIR before starting
+      --color[=never|auto|always]
+                 enable colored test results on terminal, or always
+  -j, --jobs[=N]
+                 Allow N jobs at once; infinite jobs with no arg (default 1)
   -k, --keywords=KEYWORDS
-	         select the tests matching all the comma-separated KEYWORDS
-	         multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
+                 select the tests matching all the comma-separated KEYWORDS
+                 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
+      --recheck  select all tests that failed or passed unexpectedly last time
   -e, --errexit  abort as soon as a test fails; implies --debug
   -v, --verbose  force more detailed output
-	         default for debugging scripts
+                 default for debugging scripts
   -d, --debug    inhibit clean up and top-level logging
-	         default for debugging scripts
+                 default for debugging scripts
   -x, --trace    enable tests shell tracing
 _ATEOF
-cat <<_ATEOF
+cat <<_ATEOF || at_write_fail=1
 
 Report bugs to <opendap-tech at opendap.org>.
 _ATEOF
-  exit 0
+  exit $at_write_fail
 fi
 
 # List of tests.
 if $at_list_p; then
-  cat <<_ATEOF
-libdap 3.11.6 test suite: dds-test test groups:
+  cat <<_ATEOF || at_write_fail=1
+libdap 3.12.0 test suite: dds-test test groups:
 
  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
       KEYWORDS
 
 _ATEOF
-  # Passing at_groups is tricky.  We cannot use it to form a literal string
-  # or regexp because of the limitation of AIX awk.  And Solaris' awk
-  # doesn't grok more than 99 fields in a record, so we have to use `split'.
-  echo "$at_groups$as_nl$at_help_all" |
-    awk 'BEGIN { FS = ";" }
-	 NR == 1 {
-	   for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1
+  # Pass an empty line as separator between selected groups and help.
+  $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
+    awk 'NF == 1 && FS != ";" {
+	   selected[$ 1] = 1
 	   next
 	 }
-	 {
+	 /^$/ { FS = ";" }
+	 NF > 0 {
 	   if (selected[$ 1]) {
 	     printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
-	     if ($ 4) printf "      %s\n", $ 4
+	     if ($ 4) {
+	       lmax = 79
+	       indent = "     "
+	       line = indent
+	       len = length (line)
+	       n = split ($ 4, a, " ")
+	       for (i = 1; i <= n; i++) {
+		 l = length (a[i]) + 1
+		 if (i > 1 && len + l > lmax) {
+		   print line
+		   line = indent " " a[i]
+		   len = length (line)
+		 } else {
+		   line = line " " a[i]
+		   len += l
+		 }
+	       }
+	       if (n)
+		 print line
+	     }
 	   }
-	 }'
-  exit 0
+	 }' || at_write_fail=1
+  exit $at_write_fail
 fi
 if $at_version_p; then
-  echo "$as_me (libdap 3.11.6)"
-  cat <<\_ACEOF
+  $as_echo "$as_me (libdap 3.12.0)" &&
+  cat <<\_ATEOF || at_write_fail=1
 
-Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
-Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This test suite is free software; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit 0
+_ATEOF
+  exit $at_write_fail
+fi
+
+# Should we print banners?  Yes if more than one test is run.
+case $at_groups in #(
+  *$as_nl* )
+      at_print_banners=: ;; #(
+  * ) at_print_banners=false ;;
+esac
+# Text for banner N, set to a single space once printed.
+
+# Take any -C into account.
+if $at_change_dir ; then
+  test x != "x$at_dir" && cd "$at_dir" \
+    || as_fn_error $? "unable to change directory"
+  at_dir=`pwd`
+fi
+
+# Load the config files for any default variable assignments.
+for at_file in atconfig atlocal
+do
+  test -r $at_file || continue
+  . ./$at_file || as_fn_error $? "invalid content: $at_file"
+done
+
+# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
+: "${at_top_build_prefix=$at_top_builddir}"
+
+# Perform any assignments requested during argument parsing.
+eval "$at_debug_args"
+
+# atconfig delivers names relative to the directory the test suite is
+# in, but the groups themselves are run in testsuite-dir/group-dir.
+if test -n "$at_top_srcdir"; then
+  builddir=../..
+  for at_dir_var in srcdir top_srcdir top_build_prefix
+  do
+    eval at_val=\$at_$at_dir_var
+    case $at_val in
+      [\\/$]* | ?:[\\/]* ) at_prefix= ;;
+      *) at_prefix=../../ ;;
+    esac
+    eval "$at_dir_var=\$at_prefix\$at_val"
+  done
+fi
+
+## -------------------- ##
+## Directory structure. ##
+## -------------------- ##
+
+# This is the set of directories and files used by this script
+# (non-literals are capitalized):
+#
+# TESTSUITE         - the testsuite
+# TESTSUITE.log     - summarizes the complete testsuite run
+# TESTSUITE.dir/    - created during a run, remains after -d or failed test
+# + at-groups/      - during a run: status of all groups in run
+# | + NNN/          - during a run: meta-data about test group NNN
+# | | + check-line  - location (source file and line) of current AT_CHECK
+# | | + status      - exit status of current AT_CHECK
+# | | + stdout      - stdout of current AT_CHECK
+# | | + stder1      - stderr, including trace
+# | | + stderr      - stderr, with trace filtered out
+# | | + test-source - portion of testsuite that defines group
+# | | + times       - timestamps for computing duration
+# | | + pass        - created if group passed
+# | | + xpass       - created if group xpassed
+# | | + fail        - created if group failed
+# | | + xfail       - created if group xfailed
+# | | + skip        - created if group skipped
+# + at-stop         - during a run: end the run if this file exists
+# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
+# + 0..NNN/         - created for each group NNN, remains after -d or failed test
+# | + TESTSUITE.log - summarizes the group results
+# | + ...           - files created during the group
+
+# The directory the whole suite works in.
+# Should be absolute to let the user `cd' at will.
+at_suite_dir=$at_dir/$as_me.dir
+# The file containing the suite ($at_dir might have changed since earlier).
+at_suite_log=$at_dir/$as_me.log
+# The directory containing helper files per test group.
+at_helper_dir=$at_suite_dir/at-groups
+# Stop file: if it exists, do not start new jobs.
+at_stop_file=$at_suite_dir/at-stop
+# The fifo used for the job dispatcher.
+at_job_fifo=$at_suite_dir/at-job-fifo
+
+if $at_clean; then
+  test -d "$at_suite_dir" &&
+    find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+  rm -f -r "$at_suite_dir" "$at_suite_log"
+  exit $?
 fi
 
 # Don't take risks: use only absolute directories in PATH.
 #
-# For stand-alone test suites, AUTOTEST_PATH is relative to `.'.
+# For stand-alone test suites (ie. atconfig was not found),
+# AUTOTEST_PATH is relative to `.'.
 #
 # For embedded test suites, AUTOTEST_PATH is relative to the top level
 # of the package.  Then expand it into build/src parts, since users
 # may create executables in both places.
-AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"`
+AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
 at_path=
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $AUTOTEST_PATH $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR
+    test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
 case $as_dir in
   [\\/]* | ?:[\\/]* )
-    at_path=$at_path$as_dir
+    as_fn_append at_path "$as_dir"
     ;;
   * )
     if test -z "$at_top_build_prefix"; then
       # Stand-alone test suite.
-      at_path=$at_path$as_dir
+      as_fn_append at_path "$as_dir"
     else
       # Embedded test suite.
-      at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
-      at_path=$at_path$at_top_srcdir/$as_dir
+      as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
+      as_fn_append at_path "$at_top_srcdir/$as_dir"
     fi
     ;;
 esac
-done
+  done
 IFS=$as_save_IFS
 
 
@@ -951,31 +1112,33 @@ IFS=$as_save_IFS
 #
 # There might be directories that don't exist, but don't redirect
 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
-PATH=
+at_new_path=
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $at_path
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
-test -d "$as_dir" || continue
-case $PATH in
-	          $as_dir                 | \
-	          $as_dir$PATH_SEPARATOR* | \
-  *$PATH_SEPARATOR$as_dir                 | \
-  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;
-
-  '') PATH=$as_dir ;;
-   *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
+    test -d "$as_dir" || continue
+case $as_dir in
+  [\\/]* | ?:[\\/]* ) ;;
+  * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
 esac
-done
+case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
+  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
+  $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
+  *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
+esac
+  done
 IFS=$as_save_IFS
 
+PATH=$at_new_path
 export PATH
 
 # Setting up the FDs.
-# 5 is the log file.  Not to be overwritten if `-d'.
 
+
+
+# 5 is the log file.  Not to be overwritten if `-d'.
 if $at_debug_p; then
   at_suite_log=/dev/null
 else
@@ -984,42 +1147,31 @@ fi
 exec 5>>"$at_suite_log"
 
 # Banners and logs.
-cat <<\_ASBOX
-## ----------------------------------- ##
-## libdap 3.11.6 test suite: dds-test. ##
-## ----------------------------------- ##
-_ASBOX
+$as_echo "## ----------------------------------- ##
+## libdap 3.12.0 test suite: dds-test. ##
+## ----------------------------------- ##"
 {
-  cat <<\_ASBOX
-## ----------------------------------- ##
-## libdap 3.11.6 test suite: dds-test. ##
-## ----------------------------------- ##
-_ASBOX
+  $as_echo "## ----------------------------------- ##
+## libdap 3.12.0 test suite: dds-test. ##
+## ----------------------------------- ##"
   echo
 
-  echo "$as_me: command line was:"
-  echo "  $ $0 $at_cli_args"
+  $as_echo "$as_me: command line was:"
+  $as_echo "  \$ $0 $at_cli_args"
   echo
 
-  # Try to find a few ChangeLogs in case it might help determining the
-  # exact version.  Use the relative dir: if the top dir is a symlink,
-  # find will not follow it (and options to follow the links are not
-  # portable), which would result in no output here.
-  if test -n "$at_top_srcdir"; then
-    cat <<\_ASBOX
-## ----------- ##
-## ChangeLogs. ##
-## ----------- ##
-_ASBOX
+  # If ChangeLog exists, list a few lines in case it might help determining
+  # the exact version.
+  if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
+    $as_echo "## ---------- ##
+## ChangeLog. ##
+## ---------- ##"
     echo
-    for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
-    do
-      echo "$as_me: $at_file:"
-      sed 's/^/| /;10q' $at_file
-      echo
-    done
+    sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
+    echo
+  fi
 
-    {
+  {
 cat <<_ASUNAME
 ## --------- ##
 ## Platform. ##
@@ -1049,28 +1201,179 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
+    $as_echo "PATH: $as_dir"
+  done
 IFS=$as_save_IFS
 
 }
-    echo
-  fi
+  echo
 
   # Contents of the config files.
   for at_file in atconfig atlocal
   do
     test -r $at_file || continue
-    echo "$as_me: $at_file:"
+    $as_echo "$as_me: $at_file:"
     sed 's/^/| /' $at_file
     echo
   done
+} >&5
+
+
+## ------------------------- ##
+## Autotest shell functions. ##
+## ------------------------- ##
+
+# at_fn_banner NUMBER
+# -------------------
+# Output banner NUMBER, provided the testsuite is running multiple groups and
+# this particular banner has not yet been printed.
+at_fn_banner ()
+{
+  $at_print_banners || return 0
+  eval at_banner_text=\$at_banner_text_$1
+  test "x$at_banner_text" = "x " && return 0
+  eval "at_banner_text_$1=\" \""
+  if test -z "$at_banner_text"; then
+    $at_first || echo
+  else
+    $as_echo "$as_nl$at_banner_text$as_nl"
+  fi
+} # at_fn_banner
+
+# at_fn_check_prepare_notrace REASON LINE
+# ---------------------------------------
+# Perform AT_CHECK preparations for the command at LINE for an untraceable
+# command; REASON is the reason for disabling tracing.
+at_fn_check_prepare_notrace ()
+{
+  $at_trace_echo "Not enabling shell tracing (command contains $1)"
+  $as_echo "$2" >"$at_check_line_file"
+  at_check_trace=: at_check_filter=:
+  : >"$at_stdout"; : >"$at_stderr"
+}
+
+# at_fn_check_prepare_trace LINE
+# ------------------------------
+# Perform AT_CHECK preparations for the command at LINE for a traceable
+# command.
+at_fn_check_prepare_trace ()
+{
+  $as_echo "$1" >"$at_check_line_file"
+  at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
+  : >"$at_stdout"; : >"$at_stderr"
+}
+
+# at_fn_check_prepare_dynamic COMMAND LINE
+# ----------------------------------------
+# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
+# preparation function.
+at_fn_check_prepare_dynamic ()
+{
+  case $1 in
+    *$as_nl*)
+      at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
+    *)
+      at_fn_check_prepare_trace "$2" ;;
+  esac
+}
+
+# at_fn_filter_trace
+# ------------------
+# Remove the lines in the file "$at_stderr" generated by "set -x" and print
+# them to stderr.
+at_fn_filter_trace ()
+{
+  mv "$at_stderr" "$at_stder1"
+  grep '^ *+' "$at_stder1" >&2
+  grep -v '^ *+' "$at_stder1" >"$at_stderr"
+}
+
+# at_fn_log_failure FILE-LIST
+# ---------------------------
+# Copy the files in the list on stdout with a "> " prefix, and exit the shell
+# with a failure exit code.
+at_fn_log_failure ()
+{
+  for file
+    do $as_echo "$file:"; sed 's/^/> /' "$file"; done
+  echo 1 > "$at_status_file"
+  exit 1
+}
+
+# at_fn_check_skip EXIT-CODE LINE
+# -------------------------------
+# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
+# the test group subshell with that same exit code. Use LINE in any report
+# about test failure.
+at_fn_check_skip ()
+{
+  case $1 in
+    99) echo 99 > "$at_status_file"; at_failed=:
+	$as_echo "$2: hard failure"; exit 99;;
+    77) echo 77 > "$at_status_file"; exit 77;;
+  esac
+}
+
+# at_fn_check_status EXPECTED EXIT-CODE LINE
+# ------------------------------------------
+# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
+# Otherwise, if it is 77 or 99, exit the test group subshell with that same
+# exit code; if it is anything else print an error message referring to LINE,
+# and fail the test.
+at_fn_check_status ()
+{
+  case $2 in
+    $1 ) ;;
+    77) echo 77 > "$at_status_file"; exit 77;;
+    99) echo 99 > "$at_status_file"; at_failed=:
+	$as_echo "$3: hard failure"; exit 99;;
+    *) $as_echo "$3: exit code was $2, expected $1"
+      at_failed=:;;
+  esac
+}
+
+# at_fn_diff_devnull FILE
+# -----------------------
+# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
+# invocations.
+at_fn_diff_devnull ()
+{
+  test -s "$1" || return 0
+  $at_diff "$at_devnull" "$1"
+}
+
+# at_fn_test NUMBER
+# -----------------
+# Parse out test NUMBER from the tail of this file.
+at_fn_test ()
+{
+  eval at_sed=\$at_sed$1
+  sed "$at_sed" "$at_myself" > "$at_test_source"
+}
 
-  cat <<\_ASBOX
-## ---------------- ##
+# at_fn_create_debugging_script
+# -----------------------------
+# Create the debugging script $at_group_dir/run which will reproduce the
+# current test group.
+at_fn_create_debugging_script ()
+{
+  {
+    echo "#! /bin/sh" &&
+    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
+    $as_echo "cd '$at_dir'" &&
+    $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
+    echo 'exit 1'
+  } >"$at_group_dir/run" &&
+  chmod +x "$at_group_dir/run"
+}
+
+## -------------------------------- ##
+## End of autotest shell functions. ##
+## -------------------------------- ##
+{
+  $as_echo "## ---------------- ##
 ## Tested programs. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
   echo
 } >&5
 
@@ -1078,52 +1381,44 @@ _ASBOX
 for at_program in : $at_tested
 do
   test "$at_program" = : && continue
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $at_program in
+    [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
+    * )
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -f "$as_dir/$at_program" && break
-done
+    test -f "$as_dir/$at_program" && break
+  done
 IFS=$as_save_IFS
 
-  if test -f "$as_dir/$at_program"; then
+    at_program_=$as_dir/$at_program ;;
+  esac
+  if test -f "$at_program_"; then
     {
-      echo "$at_srcdir/DDSTest.at:7: $as_dir/$at_program --version"
-      "$as_dir/$at_program" --version
+      $as_echo "$at_srcdir/DDSTest.at:7: $at_program_ --version"
+      "$at_program_" --version </dev/null
       echo
     } >&5 2>&1
   else
-    { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5
-echo "$as_me: error: cannot find $at_program" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "cannot find $at_program" "$LINENO" 5
   fi
 done
 
 {
-  cat <<\_ASBOX
-## ------------------ ##
+  $as_echo "## ------------------ ##
 ## Running the tests. ##
-## ------------------ ##
-_ASBOX
+## ------------------ ##"
 } >&5
 
 at_start_date=`date`
 at_start_time=`date +%s 2>/dev/null`
-echo "$as_me: starting at: $at_start_date" >&5
-at_xpass_list=
-at_xfail_list=
-at_pass_list=
-at_fail_list=
-at_skip_list=
-at_group_count=0
+$as_echo "$as_me: starting at: $at_start_date" >&5
 
 # Create the master directory if it doesn't already exist.
-test -d "$at_suite_dir" ||
-  mkdir "$at_suite_dir" ||
-  { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
-echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
-   { (exit 1); exit 1; }; }
+as_dir="$at_suite_dir"; as_fn_mkdir_p ||
+  as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
 
 # Can we diff with `/dev/null'?  DU 5.0 refuses.
 if diff /dev/null /dev/null >/dev/null 2>&1; then
@@ -1141,3385 +1436,1853 @@ else
   at_diff=diff
 fi
 
+# Get the last needed group.
+for at_group in : $at_groups; do :; done
+
+# Extract the start and end lines of each test group at the tail
+# of this file
+awk '
+BEGIN { FS="" }
+/^#AT_START_/ {
+  start = NR
+}
+/^#AT_STOP_/ {
+  test = substr ($ 0, 10)
+  print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
+  if (test == "'"$at_group"'") exit
+}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
+. "$at_suite_dir/at-source-lines" ||
+  as_fn_error $? "cannot create test line number cache" "$LINENO" 5
+rm -f "$at_suite_dir/at-source-lines"
+
+# Set number of jobs for `-j'; avoid more jobs than test groups.
+set X $at_groups; shift; at_max_jobs=$#
+if test $at_max_jobs -eq 0; then
+  at_jobs=1
+fi
+if test $at_jobs -ne 1 &&
+   { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
+  at_jobs=$at_max_jobs
+fi
+
+# If parallel mode, don't output banners, don't split summary lines.
+if test $at_jobs -ne 1; then
+  at_print_banners=false
+  at_quiet=:
+fi
+
+# Set up helper dirs.
+rm -rf "$at_helper_dir" &&
+mkdir "$at_helper_dir" &&
+cd "$at_helper_dir" &&
+{ test -z "$at_groups" || mkdir $at_groups; } ||
+as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
+
+# Functions for running a test group.  We leave the actual
+# test group execution outside of a shell function in order
+# to avoid hitting zsh 4.x exit status bugs.
+
+# at_fn_group_prepare
+# -------------------
+# Prepare for running a test group.
+at_fn_group_prepare ()
+{
+  # The directory for additional per-group helper files.
+  at_job_dir=$at_helper_dir/$at_group
+  # The file containing the location of the last AT_CHECK.
+  at_check_line_file=$at_job_dir/check-line
+  # The file containing the exit status of the last command.
+  at_status_file=$at_job_dir/status
+  # The files containing the output of the tested commands.
+  at_stdout=$at_job_dir/stdout
+  at_stder1=$at_job_dir/stder1
+  at_stderr=$at_job_dir/stderr
+  # The file containing the code for a test group.
+  at_test_source=$at_job_dir/test-source
+  # The file containing dates.
+  at_times_file=$at_job_dir/times
 
-for at_group in $at_groups
-do
   # Be sure to come back to the top test directory.
   cd "$at_suite_dir"
 
-  case $at_group in
-    banner-*)
-      at_group_log=$at_suite_log
-      ;;
+  # Clearly separate the test groups when verbose.
+  $at_first || $at_verbose echo
 
-    *)
-      at_group_normalized=$at_group
+  at_group_normalized=$at_group
 
-  while :; do
+  eval 'while :; do
     case $at_group_normalized in #(
-    $at_format*) break;;
+    '"$at_format"'*) break;;
     esac
     at_group_normalized=0$at_group_normalized
-  done
-
-
-      # Create a fresh directory for the next test group, and enter.
-      at_group_dir=$at_suite_dir/$at_group_normalized
-      at_group_log=$at_group_dir/$as_me.log
-      if test -d "$at_group_dir"; then
-	find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
-	rm -fr "$at_group_dir"
-      fi
-      # Be tolerant if the above `rm' was not able to remove the directory.
-      { as_dir=$at_group_dir
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-      cd $at_group_dir
-      ;;
-  esac
+  done'
+
+
+  # Create a fresh directory for the next test group, and enter.
+  # If one already exists, the user may have invoked ./run from
+  # within that directory; we remove the contents, but not the
+  # directory itself, so that we aren't pulling the rug out from
+  # under the shell's notion of the current directory.
+  at_group_dir=$at_suite_dir/$at_group_normalized
+  at_group_log=$at_group_dir/$as_me.log
+  if test -d "$at_group_dir"; then
+  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
+  rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
+fi ||
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
+$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
+  # Be tolerant if the above `rm' was not able to remove the directory.
+  as_dir="$at_group_dir"; as_fn_mkdir_p
 
   echo 0 > "$at_status_file"
 
-  # Clearly separate the test groups when verbose.
-  test $at_group_count != 0 && $at_verbose
-
   # In verbose mode, append to the log file *and* show on
-  # the standard output; in quiet mode only write to the log
-  if test $at_verbose = echo; then
+  # the standard output; in quiet mode only write to the log.
+  if test -z "$at_verbose"; then
     at_tee_pipe='tee -a "$at_group_log"'
   else
     at_tee_pipe='cat >> "$at_group_log"'
   fi
+}
 
-  case $at_group in
-  1 ) # 1. DDSTest.at:34: DDS $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds
-    at_setup_line='DDSTest.at:34'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds"
-    $at_quiet $ECHO_N "  1: DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "1. DDSTest.at:34: testing ..."
-      $at_traceon
+# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
+# -------------------------------------------------
+# Declare the test group ORDINAL, located at LINE with group description DESC,
+# and residing under BANNER. Use PAD to align the status column.
+at_fn_group_banner ()
+{
+  at_setup_line="$2"
+  test -n "$5" && at_fn_banner $5
+  at_desc="$3"
+  case $1 in
+    [0-9])      at_desc_line="  $1: ";;
+    [0-9][0-9]) at_desc_line=" $1: " ;;
+    *)          at_desc_line="$1: "  ;;
+  esac
+  as_fn_append at_desc_line "$3$4"
+  $at_quiet $as_echo_n "$at_desc_line"
+  echo "#                             -*- compilation -*-" >> "$at_group_log"
+}
 
+# at_fn_group_postprocess
+# -----------------------
+# Perform cleanup after running a test group.
+at_fn_group_postprocess ()
+{
+  # Be sure to come back to the suite directory, in particular
+  # since below we might `rm' the group directory we are in currently.
+  cd "$at_suite_dir"
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:34: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds || true"
-echo DDSTest.at:34 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+  if test ! -f "$at_check_line_file"; then
+    sed "s/^ */$as_me: WARNING: /" <<_ATEOF
+      A failure happened in a test group before any test could be
+      run. This means that test suite is improperly designed.  Please
+      report this failure to <opendap-tech at opendap.org>.
+_ATEOF
+    $as_echo "$at_setup_line" >"$at_check_line_file"
+    at_status=99
+  fi
+  $at_verbose $as_echo_n "$at_group. $at_setup_line: "
+  $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
+  case $at_xfail:$at_status in
+    yes:0)
+	at_msg="UNEXPECTED PASS"
+	at_res=xpass
+	at_errexit=$at_errexit_p
+	at_color=$at_red
+	;;
+    no:0)
+	at_msg="ok"
+	at_res=pass
+	at_errexit=false
+	at_color=$at_grn
+	;;
+    *:77)
+	at_msg='skipped ('`cat "$at_check_line_file"`')'
+	at_res=skip
+	at_errexit=false
+	at_color=$at_blu
+	;;
+    no:* | *:99)
+	at_msg='FAILED ('`cat "$at_check_line_file"`')'
+	at_res=fail
+	at_errexit=$at_errexit_p
+	at_color=$at_red
+	;;
+    yes:*)
+	at_msg='expected failure ('`cat "$at_check_line_file"`')'
+	at_res=xfail
+	at_errexit=false
+	at_color=$at_lgn
+	;;
+  esac
+  echo "$at_res" > "$at_job_dir/$at_res"
+  # In parallel mode, output the summary line only afterwards.
+  if test $at_jobs -ne 1 && test -n "$at_verbose"; then
+    $as_echo "$at_desc_line $at_color$at_msg$at_std"
+  else
+    # Make sure there is a separator even with long titles.
+    $as_echo " $at_color$at_msg$at_std"
+  fi
+  at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
+  case $at_status in
+    0|77)
+      # $at_times_file is only available if the group succeeded.
+      # We're not including the group log, so the success message
+      # is written in the global log separately.  But we also
+      # write to the group log in case they're using -d.
+      if test -f "$at_times_file"; then
+	at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
+	rm -f "$at_times_file"
+      fi
+      $as_echo "$at_log_msg" >> "$at_group_log"
+      $as_echo "$at_log_msg" >&5
+
+      # Cleanup the group directory, unless the user wants the files
+      # or the success was unexpected.
+      if $at_debug_p || test $at_res = xpass; then
+	at_fn_create_debugging_script
+	if test $at_res = xpass && $at_errexit; then
+	  echo stop > "$at_stop_file"
+	fi
+      else
+	if test -d "$at_group_dir"; then
+	  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+	  rm -fr "$at_group_dir"
+	fi
+	rm -f "$at_test_source"
+      fi
+      ;;
+    *)
+      # Upon failure, include the log into the testsuite's global
+      # log.  The failure message is written in the group log.  It
+      # is later included in the global log.
+      $as_echo "$at_log_msg" >> "$at_group_log"
+
+      # Upon failure, keep the group directory for autopsy, and create
+      # the debugging script.  With -e, do not start any further tests.
+      at_fn_create_debugging_script
+      if $at_errexit; then
+	echo stop > "$at_stop_file"
+      fi
+      ;;
+  esac
+}
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
 
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:34: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+## ------------ ##
+## Driver loop. ##
+## ------------ ##
 
 
-  echo 1 > "$at_status_file"
-  exit 1
+if (set -m && set +m && set +b) >/dev/null 2>&1; then
+  set +b
+  at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
+else
+  at_job_control_on=: at_job_control_off=: at_job_group=
 fi
 
-$at_traceon
+for at_signal in 1 2 15; do
+  trap 'set +x; set +e
+	$at_job_control_off
+	at_signal='"$at_signal"'
+	echo stop > "$at_stop_file"
+	trap "" $at_signal
+	at_pgids=
+	for at_pgid in `jobs -p 2>/dev/null`; do
+	  at_pgids="$at_pgids $at_job_group$at_pgid"
+	done
+	test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
+	wait
+	if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
+	  echo >&2
+	fi
+	at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
+	set x $at_signame
+	test 1 -gt 2 && at_signame=$at_signal
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
+$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
+	as_fn_arith 128 + $at_signal && exit_status=$as_val
+	as_fn_exit $exit_status' $at_signal
+done
 
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:34: diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stderr"
-echo DDSTest.at:34 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+rm -f "$at_stop_file"
+at_first=:
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+if test $at_jobs -ne 1 &&
+     rm -f "$at_job_fifo" &&
+     test -n "$at_job_group" &&
+     ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
+then
+  # FIFO job dispatcher.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:34: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+  trap 'at_pids=
+	for at_pid in `jobs -p`; do
+	  at_pids="$at_pids $at_job_group$at_pid"
+	done
+	if test -n "$at_pids"; then
+	  at_sig=TSTP
+	  test "${TMOUT+set}" = set && at_sig=STOP
+	  kill -$at_sig $at_pids 2>/dev/null
+	fi
+	kill -STOP $$
+	test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
 
+  echo
+  # Turn jobs into a list of numbers, starting from 1.
+  at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
 
-  echo 1 > "$at_status_file"
-  exit 1
+  set X $at_joblist
+  shift
+  for at_group in $at_groups; do
+    $at_job_control_on 2>/dev/null
+    (
+      # Start one test group.
+      $at_job_control_off
+      if $at_first; then
+	exec 7>"$at_job_fifo"
+      else
+	exec 6<&-
+      fi
+      trap 'set +x; set +e
+	    trap "" PIPE
+	    echo stop > "$at_stop_file"
+	    echo >&7
+	    as_fn_exit 141' PIPE
+      at_fn_group_prepare
+      if cd "$at_group_dir" &&
+	 at_fn_test $at_group &&
+	 . "$at_test_source"
+      then :; else
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
+	at_failed=:
+      fi
+      at_fn_group_postprocess
+      echo >&7
+    ) &
+    $at_job_control_off
+    if $at_first; then
+      at_first=false
+      exec 6<"$at_job_fifo" 7>"$at_job_fifo"
+    fi
+    shift # Consume one token.
+    if test $# -gt 0; then :; else
+      read at_token <&6 || break
+      set x $*
+    fi
+    test -f "$at_stop_file" && break
+  done
+  exec 7>&-
+  # Read back the remaining ($at_jobs - 1) tokens.
+  set X $at_joblist
+  shift
+  if test $# -gt 0; then
+    shift
+    for at_job
+    do
+      read at_token
+    done <&6
+  fi
+  exec 6<&-
+  wait
+else
+  # Run serially, avoid forks and other potential surprises.
+  for at_group in $at_groups; do
+    at_fn_group_prepare
+    if cd "$at_group_dir" &&
+       at_fn_test $at_group &&
+       . "$at_test_source"; then :; else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
+      at_failed=:
+    fi
+    at_fn_group_postprocess
+    test -f "$at_stop_file" && break
+    at_first=false
+  done
 fi
 
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+# Wrap up the test suite with summary statistics.
+cd "$at_helper_dir"
+
+# Use ?..???? when the list must remain sorted, the faster * otherwise.
+at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
+at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
+at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
+at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
+		 echo $f; done | sed '/?/d; s,/xpass,,'`
+at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
+		echo $f; done | sed '/?/d; s,/fail,,'`
+
+set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
+shift; at_group_count=$#
+set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
+set X $at_xfail_list; shift; at_xfail_count=$#
+set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
+set X $at_skip_list; shift; at_skip_count=$#
+
+as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
+as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
+as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
 
-  2 ) # 2. DDSTest.at:35: DDS $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds
-    at_setup_line='DDSTest.at:35'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds"
-    $at_quiet $ECHO_N "  2: DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "2. DDSTest.at:35: testing ..."
-      $at_traceon
+# Back to the top directory.
+cd "$at_dir"
+rm -rf "$at_helper_dir"
 
+# Compute the duration of the suite.
+at_stop_date=`date`
+at_stop_time=`date +%s 2>/dev/null`
+$as_echo "$as_me: ending at: $at_stop_date" >&5
+case $at_start_time,$at_stop_time in
+  [0-9]*,[0-9]*)
+    as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
+    as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
+    as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
+    as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
+    as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
+    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
+    $as_echo "$as_me: test suite duration: $at_duration" >&5
+    ;;
+esac
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:35: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds || true"
-echo DDSTest.at:35 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+echo
+$as_echo "## ------------- ##
+## Test results. ##
+## ------------- ##"
+echo
+{
+  echo
+  $as_echo "## ------------- ##
+## Test results. ##
+## ------------- ##"
+  echo
+} >&5
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+if test $at_run_count = 1; then
+  at_result="1 test"
+  at_were=was
 else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
+  at_result="$at_run_count tests"
+  at_were=were
 fi
+if $at_errexit_p && test $at_unexpected_count != 0; then
+  if test $at_xpass_count = 1; then
+    at_result="$at_result $at_were run, one passed"
+  else
+    at_result="$at_result $at_were run, one failed"
+  fi
+  at_result="$at_result unexpectedly and inhibited subsequent tests."
+  at_color=$at_red
+else
+  # Don't you just love exponential explosion of the number of cases?
+  at_color=$at_red
+  case $at_xpass_count:$at_fail_count:$at_xfail_count in
+    # So far, so good.
+    0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
+    0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
 
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:35: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+    # Some unexpected failures
+    0:*:0) at_result="$at_result $at_were run,
+$at_fail_count failed unexpectedly." ;;
 
+    # Some failures, both expected and unexpected
+    0:*:1) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+    0:*:*) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+    # No unexpected failures, but some xpasses
+    *:0:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly." ;;
 
-$at_traceon
+    # No expected failures, but failures and xpasses
+    *:1:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
+    *:*:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
 
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:35: diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stderr"
-echo DDSTest.at:35 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+    # All of them.
+    *:*:1) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+    *:*:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
+  esac
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
+  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
+    at_result="All $at_result"
+  fi
 fi
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:35: exit code was $at_status, expected 0"
-      at_failed=:;;
+# Now put skips in the mix.
+case $at_skip_count in
+  0) ;;
+  1) at_result="$at_result
+1 test was skipped." ;;
+  *) at_result="$at_result
+$at_skip_count tests were skipped." ;;
 esac
-if $at_failed; then
 
+if test $at_unexpected_count = 0; then
+  echo "$at_color$at_result$at_std"
+  echo "$at_result" >&5
+else
+  echo "${at_color}ERROR: $at_result$at_std" >&2
+  echo "ERROR: $at_result" >&5
+  {
+    echo
+    $as_echo "## ------------------------ ##
+## Summary of the failures. ##
+## ------------------------ ##"
+
+    # Summary of failed and skipped tests.
+    if test $at_fail_count != 0; then
+      echo "Failed tests:"
+      $SHELL "$at_myself" $at_fail_list --list
+      echo
+    fi
+    if test $at_skip_count != 0; then
+      echo "Skipped tests:"
+      $SHELL "$at_myself" $at_skip_list --list
+      echo
+    fi
+    if test $at_xpass_count != 0; then
+      echo "Unexpected passes:"
+      $SHELL "$at_myself" $at_xpass_list --list
+      echo
+    fi
+    if test $at_fail_count != 0; then
+      $as_echo "## ---------------------- ##
+## Detailed failed tests. ##
+## ---------------------- ##"
+      echo
+      for at_group in $at_fail_list
+      do
+	at_group_normalized=$at_group
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+  eval 'while :; do
+    case $at_group_normalized in #(
+    '"$at_format"'*) break;;
+    esac
+    at_group_normalized=0$at_group_normalized
+  done'
 
-$at_traceon
+	cat "$at_suite_dir/$at_group_normalized/$as_me.log"
+	echo
+      done
+      echo
+    fi
+    if test -n "$at_top_srcdir"; then
+      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## ${at_top_build_prefix}config.log ##
+_ASBOX
+      sed 's/^/| /' ${at_top_build_prefix}config.log
+      echo
+    fi
+  } >&5
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## $as_me.log was created. ##
+_ASBOX
 
-  3 ) # 3. DDSTest.at:36: DDS $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds
-    at_setup_line='DDSTest.at:36'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds"
-    $at_quiet $ECHO_N "  3: DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "3. DDSTest.at:36: testing ..."
-      $at_traceon
+  echo
+  if $at_debug_p; then
+    at_msg='per-test log files'
+  else
+    at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
+  fi
+  $as_echo "Please send $at_msg and all information you think might help:
 
+   To: <opendap-tech at opendap.org>
+   Subject: [libdap 3.12.0] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:36: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds || true"
-echo DDSTest.at:36 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
+You may investigate any problem if you feel able to do so, in which
+case the test suite provides a good starting point.  Its output may
+be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
+"
+  exit 1
 fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+exit 0
+
+## ------------- ##
+## Actual tests. ##
+## ------------- ##
+#AT_START_1
+at_fn_group_banner 1 'DDSTest.at:34' \
+  "DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds" ""
+at_xfail=no
+(
+  $as_echo "1. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-at_failed=false
+
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:34: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds || true" "DDSTest.at:34"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:36: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:34: diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stderr" "DDSTest.at:34"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.hacked.HDF.das.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:34"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_1
+#AT_START_2
+at_fn_group_banner 2 'DDSTest.at:35' \
+  "DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds" ""
+at_xfail=no
+(
+  $as_echo "2. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:35: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds || true" "DDSTest.at:35"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:36: diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stderr"
-echo DDSTest.at:36 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:35: diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stderr" "DDSTest.at:35"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.das.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:36: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:35"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_2
+#AT_START_3
+at_fn_group_banner 3 'DDSTest.at:36' \
+  "DDS \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds" ""
+at_xfail=no
+(
+  $as_echo "3. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:36: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds || true" "DDSTest.at:36"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  4 ) # 4. DDSTest.at:37: DDS $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds
-    at_setup_line='DDSTest.at:37'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/AsciiOutputTest1.dds"
-    $at_quiet $ECHO_N "  4: DDS \$abs_srcdir/dds-testsuite/AsciiOutputTest1.dds$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "4. DDSTest.at:37: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:36: diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stderr" "DDSTest.at:36"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/3B42.980909.5.HDF.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:36"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_3
+#AT_START_4
+at_fn_group_banner 4 'DDSTest.at:37' \
+  "DDS \$abs_srcdir/dds-testsuite/AsciiOutputTest1.dds" ""
+at_xfail=no
+(
+  $as_echo "4. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 #Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:37: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/AsciiOutputTest1.dds || true"
-echo DDSTest.at:37 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:37: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/AsciiOutputTest1.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds || true" "DDSTest.at:37"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:37: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:37: diff -b -B \$abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stderr" "DDSTest.at:37"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:37"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_4
+#AT_START_5
+at_fn_group_banner 5 'DDSTest.at:38' \
+  "DDS \$abs_srcdir/dds-testsuite/fnoc1.nc.das.dds" " "
+at_xfail=no
+(
+  $as_echo "5. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:38: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/fnoc1.nc.das.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds || true" "DDSTest.at:38"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:38"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:37: diff -b -B \$abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stderr"
-echo DDSTest.at:37 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:38: diff -b -B \$abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stderr" "DDSTest.at:38"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:38"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_5
+#AT_START_6
+at_fn_group_banner 6 'DDSTest.at:39' \
+  "DDS \$abs_srcdir/dds-testsuite/fnoc1.nc.dds" "     "
+at_xfail=no
+(
+  $as_echo "6. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/AsciiOutputTest1.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:37: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
 
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:39: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/fnoc1.nc.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.dds || true" "DDSTest.at:39"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:39: diff -b -B \$abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stderr" "DDSTest.at:39"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:39"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_6
+#AT_START_7
+at_fn_group_banner 7 'DDSTest.at:40' \
+  "DDS \$abs_srcdir/dds-testsuite/S2000415.HDF.das.dds" ""
+at_xfail=no
+(
+  $as_echo "7. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:40: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/S2000415.HDF.das.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds || true" "DDSTest.at:40"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:40"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  5 ) # 5. DDSTest.at:38: DDS $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds
-    at_setup_line='DDSTest.at:38'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/fnoc1.nc.das.dds"
-    $at_quiet $ECHO_N "  5: DDS \$abs_srcdir/dds-testsuite/fnoc1.nc.das.dds$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "5. DDSTest.at:38: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:40: diff -b -B \$abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stderr" "DDSTest.at:40"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:40"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_7
+#AT_START_8
+at_fn_group_banner 8 'DDSTest.at:41' \
+  "DDS \$abs_srcdir/dds-testsuite/S2000415.HDF.dds" " "
+at_xfail=no
+(
+  $as_echo "8. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:38: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/fnoc1.nc.das.dds || true"
-echo DDSTest.at:38 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:41: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/S2000415.HDF.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.dds || true" "DDSTest.at:41"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:38: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:41"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:41: diff -b -B \$abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stderr" "DDSTest.at:41"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:41"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_8
+#AT_START_9
+at_fn_group_banner 9 'DDSTest.at:42' \
+  "DDS \$abs_srcdir/dds-testsuite/test.1.dds" "       "
+at_xfail=no
+(
+  $as_echo "9. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.1.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:42: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.1.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.1.dds || true" "DDSTest.at:42"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.1.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:42"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:38: diff -b -B \$abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stderr"
-echo DDSTest.at:38 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.das.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:42: diff -b -B \$abs_srcdir/dds-testsuite/test.1.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.1.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stderr" "DDSTest.at:42"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:38: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:42"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_9
+#AT_START_10
+at_fn_group_banner 10 'DDSTest.at:43' \
+  "DDS \$abs_srcdir/dds-testsuite/test.10.dds" "      "
+at_xfail=no
+(
+  $as_echo "10. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.10.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:43: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.10.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.10.dds || true" "DDSTest.at:43"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.10.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:43"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  6 ) # 6. DDSTest.at:39: DDS $abs_srcdir/dds-testsuite/fnoc1.nc.dds
-    at_setup_line='DDSTest.at:39'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/fnoc1.nc.dds"
-    $at_quiet $ECHO_N "  6: DDS \$abs_srcdir/dds-testsuite/fnoc1.nc.dds    $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "6. DDSTest.at:39: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:43: diff -b -B \$abs_srcdir/dds-testsuite/test.10.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.10.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stderr" "DDSTest.at:43"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:43"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_10
+#AT_START_11
+at_fn_group_banner 11 'DDSTest.at:44' \
+  "DDS \$abs_srcdir/dds-testsuite/test.11.dds" "      "
+at_xfail=no
+(
+  $as_echo "11. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.11.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:39: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/fnoc1.nc.dds || true"
-echo DDSTest.at:39 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/fnoc1.nc.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:44: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.11.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.11.dds || true" "DDSTest.at:44"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.11.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:39: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:44"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:44: diff -b -B \$abs_srcdir/dds-testsuite/test.11.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.11.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stderr" "DDSTest.at:44"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:44"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_11
+#AT_START_12
+at_fn_group_banner 12 'DDSTest.at:45' \
+  "DDS \$abs_srcdir/dds-testsuite/test.12.dds" "      "
+at_xfail=no
+(
+  $as_echo "12. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.12.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:45: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.12.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.12.dds || true" "DDSTest.at:45"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.12.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:45"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:39: diff -b -B \$abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stderr"
-echo DDSTest.at:39 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/fnoc1.nc.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:45: diff -b -B \$abs_srcdir/dds-testsuite/test.12.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.12.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stderr" "DDSTest.at:45"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:39: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:45"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_12
+#AT_START_13
+at_fn_group_banner 13 'DDSTest.at:46' \
+  "DDS \$abs_srcdir/dds-testsuite/test.13.dds" "      "
+at_xfail=no
+(
+  $as_echo "13. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.13.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:46: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.13.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.13.dds || true" "DDSTest.at:46"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.13.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:46"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  7 ) # 7. DDSTest.at:40: DDS $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds
-    at_setup_line='DDSTest.at:40'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/S2000415.HDF.das.dds"
-    $at_quiet $ECHO_N "  7: DDS \$abs_srcdir/dds-testsuite/S2000415.HDF.das.dds$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "7. DDSTest.at:40: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:46: diff -b -B \$abs_srcdir/dds-testsuite/test.13.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.13.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stderr" "DDSTest.at:46"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:46"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_13
+#AT_START_14
+at_fn_group_banner 14 'DDSTest.at:47' \
+  "DDS \$abs_srcdir/dds-testsuite/test.14.dds" "      "
+at_xfail=no
+(
+  $as_echo "14. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.14.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:40: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/S2000415.HDF.das.dds || true"
-echo DDSTest.at:40 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:47: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.14.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.14.dds || true" "DDSTest.at:47"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.14.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:40: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:47: diff -b -B \$abs_srcdir/dds-testsuite/test.14.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.14.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stderr" "DDSTest.at:47"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_14
+#AT_START_15
+at_fn_group_banner 15 'DDSTest.at:48' \
+  "DDS \$abs_srcdir/dds-testsuite/test.15.dds" "      "
+at_xfail=no
+(
+  $as_echo "15. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.15.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:48: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.15.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.15.dds || true" "DDSTest.at:48"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.15.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:48"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:40: diff -b -B \$abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stderr"
-echo DDSTest.at:40 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.das.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:48: diff -b -B \$abs_srcdir/dds-testsuite/test.15.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.15.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stderr" "DDSTest.at:48"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:40: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:48"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_15
+#AT_START_16
+at_fn_group_banner 16 'DDSTest.at:49' \
+  "DDS \$abs_srcdir/dds-testsuite/test.16.dds" "      "
+at_xfail=no
+(
+  $as_echo "16. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.16.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:49: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.16.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.16.dds || true" "DDSTest.at:49"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.16.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:49"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  8 ) # 8. DDSTest.at:41: DDS $abs_srcdir/dds-testsuite/S2000415.HDF.dds
-    at_setup_line='DDSTest.at:41'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/S2000415.HDF.dds"
-    $at_quiet $ECHO_N "  8: DDS \$abs_srcdir/dds-testsuite/S2000415.HDF.dds$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "8. DDSTest.at:41: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:49: diff -b -B \$abs_srcdir/dds-testsuite/test.16.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.16.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stderr" "DDSTest.at:49"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:49"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_16
+#AT_START_17
+at_fn_group_banner 17 'DDSTest.at:50' \
+  "DDS \$abs_srcdir/dds-testsuite/test.17.dds" "      "
+at_xfail=no
+(
+  $as_echo "17. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.17.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:41: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/S2000415.HDF.dds || true"
-echo DDSTest.at:41 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/S2000415.HDF.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:50: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.17.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.17.dds || true" "DDSTest.at:50"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.17.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:41: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:50"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:50: diff -b -B \$abs_srcdir/dds-testsuite/test.17.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.17.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stderr" "DDSTest.at:50"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:50"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_17
+#AT_START_18
+at_fn_group_banner 18 'DDSTest.at:51' \
+  "DDS \$abs_srcdir/dds-testsuite/test.18.dds" "      "
+at_xfail=no
+(
+  $as_echo "18. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.18.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:51: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.18.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.18.dds || true" "DDSTest.at:51"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.18.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:51"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:41: diff -b -B \$abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stderr"
-echo DDSTest.at:41 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/S2000415.HDF.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:51: diff -b -B \$abs_srcdir/dds-testsuite/test.18.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.18.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stderr" "DDSTest.at:51"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:41: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:51"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_18
+#AT_START_19
+at_fn_group_banner 19 'DDSTest.at:52' \
+  "DDS \$abs_srcdir/dds-testsuite/test.19.dds" "      "
+at_xfail=no
+(
+  $as_echo "19. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.19.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:52: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.19.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19.dds || true" "DDSTest.at:52"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:52"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:52: diff -b -B \$abs_srcdir/dds-testsuite/test.19.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.19.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stderr" "DDSTest.at:52"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:52"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_19
+#AT_START_20
+at_fn_group_banner 20 'DDSTest.at:53' \
+  "DDS \$abs_srcdir/dds-testsuite/test.19b.das.dds" " "
+at_xfail=no
+(
+  $as_echo "20. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.das.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:53: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.19b.das.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.das.dds || true" "DDSTest.at:53"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.das.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:53"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
-  9 ) # 9. DDSTest.at:42: DDS $abs_srcdir/dds-testsuite/test.1.dds
-    at_setup_line='DDSTest.at:42'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.1.dds"
-    $at_quiet $ECHO_N "  9: DDS \$abs_srcdir/dds-testsuite/test.1.dds      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "9. DDSTest.at:42: testing ..."
-      $at_traceon
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:53: diff -b -B \$abs_srcdir/dds-testsuite/test.19b.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.19b.das.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stderr" "DDSTest.at:53"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:53"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_20
+#AT_START_21
+at_fn_group_banner 21 'DDSTest.at:54' \
+  "DDS \$abs_srcdir/dds-testsuite/test.19b.dds" "     "
+at_xfail=no
+(
+  $as_echo "21. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.1.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:42: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.1.dds || true"
-echo DDSTest.at:42 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.1.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:54: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.19b.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.dds || true" "DDSTest.at:54"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:54"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:54: diff -b -B \$abs_srcdir/dds-testsuite/test.19b.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.19b.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stderr" "DDSTest.at:54"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:54"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_21
+#AT_START_22
+at_fn_group_banner 22 'DDSTest.at:55' \
+  "DDS \$abs_srcdir/dds-testsuite/test.2.dds" "       "
+at_xfail=no
+(
+  $as_echo "22. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.1.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.1.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
 
-at_failed=false
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.2.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:55: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.2.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.2.dds || true" "DDSTest.at:55"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.2.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:42: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:55"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:55: diff -b -B \$abs_srcdir/dds-testsuite/test.2.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.2.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stderr" "DDSTest.at:55"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:55"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_22
+#AT_START_23
+at_fn_group_banner 23 'DDSTest.at:56' \
+  "DDS \$abs_srcdir/dds-testsuite/test.20.dds" "      "
+at_xfail=no
+(
+  $as_echo "23. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.20.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:56: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.20.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.20.dds || true" "DDSTest.at:56"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.20.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:56"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:42: diff -b -B \$abs_srcdir/dds-testsuite/test.1.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.1.dds.base stderr"
-echo DDSTest.at:42 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:56: diff -b -B \$abs_srcdir/dds-testsuite/test.20.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.20.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stderr" "DDSTest.at:56"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:56"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_23
+#AT_START_24
+at_fn_group_banner 24 'DDSTest.at:57' \
+  "DDS \$abs_srcdir/dds-testsuite/test.3.dds" "       "
+at_xfail=no
+(
+  $as_echo "24. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.1.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.3.dds needs to be true whether the
+#output is printed to stdout or stderr
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:57: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.3.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.3.dds || true" "DDSTest.at:57"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.3.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:57"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+#Need to compare either stdout or stderr because of the directory the above
+#AT_CHECK prints output to
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:57: diff -b -B \$abs_srcdir/dds-testsuite/test.3.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.3.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stderr" "DDSTest.at:57"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:42: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:57"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_24
+#AT_START_25
+at_fn_group_banner 25 'DDSTest.at:58' \
+  "DDS \$abs_srcdir/dds-testsuite/test.4.dds" "       "
+at_xfail=no
+(
+  $as_echo "25. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  10 ) # 10. DDSTest.at:43: DDS $abs_srcdir/dds-testsuite/test.10.dds
-    at_setup_line='DDSTest.at:43'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.10.dds"
-    $at_quiet $ECHO_N " 10: DDS \$abs_srcdir/dds-testsuite/test.10.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "10. DDSTest.at:43: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.10.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:43: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.10.dds || true"
-echo DDSTest.at:43 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.10.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.10.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.10.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:43: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:43: diff -b -B \$abs_srcdir/dds-testsuite/test.10.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.10.dds.base stderr"
-echo DDSTest.at:43 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.10.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:43: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  11 ) # 11. DDSTest.at:44: DDS $abs_srcdir/dds-testsuite/test.11.dds
-    at_setup_line='DDSTest.at:44'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.11.dds"
-    $at_quiet $ECHO_N " 11: DDS \$abs_srcdir/dds-testsuite/test.11.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "11. DDSTest.at:44: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.11.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:44: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.11.dds || true"
-echo DDSTest.at:44 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.11.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.11.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.11.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:44: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:44: diff -b -B \$abs_srcdir/dds-testsuite/test.11.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.11.dds.base stderr"
-echo DDSTest.at:44 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.11.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:44: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  12 ) # 12. DDSTest.at:45: DDS $abs_srcdir/dds-testsuite/test.12.dds
-    at_setup_line='DDSTest.at:45'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.12.dds"
-    $at_quiet $ECHO_N " 12: DDS \$abs_srcdir/dds-testsuite/test.12.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "12. DDSTest.at:45: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.12.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.4.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:45: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.12.dds || true"
-echo DDSTest.at:45 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.12.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.12.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.12.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:58: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.4.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.4.dds || true" "DDSTest.at:58"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.4.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:45: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:45: diff -b -B \$abs_srcdir/dds-testsuite/test.12.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.12.dds.base stderr"
-echo DDSTest.at:45 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.12.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:58: diff -b -B \$abs_srcdir/dds-testsuite/test.4.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.4.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stderr" "DDSTest.at:58"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:45: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  13 ) # 13. DDSTest.at:46: DDS $abs_srcdir/dds-testsuite/test.13.dds
-    at_setup_line='DDSTest.at:46'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.13.dds"
-    $at_quiet $ECHO_N " 13: DDS \$abs_srcdir/dds-testsuite/test.13.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "13. DDSTest.at:46: testing ..."
-      $at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_25
+#AT_START_26
+at_fn_group_banner 26 'DDSTest.at:59' \
+  "DDS \$abs_srcdir/dds-testsuite/test.6.dds" "       "
+at_xfail=no
+(
+  $as_echo "26. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.13.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.6.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:46: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.13.dds || true"
-echo DDSTest.at:46 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.13.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.13.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.13.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:59: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.6.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.6.dds || true" "DDSTest.at:59"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.6.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:46: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:59"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:46: diff -b -B \$abs_srcdir/dds-testsuite/test.13.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.13.dds.base stderr"
-echo DDSTest.at:46 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.13.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:59: diff -b -B \$abs_srcdir/dds-testsuite/test.6.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.6.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stderr" "DDSTest.at:59"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:46: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  14 ) # 14. DDSTest.at:47: DDS $abs_srcdir/dds-testsuite/test.14.dds
-    at_setup_line='DDSTest.at:47'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.14.dds"
-    $at_quiet $ECHO_N " 14: DDS \$abs_srcdir/dds-testsuite/test.14.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "14. DDSTest.at:47: testing ..."
-      $at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:59"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_26
+#AT_START_27
+at_fn_group_banner 27 'DDSTest.at:60' \
+  "DDS \$abs_srcdir/dds-testsuite/test.7.dds" "       "
+at_xfail=no
+(
+  $as_echo "27. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.14.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.7.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:47: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.14.dds || true"
-echo DDSTest.at:47 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.14.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.14.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.14.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:60: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.7.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.7.dds || true" "DDSTest.at:60"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.7.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:47: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:60"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:47: diff -b -B \$abs_srcdir/dds-testsuite/test.14.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.14.dds.base stderr"
-echo DDSTest.at:47 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.14.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:60: diff -b -B \$abs_srcdir/dds-testsuite/test.7.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.7.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stderr" "DDSTest.at:60"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:47: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  15 ) # 15. DDSTest.at:48: DDS $abs_srcdir/dds-testsuite/test.15.dds
-    at_setup_line='DDSTest.at:48'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.15.dds"
-    $at_quiet $ECHO_N " 15: DDS \$abs_srcdir/dds-testsuite/test.15.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "15. DDSTest.at:48: testing ..."
-      $at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:60"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_27
+#AT_START_28
+at_fn_group_banner 28 'DDSTest.at:61' \
+  "DDS \$abs_srcdir/dds-testsuite/test.8.dds" "       "
+at_xfail=no
+(
+  $as_echo "28. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.15.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.8.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:48: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.15.dds || true"
-echo DDSTest.at:48 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.15.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.15.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.15.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:61: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.8.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.8.dds || true" "DDSTest.at:61"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.8.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:48: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:61"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:48: diff -b -B \$abs_srcdir/dds-testsuite/test.15.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.15.dds.base stderr"
-echo DDSTest.at:48 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.15.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:61: diff -b -B \$abs_srcdir/dds-testsuite/test.8.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.8.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stderr" "DDSTest.at:61"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:48: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  16 ) # 16. DDSTest.at:49: DDS $abs_srcdir/dds-testsuite/test.16.dds
-    at_setup_line='DDSTest.at:49'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.16.dds"
-    $at_quiet $ECHO_N " 16: DDS \$abs_srcdir/dds-testsuite/test.16.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "16. DDSTest.at:49: testing ..."
-      $at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:61"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_28
+#AT_START_29
+at_fn_group_banner 29 'DDSTest.at:62' \
+  "DDS \$abs_srcdir/dds-testsuite/test.9.dds" "       "
+at_xfail=no
+(
+  $as_echo "29. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.16.dds needs to be true whether the
+#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.9.dds needs to be true whether the
 #output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:49: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.16.dds || true"
-echo DDSTest.at:49 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.16.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.16.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.16.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:62: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.9.dds || true"
+at_fn_check_prepare_dynamic "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.9.dds || true" "DDSTest.at:62"
+( $at_check_trace; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.9.dds || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:49: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:62"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 #Need to compare either stdout or stderr because of the directory the above
 #AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:49: diff -b -B \$abs_srcdir/dds-testsuite/test.16.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.16.dds.base stderr"
-echo DDSTest.at:49 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.16.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+{ set +x
+$as_echo "$at_srcdir/DDSTest.at:62: diff -b -B \$abs_srcdir/dds-testsuite/test.9.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.9.dds.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stderr" "DDSTest.at:62"
+( $at_check_trace; diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:49: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  17 ) # 17. DDSTest.at:50: DDS $abs_srcdir/dds-testsuite/test.17.dds
-    at_setup_line='DDSTest.at:50'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.17.dds"
-    $at_quiet $ECHO_N " 17: DDS \$abs_srcdir/dds-testsuite/test.17.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "17. DDSTest.at:50: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.17.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:50: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.17.dds || true"
-echo DDSTest.at:50 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.17.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.17.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.17.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:50: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:50: diff -b -B \$abs_srcdir/dds-testsuite/test.17.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.17.dds.base stderr"
-echo DDSTest.at:50 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.17.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:50: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  18 ) # 18. DDSTest.at:51: DDS $abs_srcdir/dds-testsuite/test.18.dds
-    at_setup_line='DDSTest.at:51'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.18.dds"
-    $at_quiet $ECHO_N " 18: DDS \$abs_srcdir/dds-testsuite/test.18.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "18. DDSTest.at:51: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.18.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:51: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.18.dds || true"
-echo DDSTest.at:51 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.18.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.18.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.18.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:51: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:51: diff -b -B \$abs_srcdir/dds-testsuite/test.18.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.18.dds.base stderr"
-echo DDSTest.at:51 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.18.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:51: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  19 ) # 19. DDSTest.at:52: DDS $abs_srcdir/dds-testsuite/test.19.dds
-    at_setup_line='DDSTest.at:52'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.19.dds"
-    $at_quiet $ECHO_N " 19: DDS \$abs_srcdir/dds-testsuite/test.19.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "19. DDSTest.at:52: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.19.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:52: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.19.dds || true"
-echo DDSTest.at:52 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:52: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:52: diff -b -B \$abs_srcdir/dds-testsuite/test.19.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.19.dds.base stderr"
-echo DDSTest.at:52 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:52: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  20 ) # 20. DDSTest.at:53: DDS $abs_srcdir/dds-testsuite/test.19b.das.dds
-    at_setup_line='DDSTest.at:53'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.19b.das.dds"
-    $at_quiet $ECHO_N " 20: DDS \$abs_srcdir/dds-testsuite/test.19b.das.dds$ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "20. DDSTest.at:53: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.das.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:53: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.19b.das.dds || true"
-echo DDSTest.at:53 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.das.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.das.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.das.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:53: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:53: diff -b -B \$abs_srcdir/dds-testsuite/test.19b.das.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.19b.das.dds.base stderr"
-echo DDSTest.at:53 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.das.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:53: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  21 ) # 21. DDSTest.at:54: DDS $abs_srcdir/dds-testsuite/test.19b.dds
-    at_setup_line='DDSTest.at:54'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.19b.dds"
-    $at_quiet $ECHO_N " 21: DDS \$abs_srcdir/dds-testsuite/test.19b.dds    $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "21. DDSTest.at:54: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:54: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.19b.dds || true"
-echo DDSTest.at:54 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.19b.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:54: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:54: diff -b -B \$abs_srcdir/dds-testsuite/test.19b.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.19b.dds.base stderr"
-echo DDSTest.at:54 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.19b.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:54: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  22 ) # 22. DDSTest.at:55: DDS $abs_srcdir/dds-testsuite/test.2.dds
-    at_setup_line='DDSTest.at:55'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.2.dds"
-    $at_quiet $ECHO_N " 22: DDS \$abs_srcdir/dds-testsuite/test.2.dds      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "22. DDSTest.at:55: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.2.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:55: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.2.dds || true"
-echo DDSTest.at:55 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.2.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.2.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.2.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:55: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:55: diff -b -B \$abs_srcdir/dds-testsuite/test.2.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.2.dds.base stderr"
-echo DDSTest.at:55 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.2.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:55: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  23 ) # 23. DDSTest.at:56: DDS $abs_srcdir/dds-testsuite/test.20.dds
-    at_setup_line='DDSTest.at:56'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.20.dds"
-    $at_quiet $ECHO_N " 23: DDS \$abs_srcdir/dds-testsuite/test.20.dds     $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "23. DDSTest.at:56: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.20.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:56: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.20.dds || true"
-echo DDSTest.at:56 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.20.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.20.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.20.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:56: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:56: diff -b -B \$abs_srcdir/dds-testsuite/test.20.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.20.dds.base stderr"
-echo DDSTest.at:56 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.20.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:56: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  24 ) # 24. DDSTest.at:57: DDS $abs_srcdir/dds-testsuite/test.3.dds
-    at_setup_line='DDSTest.at:57'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.3.dds"
-    $at_quiet $ECHO_N " 24: DDS \$abs_srcdir/dds-testsuite/test.3.dds      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "24. DDSTest.at:57: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.3.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:57: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.3.dds || true"
-echo DDSTest.at:57 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.3.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.3.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.3.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:57: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:57: diff -b -B \$abs_srcdir/dds-testsuite/test.3.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.3.dds.base stderr"
-echo DDSTest.at:57 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.3.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:57: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  25 ) # 25. DDSTest.at:58: DDS $abs_srcdir/dds-testsuite/test.4.dds
-    at_setup_line='DDSTest.at:58'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.4.dds"
-    $at_quiet $ECHO_N " 25: DDS \$abs_srcdir/dds-testsuite/test.4.dds      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "25. DDSTest.at:58: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.4.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:58: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.4.dds || true"
-echo DDSTest.at:58 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.4.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.4.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.4.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:58: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:58: diff -b -B \$abs_srcdir/dds-testsuite/test.4.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.4.dds.base stderr"
-echo DDSTest.at:58 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.4.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:58: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  26 ) # 26. DDSTest.at:59: DDS $abs_srcdir/dds-testsuite/test.6.dds
-    at_setup_line='DDSTest.at:59'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.6.dds"
-    $at_quiet $ECHO_N " 26: DDS \$abs_srcdir/dds-testsuite/test.6.dds      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "26. DDSTest.at:59: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.6.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:59: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.6.dds || true"
-echo DDSTest.at:59 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.6.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.6.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.6.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:59: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:59: diff -b -B \$abs_srcdir/dds-testsuite/test.6.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.6.dds.base stderr"
-echo DDSTest.at:59 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.6.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:59: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  27 ) # 27. DDSTest.at:60: DDS $abs_srcdir/dds-testsuite/test.7.dds
-    at_setup_line='DDSTest.at:60'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.7.dds"
-    $at_quiet $ECHO_N " 27: DDS \$abs_srcdir/dds-testsuite/test.7.dds      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "27. DDSTest.at:60: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.7.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:60: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.7.dds || true"
-echo DDSTest.at:60 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.7.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.7.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.7.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:60: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:60: diff -b -B \$abs_srcdir/dds-testsuite/test.7.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.7.dds.base stderr"
-echo DDSTest.at:60 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.7.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:60: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  28 ) # 28. DDSTest.at:61: DDS $abs_srcdir/dds-testsuite/test.8.dds
-    at_setup_line='DDSTest.at:61'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.8.dds"
-    $at_quiet $ECHO_N " 28: DDS \$abs_srcdir/dds-testsuite/test.8.dds      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "28. DDSTest.at:61: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.8.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:61: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.8.dds || true"
-echo DDSTest.at:61 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.8.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.8.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.8.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:61: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:61: diff -b -B \$abs_srcdir/dds-testsuite/test.8.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.8.dds.base stderr"
-echo DDSTest.at:61 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.8.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:61: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  29 ) # 29. DDSTest.at:62: DDS $abs_srcdir/dds-testsuite/test.9.dds
-    at_setup_line='DDSTest.at:62'
-    at_desc="DDS \$abs_srcdir/dds-testsuite/test.9.dds"
-    $at_quiet $ECHO_N " 29: DDS \$abs_srcdir/dds-testsuite/test.9.dds      $ECHO_C"
-    at_xfail=no
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "29. DDSTest.at:62: testing ..."
-      $at_traceon
-
-
-#Added || true because the $abs_srcdir/dds-test -p < $abs_srcdir/dds-testsuite/test.9.dds needs to be true whether the
-#output is printed to stdout or stderr
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:62: \$abs_builddir/dds-test -p < \$abs_srcdir/dds-testsuite/test.9.dds || true"
-echo DDSTest.at:62 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.9.dds || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.9.dds || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/dds-test -p < $abs_srcdir/dds-testsuite/test.9.dds || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:62: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-#Need to compare either stdout or stderr because of the directory the above
-#AT_CHECK prints output to
-$at_traceoff
-echo "$at_srcdir/DDSTest.at:62: diff -b -B \$abs_srcdir/dds-testsuite/test.9.dds.base stdout || diff -b -B \$abs_srcdir/dds-testsuite/test.9.dds.base stderr"
-echo DDSTest.at:62 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stdout || diff -b -B $abs_srcdir/dds-testsuite/test.9.dds.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/DDSTest.at:62: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-      $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-
-  * )
-    echo "$as_me: no such test group: $at_group" >&2
-    continue
-    ;;
-  esac
-
-  # Be sure to come back to the suite directory, in particular
-  # since below we might `rm' the group directory we are in currently.
-  cd "$at_suite_dir"
-
-  case $at_group in
-    banner-*) ;;
-    *)
-      if test ! -f "$at_check_line_file"; then
-	sed "s/^ */$as_me: warning: /" <<_ATEOF
-	A failure happened in a test group before any test could be
-	run. This means that test suite is improperly designed.  Please
-	report this failure to <opendap-tech at opendap.org>.
-_ATEOF
-	echo "$at_setup_line" >"$at_check_line_file"
-      fi
-      at_group_count=`expr 1 + $at_group_count`
-      $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
-      echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log"
-      case $at_xfail:$at_status in
-	yes:0)
-	    at_msg="UNEXPECTED PASS"
-	    at_xpass_list="$at_xpass_list $at_group"
-	    at_errexit=$at_errexit_p
-	    ;;
-	no:0)
-	    at_msg="ok"
-	    at_pass_list="$at_pass_list $at_group"
-	    at_errexit=false
-	    ;;
-	*:77)
-	    at_msg='skipped ('`cat "$at_check_line_file"`')'
-	    at_skip_list="$at_skip_list $at_group"
-	    at_errexit=false
-	    ;;
-	yes:*)
-	    at_msg='expected failure ('`cat "$at_check_line_file"`')'
-	    at_xfail_list="$at_xfail_list $at_group"
-	    at_errexit=false
-	    ;;
-	no:*)
-	    at_msg='FAILED ('`cat "$at_check_line_file"`')'
-	    at_fail_list="$at_fail_list $at_group"
-	    at_errexit=$at_errexit_p
-	    ;;
-      esac
-      # Make sure there is a separator even with long titles.
-      echo " $at_msg"
-      at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
-      case $at_status in
-	0|77)
-	  # $at_times_file is only available if the group succeeded.
-	  # We're not including the group log, so the success message
-	  # is written in the global log separately.  But we also
-	  # write to the group log in case they're using -d.
-	  if test -f "$at_times_file"; then
-	    at_log_msg="$at_log_msg	("`sed 1d "$at_times_file"`')'
-	    rm -f "$at_times_file"
-          fi
-	  echo "$at_log_msg" >> "$at_group_log"
-	  echo "$at_log_msg" >&5
-
-	  # Cleanup the group directory, unless the user wants the files.
-	  if $at_debug_p ; then
-	    	  {
-	    echo "#! /bin/sh"
-	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
-	    echo "cd '$at_dir'"
-	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
-	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
-	    echo 'exit 1'
-	  } >$at_group_dir/run
-	  chmod +x $at_group_dir/run
-
-	  elif test -d "$at_group_dir"; then
-	    find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
-	    rm -fr "$at_group_dir"
-	  fi
-	  ;;
-	*)
-	  # Upon failure, include the log into the testsuite's global
-	  # log.  The failure message is written in the group log.  It
-	  # is later included in the global log.
-	  echo "$at_log_msg" >> "$at_group_log"
-
-	  # Upon failure, keep the group directory for autopsy, and
-	  # create the debugging script.
-	  	  {
-	    echo "#! /bin/sh"
-	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
-	    echo "cd '$at_dir'"
-	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
-	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
-	    echo 'exit 1'
-	  } >$at_group_dir/run
-	  chmod +x $at_group_dir/run
-
-	  $at_errexit && break
-	  ;;
-      esac
-      ;;
-  esac
-done
-
-# Back to the top directory.
-cd "$at_dir"
-
-# Compute the duration of the suite.
-at_stop_date=`date`
-at_stop_time=`date +%s 2>/dev/null`
-echo "$as_me: ending at: $at_stop_date" >&5
-case $at_start_time,$at_stop_time in
-  [0-9]*,[0-9]*)
-    at_duration_s=`expr $at_stop_time - $at_start_time`
-    at_duration_m=`expr $at_duration_s / 60`
-    at_duration_h=`expr $at_duration_m / 60`
-    at_duration_s=`expr $at_duration_s % 60`
-    at_duration_m=`expr $at_duration_m % 60`
-    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
-    echo "$as_me: test suite duration: $at_duration" >&5
-    ;;
-esac
-
-# Wrap up the test suite with summary statistics.
-at_skip_count=`set dummy $at_skip_list; shift; echo $#`
-at_fail_count=`set dummy $at_fail_list; shift; echo $#`
-at_xpass_count=`set dummy $at_xpass_list; shift; echo $#`
-at_xfail_count=`set dummy $at_xfail_list; shift; echo $#`
-
-at_run_count=`expr $at_group_count - $at_skip_count`
-at_unexpected_count=`expr $at_xpass_count + $at_fail_count`
-at_total_fail_count=`expr $at_xfail_count + $at_fail_count`
-
-echo
-cat <<\_ASBOX
-## ------------- ##
-## Test results. ##
-## ------------- ##
-_ASBOX
-echo
-{
-  echo
-  cat <<\_ASBOX
-## ------------- ##
-## Test results. ##
-## ------------- ##
-_ASBOX
-  echo
-} >&5
-
-if test $at_run_count = 1; then
-  at_result="1 test"
-  at_were=was
-else
-  at_result="$at_run_count tests"
-  at_were=were
-fi
-if $at_errexit_p && test $at_unexpected_count != 0; then
-  if test $at_xpass_count = 1; then
-    at_result="$at_result $at_were run, one passed"
-  else
-    at_result="$at_result $at_were run, one failed"
-  fi
-  at_result="$at_result unexpectedly and inhibited subsequent tests."
-else
-  # Don't you just love exponential explosion of the number of cases?
-  case $at_xpass_count:$at_fail_count:$at_xfail_count in
-    # So far, so good.
-    0:0:0) at_result="$at_result $at_were successful." ;;
-    0:0:*) at_result="$at_result behaved as expected." ;;
-
-    # Some unexpected failures
-    0:*:0) at_result="$at_result $at_were run,
-$at_fail_count failed unexpectedly." ;;
-
-    # Some failures, both expected and unexpected
-    0:*:1) at_result="$at_result $at_were run,
-$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
-    0:*:*) at_result="$at_result $at_were run,
-$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
-
-    # No unexpected failures, but some xpasses
-    *:0:*) at_result="$at_result $at_were run,
-$at_xpass_count passed unexpectedly." ;;
-
-    # No expected failures, but failures and xpasses
-    *:1:0) at_result="$at_result $at_were run,
-$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
-    *:*:0) at_result="$at_result $at_were run,
-$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
-
-    # All of them.
-    *:*:1) at_result="$at_result $at_were run,
-$at_xpass_count passed unexpectedly,
-$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
-    *:*:*) at_result="$at_result $at_were run,
-$at_xpass_count passed unexpectedly,
-$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
-  esac
-
-  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
-    at_result="All $at_result"
-  fi
-fi
-
-# Now put skips in the mix.
-case $at_skip_count in
-  0) ;;
-  1) at_result="$at_result
-1 test was skipped." ;;
-  *) at_result="$at_result
-$at_skip_count tests were skipped." ;;
-esac
-
-if test $at_unexpected_count = 0; then
-  echo "$at_result"
-  echo "$at_result" >&5
-else
-  echo "ERROR: $at_result" >&2
-  echo "ERROR: $at_result" >&5
-  {
-    echo
-    cat <<\_ASBOX
-## ------------------------ ##
-## Summary of the failures. ##
-## ------------------------ ##
-_ASBOX
-
-    # Summary of failed and skipped tests.
-    if test $at_fail_count != 0; then
-      echo "Failed tests:"
-      $SHELL "$0" $at_fail_list --list
-      echo
-    fi
-    if test $at_skip_count != 0; then
-      echo "Skipped tests:"
-      $SHELL "$0" $at_skip_list --list
-      echo
-    fi
-    if test $at_xpass_count != 0; then
-      echo "Unexpected passes:"
-      $SHELL "$0" $at_xpass_list --list
-      echo
-    fi
-    if test $at_fail_count != 0; then
-      cat <<\_ASBOX
-## ---------------------- ##
-## Detailed failed tests. ##
-## ---------------------- ##
-_ASBOX
-      echo
-      for at_group in $at_fail_list
-      do
-        at_group_normalized=$at_group
-
-  while :; do
-    case $at_group_normalized in #(
-    $at_format*) break;;
-    esac
-    at_group_normalized=0$at_group_normalized
-  done
-
-        cat "$at_suite_dir/$at_group_normalized/$as_me.log"
-        echo
-      done
-      echo
-    fi
-    if test -n "$at_top_srcdir"; then
-      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## ${at_top_build_prefix}config.log ##
-_ASBOX
-      sed 's/^/| /' ${at_top_build_prefix}config.log
-      echo
-    fi
-  } >&5
-
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## $as_me.log was created. ##
-_ASBOX
-
-  echo
-  echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:"
-  echo
-  echo "   To: <opendap-tech at opendap.org>"
-  echo "   Subject: [libdap 3.11.6] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}"
-  echo
-  if test $at_debug_p = false; then
-    echo
-    echo 'You may investigate any problem if you feel able to do so, in which'
-    echo 'case the test suite provides a good starting point.  Its output may'
-    echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
-    echo
-  fi
-    exit 1
-fi
-
-exit 0
-
-
-
+at_fn_check_status 0 $at_status "$at_srcdir/DDSTest.at:62"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_29
diff --git a/tests/EXPRTest b/tests/EXPRTest
index 68a38ee..353e429 100755
--- a/tests/EXPRTest
+++ b/tests/EXPRTest
@@ -1,58 +1,78 @@
 #! /bin/sh
+# Generated from EXPRTest.at by GNU Autoconf 2.69.
+#
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
 # This test suite is free software; the Free Software Foundation gives
 # unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
   else
-    PATH_SEPARATOR=:
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
   fi
-  rm -f conf$$.sh
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
 
 
@@ -61,20 +81,19 @@ fi
 # there to prevent editors from complaining about space-tab.
 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
 # splitting by setting IFS to empty value.)
-as_nl='
-'
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -85,354 +104,341 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
 
 # CDPATH.
-$as_unset CDPATH
-
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
 else
-  as_have_required=no
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
 fi
-
-  if test $as_have_required = yes && 	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
 
 exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_have_required=no
 fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
 else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  case $as_dir in
+  as_found=:
+  case $as_dir in #(
 	 /*)
 	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
 	   done;;
        esac
+  as_found=false
 done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
 IFS=$as_save_IFS
 
 
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
 fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
 fi
-
 fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
 
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-        done
-        export CONFIG_SHELL
-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
 
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
 
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
 
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
-fi
 
-fi
+} # as_fn_mkdir_p
 
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
 
 
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
 
-exitcode=0
-if as_func_success; then
-  :
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
 else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
+  as_expr=false
 fi
 
-if as_func_ret_success; then
-  :
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
 else
-  exitcode=1
-  echo as_func_ret_success failed.
+  as_basename=false
 fi
 
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_dirname=false
 fi
 
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf at gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
-}
-
-
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
 
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
   sed -n '
     p
     /[$]LINENO/=
@@ -449,9 +455,12 @@ test \$exitcode = 0") || {
       s/-\n.*//
     ' >$as_me.lineno &&
   chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -460,84 +469,55 @@ test \$exitcode = 0") || {
   exit
 }
 
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
 -n*)
-  case `echo 'x\c'` in
+  case `echo 'xy\c'` in
   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
 else
   rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -547,32 +527,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 
+
+
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # How were we run?
 at_cli_args="$@"
 
-# Load the config file.
-for at_file in atconfig atlocal
-do
-  test -r $at_file || continue
-  . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
-   { (exit 1); exit 1; }; }
-done
-
-# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
-: ${at_top_build_prefix=$at_top_builddir}
-
-# atconfig delivers names relative to the directory the test suite is
-# in, but the groups themselves are run in testsuite-dir/group-dir.
-if test -n "$at_top_srcdir"; then
-  builddir=../..
-  for at_dir in srcdir top_srcdir top_build_prefix
-  do
-    at_val=`eval echo '${'at_$at_dir'}'`
-    eval "$at_dir=\$at_val/../.."
-  done
-fi
 
 # Not all shells have the 'times' builtin; the subshell is needed to make
 # sure we discard the 'times: not found' message from the shell.
@@ -583,9 +544,14 @@ at_times_p=false
 at_debug_args=
 # -e sets to true
 at_errexit_p=false
-# Shall we be verbose?
+# Shall we be verbose?  ':' means no, empty means yes.
 at_verbose=:
-at_quiet=echo
+at_quiet=
+# Running several jobs in parallel, 0 means as many as test groups.
+at_jobs=1
+at_traceon=:
+at_trace_echo=:
+at_check_filter_trace=:
 
 # Shall we keep the debug scripts?  Must be `:' when the suite is
 # run by a debug script, so that the script doesn't remove itself.
@@ -596,31 +562,29 @@ at_help_p=false
 at_version_p=false
 # List test groups?
 at_list_p=false
+# --clean
+at_clean=false
 # Test groups to run
 at_groups=
+# Whether to rerun failed tests.
+at_recheck=
+# Whether a write failure occurred
+at_write_fail=0
 
-# The directory we are in.
+# The directory we run the suite in.  Default to . if no -C option.
 at_dir=`pwd`
-# The directory the whole suite works in.
-# Should be absolutely to let the user `cd' at will.
-at_suite_dir=$at_dir/$as_me.dir
-# The file containing the suite.
-at_suite_log=$at_dir/$as_me.log
-# The file containing the location of the last AT_CHECK.
-at_check_line_file=$at_suite_dir/at-check-line
-# The file containing the exit status of the last command.
-at_status_file=$at_suite_dir/at-status
-# The files containing the output of the tested commands.
-at_stdout=$at_suite_dir/at-stdout
-at_stder1=$at_suite_dir/at-stder1
-at_stderr=$at_suite_dir/at-stderr
-# The file containing dates.
-at_times_file=$at_suite_dir/at-times
+# An absolute reference to this testsuite script.
+case $as_myself in
+  [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
+  * ) at_myself=$at_dir/$as_myself ;;
+esac
+# Whether -C is in effect.
+at_change_dir=false
 
+# Whether to enable colored test results.
+at_color=no
 # List of the tested programs.
 at_tested=''
-# List of the all the test groups.
-at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122'
 # As many question marks as there are digits in the last test group number.
 # Used to normalize the test group numbers so that `ls' lists them in
 # numerical order.
@@ -730,25 +694,35 @@ at_help_all="1;EXPRTest.at:45;expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k
 102;EXPRTest.at:99;expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  (pass);expr;
 103;EXPRTest.at:100;expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass);expr;
 104;EXPRTest.at:100;expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass);expr;
-105;EXPRTest.at:101;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" (pass);expr;
-106;EXPRTest.at:101;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" (pass);expr;
-107;EXPRTest.at:102;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass);expr;
-108;EXPRTest.at:102;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass);expr;
-109;EXPRTest.at:104;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" (pass);expr;
-110;EXPRTest.at:104;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" (pass);expr;
-111;EXPRTest.at:105;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" (pass);expr;
-112;EXPRTest.at:105;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" (pass);expr;
-113;EXPRTest.at:106;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" (pass);expr;
-114;EXPRTest.at:106;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" (pass);expr;
-115;EXPRTest.at:107;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass);expr;
-116;EXPRTest.at:107;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass);expr;
-117;EXPRTest.at:108;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" (pass);expr;
-118;EXPRTest.at:108;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" (pass);expr;
-119;EXPRTest.at:109;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass);expr;
-120;EXPRTest.at:109;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass);expr;
-121;EXPRTest.at:110;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" (pass);expr;
-122;EXPRTest.at:110;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" (pass);expr;
+105;EXPRTest.at:102;expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass);expr;
+106;EXPRTest.at:102;expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass);expr;
 "
+# List of the all the test groups.
+at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
+
+# at_fn_validate_ranges NAME...
+# -----------------------------
+# Validate and normalize the test group number contained in each variable
+# NAME. Leading zeroes are treated as decimal.
+at_fn_validate_ranges ()
+{
+  for at_grp
+  do
+    eval at_value=\$$at_grp
+    if test $at_value -lt 1 || test $at_value -gt 106; then
+      $as_echo "invalid test group: $at_value" >&2
+      exit 1
+    fi
+    case $at_value in
+      0*) # We want to treat leading 0 as decimal, like expr and test, but
+	  # AS_VAR_ARITH treats it as octal if it uses $(( )).
+	  # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
+	  # expr fork, but it is not worth the effort to determine if the
+	  # shell supports XSI when the user can just avoid leading 0.
+	  eval $at_grp='`expr $at_value + 0`' ;;
+    esac
+  done
+}
 
 at_prev=
 for at_option
@@ -760,8 +734,8 @@ do
   fi
 
   case $at_option in
-  *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;;
-  *)   at_optarg= ;;
+  *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
+  *)    at_optarg= ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -780,10 +754,20 @@ do
 	;;
 
     --clean | -c )
-	test -d "$at_suite_dir" &&
-	  find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
-	rm -f -r "$at_suite_dir" "$at_suite_log"
-	exit 0
+	at_clean=:
+	;;
+
+    --color )
+	at_color=always
+	;;
+    --color=* )
+	case $at_optarg in
+	no | never | none) at_color=never ;;
+	auto | tty | if-tty) at_color=auto ;;
+	always | yes | force) at_color=always ;;
+	*) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
+	   as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
+	esac
 	;;
 
     --debug | -d )
@@ -796,30 +780,35 @@ do
 	;;
 
     --verbose | -v )
-	at_verbose=echo; at_quiet=:
+	at_verbose=; at_quiet=:
 	;;
 
     --trace | -x )
-	at_traceon='set -x'; at_traceoff='set +x'
+	at_traceon='set -x'
+	at_trace_echo=echo
+	at_check_filter_trace=at_fn_filter_trace
 	;;
 
     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
-	at_groups="$at_groups$at_option "
+	at_fn_validate_ranges at_option
+	as_fn_append at_groups "$at_option$as_nl"
 	;;
 
     # Ranges
     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
 	at_range_start=`echo $at_option |tr -d X-`
-	at_range=`echo " $at_groups_all " | \
-	  sed -e 's/^.* \('$at_range_start' \)/\1/'`
-	at_groups="$at_groups$at_range "
+	at_fn_validate_ranges at_range_start
+	at_range=`$as_echo "$at_groups_all" | \
+	  sed -ne '/^'$at_range_start'$/,$p'`
+	as_fn_append at_groups "$at_range$as_nl"
 	;;
 
     -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
 	at_range_end=`echo $at_option |tr -d X-`
-	at_range=`echo " $at_groups_all " | \
-	  sed -e 's/\( '$at_range_end'\) .*$/\1/'`
-	at_groups="$at_groups$at_range "
+	at_fn_validate_ranges at_range_end
+	at_range=`$as_echo "$at_groups_all" | \
+	  sed -ne '1,/^'$at_range_end'$/p'`
+	as_fn_append at_groups "$at_range$as_nl"
 	;;
 
     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
@@ -835,10 +824,38 @@ do
 	  at_range_end=$at_range_start
 	  at_range_start=$at_tmp
 	fi
-	at_range=`echo " $at_groups_all " | \
-	  sed -e 's/^.*\( '$at_range_start' \)/\1/' \
-	      -e 's/\( '$at_range_end'\) .*$/\1/'`
-	at_groups="$at_groups$at_range "
+	at_fn_validate_ranges at_range_start at_range_end
+	at_range=`$as_echo "$at_groups_all" | \
+	  sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
+	as_fn_append at_groups "$at_range$as_nl"
+	;;
+
+    # Directory selection.
+    --directory | -C )
+	at_prev=--directory
+	;;
+    --directory=* )
+	at_change_dir=:
+	at_dir=$at_optarg
+	if test x- = "x$at_dir" ; then
+	  at_dir=./-
+	fi
+	;;
+
+    # Parallel execution.
+    --jobs | -j )
+	at_jobs=0
+	;;
+    --jobs=* | -j[0-9]* )
+	if test -n "$at_optarg"; then
+	  at_jobs=$at_optarg
+	else
+	  at_jobs=`expr X$at_option : 'X-j\(.*\)'`
+	fi
+	case $at_jobs in *[!0-9]*)
+	  at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
+	  as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
+	esac
 	;;
 
     # Keywords.
@@ -862,85 +879,97 @@ do
 	    ;;
 	  esac
 	  # It is on purpose that we match the test group titles too.
-	  at_groups_selected=`echo "$at_groups_selected" |
+	  at_groups_selected=`$as_echo "$at_groups_selected" |
 	      grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
 	done
-	at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
-	# Smash the newlines.
-	at_groups="$at_groups`echo $at_groups_selected` "
+	# Smash the keywords.
+	at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
+	as_fn_append at_groups "$at_groups_selected$as_nl"
+	;;
+    --recheck)
+	at_recheck=:
 	;;
 
     *=*)
 	at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
 	# Reject names that are not valid shell variable names.
-	expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-	  { echo "$as_me: error: invalid variable name: $at_envvar" >&2
-   { (exit 1); exit 1; }; }
-	at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
-	eval "$at_envvar='$at_value'"
+	case $at_envvar in
+	  '' | [0-9]* | *[!_$as_cr_alnum]* )
+	    as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
+	esac
+	at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
+	# Export now, but save eval for later and for debug scripts.
 	export $at_envvar
-	# Propagate to debug scripts.
-	at_debug_args="$at_debug_args $at_envvar='$at_value'"
+	as_fn_append at_debug_args " $at_envvar='$at_value'"
 	;;
 
-     *) echo "$as_me: invalid option: $at_option" >&2
-	echo "Try \`$0 --help' for more information." >&2
+     *) $as_echo "$as_me: invalid option: $at_option" >&2
+	$as_echo "Try \`$0 --help' for more information." >&2
 	exit 1
 	;;
   esac
 done
 
+# Verify our last option didn't require an argument
+if test -n "$at_prev"; then :
+  as_fn_error $? "\`$at_prev' requires an argument"
+fi
+
+# The file containing the suite.
+at_suite_log=$at_dir/$as_me.log
+
 # Selected test groups.
-if test -z "$at_groups"; then
+if test -z "$at_groups$at_recheck"; then
   at_groups=$at_groups_all
 else
-  # Sort the tests, removing duplicates:
-  at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu`
-  # and add banners.  (Passing at_groups_all is tricky--see the comment
-  # starting with "Passing at_groups is tricky.")
-  at_groups=`echo "$at_groups$as_nl $at_groups_all" |
-    awk 'BEGIN { FS = "@" } # Effectively switch off field splitting.
-	/^$/ { next }  # Ignore the empty line.
-	!/ / { groups++; selected[$ 0] = 1; next }
-	# The last line, containing at_groups_all.
-	{
-		n = split($ 0, a, " ")
-		# If there are several tests, select their banners:
-		if (groups > 1) {
-			for (i = 1; i <= n; i++) {
-				if (a[i] ~ /^banner-/)
-					banner = a[i]
-				else if (banner != "" && selected[a[i]] == 1)
-					selected[banner] = 1
-			}
-		}
-		for (i = 1; i <= n; i++)
-			if (selected[a[i]] == 1)
-				list = list " " a[i]
-		print list
-	}'`
+  if test -n "$at_recheck" && test -r "$at_suite_log"; then
+    at_oldfails=`sed -n '
+      /^Failed tests:$/,/^Skipped tests:$/{
+	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
+      }
+      /^Unexpected passes:$/,/^## Detailed failed tests/{
+	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
+      }
+      /^## Detailed failed tests/q
+      ' "$at_suite_log"`
+    as_fn_append at_groups "$at_oldfails$as_nl"
+  fi
+  # Sort the tests, removing duplicates.
+  at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
+fi
+
+if test x"$at_color" = xalways \
+   || { test x"$at_color" = xauto && test -t 1; }; then
+  at_red=`printf '\033[0;31m'`
+  at_grn=`printf '\033[0;32m'`
+  at_lgn=`printf '\033[1;32m'`
+  at_blu=`printf '\033[1;34m'`
+  at_std=`printf '\033[m'`
+else
+  at_red= at_grn= at_lgn= at_blu= at_std=
 fi
 
 # Help message.
 if $at_help_p; then
-  cat <<_ATEOF
+  cat <<_ATEOF || at_write_fail=1
 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
 
 Run all the tests, or the selected TESTS, given by numeric ranges, and
 save a detailed log file.  Upon failure, create debugging scripts.
 
-You should not change environment variables unless explicitly passed
-as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
+Do not change environment variables directly.  Instead, set them via
+command line arguments.  Set \`AUTOTEST_PATH' to select the executables
 to exercise.  Each relative directory is expanded as build and source
-directories relatively to the top level of this distribution.  E.g.,
+directories relative to the top level of this distribution.
+E.g., from within the build directory /tmp/foo-1.0, invoking this:
 
   $ $0 AUTOTEST_PATH=bin
 
-possibly amounts into
+is equivalent to the following, assuming the source directory is /src/foo-1.0:
 
-  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
+  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
 _ATEOF
-cat <<_ATEOF
+cat <<_ATEOF || at_write_fail=1
 
 Operation modes:
   -h, --help     print the help message, then exit
@@ -948,95 +977,211 @@ Operation modes:
   -c, --clean    remove all the files this test suite might create and exit
   -l, --list     describes all the tests, or the selected TESTS
 _ATEOF
-cat <<_ATEOF
+cat <<_ATEOF || at_write_fail=1
 
 Execution tuning:
+  -C, --directory=DIR
+                 change to directory DIR before starting
+      --color[=never|auto|always]
+                 enable colored test results on terminal, or always
+  -j, --jobs[=N]
+                 Allow N jobs at once; infinite jobs with no arg (default 1)
   -k, --keywords=KEYWORDS
-	         select the tests matching all the comma-separated KEYWORDS
-	         multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
+                 select the tests matching all the comma-separated KEYWORDS
+                 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
+      --recheck  select all tests that failed or passed unexpectedly last time
   -e, --errexit  abort as soon as a test fails; implies --debug
   -v, --verbose  force more detailed output
-	         default for debugging scripts
+                 default for debugging scripts
   -d, --debug    inhibit clean up and top-level logging
-	         default for debugging scripts
+                 default for debugging scripts
   -x, --trace    enable tests shell tracing
 _ATEOF
-cat <<_ATEOF
+cat <<_ATEOF || at_write_fail=1
 
 Report bugs to <opendap-tech at opendap.org>.
 _ATEOF
-  exit 0
+  exit $at_write_fail
 fi
 
 # List of tests.
 if $at_list_p; then
-  cat <<_ATEOF
-libdap 3.11.6 test suite: expr-test test groups:
+  cat <<_ATEOF || at_write_fail=1
+libdap 3.12.0 test suite: expr-test test groups:
 
  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
       KEYWORDS
 
 _ATEOF
-  # Passing at_groups is tricky.  We cannot use it to form a literal string
-  # or regexp because of the limitation of AIX awk.  And Solaris' awk
-  # doesn't grok more than 99 fields in a record, so we have to use `split'.
-  echo "$at_groups$as_nl$at_help_all" |
-    awk 'BEGIN { FS = ";" }
-	 NR == 1 {
-	   for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1
+  # Pass an empty line as separator between selected groups and help.
+  $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
+    awk 'NF == 1 && FS != ";" {
+	   selected[$ 1] = 1
 	   next
 	 }
-	 {
+	 /^$/ { FS = ";" }
+	 NF > 0 {
 	   if (selected[$ 1]) {
 	     printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
-	     if ($ 4) printf "      %s\n", $ 4
+	     if ($ 4) {
+	       lmax = 79
+	       indent = "     "
+	       line = indent
+	       len = length (line)
+	       n = split ($ 4, a, " ")
+	       for (i = 1; i <= n; i++) {
+		 l = length (a[i]) + 1
+		 if (i > 1 && len + l > lmax) {
+		   print line
+		   line = indent " " a[i]
+		   len = length (line)
+		 } else {
+		   line = line " " a[i]
+		   len += l
+		 }
+	       }
+	       if (n)
+		 print line
+	     }
 	   }
-	 }'
-  exit 0
+	 }' || at_write_fail=1
+  exit $at_write_fail
 fi
 if $at_version_p; then
-  echo "$as_me (libdap 3.11.6)"
-  cat <<\_ACEOF
+  $as_echo "$as_me (libdap 3.12.0)" &&
+  cat <<\_ATEOF || at_write_fail=1
 
-Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
-Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This test suite is free software; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit 0
+_ATEOF
+  exit $at_write_fail
+fi
+
+# Should we print banners?  Yes if more than one test is run.
+case $at_groups in #(
+  *$as_nl* )
+      at_print_banners=: ;; #(
+  * ) at_print_banners=false ;;
+esac
+# Text for banner N, set to a single space once printed.
+
+# Take any -C into account.
+if $at_change_dir ; then
+  test x != "x$at_dir" && cd "$at_dir" \
+    || as_fn_error $? "unable to change directory"
+  at_dir=`pwd`
+fi
+
+# Load the config files for any default variable assignments.
+for at_file in atconfig atlocal
+do
+  test -r $at_file || continue
+  . ./$at_file || as_fn_error $? "invalid content: $at_file"
+done
+
+# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
+: "${at_top_build_prefix=$at_top_builddir}"
+
+# Perform any assignments requested during argument parsing.
+eval "$at_debug_args"
+
+# atconfig delivers names relative to the directory the test suite is
+# in, but the groups themselves are run in testsuite-dir/group-dir.
+if test -n "$at_top_srcdir"; then
+  builddir=../..
+  for at_dir_var in srcdir top_srcdir top_build_prefix
+  do
+    eval at_val=\$at_$at_dir_var
+    case $at_val in
+      [\\/$]* | ?:[\\/]* ) at_prefix= ;;
+      *) at_prefix=../../ ;;
+    esac
+    eval "$at_dir_var=\$at_prefix\$at_val"
+  done
+fi
+
+## -------------------- ##
+## Directory structure. ##
+## -------------------- ##
+
+# This is the set of directories and files used by this script
+# (non-literals are capitalized):
+#
+# TESTSUITE         - the testsuite
+# TESTSUITE.log     - summarizes the complete testsuite run
+# TESTSUITE.dir/    - created during a run, remains after -d or failed test
+# + at-groups/      - during a run: status of all groups in run
+# | + NNN/          - during a run: meta-data about test group NNN
+# | | + check-line  - location (source file and line) of current AT_CHECK
+# | | + status      - exit status of current AT_CHECK
+# | | + stdout      - stdout of current AT_CHECK
+# | | + stder1      - stderr, including trace
+# | | + stderr      - stderr, with trace filtered out
+# | | + test-source - portion of testsuite that defines group
+# | | + times       - timestamps for computing duration
+# | | + pass        - created if group passed
+# | | + xpass       - created if group xpassed
+# | | + fail        - created if group failed
+# | | + xfail       - created if group xfailed
+# | | + skip        - created if group skipped
+# + at-stop         - during a run: end the run if this file exists
+# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
+# + 0..NNN/         - created for each group NNN, remains after -d or failed test
+# | + TESTSUITE.log - summarizes the group results
+# | + ...           - files created during the group
+
+# The directory the whole suite works in.
+# Should be absolute to let the user `cd' at will.
+at_suite_dir=$at_dir/$as_me.dir
+# The file containing the suite ($at_dir might have changed since earlier).
+at_suite_log=$at_dir/$as_me.log
+# The directory containing helper files per test group.
+at_helper_dir=$at_suite_dir/at-groups
+# Stop file: if it exists, do not start new jobs.
+at_stop_file=$at_suite_dir/at-stop
+# The fifo used for the job dispatcher.
+at_job_fifo=$at_suite_dir/at-job-fifo
+
+if $at_clean; then
+  test -d "$at_suite_dir" &&
+    find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+  rm -f -r "$at_suite_dir" "$at_suite_log"
+  exit $?
 fi
 
 # Don't take risks: use only absolute directories in PATH.
 #
-# For stand-alone test suites, AUTOTEST_PATH is relative to `.'.
+# For stand-alone test suites (ie. atconfig was not found),
+# AUTOTEST_PATH is relative to `.'.
 #
 # For embedded test suites, AUTOTEST_PATH is relative to the top level
 # of the package.  Then expand it into build/src parts, since users
 # may create executables in both places.
-AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"`
+AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
 at_path=
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $AUTOTEST_PATH $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR
+    test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
 case $as_dir in
   [\\/]* | ?:[\\/]* )
-    at_path=$at_path$as_dir
+    as_fn_append at_path "$as_dir"
     ;;
   * )
     if test -z "$at_top_build_prefix"; then
       # Stand-alone test suite.
-      at_path=$at_path$as_dir
+      as_fn_append at_path "$as_dir"
     else
       # Embedded test suite.
-      at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
-      at_path=$at_path$at_top_srcdir/$as_dir
+      as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
+      as_fn_append at_path "$at_top_srcdir/$as_dir"
     fi
     ;;
 esac
-done
+  done
 IFS=$as_save_IFS
 
 
@@ -1044,31 +1189,33 @@ IFS=$as_save_IFS
 #
 # There might be directories that don't exist, but don't redirect
 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
-PATH=
+at_new_path=
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $at_path
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
-test -d "$as_dir" || continue
-case $PATH in
-	          $as_dir                 | \
-	          $as_dir$PATH_SEPARATOR* | \
-  *$PATH_SEPARATOR$as_dir                 | \
-  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;
-
-  '') PATH=$as_dir ;;
-   *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
+    test -d "$as_dir" || continue
+case $as_dir in
+  [\\/]* | ?:[\\/]* ) ;;
+  * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
 esac
-done
+case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
+  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
+  $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
+  *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
+esac
+  done
 IFS=$as_save_IFS
 
+PATH=$at_new_path
 export PATH
 
 # Setting up the FDs.
-# 5 is the log file.  Not to be overwritten if `-d'.
 
+
+
+# 5 is the log file.  Not to be overwritten if `-d'.
 if $at_debug_p; then
   at_suite_log=/dev/null
 else
@@ -1077,42 +1224,31 @@ fi
 exec 5>>"$at_suite_log"
 
 # Banners and logs.
-cat <<\_ASBOX
-## ------------------------------------ ##
-## libdap 3.11.6 test suite: expr-test. ##
-## ------------------------------------ ##
-_ASBOX
+$as_echo "## ------------------------------------ ##
+## libdap 3.12.0 test suite: expr-test. ##
+## ------------------------------------ ##"
 {
-  cat <<\_ASBOX
-## ------------------------------------ ##
-## libdap 3.11.6 test suite: expr-test. ##
-## ------------------------------------ ##
-_ASBOX
+  $as_echo "## ------------------------------------ ##
+## libdap 3.12.0 test suite: expr-test. ##
+## ------------------------------------ ##"
   echo
 
-  echo "$as_me: command line was:"
-  echo "  $ $0 $at_cli_args"
+  $as_echo "$as_me: command line was:"
+  $as_echo "  \$ $0 $at_cli_args"
   echo
 
-  # Try to find a few ChangeLogs in case it might help determining the
-  # exact version.  Use the relative dir: if the top dir is a symlink,
-  # find will not follow it (and options to follow the links are not
-  # portable), which would result in no output here.
-  if test -n "$at_top_srcdir"; then
-    cat <<\_ASBOX
-## ----------- ##
-## ChangeLogs. ##
-## ----------- ##
-_ASBOX
+  # If ChangeLog exists, list a few lines in case it might help determining
+  # the exact version.
+  if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
+    $as_echo "## ---------- ##
+## ChangeLog. ##
+## ---------- ##"
     echo
-    for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
-    do
-      echo "$as_me: $at_file:"
-      sed 's/^/| /;10q' $at_file
-      echo
-    done
+    sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
+    echo
+  fi
 
-    {
+  {
 cat <<_ASUNAME
 ## --------- ##
 ## Platform. ##
@@ -1142,28 +1278,179 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
+    $as_echo "PATH: $as_dir"
+  done
 IFS=$as_save_IFS
 
 }
-    echo
-  fi
+  echo
 
   # Contents of the config files.
   for at_file in atconfig atlocal
   do
     test -r $at_file || continue
-    echo "$as_me: $at_file:"
+    $as_echo "$as_me: $at_file:"
     sed 's/^/| /' $at_file
     echo
   done
+} >&5
+
+
+## ------------------------- ##
+## Autotest shell functions. ##
+## ------------------------- ##
+
+# at_fn_banner NUMBER
+# -------------------
+# Output banner NUMBER, provided the testsuite is running multiple groups and
+# this particular banner has not yet been printed.
+at_fn_banner ()
+{
+  $at_print_banners || return 0
+  eval at_banner_text=\$at_banner_text_$1
+  test "x$at_banner_text" = "x " && return 0
+  eval "at_banner_text_$1=\" \""
+  if test -z "$at_banner_text"; then
+    $at_first || echo
+  else
+    $as_echo "$as_nl$at_banner_text$as_nl"
+  fi
+} # at_fn_banner
+
+# at_fn_check_prepare_notrace REASON LINE
+# ---------------------------------------
+# Perform AT_CHECK preparations for the command at LINE for an untraceable
+# command; REASON is the reason for disabling tracing.
+at_fn_check_prepare_notrace ()
+{
+  $at_trace_echo "Not enabling shell tracing (command contains $1)"
+  $as_echo "$2" >"$at_check_line_file"
+  at_check_trace=: at_check_filter=:
+  : >"$at_stdout"; : >"$at_stderr"
+}
+
+# at_fn_check_prepare_trace LINE
+# ------------------------------
+# Perform AT_CHECK preparations for the command at LINE for a traceable
+# command.
+at_fn_check_prepare_trace ()
+{
+  $as_echo "$1" >"$at_check_line_file"
+  at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
+  : >"$at_stdout"; : >"$at_stderr"
+}
+
+# at_fn_check_prepare_dynamic COMMAND LINE
+# ----------------------------------------
+# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
+# preparation function.
+at_fn_check_prepare_dynamic ()
+{
+  case $1 in
+    *$as_nl*)
+      at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
+    *)
+      at_fn_check_prepare_trace "$2" ;;
+  esac
+}
+
+# at_fn_filter_trace
+# ------------------
+# Remove the lines in the file "$at_stderr" generated by "set -x" and print
+# them to stderr.
+at_fn_filter_trace ()
+{
+  mv "$at_stderr" "$at_stder1"
+  grep '^ *+' "$at_stder1" >&2
+  grep -v '^ *+' "$at_stder1" >"$at_stderr"
+}
+
+# at_fn_log_failure FILE-LIST
+# ---------------------------
+# Copy the files in the list on stdout with a "> " prefix, and exit the shell
+# with a failure exit code.
+at_fn_log_failure ()
+{
+  for file
+    do $as_echo "$file:"; sed 's/^/> /' "$file"; done
+  echo 1 > "$at_status_file"
+  exit 1
+}
+
+# at_fn_check_skip EXIT-CODE LINE
+# -------------------------------
+# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
+# the test group subshell with that same exit code. Use LINE in any report
+# about test failure.
+at_fn_check_skip ()
+{
+  case $1 in
+    99) echo 99 > "$at_status_file"; at_failed=:
+	$as_echo "$2: hard failure"; exit 99;;
+    77) echo 77 > "$at_status_file"; exit 77;;
+  esac
+}
+
+# at_fn_check_status EXPECTED EXIT-CODE LINE
+# ------------------------------------------
+# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
+# Otherwise, if it is 77 or 99, exit the test group subshell with that same
+# exit code; if it is anything else print an error message referring to LINE,
+# and fail the test.
+at_fn_check_status ()
+{
+  case $2 in
+    $1 ) ;;
+    77) echo 77 > "$at_status_file"; exit 77;;
+    99) echo 99 > "$at_status_file"; at_failed=:
+	$as_echo "$3: hard failure"; exit 99;;
+    *) $as_echo "$3: exit code was $2, expected $1"
+      at_failed=:;;
+  esac
+}
+
+# at_fn_diff_devnull FILE
+# -----------------------
+# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
+# invocations.
+at_fn_diff_devnull ()
+{
+  test -s "$1" || return 0
+  $at_diff "$at_devnull" "$1"
+}
+
+# at_fn_test NUMBER
+# -----------------
+# Parse out test NUMBER from the tail of this file.
+at_fn_test ()
+{
+  eval at_sed=\$at_sed$1
+  sed "$at_sed" "$at_myself" > "$at_test_source"
+}
 
-  cat <<\_ASBOX
-## ---------------- ##
+# at_fn_create_debugging_script
+# -----------------------------
+# Create the debugging script $at_group_dir/run which will reproduce the
+# current test group.
+at_fn_create_debugging_script ()
+{
+  {
+    echo "#! /bin/sh" &&
+    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
+    $as_echo "cd '$at_dir'" &&
+    $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
+    echo 'exit 1'
+  } >"$at_group_dir/run" &&
+  chmod +x "$at_group_dir/run"
+}
+
+## -------------------------------- ##
+## End of autotest shell functions. ##
+## -------------------------------- ##
+{
+  $as_echo "## ---------------- ##
 ## Tested programs. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
   echo
 } >&5
 
@@ -1171,52 +1458,44 @@ _ASBOX
 for at_program in : $at_tested
 do
   test "$at_program" = : && continue
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $at_program in
+    [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
+    * )
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -f "$as_dir/$at_program" && break
-done
+    test -f "$as_dir/$at_program" && break
+  done
 IFS=$as_save_IFS
 
-  if test -f "$as_dir/$at_program"; then
+    at_program_=$as_dir/$at_program ;;
+  esac
+  if test -f "$at_program_"; then
     {
-      echo "$at_srcdir/EXPRTest.at:3: $as_dir/$at_program --version"
-      "$as_dir/$at_program" --version
+      $as_echo "$at_srcdir/EXPRTest.at:3: $at_program_ --version"
+      "$at_program_" --version </dev/null
       echo
     } >&5 2>&1
   else
-    { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5
-echo "$as_me: error: cannot find $at_program" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "cannot find $at_program" "$LINENO" 5
   fi
 done
 
 {
-  cat <<\_ASBOX
-## ------------------ ##
+  $as_echo "## ------------------ ##
 ## Running the tests. ##
-## ------------------ ##
-_ASBOX
+## ------------------ ##"
 } >&5
 
 at_start_date=`date`
 at_start_time=`date +%s 2>/dev/null`
-echo "$as_me: starting at: $at_start_date" >&5
-at_xpass_list=
-at_xfail_list=
-at_pass_list=
-at_fail_list=
-at_skip_list=
-at_group_count=0
+$as_echo "$as_me: starting at: $at_start_date" >&5
 
 # Create the master directory if it doesn't already exist.
-test -d "$at_suite_dir" ||
-  mkdir "$at_suite_dir" ||
-  { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
-echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
-   { (exit 1); exit 1; }; }
+as_dir="$at_suite_dir"; as_fn_mkdir_p ||
+  as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
 
 # Can we diff with `/dev/null'?  DU 5.0 refuses.
 if diff /dev/null /dev/null >/dev/null 2>&1; then
@@ -1234,323 +1513,588 @@ else
   at_diff=diff
 fi
 
+# Get the last needed group.
+for at_group in : $at_groups; do :; done
+
+# Extract the start and end lines of each test group at the tail
+# of this file
+awk '
+BEGIN { FS="" }
+/^#AT_START_/ {
+  start = NR
+}
+/^#AT_STOP_/ {
+  test = substr ($ 0, 10)
+  print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
+  if (test == "'"$at_group"'") exit
+}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
+. "$at_suite_dir/at-source-lines" ||
+  as_fn_error $? "cannot create test line number cache" "$LINENO" 5
+rm -f "$at_suite_dir/at-source-lines"
+
+# Set number of jobs for `-j'; avoid more jobs than test groups.
+set X $at_groups; shift; at_max_jobs=$#
+if test $at_max_jobs -eq 0; then
+  at_jobs=1
+fi
+if test $at_jobs -ne 1 &&
+   { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
+  at_jobs=$at_max_jobs
+fi
+
+# If parallel mode, don't output banners, don't split summary lines.
+if test $at_jobs -ne 1; then
+  at_print_banners=false
+  at_quiet=:
+fi
+
+# Set up helper dirs.
+rm -rf "$at_helper_dir" &&
+mkdir "$at_helper_dir" &&
+cd "$at_helper_dir" &&
+{ test -z "$at_groups" || mkdir $at_groups; } ||
+as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
+
+# Functions for running a test group.  We leave the actual
+# test group execution outside of a shell function in order
+# to avoid hitting zsh 4.x exit status bugs.
+
+# at_fn_group_prepare
+# -------------------
+# Prepare for running a test group.
+at_fn_group_prepare ()
+{
+  # The directory for additional per-group helper files.
+  at_job_dir=$at_helper_dir/$at_group
+  # The file containing the location of the last AT_CHECK.
+  at_check_line_file=$at_job_dir/check-line
+  # The file containing the exit status of the last command.
+  at_status_file=$at_job_dir/status
+  # The files containing the output of the tested commands.
+  at_stdout=$at_job_dir/stdout
+  at_stder1=$at_job_dir/stder1
+  at_stderr=$at_job_dir/stderr
+  # The file containing the code for a test group.
+  at_test_source=$at_job_dir/test-source
+  # The file containing dates.
+  at_times_file=$at_job_dir/times
 
-for at_group in $at_groups
-do
   # Be sure to come back to the top test directory.
   cd "$at_suite_dir"
 
-  case $at_group in
-    banner-*)
-      at_group_log=$at_suite_log
-      ;;
+  # Clearly separate the test groups when verbose.
+  $at_first || $at_verbose echo
 
-    *)
-      at_group_normalized=$at_group
+  at_group_normalized=$at_group
 
-  while :; do
+  eval 'while :; do
     case $at_group_normalized in #(
-    $at_format*) break;;
+    '"$at_format"'*) break;;
     esac
     at_group_normalized=0$at_group_normalized
-  done
-
-
-      # Create a fresh directory for the next test group, and enter.
-      at_group_dir=$at_suite_dir/$at_group_normalized
-      at_group_log=$at_group_dir/$as_me.log
-      if test -d "$at_group_dir"; then
-	find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
-	rm -fr "$at_group_dir"
-      fi
-      # Be tolerant if the above `rm' was not able to remove the directory.
-      { as_dir=$at_group_dir
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-      cd $at_group_dir
-      ;;
-  esac
+  done'
+
+
+  # Create a fresh directory for the next test group, and enter.
+  # If one already exists, the user may have invoked ./run from
+  # within that directory; we remove the contents, but not the
+  # directory itself, so that we aren't pulling the rug out from
+  # under the shell's notion of the current directory.
+  at_group_dir=$at_suite_dir/$at_group_normalized
+  at_group_log=$at_group_dir/$as_me.log
+  if test -d "$at_group_dir"; then
+  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
+  rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
+fi ||
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
+$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
+  # Be tolerant if the above `rm' was not able to remove the directory.
+  as_dir="$at_group_dir"; as_fn_mkdir_p
 
   echo 0 > "$at_status_file"
 
-  # Clearly separate the test groups when verbose.
-  test $at_group_count != 0 && $at_verbose
-
   # In verbose mode, append to the log file *and* show on
-  # the standard output; in quiet mode only write to the log
-  if test $at_verbose = echo; then
+  # the standard output; in quiet mode only write to the log.
+  if test -z "$at_verbose"; then
     at_tee_pipe='tee -a "$at_group_log"'
   else
     at_tee_pipe='cat >> "$at_group_log"'
   fi
+}
 
-  case $at_group in
-  1 ) # 1. EXPRTest.at:45: expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i (pass)
-    at_setup_line='EXPRTest.at:45'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i (pass)"
-    $at_quiet $ECHO_N "  1: expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "1. EXPRTest.at:45: testing ..."
-      $at_traceon
+# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
+# -------------------------------------------------
+# Declare the test group ORDINAL, located at LINE with group description DESC,
+# and residing under BANNER. Use PAD to align the status column.
+at_fn_group_banner ()
+{
+  at_setup_line="$2"
+  test -n "$5" && at_fn_banner $5
+  at_desc="$3"
+  case $1 in
+    [0-9])      at_desc_line="  $1: ";;
+    [0-9][0-9]) at_desc_line=" $1: " ;;
+    *)          at_desc_line="$1: "  ;;
+  esac
+  as_fn_append at_desc_line "$3$4"
+  $at_quiet $as_echo_n "$at_desc_line"
+  echo "#                             -*- compilation -*-" >> "$at_group_log"
+}
 
+# at_fn_group_postprocess
+# -----------------------
+# Perform cleanup after running a test group.
+at_fn_group_postprocess ()
+{
+  # Be sure to come back to the suite directory, in particular
+  # since below we might `rm' the group directory we are in currently.
+  cd "$at_suite_dir"
 
+  if test ! -f "$at_check_line_file"; then
+    sed "s/^ */$as_me: WARNING: /" <<_ATEOF
+      A failure happened in a test group before any test could be
+      run. This means that test suite is improperly designed.  Please
+      report this failure to <opendap-tech at opendap.org>.
+_ATEOF
+    $as_echo "$at_setup_line" >"$at_check_line_file"
+    at_status=99
+  fi
+  $at_verbose $as_echo_n "$at_group. $at_setup_line: "
+  $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
+  case $at_xfail:$at_status in
+    yes:0)
+	at_msg="UNEXPECTED PASS"
+	at_res=xpass
+	at_errexit=$at_errexit_p
+	at_color=$at_red
+	;;
+    no:0)
+	at_msg="ok"
+	at_res=pass
+	at_errexit=false
+	at_color=$at_grn
+	;;
+    *:77)
+	at_msg='skipped ('`cat "$at_check_line_file"`')'
+	at_res=skip
+	at_errexit=false
+	at_color=$at_blu
+	;;
+    no:* | *:99)
+	at_msg='FAILED ('`cat "$at_check_line_file"`')'
+	at_res=fail
+	at_errexit=$at_errexit_p
+	at_color=$at_red
+	;;
+    yes:*)
+	at_msg='expected failure ('`cat "$at_check_line_file"`')'
+	at_res=xfail
+	at_errexit=false
+	at_color=$at_lgn
+	;;
+  esac
+  echo "$at_res" > "$at_job_dir/$at_res"
+  # In parallel mode, output the summary line only afterwards.
+  if test $at_jobs -ne 1 && test -n "$at_verbose"; then
+    $as_echo "$at_desc_line $at_color$at_msg$at_std"
+  else
+    # Make sure there is a separator even with long titles.
+    $as_echo " $at_color$at_msg$at_std"
+  fi
+  at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
+  case $at_status in
+    0|77)
+      # $at_times_file is only available if the group succeeded.
+      # We're not including the group log, so the success message
+      # is written in the global log separately.  But we also
+      # write to the group log in case they're using -d.
+      if test -f "$at_times_file"; then
+	at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
+	rm -f "$at_times_file"
+      fi
+      $as_echo "$at_log_msg" >> "$at_group_log"
+      $as_echo "$at_log_msg" >&5
+
+      # Cleanup the group directory, unless the user wants the files
+      # or the success was unexpected.
+      if $at_debug_p || test $at_res = xpass; then
+	at_fn_create_debugging_script
+	if test $at_res = xpass && $at_errexit; then
+	  echo stop > "$at_stop_file"
+	fi
+      else
+	if test -d "$at_group_dir"; then
+	  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+	  rm -fr "$at_group_dir"
+	fi
+	rm -f "$at_test_source"
+      fi
+      ;;
+    *)
+      # Upon failure, include the log into the testsuite's global
+      # log.  The failure message is written in the group log.  It
+      # is later included in the global log.
+      $as_echo "$at_log_msg" >> "$at_group_log"
+
+      # Upon failure, keep the group directory for autopsy, and create
+      # the debugging script.  With -e, do not start any further tests.
+      at_fn_create_debugging_script
+      if $at_errexit; then
+	echo stop > "$at_stop_file"
+      fi
+      ;;
+  esac
+}
 
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:45: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i -f \"dummy\" || true"
-echo EXPRTest.at:45 >"$at_check_line_file"
+## ------------ ##
+## Driver loop. ##
+## ------------ ##
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+if (set -m && set +m && set +b) >/dev/null 2>&1; then
+  set +b
+  at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
 else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
+  at_job_control_on=: at_job_control_off=: at_job_group=
 fi
 
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:45: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+for at_signal in 1 2 15; do
+  trap 'set +x; set +e
+	$at_job_control_off
+	at_signal='"$at_signal"'
+	echo stop > "$at_stop_file"
+	trap "" $at_signal
+	at_pgids=
+	for at_pgid in `jobs -p 2>/dev/null`; do
+	  at_pgids="$at_pgids $at_job_group$at_pgid"
+	done
+	test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
+	wait
+	if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
+	  echo >&2
+	fi
+	at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
+	set x $at_signame
+	test 1 -gt 2 && at_signame=$at_signal
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
+$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
+	as_fn_arith 128 + $at_signal && exit_status=$as_val
+	as_fn_exit $exit_status' $at_signal
+done
 
+rm -f "$at_stop_file"
+at_first=:
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+if test $at_jobs -ne 1 &&
+     rm -f "$at_job_fifo" &&
+     test -n "$at_job_group" &&
+     ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
+then
+  # FIFO job dispatcher.
 
-$at_traceon
+  trap 'at_pids=
+	for at_pid in `jobs -p`; do
+	  at_pids="$at_pids $at_job_group$at_pid"
+	done
+	if test -n "$at_pids"; then
+	  at_sig=TSTP
+	  test "${TMOUT+set}" = set && at_sig=STOP
+	  kill -$at_sig $at_pids 2>/dev/null
+	fi
+	kill -STOP $$
+	test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:45: diff -b -B \$abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1.base stderr"
-echo EXPRTest.at:45 >"$at_check_line_file"
+  echo
+  # Turn jobs into a list of numbers, starting from 1.
+  at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
+  set X $at_joblist
+  shift
+  for at_group in $at_groups; do
+    $at_job_control_on 2>/dev/null
+    (
+      # Start one test group.
+      $at_job_control_off
+      if $at_first; then
+	exec 7>"$at_job_fifo"
+      else
+	exec 6<&-
+      fi
+      trap 'set +x; set +e
+	    trap "" PIPE
+	    echo stop > "$at_stop_file"
+	    echo >&7
+	    as_fn_exit 141' PIPE
+      at_fn_group_prepare
+      if cd "$at_group_dir" &&
+	 at_fn_test $at_group &&
+	 . "$at_test_source"
+      then :; else
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
+	at_failed=:
+      fi
+      at_fn_group_postprocess
+      echo >&7
+    ) &
+    $at_job_control_off
+    if $at_first; then
+      at_first=false
+      exec 6<"$at_job_fifo" 7>"$at_job_fifo"
+    fi
+    shift # Consume one token.
+    if test $# -gt 0; then :; else
+      read at_token <&6 || break
+      set x $*
+    fi
+    test -f "$at_stop_file" && break
+  done
+  exec 7>&-
+  # Read back the remaining ($at_jobs - 1) tokens.
+  set X $at_joblist
+  shift
+  if test $# -gt 0; then
+    shift
+    for at_job
+    do
+      read at_token
+    done <&6
+  fi
+  exec 6<&-
+  wait
+else
+  # Run serially, avoid forks and other potential surprises.
+  for at_group in $at_groups; do
+    at_fn_group_prepare
+    if cd "$at_group_dir" &&
+       at_fn_test $at_group &&
+       . "$at_test_source"; then :; else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
+      at_failed=:
+    fi
+    at_fn_group_postprocess
+    test -f "$at_stop_file" && break
+    at_first=false
+  done
 fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+# Wrap up the test suite with summary statistics.
+cd "$at_helper_dir"
+
+# Use ?..???? when the list must remain sorted, the faster * otherwise.
+at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
+at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
+at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
+at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
+		 echo $f; done | sed '/?/d; s,/xpass,,'`
+at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
+		echo $f; done | sed '/?/d; s,/fail,,'`
+
+set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
+shift; at_group_count=$#
+set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
+set X $at_xfail_list; shift; at_xfail_count=$#
+set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
+set X $at_skip_list; shift; at_skip_count=$#
+
+as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
+as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
+as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:45: exit code was $at_status, expected 0"
-      at_failed=:;;
+# Back to the top directory.
+cd "$at_dir"
+rm -rf "$at_helper_dir"
+
+# Compute the duration of the suite.
+at_stop_date=`date`
+at_stop_time=`date +%s 2>/dev/null`
+$as_echo "$as_me: ending at: $at_stop_date" >&5
+case $at_start_time,$at_stop_time in
+  [0-9]*,[0-9]*)
+    as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
+    as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
+    as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
+    as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
+    as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
+    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
+    $as_echo "$as_me: test suite duration: $at_duration" >&5
+    ;;
 esac
-if $at_failed; then
 
+echo
+$as_echo "## ------------- ##
+## Test results. ##
+## ------------- ##"
+echo
+{
+  echo
+  $as_echo "## ------------- ##
+## Test results. ##
+## ------------- ##"
+  echo
+} >&5
 
-  echo 1 > "$at_status_file"
-  exit 1
+if test $at_run_count = 1; then
+  at_result="1 test"
+  at_were=was
+else
+  at_result="$at_run_count tests"
+  at_were=were
 fi
+if $at_errexit_p && test $at_unexpected_count != 0; then
+  if test $at_xpass_count = 1; then
+    at_result="$at_result $at_were run, one passed"
+  else
+    at_result="$at_result $at_were run, one failed"
+  fi
+  at_result="$at_result unexpectedly and inhibited subsequent tests."
+  at_color=$at_red
+else
+  # Don't you just love exponential explosion of the number of cases?
+  at_color=$at_red
+  case $at_xpass_count:$at_fail_count:$at_xfail_count in
+    # So far, so good.
+    0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
+    0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
 
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  2 ) # 2. EXPRTest.at:45: expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i (pass)
-    at_setup_line='EXPRTest.at:45'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i (pass)"
-    $at_quiet $ECHO_N "  2: expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "2. EXPRTest.at:45: testing ..."
-      $at_traceon
-
+    # Some unexpected failures
+    0:*:0) at_result="$at_result $at_were run,
+$at_fail_count failed unexpectedly." ;;
 
+    # Some failures, both expected and unexpected
+    0:*:1) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+    0:*:*) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
 
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
+    # No unexpected failures, but some xpasses
+    *:0:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly." ;;
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:45: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i -f \"dummy\" || true"
-echo EXPRTest.at:45 >"$at_check_line_file"
+    # No expected failures, but failures and xpasses
+    *:1:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
+    *:*:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+    # All of them.
+    *:*:1) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+    *:*:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
+  esac
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
+  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
+    at_result="All $at_result"
+  fi
 fi
 
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:45: exit code was $at_status, expected 0"
-      at_failed=:;;
+# Now put skips in the mix.
+case $at_skip_count in
+  0) ;;
+  1) at_result="$at_result
+1 test was skipped." ;;
+  *) at_result="$at_result
+$at_skip_count tests were skipped." ;;
 esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
+if test $at_unexpected_count = 0; then
+  echo "$at_color$at_result$at_std"
+  echo "$at_result" >&5
+else
+  echo "${at_color}ERROR: $at_result$at_std" >&2
+  echo "ERROR: $at_result" >&5
+  {
+    echo
+    $as_echo "## ------------------------ ##
+## Summary of the failures. ##
+## ------------------------ ##"
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:45: diff -b -B \$abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1.base stderr"
-echo EXPRTest.at:45 >"$at_check_line_file"
+    # Summary of failed and skipped tests.
+    if test $at_fail_count != 0; then
+      echo "Failed tests:"
+      $SHELL "$at_myself" $at_fail_list --list
+      echo
+    fi
+    if test $at_skip_count != 0; then
+      echo "Skipped tests:"
+      $SHELL "$at_myself" $at_skip_list --list
+      echo
+    fi
+    if test $at_xpass_count != 0; then
+      echo "Unexpected passes:"
+      $SHELL "$at_myself" $at_xpass_list --list
+      echo
+    fi
+    if test $at_fail_count != 0; then
+      $as_echo "## ---------------------- ##
+## Detailed failed tests. ##
+## ---------------------- ##"
+      echo
+      for at_group in $at_fail_list
+      do
+	at_group_normalized=$at_group
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
+  eval 'while :; do
+    case $at_group_normalized in #(
+    '"$at_format"'*) break;;
     esac
-fi
+    at_group_normalized=0$at_group_normalized
+  done'
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+	cat "$at_suite_dir/$at_group_normalized/$as_me.log"
+	echo
+      done
+      echo
+    fi
+    if test -n "$at_top_srcdir"; then
+      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## ${at_top_build_prefix}config.log ##
+_ASBOX
+      sed 's/^/| /' ${at_top_build_prefix}config.log
+      echo
+    fi
+  } >&5
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:45: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## $as_me.log was created. ##
+_ASBOX
+
+  echo
+  if $at_debug_p; then
+    at_msg='per-test log files'
+  else
+    at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
+  fi
+  $as_echo "Please send $at_msg and all information you think might help:
 
+   To: <opendap-tech at opendap.org>
+   Subject: [libdap 3.12.0] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
 
-  echo 1 > "$at_status_file"
+You may investigate any problem if you feel able to do so, in which
+case the test suite provides a good starting point.  Its output may
+be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
+"
   exit 1
 fi
 
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+exit 0
 
-  3 ) # 3. EXPRTest.at:46: expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i,j (pass)
-    at_setup_line='EXPRTest.at:46'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i,j (pass)"
-    $at_quiet $ECHO_N "  3: expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i,j (pass)$ECHO_C"
-    at_xfail=no
+## ------------- ##
+## Actual tests. ##
+## ------------- ##
+#AT_START_1
+at_fn_group_banner 1 'EXPRTest.at:45' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "3. EXPRTest.at:46: testing ..."
-      $at_traceon
+(
+  $as_echo "1. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -1561,105 +2105,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:46: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i,j -f \"dummy\" || true"
-echo EXPRTest.at:46 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i,j -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i,j -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i,j -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:45: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i -f \"dummy\" || true" "EXPRTest.at:45"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:46: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:45"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:45: diff -b -B \$abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr" "EXPRTest.at:45"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:45"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_1
+#AT_START_2
+at_fn_group_banner 2 'EXPRTest.at:45' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "2. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:46: diff -b -B \$abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1a.base stderr"
-echo EXPRTest.at:46 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:45: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i -f \"dummy\" || true" "EXPRTest.at:45"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:45"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:45: diff -b -B \$abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr" "EXPRTest.at:45"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:46: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:45"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_2
+#AT_START_3
+at_fn_group_banner 3 'EXPRTest.at:46' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i,j (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "3. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  4 ) # 4. EXPRTest.at:46: expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i,j (pass)
-    at_setup_line='EXPRTest.at:46'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i,j (pass)"
-    $at_quiet $ECHO_N "  4: expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i,j (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:46: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k i,j -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i,j -f \"dummy\" || true" "EXPRTest.at:46"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k i,j -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:46"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:46: diff -b -B \$abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr" "EXPRTest.at:46"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:46"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_3
+#AT_START_4
+at_fn_group_banner 4 'EXPRTest.at:46' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i,j (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "4. EXPRTest.at:46: testing ..."
-      $at_traceon
+(
+  $as_echo "4. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -1670,105 +2255,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:46: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i,j -f \"dummy\" || true"
-echo EXPRTest.at:46 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i,j -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i,j -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i,j -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:46: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k i,j -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i,j -f \"dummy\" || true" "EXPRTest.at:46"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k i,j -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:46: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:46"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:46: diff -b -B \$abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr" "EXPRTest.at:46"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:46"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_4
+#AT_START_5
+at_fn_group_banner 5 'EXPRTest.at:47' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "5. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:46: diff -b -B \$abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1a.base stderr"
-echo EXPRTest.at:46 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:47: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f \"dummy\" || true" "EXPRTest.at:47"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:47: diff -b -B \$abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr" "EXPRTest.at:47"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:46: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_5
+#AT_START_6
+at_fn_group_banner 6 'EXPRTest.at:47' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "6. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  5 ) # 5. EXPRTest.at:47: expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' (pass)
-    at_setup_line='EXPRTest.at:47'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' (pass)"
-    $at_quiet $ECHO_N "  5: expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:47: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f \"dummy\" || true" "EXPRTest.at:47"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:47: diff -b -B \$abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr" "EXPRTest.at:47"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:47"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_6
+#AT_START_7
+at_fn_group_banner 7 'EXPRTest.at:48' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "5. EXPRTest.at:47: testing ..."
-      $at_traceon
+(
+  $as_echo "7. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -1779,105 +2405,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:47: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f \"dummy\" || true"
-echo EXPRTest.at:47 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:48: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f \"dummy\" || true" "EXPRTest.at:48"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:47: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:48"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:48: diff -b -B \$abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr" "EXPRTest.at:48"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:48"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_7
+#AT_START_8
+at_fn_group_banner 8 'EXPRTest.at:48' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "8. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:47: diff -b -B \$abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1b.base stderr"
-echo EXPRTest.at:47 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:48: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f \"dummy\" || true" "EXPRTest.at:48"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:48"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:48: diff -b -B \$abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr" "EXPRTest.at:48"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:47: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:48"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_8
+#AT_START_9
+at_fn_group_banner 9 'EXPRTest.at:49' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s1 (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "9. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  6 ) # 6. EXPRTest.at:47: expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' (pass)
-    at_setup_line='EXPRTest.at:47'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' (pass)"
-    $at_quiet $ECHO_N "  6: expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:49: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s1 -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s1 -f \"dummy\" || true" "EXPRTest.at:49"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s1 -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:49"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:49: diff -b -B \$abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr" "EXPRTest.at:49"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:49"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_9
+#AT_START_10
+at_fn_group_banner 10 'EXPRTest.at:49' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s1 (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "6. EXPRTest.at:47: testing ..."
-      $at_traceon
+(
+  $as_echo "10. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -1888,105 +2555,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:47: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f \"dummy\" || true"
-echo EXPRTest.at:47 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i,j&i=j' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:49: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s1 -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s1 -f \"dummy\" || true" "EXPRTest.at:49"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s1 -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:47: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:49"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:49: diff -b -B \$abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr" "EXPRTest.at:49"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:49"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_10
+#AT_START_11
+at_fn_group_banner 11 'EXPRTest.at:50' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2 (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "11. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:47: diff -b -B \$abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1b.base stderr"
-echo EXPRTest.at:47 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:50: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2 -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2 -f \"dummy\" || true" "EXPRTest.at:50"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2 -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:50"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:50: diff -b -B \$abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr" "EXPRTest.at:50"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:47: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:50"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_11
+#AT_START_12
+at_fn_group_banner 12 'EXPRTest.at:50' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2 (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "12. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  7 ) # 7. EXPRTest.at:48: expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' (pass)
-    at_setup_line='EXPRTest.at:48'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' (pass)"
-    $at_quiet $ECHO_N "  7: expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:50: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2 -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2 -f \"dummy\" || true" "EXPRTest.at:50"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2 -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:50"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:50: diff -b -B \$abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr" "EXPRTest.at:50"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:50"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_12
+#AT_START_13
+at_fn_group_banner 13 'EXPRTest.at:51' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "7. EXPRTest.at:48: testing ..."
-      $at_traceon
+(
+  $as_echo "13. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -1997,105 +2705,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:48: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f \"dummy\" || true"
-echo EXPRTest.at:48 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:51: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f \"dummy\" || true" "EXPRTest.at:51"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:48: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:51"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:51: diff -b -B \$abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr" "EXPRTest.at:51"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:51"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_13
+#AT_START_14
+at_fn_group_banner 14 'EXPRTest.at:51' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "14. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:48: diff -b -B \$abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1d.base stderr"
-echo EXPRTest.at:48 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:51: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f \"dummy\" || true" "EXPRTest.at:51"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:51"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:51: diff -b -B \$abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr" "EXPRTest.at:51"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:48: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:51"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_14
+#AT_START_15
+at_fn_group_banner 15 'EXPRTest.at:52' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "15. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  8 ) # 8. EXPRTest.at:48: expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' (pass)
-    at_setup_line='EXPRTest.at:48'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' (pass)"
-    $at_quiet $ECHO_N "  8: expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:52: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f \"dummy\" || true" "EXPRTest.at:52"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:52"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:52: diff -b -B \$abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2c.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr" "EXPRTest.at:52"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:52"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_15
+#AT_START_16
+at_fn_group_banner 16 'EXPRTest.at:52' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "8. EXPRTest.at:48: testing ..."
-      $at_traceon
+(
+  $as_echo "16. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -2106,105 +2855,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:48: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f \"dummy\" || true"
-echo EXPRTest.at:48 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.1 -k 'i&i=j' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:52: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f \"dummy\" || true" "EXPRTest.at:52"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:48: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:52"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:52: diff -b -B \$abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2c.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr" "EXPRTest.at:52"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:52"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_16
+#AT_START_17
+at_fn_group_banner 17 'EXPRTest.at:54' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "17. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:48: diff -b -B \$abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.1d.base stderr"
-echo EXPRTest.at:48 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.1d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:54: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f \"dummy\" || true" "EXPRTest.at:54"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:54"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:54: diff -b -B \$abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr" "EXPRTest.at:54"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:48: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:54"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_17
+#AT_START_18
+at_fn_group_banner 18 'EXPRTest.at:54' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "18. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  9 ) # 9. EXPRTest.at:49: expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s1 (pass)
-    at_setup_line='EXPRTest.at:49'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s1 (pass)"
-    $at_quiet $ECHO_N "  9: expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s1 (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:54: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f \"dummy\" || true" "EXPRTest.at:54"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:54"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:54: diff -b -B \$abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr" "EXPRTest.at:54"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:54"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_18
+#AT_START_19
+at_fn_group_banner 19 'EXPRTest.at:55' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "9. EXPRTest.at:49: testing ..."
-      $at_traceon
+(
+  $as_echo "19. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -2215,105 +3005,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:49: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s1 -f \"dummy\" || true"
-echo EXPRTest.at:49 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s1 -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s1 -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s1 -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:55: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f \"dummy\" || true" "EXPRTest.at:55"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:49: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:55"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:55: diff -b -B \$abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2e.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr" "EXPRTest.at:55"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:55"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_19
+#AT_START_20
+at_fn_group_banner 20 'EXPRTest.at:55' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "20. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:49: diff -b -B \$abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2.base stderr"
-echo EXPRTest.at:49 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:55: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f \"dummy\" || true" "EXPRTest.at:55"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:55"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:55: diff -b -B \$abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2e.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr" "EXPRTest.at:55"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:49: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:55"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_20
+#AT_START_21
+at_fn_group_banner 21 'EXPRTest.at:57' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "21. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  10 ) # 10. EXPRTest.at:49: expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s1 (pass)
-    at_setup_line='EXPRTest.at:49'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s1 (pass)"
-    $at_quiet $ECHO_N " 10: expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s1 (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:57: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f \"dummy\" || true" "EXPRTest.at:57"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:57"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:57: diff -b -B \$abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2f.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr" "EXPRTest.at:57"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:57"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_21
+#AT_START_22
+at_fn_group_banner 22 'EXPRTest.at:57' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "10. EXPRTest.at:49: testing ..."
-      $at_traceon
+(
+  $as_echo "22. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -2324,105 +3155,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:49: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s1 -f \"dummy\" || true"
-echo EXPRTest.at:49 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s1 -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s1 -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s1 -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:57: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f \"dummy\" || true" "EXPRTest.at:57"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:49: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:57"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:57: diff -b -B \$abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2f.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr" "EXPRTest.at:57"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:57"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_22
+#AT_START_23
+at_fn_group_banner 23 'EXPRTest.at:58' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "23. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:49: diff -b -B \$abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2.base stderr"
-echo EXPRTest.at:49 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:58: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f \"dummy\" || true" "EXPRTest.at:58"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:58: diff -b -B \$abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.3.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr" "EXPRTest.at:58"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:49: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_23
+#AT_START_24
+at_fn_group_banner 24 'EXPRTest.at:58' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "24. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  11 ) # 11. EXPRTest.at:50: expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2 (pass)
-    at_setup_line='EXPRTest.at:50'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2 (pass)"
-    $at_quiet $ECHO_N " 11: expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2 (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:58: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f \"dummy\" || true" "EXPRTest.at:58"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:58: diff -b -B \$abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.3.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr" "EXPRTest.at:58"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:58"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_24
+#AT_START_25
+at_fn_group_banner 25 'EXPRTest.at:59' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "11. EXPRTest.at:50: testing ..."
-      $at_traceon
+(
+  $as_echo "25. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -2433,105 +3305,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:50: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2 -f \"dummy\" || true"
-echo EXPRTest.at:50 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2 -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2 -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2 -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:59: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' -f \"dummy\" || true" "EXPRTest.at:59"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.4 -k 's&s=~"^Silly.*"' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:50: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:59"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:59: diff -b -B \$abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.4.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr" "EXPRTest.at:59"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:59"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_25
+#AT_START_26
+at_fn_group_banner 26 'EXPRTest.at:59' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "26. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:50: diff -b -B \$abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2a.base stderr"
-echo EXPRTest.at:50 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:59: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' -f \"dummy\" || true" "EXPRTest.at:59"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.4 -k 's&s=~"^Silly.*"' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:59"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:59: diff -b -B \$abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.4.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr" "EXPRTest.at:59"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:50: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:59"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_26
+#AT_START_27
+at_fn_group_banner 27 'EXPRTest.at:61' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "27. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  12 ) # 12. EXPRTest.at:50: expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2 (pass)
-    at_setup_line='EXPRTest.at:50'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2 (pass)"
-    $at_quiet $ECHO_N " 12: expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2 (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:61: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' -f \"dummy\" || true" "EXPRTest.at:61"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 3"' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:61"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:61: diff -b -B \$abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ea.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr" "EXPRTest.at:61"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:61"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_27
+#AT_START_28
+at_fn_group_banner 28 'EXPRTest.at:61' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "12. EXPRTest.at:50: testing ..."
-      $at_traceon
+(
+  $as_echo "28. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -2542,105 +3455,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:50: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2 -f \"dummy\" || true"
-echo EXPRTest.at:50 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2 -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2 -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2 -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:61: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' -f \"dummy\" || true" "EXPRTest.at:61"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 3"' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:50: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:61"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:61: diff -b -B \$abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ea.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr" "EXPRTest.at:61"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:61"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_28
+#AT_START_29
+at_fn_group_banner 29 'EXPRTest.at:62' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "29. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:50: diff -b -B \$abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2a.base stderr"
-echo EXPRTest.at:50 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:62: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' -f \"dummy\" || true" "EXPRTest.at:62"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 5"' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:62"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:62: diff -b -B \$abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.eb.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr" "EXPRTest.at:62"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:50: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:62"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_29
+#AT_START_30
+at_fn_group_banner 30 'EXPRTest.at:62' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "30. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  13 ) # 13. EXPRTest.at:51: expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2,s3 (pass)
-    at_setup_line='EXPRTest.at:51'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 (pass)"
-    $at_quiet $ECHO_N " 13: expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:62: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' -f \"dummy\" || true" "EXPRTest.at:62"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 5"' -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:62"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:62: diff -b -B \$abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.eb.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr" "EXPRTest.at:62"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:62"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_30
+#AT_START_31
+at_fn_group_banner 31 'EXPRTest.at:63' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "13. EXPRTest.at:51: testing ..."
-      $at_traceon
+(
+  $as_echo "31. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -2651,105 +3605,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:51: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f \"dummy\" || true"
-echo EXPRTest.at:51 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:63: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f \"dummy\" || true" "EXPRTest.at:63"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:51: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:63"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:63: diff -b -B \$abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr" "EXPRTest.at:63"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:63"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_31
+#AT_START_32
+at_fn_group_banner 32 'EXPRTest.at:63' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "32. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:51: diff -b -B \$abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2b.base stderr"
-echo EXPRTest.at:51 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:63: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f \"dummy\" || true" "EXPRTest.at:63"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:63"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:63: diff -b -B \$abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr" "EXPRTest.at:63"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:51: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:63"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_32
+#AT_START_33
+at_fn_group_banner 33 'EXPRTest.at:64' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "33. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  14 ) # 14. EXPRTest.at:51: expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2,s3 (pass)
-    at_setup_line='EXPRTest.at:51'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 (pass)"
-    $at_quiet $ECHO_N " 14: expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:64: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f \"dummy\" || true" "EXPRTest.at:64"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:64"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:64: diff -b -B \$abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr" "EXPRTest.at:64"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:64"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_33
+#AT_START_34
+at_fn_group_banner 34 'EXPRTest.at:64' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "14. EXPRTest.at:51: testing ..."
-      $at_traceon
+(
+  $as_echo "34. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -2760,105 +3755,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:51: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f \"dummy\" || true"
-echo EXPRTest.at:51 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2,s3 -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:64: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f \"dummy\" || true" "EXPRTest.at:64"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:51: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:64"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:64: diff -b -B \$abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr" "EXPRTest.at:64"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:64"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_34
+#AT_START_35
+at_fn_group_banner 35 'EXPRTest.at:65' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "35. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:51: diff -b -B \$abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2b.base stderr"
-echo EXPRTest.at:51 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:65: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i -f \"dummy\" || true" "EXPRTest.at:65"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:65"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:65: diff -b -B \$abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr" "EXPRTest.at:65"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:51: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:65"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_35
+#AT_START_36
+at_fn_group_banner 36 'EXPRTest.at:65' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "36. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  15 ) # 15. EXPRTest.at:52: expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o (pass)
-    at_setup_line='EXPRTest.at:52'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o (pass)"
-    $at_quiet $ECHO_N " 15: expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:65: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i -f \"dummy\" || true" "EXPRTest.at:65"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:65"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:65: diff -b -B \$abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr" "EXPRTest.at:65"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:65"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_36
+#AT_START_37
+at_fn_group_banner 37 'EXPRTest.at:66' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "15. EXPRTest.at:52: testing ..."
-      $at_traceon
+(
+  $as_echo "37. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -2869,105 +3905,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:52: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f \"dummy\" || true"
-echo EXPRTest.at:52 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:66: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f \"dummy\" || true" "EXPRTest.at:66"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:52: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:66"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:66: diff -b -B \$abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr" "EXPRTest.at:66"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:66"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_37
+#AT_START_38
+at_fn_group_banner 38 'EXPRTest.at:66' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "38. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:52: diff -b -B \$abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2c.base stderr"
-echo EXPRTest.at:52 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:66: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f \"dummy\" || true" "EXPRTest.at:66"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:66"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:66: diff -b -B \$abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr" "EXPRTest.at:66"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:52: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:66"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_38
+#AT_START_39
+at_fn_group_banner 39 'EXPRTest.at:67' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "39. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  16 ) # 16. EXPRTest.at:52: expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o (pass)
-    at_setup_line='EXPRTest.at:52'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o (pass)"
-    $at_quiet $ECHO_N " 16: expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:67: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f \"dummy\" || true" "EXPRTest.at:67"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:67"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:67: diff -b -B \$abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr" "EXPRTest.at:67"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:67"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_39
+#AT_START_40
+at_fn_group_banner 40 'EXPRTest.at:67' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "16. EXPRTest.at:52: testing ..."
-      $at_traceon
+(
+  $as_echo "40. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -2978,105 +4055,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:52: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f \"dummy\" || true"
-echo EXPRTest.at:52 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4],s3.o -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:67: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f \"dummy\" || true" "EXPRTest.at:67"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:52: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:67"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:67: diff -b -B \$abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr" "EXPRTest.at:67"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:67"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_40
+#AT_START_41
+at_fn_group_banner 41 'EXPRTest.at:68' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "41. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:52: diff -b -B \$abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2c.base stderr"
-echo EXPRTest.at:52 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2c.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:68: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length -f \"dummy\" || true" "EXPRTest.at:68"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:68"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:68: diff -b -B \$abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5c.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr" "EXPRTest.at:68"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:52: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:68"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_41
+#AT_START_42
+at_fn_group_banner 42 'EXPRTest.at:68' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "42. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  17 ) # 17. EXPRTest.at:54: expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m (pass)
-    at_setup_line='EXPRTest.at:54'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m (pass)"
-    $at_quiet $ECHO_N " 17: expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:68: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length -f \"dummy\" || true" "EXPRTest.at:68"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:68"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:68: diff -b -B \$abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5c.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr" "EXPRTest.at:68"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:68"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_42
+#AT_START_43
+at_fn_group_banner 43 'EXPRTest.at:69' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "17. EXPRTest.at:54: testing ..."
-      $at_traceon
+(
+  $as_echo "43. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -3087,105 +4205,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:54: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f \"dummy\" || true"
-echo EXPRTest.at:54 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:69: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f \"dummy\" || true" "EXPRTest.at:69"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:54: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:69: diff -b -B \$abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr" "EXPRTest.at:69"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_43
+#AT_START_44
+at_fn_group_banner 44 'EXPRTest.at:69' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "44. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:54: diff -b -B \$abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2d.base stderr"
-echo EXPRTest.at:54 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:69: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f \"dummy\" || true" "EXPRTest.at:69"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:69: diff -b -B \$abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr" "EXPRTest.at:69"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:54: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:69"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_44
+#AT_START_45
+at_fn_group_banner 45 'EXPRTest.at:70' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k j,o (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "45. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  18 ) # 18. EXPRTest.at:54: expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m (pass)
-    at_setup_line='EXPRTest.at:54'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m (pass)"
-    $at_quiet $ECHO_N " 18: expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:70: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k j,o -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k j,o -f \"dummy\" || true" "EXPRTest.at:70"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k j,o -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:70"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:70: diff -b -B \$abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2g.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr" "EXPRTest.at:70"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:70"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_45
+#AT_START_46
+at_fn_group_banner 46 'EXPRTest.at:70' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k j,o (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "18. EXPRTest.at:54: testing ..."
-      $at_traceon
+(
+  $as_echo "46. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -3196,105 +4355,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:54: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f \"dummy\" || true"
-echo EXPRTest.at:54 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:70: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k j,o -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k j,o -f \"dummy\" || true" "EXPRTest.at:70"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k j,o -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:54: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:70"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:70: diff -b -B \$abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2g.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr" "EXPRTest.at:70"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:70"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_46
+#AT_START_47
+at_fn_group_banner 47 'EXPRTest.at:71' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "47. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:54: diff -b -B \$abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2d.base stderr"
-echo EXPRTest.at:54 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:71: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" -f \"dummy\" || true" "EXPRTest.at:71"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "data%23i[0:2:9][0:2]" -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:71"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:71: diff -b -B \$abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr" "EXPRTest.at:71"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:54: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:71"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_47
+#AT_START_48
+at_fn_group_banner 48 'EXPRTest.at:71' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "48. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  19 ) # 19. EXPRTest.at:55: expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l (pass)
-    at_setup_line='EXPRTest.at:55'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l (pass)"
-    $at_quiet $ECHO_N " 19: expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:71: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" -f \"dummy\" || true" "EXPRTest.at:71"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "data%23i[0:2:9][0:2]" -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:71"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:71: diff -b -B \$abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr" "EXPRTest.at:71"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:71"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_48
+#AT_START_49
+at_fn_group_banner 49 'EXPRTest.at:72' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.7 -k x,y,f (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "19. EXPRTest.at:55: testing ..."
-      $at_traceon
+(
+  $as_echo "49. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -3305,105 +4505,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:55: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f \"dummy\" || true"
-echo EXPRTest.at:55 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:72: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.7 -k x,y,f -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f \"dummy\" || true" "EXPRTest.at:72"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:55: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:72"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:72: diff -b -B \$abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.7.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr" "EXPRTest.at:72"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:72"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_49
+#AT_START_50
+at_fn_group_banner 50 'EXPRTest.at:72' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.7 -k x,y,f (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "50. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:55: diff -b -B \$abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2e.base stderr"
-echo EXPRTest.at:55 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:72: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.7 -k x,y,f -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f \"dummy\" || true" "EXPRTest.at:72"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:72"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:72: diff -b -B \$abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.7.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr" "EXPRTest.at:72"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:55: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:72"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_50
+#AT_START_51
+at_fn_group_banner 51 'EXPRTest.at:73' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "51. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  20 ) # 20. EXPRTest.at:55: expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l (pass)
-    at_setup_line='EXPRTest.at:55'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l (pass)"
-    $at_quiet $ECHO_N " 20: expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:73: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" -f \"dummy\" || true" "EXPRTest.at:73"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "x%23y,y" -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:73"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:73: diff -b -B \$abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr" "EXPRTest.at:73"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:73"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_51
+#AT_START_52
+at_fn_group_banner 52 'EXPRTest.at:73' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "20. EXPRTest.at:55: testing ..."
-      $at_traceon
+(
+  $as_echo "52. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -3414,105 +4655,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:55: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f \"dummy\" || true"
-echo EXPRTest.at:55 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k s2[2:2:4].m,s2[2:2:4].l -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:73: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" -f \"dummy\" || true" "EXPRTest.at:73"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "x%23y,y" -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:55: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:73"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:73: diff -b -B \$abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr" "EXPRTest.at:73"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:73"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_52
+#AT_START_53
+at_fn_group_banner 53 'EXPRTest.at:74' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "53. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:55: diff -b -B \$abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2e.base stderr"
-echo EXPRTest.at:55 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2e.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:74: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" -f \"dummy\" || true" "EXPRTest.at:74"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "data%20name,y" -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:74"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:74: diff -b -B \$abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr" "EXPRTest.at:74"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:55: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:74"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_53
+#AT_START_54
+at_fn_group_banner 54 'EXPRTest.at:74' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "54. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  21 ) # 21. EXPRTest.at:57: expr-test -w $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] (pass)
-    at_setup_line='EXPRTest.at:57'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] (pass)"
-    $at_quiet $ECHO_N " 21: expr-test -w \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:74: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" -f \"dummy\" || true" "EXPRTest.at:74"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "data%20name,y" -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:74"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:74: diff -b -B \$abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr" "EXPRTest.at:74"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:74"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_54
+#AT_START_55
+at_fn_group_banner 55 'EXPRTest.at:75' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "21. EXPRTest.at:57: testing ..."
-      $at_traceon
+(
+  $as_echo "55. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -3523,105 +4805,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:57: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f \"dummy\" || true"
-echo EXPRTest.at:57 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:75: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" -f \"dummy\" || true" "EXPRTest.at:75"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.9 -k "Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]" -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:57: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:75"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:75: diff -b -B \$abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.9.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr" "EXPRTest.at:75"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:75"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_55
+#AT_START_56
+at_fn_group_banner 56 'EXPRTest.at:75' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "56. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:57: diff -b -B \$abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2f.base stderr"
-echo EXPRTest.at:57 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:75: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" -f \"dummy\" || true" "EXPRTest.at:75"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.9 -k "Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]" -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:75"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:75: diff -b -B \$abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.9.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr" "EXPRTest.at:75"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:57: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:75"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_56
+#AT_START_57
+at_fn_group_banner 57 'EXPRTest.at:76' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "57. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  22 ) # 22. EXPRTest.at:57: expr-test -W $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] (pass)
-    at_setup_line='EXPRTest.at:57'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] (pass)"
-    $at_quiet $ECHO_N " 22: expr-test -W \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:76: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f \"dummy\" || true" "EXPRTest.at:76"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:76"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:76: diff -b -B \$abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5e.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr" "EXPRTest.at:76"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:76"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_57
+#AT_START_58
+at_fn_group_banner 58 'EXPRTest.at:76' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "22. EXPRTest.at:57: testing ..."
-      $at_traceon
+(
+  $as_echo "58. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -3632,105 +4955,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:57: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f \"dummy\" || true"
-echo EXPRTest.at:57 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2a -k s2[2:4].m[0:4],s2[2:4].l[0:5] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:76: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f \"dummy\" || true" "EXPRTest.at:76"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:57: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:76"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:76: diff -b -B \$abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5e.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr" "EXPRTest.at:76"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:76"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_58
+#AT_START_59
+at_fn_group_banner 59 'EXPRTest.at:77' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "59. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:57: diff -b -B \$abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2f.base stderr"
-echo EXPRTest.at:57 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2f.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:77: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f \"dummy\" || true" "EXPRTest.at:77"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:77"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:77: diff -b -B \$abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr" "EXPRTest.at:77"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:57: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:77"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_59
+#AT_START_60
+at_fn_group_banner 60 'EXPRTest.at:77' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "60. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  23 ) # 23. EXPRTest.at:58: expr-test -w $abs_srcdir/expr-testsuite/test.3 -k i[1:10] (pass)
-    at_setup_line='EXPRTest.at:58'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] (pass)"
-    $at_quiet $ECHO_N " 23: expr-test -w \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:77: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f \"dummy\" || true" "EXPRTest.at:77"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:77"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:77: diff -b -B \$abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr" "EXPRTest.at:77"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:77"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_60
+#AT_START_61
+at_fn_group_banner 61 'EXPRTest.at:78' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "23. EXPRTest.at:58: testing ..."
-      $at_traceon
+(
+  $as_echo "61. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -3741,105 +5105,196 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:58: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f \"dummy\" || true"
-echo EXPRTest.at:58 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:78: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k \"\" -b -f \"dummy\" || true" "EXPRTest.at:78"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:58: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:78"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:78: diff -b -B \$abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr" "EXPRTest.at:78"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:78"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_61
+#AT_START_62
+at_fn_group_banner 62 'EXPRTest.at:78' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "62. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
 
-$at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:58: diff -b -B \$abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.3.base stderr"
-echo EXPRTest.at:58 >"$at_check_line_file"
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:78: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k \"\" -b -f \"dummy\" || true" "EXPRTest.at:78"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:78"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:78: diff -b -B \$abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr" "EXPRTest.at:78"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:78"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_62
+#AT_START_63
+at_fn_group_banner 63 'EXPRTest.at:79' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "63. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:58: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
 
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:79: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:79"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:79"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:79: diff -b -B \$abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.aa.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr" "EXPRTest.at:79"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:79"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_63
+#AT_START_64
+at_fn_group_banner 64 'EXPRTest.at:79' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "64. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  24 ) # 24. EXPRTest.at:58: expr-test -W $abs_srcdir/expr-testsuite/test.3 -k i[1:10] (pass)
-    at_setup_line='EXPRTest.at:58'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] (pass)"
-    $at_quiet $ECHO_N " 24: expr-test -W \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:79: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:79"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:79"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:79: diff -b -B \$abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.aa.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr" "EXPRTest.at:79"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:79"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_64
+#AT_START_65
+at_fn_group_banner 65 'EXPRTest.at:80' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "24. EXPRTest.at:58: testing ..."
-      $at_traceon
+(
+  $as_echo "65. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -3850,105 +5305,196 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:58: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f \"dummy\" || true"
-echo EXPRTest.at:58 >"$at_check_line_file"
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:80: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b -f \"dummy\" || true" "EXPRTest.at:80"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "j&i>2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:80"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:80: diff -b -B \$abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ab.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr" "EXPRTest.at:80"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:80"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_65
+#AT_START_66
+at_fn_group_banner 66 'EXPRTest.at:80' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "66. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.3 -k i[1:10] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
 
-at_failed=false
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:80: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b -f \"dummy\" || true" "EXPRTest.at:80"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "j&i>2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:58: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:80"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:80: diff -b -B \$abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ab.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr" "EXPRTest.at:80"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:80"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_66
+#AT_START_67
+at_fn_group_banner 67 'EXPRTest.at:81' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "67. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:58: diff -b -B \$abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.3.base stderr"
-echo EXPRTest.at:58 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.3.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:81: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b -f \"dummy\" || true" "EXPRTest.at:81"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "i,j&i<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:81"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:81: diff -b -B \$abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ac.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr" "EXPRTest.at:81"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:58: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:81"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_67
+#AT_START_68
+at_fn_group_banner 68 'EXPRTest.at:81' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "68. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  25 ) # 25. EXPRTest.at:59: expr-test -w $abs_srcdir/expr-testsuite/test.4 -k 's&s=~"^Silly.*"' (pass)
-    at_setup_line='EXPRTest.at:59'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' (pass)"
-    $at_quiet $ECHO_N " 25: expr-test -w \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:81: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b -f \"dummy\" || true" "EXPRTest.at:81"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "i,j&i<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:81"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:81: diff -b -B \$abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ac.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr" "EXPRTest.at:81"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:81"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_68
+#AT_START_69
+at_fn_group_banner 69 'EXPRTest.at:82' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "25. EXPRTest.at:59: testing ..."
-      $at_traceon
+(
+  $as_echo "69. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -3959,105 +5505,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:59: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' -f \"dummy\" || true"
-echo EXPRTest.at:59 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.4 -k 's&s=~"^Silly.*"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.4 -k 's&s=~"^Silly.*"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:82: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"\" -b -f \"dummy\" || true" "EXPRTest.at:82"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:59: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:82"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:82: diff -b -B \$abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr" "EXPRTest.at:82"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:82"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_69
+#AT_START_70
+at_fn_group_banner 70 'EXPRTest.at:82' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "70. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:59: diff -b -B \$abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.4.base stderr"
-echo EXPRTest.at:59 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:82: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"\" -b -f \"dummy\" || true" "EXPRTest.at:82"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:82"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:82: diff -b -B \$abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr" "EXPRTest.at:82"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:59: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:82"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_70
+#AT_START_71
+at_fn_group_banner 71 'EXPRTest.at:83' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "71. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  26 ) # 26. EXPRTest.at:59: expr-test -W $abs_srcdir/expr-testsuite/test.4 -k 's&s=~"^Silly.*"' (pass)
-    at_setup_line='EXPRTest.at:59'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' (pass)"
-    $at_quiet $ECHO_N " 26: expr-test -W \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:83: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b -f \"dummy\" || true" "EXPRTest.at:83"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:83"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:83: diff -b -B \$abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ba.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr" "EXPRTest.at:83"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:83"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_71
+#AT_START_72
+at_fn_group_banner 72 'EXPRTest.at:83' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "26. EXPRTest.at:59: testing ..."
-      $at_traceon
+(
+  $as_echo "72. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -4068,105 +5655,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:59: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' -f \"dummy\" || true"
-echo EXPRTest.at:59 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.4 -k 's&s=~\"^Silly.*\"' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.4 -k 's&s=~"^Silly.*"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.4 -k 's&s=~"^Silly.*"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:83: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b -f \"dummy\" || true" "EXPRTest.at:83"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:59: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:83"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:83: diff -b -B \$abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ba.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr" "EXPRTest.at:83"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:83"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_72
+#AT_START_73
+at_fn_group_banner 73 'EXPRTest.at:84' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "73. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:59: diff -b -B \$abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.4.base stderr"
-echo EXPRTest.at:59 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.4.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:84: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:84"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:84"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:84: diff -b -B \$abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bb.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr" "EXPRTest.at:84"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:59: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:84"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_73
+#AT_START_74
+at_fn_group_banner 74 'EXPRTest.at:84' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "74. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  27 ) # 27. EXPRTest.at:61: expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 3"' (pass)
-    at_setup_line='EXPRTest.at:61'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' (pass)"
-    $at_quiet $ECHO_N " 27: expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:84: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:84"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:84"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:84: diff -b -B \$abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bb.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr" "EXPRTest.at:84"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:84"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_74
+#AT_START_75
+at_fn_group_banner 75 'EXPRTest.at:85' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "27. EXPRTest.at:61: testing ..."
-      $at_traceon
+(
+  $as_echo "75. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -4177,105 +5805,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:61: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' -f \"dummy\" || true"
-echo EXPRTest.at:61 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 3"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 3"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:85: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b -f \"dummy\" || true" "EXPRTest.at:85"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f&f<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:61: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:85"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:85: diff -b -B \$abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bc.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr" "EXPRTest.at:85"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:85"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_75
+#AT_START_76
+at_fn_group_banner 76 'EXPRTest.at:85' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "76. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:61: diff -b -B \$abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ea.base stderr"
-echo EXPRTest.at:61 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:85: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b -f \"dummy\" || true" "EXPRTest.at:85"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f&f<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:85"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:85: diff -b -B \$abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bc.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr" "EXPRTest.at:85"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:61: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:85"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_76
+#AT_START_77
+at_fn_group_banner 77 'EXPRTest.at:86' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "77. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  28 ) # 28. EXPRTest.at:61: expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 3"' (pass)
-    at_setup_line='EXPRTest.at:61'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' (pass)"
-    $at_quiet $ECHO_N " 28: expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:86: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:86"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,j&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:86"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:86: diff -b -B \$abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bd.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr" "EXPRTest.at:86"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:86"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_77
+#AT_START_78
+at_fn_group_banner 78 'EXPRTest.at:86' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "28. EXPRTest.at:61: testing ..."
-      $at_traceon
+(
+  $as_echo "78. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -4286,105 +5955,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:61: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' -f \"dummy\" || true"
-echo EXPRTest.at:61 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 3\"' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 3"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 3"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:86: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:86"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,j&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:61: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:86"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:86: diff -b -B \$abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bd.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr" "EXPRTest.at:86"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:86"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_78
+#AT_START_79
+at_fn_group_banner 79 'EXPRTest.at:87' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "79. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:61: diff -b -B \$abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ea.base stderr"
-echo EXPRTest.at:61 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ea.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:87: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b -f \"dummy\" || true" "EXPRTest.at:87"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "&i<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:87"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:87: diff -b -B \$abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.be.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr" "EXPRTest.at:87"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:61: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:87"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_79
+#AT_START_80
+at_fn_group_banner 80 'EXPRTest.at:87' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "80. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  29 ) # 29. EXPRTest.at:62: expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 5"' (pass)
-    at_setup_line='EXPRTest.at:62'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' (pass)"
-    $at_quiet $ECHO_N " 29: expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:87: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b -f \"dummy\" || true" "EXPRTest.at:87"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "&i<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:87"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:87: diff -b -B \$abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.be.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr" "EXPRTest.at:87"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:87"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_80
+#AT_START_81
+at_fn_group_banner 81 'EXPRTest.at:88' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "29. EXPRTest.at:62: testing ..."
-      $at_traceon
+(
+  $as_echo "81. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -4395,105 +6105,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:62: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' -f \"dummy\" || true"
-echo EXPRTest.at:62 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 5"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 5"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:88: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"\" -b -f \"dummy\" || true" "EXPRTest.at:88"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:62: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:88"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:88: diff -b -B \$abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr" "EXPRTest.at:88"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:88"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_81
+#AT_START_82
+at_fn_group_banner 82 'EXPRTest.at:88' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "82. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:62: diff -b -B \$abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.eb.base stderr"
-echo EXPRTest.at:62 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:88: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"\" -b -f \"dummy\" || true" "EXPRTest.at:88"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:88"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:88: diff -b -B \$abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr" "EXPRTest.at:88"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:62: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:88"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_82
+#AT_START_83
+at_fn_group_banner 83 'EXPRTest.at:89' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "83. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  30 ) # 30. EXPRTest.at:62: expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 5"' (pass)
-    at_setup_line='EXPRTest.at:62'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' (pass)"
-    $at_quiet $ECHO_N " 30: expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:89: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b -f \"dummy\" || true" "EXPRTest.at:89"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:89"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:89: diff -b -B \$abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.da.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr" "EXPRTest.at:89"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:89"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_83
+#AT_START_84
+at_fn_group_banner 84 'EXPRTest.at:89' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "30. EXPRTest.at:62: testing ..."
-      $at_traceon
+(
+  $as_echo "84. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -4504,105 +6255,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:62: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' -f \"dummy\" || true"
-echo EXPRTest.at:62 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~\".*: 5\"' -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 5"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.e -k 'names.s&names.s=~".*: 5"' -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:89: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b -f \"dummy\" || true" "EXPRTest.at:89"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:62: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:89"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:89: diff -b -B \$abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.da.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr" "EXPRTest.at:89"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:89"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_84
+#AT_START_85
+at_fn_group_banner 85 'EXPRTest.at:90' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "85. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:62: diff -b -B \$abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.eb.base stderr"
-echo EXPRTest.at:62 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.eb.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:90: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:90"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:90"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:90: diff -b -B \$abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.db.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr" "EXPRTest.at:90"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:62: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:90"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_85
+#AT_START_86
+at_fn_group_banner 86 'EXPRTest.at:90' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "86. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  31 ) # 31. EXPRTest.at:63: expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] (pass)
-    at_setup_line='EXPRTest.at:63'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] (pass)"
-    $at_quiet $ECHO_N " 31: expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:90: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:90"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:90"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:90: diff -b -B \$abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.db.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr" "EXPRTest.at:90"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:90"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_86
+#AT_START_87
+at_fn_group_banner 87 'EXPRTest.at:91' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "31. EXPRTest.at:63: testing ..."
-      $at_traceon
+(
+  $as_echo "87. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -4613,105 +6405,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:63: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f \"dummy\" || true"
-echo EXPRTest.at:63 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:91: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b -f \"dummy\" || true" "EXPRTest.at:91"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&f<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:63: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:91"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:91: diff -b -B \$abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dc.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr" "EXPRTest.at:91"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:91"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_87
+#AT_START_88
+at_fn_group_banner 88 'EXPRTest.at:91' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "88. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:63: diff -b -B \$abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5.base stderr"
-echo EXPRTest.at:63 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:91: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b -f \"dummy\" || true" "EXPRTest.at:91"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&f<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:91"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:91: diff -b -B \$abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dc.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr" "EXPRTest.at:91"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:63: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:91"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_88
+#AT_START_89
+at_fn_group_banner 89 'EXPRTest.at:92' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "89. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  32 ) # 32. EXPRTest.at:63: expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] (pass)
-    at_setup_line='EXPRTest.at:63'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] (pass)"
-    $at_quiet $ECHO_N " 32: expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:92: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b -f \"dummy\" || true" "EXPRTest.at:92"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&a<10" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:92"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:92: diff -b -B \$abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dd.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr" "EXPRTest.at:92"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:92"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_89
+#AT_START_90
+at_fn_group_banner 90 'EXPRTest.at:92' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "32. EXPRTest.at:63: testing ..."
-      $at_traceon
+(
+  $as_echo "90. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -4722,105 +6555,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:63: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f \"dummy\" || true"
-echo EXPRTest.at:63 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0][0] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:92: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b -f \"dummy\" || true" "EXPRTest.at:92"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&a<10" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:63: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:92"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:92: diff -b -B \$abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dd.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr" "EXPRTest.at:92"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:92"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_90
+#AT_START_91
+at_fn_group_banner 91 'EXPRTest.at:93' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "91. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:63: diff -b -B \$abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5.base stderr"
-echo EXPRTest.at:63 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:93: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:93"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:93"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:93: diff -b -B \$abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.de.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr" "EXPRTest.at:93"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:63: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:93"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_91
+#AT_START_92
+at_fn_group_banner 92 'EXPRTest.at:93' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "92. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  33 ) # 33. EXPRTest.at:64: expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] (pass)
-    at_setup_line='EXPRTest.at:64'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] (pass)"
-    $at_quiet $ECHO_N " 33: expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:93: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:93"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:93"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:93: diff -b -B \$abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.de.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr" "EXPRTest.at:93"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:93"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_92
+#AT_START_93
+at_fn_group_banner 93 'EXPRTest.at:94' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "33. EXPRTest.at:64: testing ..."
-      $at_traceon
+(
+  $as_echo "93. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -4831,105 +6705,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:64: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f \"dummy\" || true"
-echo EXPRTest.at:64 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:94: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:94"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:64: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:94"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:94: diff -b -B \$abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.df.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr" "EXPRTest.at:94"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:94"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_93
+#AT_START_94
+at_fn_group_banner 94 'EXPRTest.at:94' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "94. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:64: diff -b -B \$abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5a.base stderr"
-echo EXPRTest.at:64 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:94: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b -f \"dummy\" || true" "EXPRTest.at:94"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i&i<2000" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:94"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:94: diff -b -B \$abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.df.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr" "EXPRTest.at:94"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:64: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:94"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_94
+#AT_START_95
+at_fn_group_banner 95 'EXPRTest.at:95' \
+  "expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "95. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  34 ) # 34. EXPRTest.at:64: expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] (pass)
-    at_setup_line='EXPRTest.at:64'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] (pass)"
-    $at_quiet $ECHO_N " 34: expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:95: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b -f \"dummy\" || true" "EXPRTest.at:95"
+( $at_check_trace; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:95"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:95: diff -b -B \$abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dg.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr" "EXPRTest.at:95"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:95"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_95
+#AT_START_96
+at_fn_group_banner 96 'EXPRTest.at:95' \
+  "expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "34. EXPRTest.at:64: testing ..."
-      $at_traceon
+(
+  $as_echo "96. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -4940,105 +6855,46 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:64: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f \"dummy\" || true"
-echo EXPRTest.at:64 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[0:2:4][0:2:4][0:2:4] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:95: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b -f \"dummy\" || true" "EXPRTest.at:95"
+( $at_check_trace; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<0" -b -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:64: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:64: diff -b -B \$abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5a.base stderr"
-echo EXPRTest.at:64 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:95"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:95: diff -b -B \$abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dg.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr" "EXPRTest.at:95"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:64: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  35 ) # 35. EXPRTest.at:65: expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i (pass)
-    at_setup_line='EXPRTest.at:65'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i (pass)"
-    $at_quiet $ECHO_N " 35: expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i (pass)$ECHO_C"
-    at_xfail=no
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:95"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_96
+#AT_START_97
+at_fn_group_banner 97 'EXPRTest.at:97' \
+  "expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k i (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "35. EXPRTest.at:65: testing ..."
-      $at_traceon
+(
+  $as_echo "97. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -5049,105 +6905,46 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:65: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i -f \"dummy\" || true"
-echo EXPRTest.at:65 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:97: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k i -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k i -f \"dummy\" || true" "EXPRTest.at:97"
+( $at_check_trace; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k i -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:65: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:65: diff -b -B \$abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6.base stderr"
-echo EXPRTest.at:65 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:97"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:97: diff -b -B \$abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr" "EXPRTest.at:97"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:65: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  36 ) # 36. EXPRTest.at:65: expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i (pass)
-    at_setup_line='EXPRTest.at:65'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i (pass)"
-    $at_quiet $ECHO_N " 36: expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i (pass)$ECHO_C"
-    at_xfail=no
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:97"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_97
+#AT_START_98
+at_fn_group_banner 98 'EXPRTest.at:97' \
+  "expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k i (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "36. EXPRTest.at:65: testing ..."
-      $at_traceon
+(
+  $as_echo "98. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -5158,105 +6955,46 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:65: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i -f \"dummy\" || true"
-echo EXPRTest.at:65 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:97: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k i -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k i -f \"dummy\" || true" "EXPRTest.at:97"
+( $at_check_trace; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k i -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:65: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:65: diff -b -B \$abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6.base stderr"
-echo EXPRTest.at:65 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:97"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:97: diff -b -B \$abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61a.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr" "EXPRTest.at:97"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:65: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  37 ) # 37. EXPRTest.at:66: expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] (pass)
-    at_setup_line='EXPRTest.at:66'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] (pass)"
-    $at_quiet $ECHO_N " 37: expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] (pass)$ECHO_C"
-    at_xfail=no
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:97"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_98
+#AT_START_99
+at_fn_group_banner 99 'EXPRTest.at:98' \
+  "expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "37. EXPRTest.at:66: testing ..."
-      $at_traceon
+(
+  $as_echo "99. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -5267,105 +7005,46 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:66: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f \"dummy\" || true"
-echo EXPRTest.at:66 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:98: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f \"dummy\" || true" "EXPRTest.at:98"
+( $at_check_trace; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:66: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:66: diff -b -B \$abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6a.base stderr"
-echo EXPRTest.at:66 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:98"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:98: diff -b -B \$abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr" "EXPRTest.at:98"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:66: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  38 ) # 38. EXPRTest.at:66: expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] (pass)
-    at_setup_line='EXPRTest.at:66'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] (pass)"
-    $at_quiet $ECHO_N " 38: expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] (pass)$ECHO_C"
-    at_xfail=no
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:98"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_99
+#AT_START_100
+at_fn_group_banner 100 'EXPRTest.at:98' \
+  "expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "38. EXPRTest.at:66: testing ..."
-      $at_traceon
+(
+  $as_echo "100. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -5376,105 +7055,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:66: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f \"dummy\" || true"
-echo EXPRTest.at:66 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:2][2:4] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:98: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f \"dummy\" || true" "EXPRTest.at:98"
+( $at_check_trace; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:66: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:98"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:98: diff -b -B \$abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61b.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr" "EXPRTest.at:98"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:98"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_100
+#AT_START_101
+at_fn_group_banner 101 'EXPRTest.at:99' \
+  "expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "101. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:66: diff -b -B \$abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6a.base stderr"
-echo EXPRTest.at:66 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:99: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f \"dummy\" || true" "EXPRTest.at:99"
+( $at_check_trace; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:99"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:99: diff -b -B \$abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61c.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr" "EXPRTest.at:99"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:66: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:99"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_101
+#AT_START_102
+at_fn_group_banner 102 'EXPRTest.at:99' \
+  "expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "102. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  39 ) # 39. EXPRTest.at:67: expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] (pass)
-    at_setup_line='EXPRTest.at:67'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] (pass)"
-    $at_quiet $ECHO_N " 39: expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:99: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f \"dummy\" || true" "EXPRTest.at:99"
+( $at_check_trace; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:99"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:99: diff -b -B \$abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61c.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr" "EXPRTest.at:99"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:99"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_102
+#AT_START_103
+at_fn_group_banner 103 'EXPRTest.at:100' \
+  "expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "39. EXPRTest.at:67: testing ..."
-      $at_traceon
+(
+  $as_echo "103. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -5485,105 +7205,146 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:67: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f \"dummy\" || true"
-echo EXPRTest.at:67 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:100: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f \"dummy\" || true" "EXPRTest.at:100"
+( $at_check_trace; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:67: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:100"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:100: diff -b -B \$abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr" "EXPRTest.at:100"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:100"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_103
+#AT_START_104
+at_fn_group_banner 104 'EXPRTest.at:100' \
+  "expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "104. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:67: diff -b -B \$abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5b.base stderr"
-echo EXPRTest.at:67 >"$at_check_line_file"
 
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
 
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:100: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f \"dummy\" || true" "EXPRTest.at:100"
+( $at_check_trace; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:100"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:100: diff -b -B \$abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61d.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr" "EXPRTest.at:100"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:67: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:100"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_104
+#AT_START_105
+at_fn_group_banner 105 'EXPRTest.at:102' \
+  "expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass)" ""
+at_xfail=no
+      test "pass" = "xfail" && at_xfail=yes
+(
+  $as_echo "105. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-$at_traceon
 
 
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
+    # Added || true because expr-test returns 0 (failure) for some of
+    # these tests which is correct for the test - we expect some of
+    # the input to trigger an error response from the parser, et
+    # cetera. That's also why we capture both stdout and stderr -
+    # successful runs are sent to stdout while the errors are sent to
+    # stderr.
 
-  40 ) # 40. EXPRTest.at:67: expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] (pass)
-    at_setup_line='EXPRTest.at:67'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] (pass)"
-    $at_quiet $ECHO_N " 40: expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] (pass)$ECHO_C"
-    at_xfail=no
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:102: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k SST -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k SST -f \"dummy\" || true" "EXPRTest.at:102"
+( $at_check_trace; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k SST -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+echo stderr:; tee stderr <"$at_stderr"
+echo stdout:; tee stdout <"$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:102"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:102: diff -b -B \$abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z1.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr" "EXPRTest.at:102"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:102"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_105
+#AT_START_106
+at_fn_group_banner 106 'EXPRTest.at:102' \
+  "expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass)" ""
+at_xfail=no
       test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "40. EXPRTest.at:67: testing ..."
-      $at_traceon
+(
+  $as_echo "106. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
 
 
@@ -5594,9336 +7355,35 @@ $at_traceon
     # successful runs are sent to stdout while the errors are sent to
     # stderr.
 
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:67: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f \"dummy\" || true"
-echo EXPRTest.at:67 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.val[0:1][0:1][0:1] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:102: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k SST -f \"dummy\" || true"
+at_fn_check_prepare_dynamic "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k SST -f \"dummy\" || true" "EXPRTest.at:102"
+( $at_check_trace; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k SST -f "dummy" || true
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:67: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:67: diff -b -B \$abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5b.base stderr"
-echo EXPRTest.at:67 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:67: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  41 ) # 41. EXPRTest.at:68: expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length (pass)
-    at_setup_line='EXPRTest.at:68'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length (pass)"
-    $at_quiet $ECHO_N " 41: expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "41. EXPRTest.at:68: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:68: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length -f \"dummy\" || true"
-echo EXPRTest.at:68 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:68: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:68: diff -b -B \$abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5c.base stderr"
-echo EXPRTest.at:68 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:68: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  42 ) # 42. EXPRTest.at:68: expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length (pass)
-    at_setup_line='EXPRTest.at:68'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length (pass)"
-    $at_quiet $ECHO_N " 42: expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "42. EXPRTest.at:68: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:68: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length -f \"dummy\" || true"
-echo EXPRTest.at:68 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:68: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:68: diff -b -B \$abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5c.base stderr"
-echo EXPRTest.at:68 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5c.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:68: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  43 ) # 43. EXPRTest.at:69: expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width (pass)
-    at_setup_line='EXPRTest.at:69'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width (pass)"
-    $at_quiet $ECHO_N " 43: expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "43. EXPRTest.at:69: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:69: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f \"dummy\" || true"
-echo EXPRTest.at:69 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:69: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:69: diff -b -B \$abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5d.base stderr"
-echo EXPRTest.at:69 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:69: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  44 ) # 44. EXPRTest.at:69: expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width (pass)
-    at_setup_line='EXPRTest.at:69'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width (pass)"
-    $at_quiet $ECHO_N " 44: expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "44. EXPRTest.at:69: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:69: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f \"dummy\" || true"
-echo EXPRTest.at:69 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g.length,g.width -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:69: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:69: diff -b -B \$abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5d.base stderr"
-echo EXPRTest.at:69 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:69: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  45 ) # 45. EXPRTest.at:70: expr-test -w $abs_srcdir/expr-testsuite/test.2 -k j,o (pass)
-    at_setup_line='EXPRTest.at:70'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k j,o (pass)"
-    $at_quiet $ECHO_N " 45: expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k j,o (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "45. EXPRTest.at:70: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:70: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.2 -k j,o -f \"dummy\" || true"
-echo EXPRTest.at:70 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k j,o -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k j,o -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.2 -k j,o -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:70: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:70: diff -b -B \$abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2g.base stderr"
-echo EXPRTest.at:70 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:70: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  46 ) # 46. EXPRTest.at:70: expr-test -W $abs_srcdir/expr-testsuite/test.2 -k j,o (pass)
-    at_setup_line='EXPRTest.at:70'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k j,o (pass)"
-    $at_quiet $ECHO_N " 46: expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k j,o (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "46. EXPRTest.at:70: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:70: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.2 -k j,o -f \"dummy\" || true"
-echo EXPRTest.at:70 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k j,o -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k j,o -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.2 -k j,o -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:70: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:70: diff -b -B \$abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.2g.base stderr"
-echo EXPRTest.at:70 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.2g.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:70: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  47 ) # 47. EXPRTest.at:71: expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "data%23i[0:2:9][0:2]" (pass)
-    at_setup_line='EXPRTest.at:71'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" (pass)"
-    $at_quiet $ECHO_N " 47: expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "47. EXPRTest.at:71: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:71: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" -f \"dummy\" || true"
-echo EXPRTest.at:71 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "data%23i[0:2:9][0:2]" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "data%23i[0:2:9][0:2]" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:71: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:71: diff -b -B \$abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8.base stderr"
-echo EXPRTest.at:71 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:71: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  48 ) # 48. EXPRTest.at:71: expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "data%23i[0:2:9][0:2]" (pass)
-    at_setup_line='EXPRTest.at:71'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" (pass)"
-    $at_quiet $ECHO_N " 48: expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "48. EXPRTest.at:71: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:71: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" -f \"dummy\" || true"
-echo EXPRTest.at:71 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k \"data%23i[0:2:9][0:2]\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "data%23i[0:2:9][0:2]" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "data%23i[0:2:9][0:2]" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:71: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:71: diff -b -B \$abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8.base stderr"
-echo EXPRTest.at:71 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:71: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  49 ) # 49. EXPRTest.at:72: expr-test -w $abs_srcdir/expr-testsuite/test.7 -k x,y,f (pass)
-    at_setup_line='EXPRTest.at:72'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.7 -k x,y,f (pass)"
-    $at_quiet $ECHO_N " 49: expr-test -w \$abs_srcdir/expr-testsuite/test.7 -k x,y,f (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "49. EXPRTest.at:72: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:72: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.7 -k x,y,f -f \"dummy\" || true"
-echo EXPRTest.at:72 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:72: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:72: diff -b -B \$abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.7.base stderr"
-echo EXPRTest.at:72 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:72: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  50 ) # 50. EXPRTest.at:72: expr-test -W $abs_srcdir/expr-testsuite/test.7 -k x,y,f (pass)
-    at_setup_line='EXPRTest.at:72'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.7 -k x,y,f (pass)"
-    $at_quiet $ECHO_N " 50: expr-test -W \$abs_srcdir/expr-testsuite/test.7 -k x,y,f (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "50. EXPRTest.at:72: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:72: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.7 -k x,y,f -f \"dummy\" || true"
-echo EXPRTest.at:72 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.7 -k x,y,f -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:72: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:72: diff -b -B \$abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.7.base stderr"
-echo EXPRTest.at:72 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.7.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:72: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  51 ) # 51. EXPRTest.at:73: expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "x%23y,y" (pass)
-    at_setup_line='EXPRTest.at:73'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" (pass)"
-    $at_quiet $ECHO_N " 51: expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "51. EXPRTest.at:73: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:73: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" -f \"dummy\" || true"
-echo EXPRTest.at:73 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "x%23y,y" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "x%23y,y" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:73: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:73: diff -b -B \$abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8a.base stderr"
-echo EXPRTest.at:73 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:73: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  52 ) # 52. EXPRTest.at:73: expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "x%23y,y" (pass)
-    at_setup_line='EXPRTest.at:73'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" (pass)"
-    $at_quiet $ECHO_N " 52: expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "52. EXPRTest.at:73: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:73: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" -f \"dummy\" || true"
-echo EXPRTest.at:73 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k \"x%23y,y\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "x%23y,y" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "x%23y,y" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:73: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:73: diff -b -B \$abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8a.base stderr"
-echo EXPRTest.at:73 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:73: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  53 ) # 53. EXPRTest.at:74: expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "data%20name,y" (pass)
-    at_setup_line='EXPRTest.at:74'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" (pass)"
-    $at_quiet $ECHO_N " 53: expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "53. EXPRTest.at:74: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:74: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" -f \"dummy\" || true"
-echo EXPRTest.at:74 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "data%20name,y" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.8 -k "data%20name,y" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:74: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:74: diff -b -B \$abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8b.base stderr"
-echo EXPRTest.at:74 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:74: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  54 ) # 54. EXPRTest.at:74: expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "data%20name,y" (pass)
-    at_setup_line='EXPRTest.at:74'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" (pass)"
-    $at_quiet $ECHO_N " 54: expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "54. EXPRTest.at:74: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:74: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" -f \"dummy\" || true"
-echo EXPRTest.at:74 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k \"data%20name,y\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "data%20name,y" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.8 -k "data%20name,y" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:74: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:74: diff -b -B \$abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.8b.base stderr"
-echo EXPRTest.at:74 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.8b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:74: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  55 ) # 55. EXPRTest.at:75: expr-test -w $abs_srcdir/expr-testsuite/test.9 -k "Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]" (pass)
-    at_setup_line='EXPRTest.at:75'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" (pass)"
-    $at_quiet $ECHO_N " 55: expr-test -w \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "55. EXPRTest.at:75: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:75: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" -f \"dummy\" || true"
-echo EXPRTest.at:75 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.9 -k "Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.9 -k "Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:75: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:75: diff -b -B \$abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.9.base stderr"
-echo EXPRTest.at:75 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:75: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  56 ) # 56. EXPRTest.at:75: expr-test -W $abs_srcdir/expr-testsuite/test.9 -k "Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]" (pass)
-    at_setup_line='EXPRTest.at:75'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" (pass)"
-    $at_quiet $ECHO_N " 56: expr-test -W \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "56. EXPRTest.at:75: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:75: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" -f \"dummy\" || true"
-echo EXPRTest.at:75 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.9 -k \"Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.9 -k "Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.9 -k "Data-Set-2.fakeDim0[0:3],Data-Set-2.fakeDim1[0:3]" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:75: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:75: diff -b -B \$abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.9.base stderr"
-echo EXPRTest.at:75 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.9.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.9.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:75: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  57 ) # 57. EXPRTest.at:76: expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] (pass)
-    at_setup_line='EXPRTest.at:76'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] (pass)"
-    $at_quiet $ECHO_N " 57: expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "57. EXPRTest.at:76: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:76: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f \"dummy\" || true"
-echo EXPRTest.at:76 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:76: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:76: diff -b -B \$abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5e.base stderr"
-echo EXPRTest.at:76 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:76: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  58 ) # 58. EXPRTest.at:76: expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] (pass)
-    at_setup_line='EXPRTest.at:76'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] (pass)"
-    $at_quiet $ECHO_N " 58: expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "58. EXPRTest.at:76: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:76: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f \"dummy\" || true"
-echo EXPRTest.at:76 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.5 -k g[1:4:9] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:76: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:76: diff -b -B \$abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.5e.base stderr"
-echo EXPRTest.at:76 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.5e.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:76: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  59 ) # 59. EXPRTest.at:77: expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] (pass)
-    at_setup_line='EXPRTest.at:77'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] (pass)"
-    $at_quiet $ECHO_N " 59: expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "59. EXPRTest.at:77: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:77: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f \"dummy\" || true"
-echo EXPRTest.at:77 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:77: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:77: diff -b -B \$abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6b.base stderr"
-echo EXPRTest.at:77 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:77: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  60 ) # 60. EXPRTest.at:77: expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] (pass)
-    at_setup_line='EXPRTest.at:77'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] (pass)"
-    $at_quiet $ECHO_N " 60: expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "60. EXPRTest.at:77: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:77: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f \"dummy\" || true"
-echo EXPRTest.at:77 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.6 -k i[1:4:9] -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:77: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:77: diff -b -B \$abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.6b.base stderr"
-echo EXPRTest.at:77 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.6b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:77: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  61 ) # 61. EXPRTest.at:78: expr-test -w $abs_srcdir/expr-testsuite/test.a -k "" -b (pass)
-    at_setup_line='EXPRTest.at:78'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"\" -b (pass)"
-    $at_quiet $ECHO_N " 61: expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "61. EXPRTest.at:78: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:78: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"\" -b -f \"dummy\" || true"
-echo EXPRTest.at:78 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k \"\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:78: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:78: diff -b -B \$abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.a.base stderr"
-echo EXPRTest.at:78 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:78: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  62 ) # 62. EXPRTest.at:78: expr-test -W $abs_srcdir/expr-testsuite/test.a -k "" -b (pass)
-    at_setup_line='EXPRTest.at:78'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"\" -b (pass)"
-    $at_quiet $ECHO_N " 62: expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "62. EXPRTest.at:78: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:78: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"\" -b -f \"dummy\" || true"
-echo EXPRTest.at:78 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k \"\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:78: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:78: diff -b -B \$abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.a.base stderr"
-echo EXPRTest.at:78 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:78: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  63 ) # 63. EXPRTest.at:79: expr-test -w $abs_srcdir/expr-testsuite/test.a -k "&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:79'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 63: expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "63. EXPRTest.at:79: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:79: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:79 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:79: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:79: diff -b -B \$abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.aa.base stderr"
-echo EXPRTest.at:79 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:79: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  64 ) # 64. EXPRTest.at:79: expr-test -W $abs_srcdir/expr-testsuite/test.a -k "&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:79'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 64: expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "64. EXPRTest.at:79: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:79: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:79 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k \"&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:79: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:79: diff -b -B \$abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.aa.base stderr"
-echo EXPRTest.at:79 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.aa.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:79: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  65 ) # 65. EXPRTest.at:80: expr-test -w $abs_srcdir/expr-testsuite/test.a -k "j&i>2000" -b (pass)
-    at_setup_line='EXPRTest.at:80'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b (pass)"
-    $at_quiet $ECHO_N " 65: expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "65. EXPRTest.at:80: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:80: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:80 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "j&i>2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "j&i>2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:80: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:80: diff -b -B \$abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ab.base stderr"
-echo EXPRTest.at:80 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:80: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  66 ) # 66. EXPRTest.at:80: expr-test -W $abs_srcdir/expr-testsuite/test.a -k "j&i>2000" -b (pass)
-    at_setup_line='EXPRTest.at:80'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b (pass)"
-    $at_quiet $ECHO_N " 66: expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "66. EXPRTest.at:80: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:80: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:80 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k \"j&i>2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "j&i>2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "j&i>2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:80: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:80: diff -b -B \$abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ab.base stderr"
-echo EXPRTest.at:80 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ab.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:80: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  67 ) # 67. EXPRTest.at:81: expr-test -w $abs_srcdir/expr-testsuite/test.a -k "i,j&i<0" -b (pass)
-    at_setup_line='EXPRTest.at:81'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b (pass)"
-    $at_quiet $ECHO_N " 67: expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "67. EXPRTest.at:81: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:81: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:81 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "i,j&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.a -k "i,j&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:81: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:81: diff -b -B \$abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ac.base stderr"
-echo EXPRTest.at:81 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:81: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  68 ) # 68. EXPRTest.at:81: expr-test -W $abs_srcdir/expr-testsuite/test.a -k "i,j&i<0" -b (pass)
-    at_setup_line='EXPRTest.at:81'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b (pass)"
-    $at_quiet $ECHO_N " 68: expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "68. EXPRTest.at:81: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:81: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:81 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k \"i,j&i<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "i,j&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.a -k "i,j&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:81: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:81: diff -b -B \$abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ac.base stderr"
-echo EXPRTest.at:81 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ac.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:81: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  69 ) # 69. EXPRTest.at:82: expr-test -w $abs_srcdir/expr-testsuite/test.b -k "" -b (pass)
-    at_setup_line='EXPRTest.at:82'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"\" -b (pass)"
-    $at_quiet $ECHO_N " 69: expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "69. EXPRTest.at:82: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:82: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"\" -b -f \"dummy\" || true"
-echo EXPRTest.at:82 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:82: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:82: diff -b -B \$abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.b.base stderr"
-echo EXPRTest.at:82 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:82: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  70 ) # 70. EXPRTest.at:82: expr-test -W $abs_srcdir/expr-testsuite/test.b -k "" -b (pass)
-    at_setup_line='EXPRTest.at:82'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"\" -b (pass)"
-    $at_quiet $ECHO_N " 70: expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "70. EXPRTest.at:82: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:82: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"\" -b -f \"dummy\" || true"
-echo EXPRTest.at:82 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:82: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:82: diff -b -B \$abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.b.base stderr"
-echo EXPRTest.at:82 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:82: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  71 ) # 71. EXPRTest.at:83: expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f" -b (pass)
-    at_setup_line='EXPRTest.at:83'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b (pass)"
-    $at_quiet $ECHO_N " 71: expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "71. EXPRTest.at:83: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:83: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b -f \"dummy\" || true"
-echo EXPRTest.at:83 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:83: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:83: diff -b -B \$abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ba.base stderr"
-echo EXPRTest.at:83 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:83: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  72 ) # 72. EXPRTest.at:83: expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f" -b (pass)
-    at_setup_line='EXPRTest.at:83'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b (pass)"
-    $at_quiet $ECHO_N " 72: expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "72. EXPRTest.at:83: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:83: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b -f \"dummy\" || true"
-echo EXPRTest.at:83 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"i,f\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:83: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:83: diff -b -B \$abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.ba.base stderr"
-echo EXPRTest.at:83 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.ba.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:83: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  73 ) # 73. EXPRTest.at:84: expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:84'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 73: expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "73. EXPRTest.at:84: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:84: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:84 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:84: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:84: diff -b -B \$abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bb.base stderr"
-echo EXPRTest.at:84 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:84: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  74 ) # 74. EXPRTest.at:84: expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:84'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 74: expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "74. EXPRTest.at:84: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:84: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:84 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"i,f&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:84: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:84: diff -b -B \$abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bb.base stderr"
-echo EXPRTest.at:84 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bb.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:84: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  75 ) # 75. EXPRTest.at:85: expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f&f<0" -b (pass)
-    at_setup_line='EXPRTest.at:85'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b (pass)"
-    $at_quiet $ECHO_N " 75: expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "75. EXPRTest.at:85: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:85: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:85 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f&f<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,f&f<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:85: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:85: diff -b -B \$abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bc.base stderr"
-echo EXPRTest.at:85 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:85: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  76 ) # 76. EXPRTest.at:85: expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f&f<0" -b (pass)
-    at_setup_line='EXPRTest.at:85'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b (pass)"
-    $at_quiet $ECHO_N " 76: expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "76. EXPRTest.at:85: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:85: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:85 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"i,f&f<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f&f<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,f&f<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:85: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:85: diff -b -B \$abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bc.base stderr"
-echo EXPRTest.at:85 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bc.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:85: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  77 ) # 77. EXPRTest.at:86: expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,j&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:86'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 77: expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "77. EXPRTest.at:86: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:86: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:86 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,j&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "i,j&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:86: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:86: diff -b -B \$abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bd.base stderr"
-echo EXPRTest.at:86 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:86: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  78 ) # 78. EXPRTest.at:86: expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,j&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:86'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 78: expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "78. EXPRTest.at:86: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:86: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:86 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"i,j&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,j&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "i,j&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:86: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:86: diff -b -B \$abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.bd.base stderr"
-echo EXPRTest.at:86 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.bd.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:86: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  79 ) # 79. EXPRTest.at:87: expr-test -w $abs_srcdir/expr-testsuite/test.b -k "&i<0" -b (pass)
-    at_setup_line='EXPRTest.at:87'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b (pass)"
-    $at_quiet $ECHO_N " 79: expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "79. EXPRTest.at:87: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:87: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:87 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.b -k "&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:87: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:87: diff -b -B \$abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.be.base stderr"
-echo EXPRTest.at:87 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:87: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  80 ) # 80. EXPRTest.at:87: expr-test -W $abs_srcdir/expr-testsuite/test.b -k "&i<0" -b (pass)
-    at_setup_line='EXPRTest.at:87'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b (pass)"
-    $at_quiet $ECHO_N " 80: expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "80. EXPRTest.at:87: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:87: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:87 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k \"&i<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.b -k "&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:87: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:87: diff -b -B \$abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.be.base stderr"
-echo EXPRTest.at:87 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.be.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.be.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:87: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  81 ) # 81. EXPRTest.at:88: expr-test -w $abs_srcdir/expr-testsuite/test.d -k "" -b (pass)
-    at_setup_line='EXPRTest.at:88'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"\" -b (pass)"
-    $at_quiet $ECHO_N " 81: expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "81. EXPRTest.at:88: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:88: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"\" -b -f \"dummy\" || true"
-echo EXPRTest.at:88 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:88: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:88: diff -b -B \$abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.d.base stderr"
-echo EXPRTest.at:88 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:88: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  82 ) # 82. EXPRTest.at:88: expr-test -W $abs_srcdir/expr-testsuite/test.d -k "" -b (pass)
-    at_setup_line='EXPRTest.at:88'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"\" -b (pass)"
-    $at_quiet $ECHO_N " 82: expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "82. EXPRTest.at:88: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:88: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"\" -b -f \"dummy\" || true"
-echo EXPRTest.at:88 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:88: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:88: diff -b -B \$abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.d.base stderr"
-echo EXPRTest.at:88 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:88: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  83 ) # 83. EXPRTest.at:89: expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a" -b (pass)
-    at_setup_line='EXPRTest.at:89'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b (pass)"
-    $at_quiet $ECHO_N " 83: expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "83. EXPRTest.at:89: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:89: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b -f \"dummy\" || true"
-echo EXPRTest.at:89 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:89: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:89: diff -b -B \$abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.da.base stderr"
-echo EXPRTest.at:89 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:89: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  84 ) # 84. EXPRTest.at:89: expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a" -b (pass)
-    at_setup_line='EXPRTest.at:89'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b (pass)"
-    $at_quiet $ECHO_N " 84: expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "84. EXPRTest.at:89: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:89: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b -f \"dummy\" || true"
-echo EXPRTest.at:89 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:89: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:89: diff -b -B \$abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.da.base stderr"
-echo EXPRTest.at:89 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.da.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.da.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:89: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  85 ) # 85. EXPRTest.at:90: expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:90'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 85: expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "85. EXPRTest.at:90: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:90: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:90 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:90: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:90: diff -b -B \$abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.db.base stderr"
-echo EXPRTest.at:90 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:90: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  86 ) # 86. EXPRTest.at:90: expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:90'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 86: expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "86. EXPRTest.at:90: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:90: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:90 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:90: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:90: diff -b -B \$abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.db.base stderr"
-echo EXPRTest.at:90 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.db.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.db.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:90: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  87 ) # 87. EXPRTest.at:91: expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&f<0" -b (pass)
-    at_setup_line='EXPRTest.at:91'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b (pass)"
-    $at_quiet $ECHO_N " 87: expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "87. EXPRTest.at:91: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:91: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:91 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&f<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&f<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:91: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:91: diff -b -B \$abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dc.base stderr"
-echo EXPRTest.at:91 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:91: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  88 ) # 88. EXPRTest.at:91: expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&f<0" -b (pass)
-    at_setup_line='EXPRTest.at:91'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b (pass)"
-    $at_quiet $ECHO_N " 88: expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "88. EXPRTest.at:91: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:91: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:91 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&f<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&f<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&f<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:91: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:91: diff -b -B \$abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dc.base stderr"
-echo EXPRTest.at:91 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dc.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:91: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  89 ) # 89. EXPRTest.at:92: expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&a<10" -b (pass)
-    at_setup_line='EXPRTest.at:92'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b (pass)"
-    $at_quiet $ECHO_N " 89: expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "89. EXPRTest.at:92: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:92: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b -f \"dummy\" || true"
-echo EXPRTest.at:92 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&a<10" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&a<10" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:92: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:92: diff -b -B \$abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dd.base stderr"
-echo EXPRTest.at:92 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:92: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  90 ) # 90. EXPRTest.at:92: expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&a<10" -b (pass)
-    at_setup_line='EXPRTest.at:92'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b (pass)"
-    $at_quiet $ECHO_N " 90: expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "90. EXPRTest.at:92: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:92: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b -f \"dummy\" || true"
-echo EXPRTest.at:92 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&a<10\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&a<10" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&a<10" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:92: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:92: diff -b -B \$abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dd.base stderr"
-echo EXPRTest.at:92 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dd.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:92: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  91 ) # 91. EXPRTest.at:93: expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:93'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 91: expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "91. EXPRTest.at:93: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:93: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:93 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:93: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:93: diff -b -B \$abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.de.base stderr"
-echo EXPRTest.at:93 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:93: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  92 ) # 92. EXPRTest.at:93: expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:93'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 92: expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "92. EXPRTest.at:93: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:93: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:93 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:93: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:93: diff -b -B \$abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.de.base stderr"
-echo EXPRTest.at:93 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.de.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.de.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:93: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  93 ) # 93. EXPRTest.at:94: expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:94'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 93: expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "93. EXPRTest.at:94: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:94: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:94 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:94: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:94: diff -b -B \$abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.df.base stderr"
-echo EXPRTest.at:94 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:94: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  94 ) # 94. EXPRTest.at:94: expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i&i<2000" -b (pass)
-    at_setup_line='EXPRTest.at:94'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b (pass)"
-    $at_quiet $ECHO_N " 94: expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "94. EXPRTest.at:94: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:94: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b -f \"dummy\" || true"
-echo EXPRTest.at:94 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i&i<2000\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i&i<2000" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:94: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:94: diff -b -B \$abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.df.base stderr"
-echo EXPRTest.at:94 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.df.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.df.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:94: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  95 ) # 95. EXPRTest.at:95: expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<0" -b (pass)
-    at_setup_line='EXPRTest.at:95'
-    at_desc="expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b (pass)"
-    $at_quiet $ECHO_N " 95: expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "95. EXPRTest.at:95: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:95: \$abs_builddir/expr-test -w \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:95 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -w $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:95: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:95: diff -b -B \$abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dg.base stderr"
-echo EXPRTest.at:95 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:95: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  96 ) # 96. EXPRTest.at:95: expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<0" -b (pass)
-    at_setup_line='EXPRTest.at:95'
-    at_desc="expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b (pass)"
-    $at_quiet $ECHO_N " 96: expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "96. EXPRTest.at:95: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:95: \$abs_builddir/expr-test -W \$abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b -f \"dummy\" || true"
-echo EXPRTest.at:95 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k \"i,f,a&i<0\" -b -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -W $abs_srcdir/expr-testsuite/test.d -k "i,f,a&i<0" -b -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:95: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:95: diff -b -B \$abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/test.dg.base stderr"
-echo EXPRTest.at:95 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stdout || diff -b -B $abs_srcdir/expr-testsuite/test.dg.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:95: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  97 ) # 97. EXPRTest.at:97: expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k i (pass)
-    at_setup_line='EXPRTest.at:97'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k i (pass)"
-    $at_quiet $ECHO_N " 97: expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k i (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "97. EXPRTest.at:97: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:97: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k i -f \"dummy\" || true"
-echo EXPRTest.at:97 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k i -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:97: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:97: diff -b -B \$abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61a.base stderr"
-echo EXPRTest.at:97 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:97: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  98 ) # 98. EXPRTest.at:97: expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k i (pass)
-    at_setup_line='EXPRTest.at:97'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k i (pass)"
-    $at_quiet $ECHO_N " 98: expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k i (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "98. EXPRTest.at:97: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:97: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k i -f \"dummy\" || true"
-echo EXPRTest.at:97 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k i -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k i -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:97: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:97: diff -b -B \$abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61a.base stderr"
-echo EXPRTest.at:97 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61a.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:97: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  99 ) # 99. EXPRTest.at:98: expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  (pass)
-    at_setup_line='EXPRTest.at:98'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  (pass)"
-    $at_quiet $ECHO_N " 99: expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "99. EXPRTest.at:98: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:98: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f \"dummy\" || true"
-echo EXPRTest.at:98 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:98: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:98: diff -b -B \$abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61b.base stderr"
-echo EXPRTest.at:98 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:98: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  100 ) # 100. EXPRTest.at:98: expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  (pass)
-    at_setup_line='EXPRTest.at:98'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  (pass)"
-    $at_quiet $ECHO_N "100: expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "100. EXPRTest.at:98: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:98: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f \"dummy\" || true"
-echo EXPRTest.at:98 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[0:2][0:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:98: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:98: diff -b -B \$abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61b.base stderr"
-echo EXPRTest.at:98 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61b.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:98: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  101 ) # 101. EXPRTest.at:99: expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  (pass)
-    at_setup_line='EXPRTest.at:99'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  (pass)"
-    $at_quiet $ECHO_N "101: expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "101. EXPRTest.at:99: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:99: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f \"dummy\" || true"
-echo EXPRTest.at:99 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:99: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:99: diff -b -B \$abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61c.base stderr"
-echo EXPRTest.at:99 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:99: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  102 ) # 102. EXPRTest.at:99: expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  (pass)
-    at_setup_line='EXPRTest.at:99'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  (pass)"
-    $at_quiet $ECHO_N "102: expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "102. EXPRTest.at:99: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:99: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f \"dummy\" || true"
-echo EXPRTest.at:99 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][0:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:99: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:99: diff -b -B \$abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61c.base stderr"
-echo EXPRTest.at:99 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61c.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:99: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  103 ) # 103. EXPRTest.at:100: expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass)
-    at_setup_line='EXPRTest.at:100'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass)"
-    $at_quiet $ECHO_N "103: expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "103. EXPRTest.at:100: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:100: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f \"dummy\" || true"
-echo EXPRTest.at:100 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:100: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:100: diff -b -B \$abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61d.base stderr"
-echo EXPRTest.at:100 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:100: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  104 ) # 104. EXPRTest.at:100: expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass)
-    at_setup_line='EXPRTest.at:100'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass)"
-    $at_quiet $ECHO_N "104: expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "104. EXPRTest.at:100: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:100: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f \"dummy\" || true"
-echo EXPRTest.at:100 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.61 -k  i[1:2][1:2]  -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:100: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:100: diff -b -B \$abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.61d.base stderr"
-echo EXPRTest.at:100 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.61d.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:100: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  105 ) # 105. EXPRTest.at:101: expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST)" (pass)
-    at_setup_line='EXPRTest.at:101'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" (pass)"
-    $at_quiet $ECHO_N "105: expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "105. EXPRTest.at:101: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:101: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" -f \"dummy\" || true"
-echo EXPRTest.at:101 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:101: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:101: diff -b -B \$abs_srcdir/expr-testsuite/data.z0.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z0.base stderr"
-echo EXPRTest.at:101 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:101: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  106 ) # 106. EXPRTest.at:101: expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST)" (pass)
-    at_setup_line='EXPRTest.at:101'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" (pass)"
-    $at_quiet $ECHO_N "106: expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "106. EXPRTest.at:101: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:101: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" -f \"dummy\" || true"
-echo EXPRTest.at:101 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:101: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:101: diff -b -B \$abs_srcdir/expr-testsuite/data.z0.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z0.base stderr"
-echo EXPRTest.at:101 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z0.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:101: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  107 ) # 107. EXPRTest.at:102: expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k SST (pass)
-    at_setup_line='EXPRTest.at:102'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass)"
-    $at_quiet $ECHO_N "107: expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "107. EXPRTest.at:102: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:102: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k SST -f \"dummy\" || true"
-echo EXPRTest.at:102 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k SST -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k SST -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k SST -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:102: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:102: diff -b -B \$abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z1.base stderr"
-echo EXPRTest.at:102 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:102: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  108 ) # 108. EXPRTest.at:102: expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k SST (pass)
-    at_setup_line='EXPRTest.at:102'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass)"
-    $at_quiet $ECHO_N "108: expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k SST (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "108. EXPRTest.at:102: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:102: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k SST -f \"dummy\" || true"
-echo EXPRTest.at:102 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k SST -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k SST -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k SST -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:102: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:102: diff -b -B \$abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z1.base stderr"
-echo EXPRTest.at:102 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:102: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  109 ) # 109. EXPRTest.at:104: expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:104'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "109: expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "109. EXPRTest.at:104: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:104: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:104 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:104: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:104: diff -b -B \$abs_srcdir/expr-testsuite/data.z2.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z2.base stderr"
-echo EXPRTest.at:104 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:104: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  110 ) # 110. EXPRTest.at:104: expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:104'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "110: expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "110. EXPRTest.at:104: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:104: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:104 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c0 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:104: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:104: diff -b -B \$abs_srcdir/expr-testsuite/data.z2.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z2.base stderr"
-echo EXPRTest.at:104 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z2.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:104: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  111 ) # 111. EXPRTest.at:105: expr-test -b -w $abs_srcdir/expr-testsuite/test.c1 -k "geogrid(SST,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:105'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "111: expr-test -b -w \$abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "111. EXPRTest.at:105: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:105: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:105 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c1 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c1 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:105: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:105: diff -b -B \$abs_srcdir/expr-testsuite/data.z3.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z3.base stderr"
-echo EXPRTest.at:105 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:105: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  112 ) # 112. EXPRTest.at:105: expr-test -b -W $abs_srcdir/expr-testsuite/test.c1 -k "geogrid(SST,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:105'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "112: expr-test -b -W \$abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "112. EXPRTest.at:105: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:105: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:105 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c1 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c1 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c1 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:105: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:105: diff -b -B \$abs_srcdir/expr-testsuite/data.z3.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z3.base stderr"
-echo EXPRTest.at:105 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z3.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:105: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  113 ) # 113. EXPRTest.at:106: expr-test -b -w $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:106'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "113: expr-test -b -w \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "113. EXPRTest.at:106: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:106: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:106 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:106: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:106: diff -b -B \$abs_srcdir/expr-testsuite/data.z4.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z4.base stderr"
-echo EXPRTest.at:106 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:106: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  114 ) # 114. EXPRTest.at:106: expr-test -b -W $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:106'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "114: expr-test -b -W \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "114. EXPRTest.at:106: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:106: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:106 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:106: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:106: diff -b -B \$abs_srcdir/expr-testsuite/data.z4.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z4.base stderr"
-echo EXPRTest.at:106 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z4.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:106: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  115 ) # 115. EXPRTest.at:107: expr-test -b -w $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160,\"time=1024\")" (pass)
-    at_setup_line='EXPRTest.at:107'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass)"
-    $at_quiet $ECHO_N "115: expr-test -b -w \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "115. EXPRTest.at:107: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:107: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" -f \"dummy\" || true"
-echo EXPRTest.at:107 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160,\"time=1024\")" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160,\"time=1024\")" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:107: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:107: diff -b -B \$abs_srcdir/expr-testsuite/data.z5.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z5.base stderr"
-echo EXPRTest.at:107 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:107: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  116 ) # 116. EXPRTest.at:107: expr-test -b -W $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160,\"time=1024\")" (pass)
-    at_setup_line='EXPRTest.at:107'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass)"
-    $at_quiet $ECHO_N "116: expr-test -b -W \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "116. EXPRTest.at:107: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:107: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" -f \"dummy\" || true"
-echo EXPRTest.at:107 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c2 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160,\"time=1024\")" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c2 -k "geogrid(SST,61,97,38,160,\"time=1024\")" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:107: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:107: diff -b -B \$abs_srcdir/expr-testsuite/data.z5.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z5.base stderr"
-echo EXPRTest.at:107 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z5.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:107: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  117 ) # 117. EXPRTest.at:108: expr-test -b -w $abs_srcdir/expr-testsuite/test.c3 -k "geogrid(SST,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:108'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "117: expr-test -b -w \$abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "117. EXPRTest.at:108: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:108: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:108 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c3 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c3 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:108: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:108: diff -b -B \$abs_srcdir/expr-testsuite/data.z6.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z6.base stderr"
-echo EXPRTest.at:108 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:108: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  118 ) # 118. EXPRTest.at:108: expr-test -b -W $abs_srcdir/expr-testsuite/test.c3 -k "geogrid(SST,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:108'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "118: expr-test -b -W \$abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "118. EXPRTest.at:108: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:108: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:108 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c3 -k \"geogrid(SST,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c3 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c3 -k "geogrid(SST,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:108: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:108: diff -b -B \$abs_srcdir/expr-testsuite/data.z6.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z6.base stderr"
-echo EXPRTest.at:108 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z6.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:108: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  119 ) # 119. EXPRTest.at:109: expr-test -b -w $abs_srcdir/expr-testsuite/test.c4 -k "geogrid(SST,61,97,38,160,\"time=1024\")" (pass)
-    at_setup_line='EXPRTest.at:109'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass)"
-    $at_quiet $ECHO_N "119: expr-test -b -w \$abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "119. EXPRTest.at:109: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:109: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" -f \"dummy\" || true"
-echo EXPRTest.at:109 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c4 -k "geogrid(SST,61,97,38,160,\"time=1024\")" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c4 -k "geogrid(SST,61,97,38,160,\"time=1024\")" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:109: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:109: diff -b -B \$abs_srcdir/expr-testsuite/data.z7.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z7.base stderr"
-echo EXPRTest.at:109 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:109: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  120 ) # 120. EXPRTest.at:109: expr-test -b -W $abs_srcdir/expr-testsuite/test.c4 -k "geogrid(SST,61,97,38,160,\"time=1024\")" (pass)
-    at_setup_line='EXPRTest.at:109'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass)"
-    $at_quiet $ECHO_N "120: expr-test -b -W \$abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "120. EXPRTest.at:109: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:109: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" -f \"dummy\" || true"
-echo EXPRTest.at:109 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c4 -k \"geogrid(SST,61,97,38,160,\\\"time=1024\\\")\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c4 -k "geogrid(SST,61,97,38,160,\"time=1024\")" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c4 -k "geogrid(SST,61,97,38,160,\"time=1024\")" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:109: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:109: diff -b -B \$abs_srcdir/expr-testsuite/data.z7.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z7.base stderr"
-echo EXPRTest.at:109 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z7.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:109: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  121 ) # 121. EXPRTest.at:110: expr-test -b -w $abs_srcdir/expr-testsuite/test.c5 -k "geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:110'
-    at_desc="expr-test -b -w \$abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "121: expr-test -b -w \$abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "121. EXPRTest.at:110: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:110: \$abs_builddir/expr-test -b -w \$abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:110 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c5 -k "geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -w $abs_srcdir/expr-testsuite/test.c5 -k "geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:110: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:110: diff -b -B \$abs_srcdir/expr-testsuite/data.z8.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z8.base stderr"
-echo EXPRTest.at:110 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:110: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-  122 ) # 122. EXPRTest.at:110: expr-test -b -W $abs_srcdir/expr-testsuite/test.c5 -k "geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)" (pass)
-    at_setup_line='EXPRTest.at:110'
-    at_desc="expr-test -b -W \$abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" (pass)"
-    $at_quiet $ECHO_N "122: expr-test -b -W \$abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" (pass)$ECHO_C"
-    at_xfail=no
-      test "pass" = "xfail" && at_xfail=yes
-    echo "#                             -*- compilation -*-" >> "$at_group_log"
-    (
-      echo "122. EXPRTest.at:110: testing ..."
-      $at_traceon
-
-
-
-    # Added || true because expr-test returns 0 (failure) for some of
-    # these tests which is correct for the test - we expect some of
-    # the input to trigger an error response from the parser, et
-    # cetera. That's also why we capture both stdout and stderr -
-    # successful runs are sent to stdout while the errors are sent to
-    # stderr.
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:110: \$abs_builddir/expr-test -b -W \$abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" -f \"dummy\" || true"
-echo EXPRTest.at:110 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "$abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c5 -k \"geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)\" -f \"dummy\" || true" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c5 -k "geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; $abs_builddir/expr-test -b -W $abs_srcdir/expr-testsuite/test.c5 -k "geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)" -f "dummy" || true ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:110: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-    $at_traceoff
-echo "$at_srcdir/EXPRTest.at:110: diff -b -B \$abs_srcdir/expr-testsuite/data.z8.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z8.base stderr"
-echo EXPRTest.at:110 >"$at_check_line_file"
-
-at_trace_this=
-if test -n "$at_traceon"; then
-    case "diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stderr" in
-        *'
-'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
- *) at_trace_this=yes ;;
-    esac
-fi
-
-if test -n "$at_trace_this"; then
-    ( $at_traceon; diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stderr ) >"$at_stdout" 2>"$at_stder1"
-    at_status=$?
-    grep '^ *+' "$at_stder1" >&2
-    grep -v '^ *+' "$at_stder1" >"$at_stderr"
-else
-    ( :; diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z8.base stderr ) >"$at_stdout" 2>"$at_stderr"
-    at_status=$?
-fi
-
-at_failed=false
-$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:102"
+$at_failed && at_fn_log_failure
+$at_traceon; }
+
+    { set +x
+$as_echo "$at_srcdir/EXPRTest.at:102: diff -b -B \$abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B \$abs_srcdir/expr-testsuite/data.z1.base stderr"
+at_fn_check_prepare_dynamic "diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr" "EXPRTest.at:102"
+( $at_check_trace; diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stdout || diff -b -B $abs_srcdir/expr-testsuite/data.z1.base stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+at_status=$? at_failed=false
+$at_check_filter
+at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-case $at_status in
-   77) echo 77 > "$at_status_file"; exit 77;;
-   0) ;;
-   *) echo "$at_srcdir/EXPRTest.at:110: exit code was $at_status, expected 0"
-      at_failed=:;;
-esac
-if $at_failed; then
-
-
-  echo 1 > "$at_status_file"
-  exit 1
-fi
-
-$at_traceon
-
-
-          $at_traceoff
-      $at_times_p && times >"$at_times_file"
-    ) 5>&1 2>&1 | eval $at_tee_pipe
-    at_status=`cat "$at_status_file"`
-    ;;
-
-
-  * )
-    echo "$as_me: no such test group: $at_group" >&2
-    continue
-    ;;
-  esac
-
-  # Be sure to come back to the suite directory, in particular
-  # since below we might `rm' the group directory we are in currently.
-  cd "$at_suite_dir"
-
-  case $at_group in
-    banner-*) ;;
-    *)
-      if test ! -f "$at_check_line_file"; then
-	sed "s/^ */$as_me: warning: /" <<_ATEOF
-	A failure happened in a test group before any test could be
-	run. This means that test suite is improperly designed.  Please
-	report this failure to <opendap-tech at opendap.org>.
-_ATEOF
-	echo "$at_setup_line" >"$at_check_line_file"
-      fi
-      at_group_count=`expr 1 + $at_group_count`
-      $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
-      echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log"
-      case $at_xfail:$at_status in
-	yes:0)
-	    at_msg="UNEXPECTED PASS"
-	    at_xpass_list="$at_xpass_list $at_group"
-	    at_errexit=$at_errexit_p
-	    ;;
-	no:0)
-	    at_msg="ok"
-	    at_pass_list="$at_pass_list $at_group"
-	    at_errexit=false
-	    ;;
-	*:77)
-	    at_msg='skipped ('`cat "$at_check_line_file"`')'
-	    at_skip_list="$at_skip_list $at_group"
-	    at_errexit=false
-	    ;;
-	yes:*)
-	    at_msg='expected failure ('`cat "$at_check_line_file"`')'
-	    at_xfail_list="$at_xfail_list $at_group"
-	    at_errexit=false
-	    ;;
-	no:*)
-	    at_msg='FAILED ('`cat "$at_check_line_file"`')'
-	    at_fail_list="$at_fail_list $at_group"
-	    at_errexit=$at_errexit_p
-	    ;;
-      esac
-      # Make sure there is a separator even with long titles.
-      echo " $at_msg"
-      at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
-      case $at_status in
-	0|77)
-	  # $at_times_file is only available if the group succeeded.
-	  # We're not including the group log, so the success message
-	  # is written in the global log separately.  But we also
-	  # write to the group log in case they're using -d.
-	  if test -f "$at_times_file"; then
-	    at_log_msg="$at_log_msg	("`sed 1d "$at_times_file"`')'
-	    rm -f "$at_times_file"
-          fi
-	  echo "$at_log_msg" >> "$at_group_log"
-	  echo "$at_log_msg" >&5
-
-	  # Cleanup the group directory, unless the user wants the files.
-	  if $at_debug_p ; then
-	    	  {
-	    echo "#! /bin/sh"
-	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
-	    echo "cd '$at_dir'"
-	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
-	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
-	    echo 'exit 1'
-	  } >$at_group_dir/run
-	  chmod +x $at_group_dir/run
-
-	  elif test -d "$at_group_dir"; then
-	    find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
-	    rm -fr "$at_group_dir"
-	  fi
-	  ;;
-	*)
-	  # Upon failure, include the log into the testsuite's global
-	  # log.  The failure message is written in the group log.  It
-	  # is later included in the global log.
-	  echo "$at_log_msg" >> "$at_group_log"
-
-	  # Upon failure, keep the group directory for autopsy, and
-	  # create the debugging script.
-	  	  {
-	    echo "#! /bin/sh"
-	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
-	    echo "cd '$at_dir'"
-	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
-	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
-	    echo 'exit 1'
-	  } >$at_group_dir/run
-	  chmod +x $at_group_dir/run
-
-	  $at_errexit && break
-	  ;;
-      esac
-      ;;
-  esac
-done
-
-# Back to the top directory.
-cd "$at_dir"
-
-# Compute the duration of the suite.
-at_stop_date=`date`
-at_stop_time=`date +%s 2>/dev/null`
-echo "$as_me: ending at: $at_stop_date" >&5
-case $at_start_time,$at_stop_time in
-  [0-9]*,[0-9]*)
-    at_duration_s=`expr $at_stop_time - $at_start_time`
-    at_duration_m=`expr $at_duration_s / 60`
-    at_duration_h=`expr $at_duration_m / 60`
-    at_duration_s=`expr $at_duration_s % 60`
-    at_duration_m=`expr $at_duration_m % 60`
-    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
-    echo "$as_me: test suite duration: $at_duration" >&5
-    ;;
-esac
-
-# Wrap up the test suite with summary statistics.
-at_skip_count=`set dummy $at_skip_list; shift; echo $#`
-at_fail_count=`set dummy $at_fail_list; shift; echo $#`
-at_xpass_count=`set dummy $at_xpass_list; shift; echo $#`
-at_xfail_count=`set dummy $at_xfail_list; shift; echo $#`
-
-at_run_count=`expr $at_group_count - $at_skip_count`
-at_unexpected_count=`expr $at_xpass_count + $at_fail_count`
-at_total_fail_count=`expr $at_xfail_count + $at_fail_count`
-
-echo
-cat <<\_ASBOX
-## ------------- ##
-## Test results. ##
-## ------------- ##
-_ASBOX
-echo
-{
-  echo
-  cat <<\_ASBOX
-## ------------- ##
-## Test results. ##
-## ------------- ##
-_ASBOX
-  echo
-} >&5
-
-if test $at_run_count = 1; then
-  at_result="1 test"
-  at_were=was
-else
-  at_result="$at_run_count tests"
-  at_were=were
-fi
-if $at_errexit_p && test $at_unexpected_count != 0; then
-  if test $at_xpass_count = 1; then
-    at_result="$at_result $at_were run, one passed"
-  else
-    at_result="$at_result $at_were run, one failed"
-  fi
-  at_result="$at_result unexpectedly and inhibited subsequent tests."
-else
-  # Don't you just love exponential explosion of the number of cases?
-  case $at_xpass_count:$at_fail_count:$at_xfail_count in
-    # So far, so good.
-    0:0:0) at_result="$at_result $at_were successful." ;;
-    0:0:*) at_result="$at_result behaved as expected." ;;
-
-    # Some unexpected failures
-    0:*:0) at_result="$at_result $at_were run,
-$at_fail_count failed unexpectedly." ;;
-
-    # Some failures, both expected and unexpected
-    0:*:1) at_result="$at_result $at_were run,
-$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
-    0:*:*) at_result="$at_result $at_were run,
-$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
-
-    # No unexpected failures, but some xpasses
-    *:0:*) at_result="$at_result $at_were run,
-$at_xpass_count passed unexpectedly." ;;
-
-    # No expected failures, but failures and xpasses
-    *:1:0) at_result="$at_result $at_were run,
-$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
-    *:*:0) at_result="$at_result $at_were run,
-$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
-
-    # All of them.
-    *:*:1) at_result="$at_result $at_were run,
-$at_xpass_count passed unexpectedly,
-$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
-    *:*:*) at_result="$at_result $at_were run,
-$at_xpass_count passed unexpectedly,
-$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
-  esac
-
-  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
-    at_result="All $at_result"
-  fi
-fi
-
-# Now put skips in the mix.
-case $at_skip_count in
-  0) ;;
-  1) at_result="$at_result
-1 test was skipped." ;;
-  *) at_result="$at_result
-$at_skip_count tests were skipped." ;;
-esac
-
-if test $at_unexpected_count = 0; then
-  echo "$at_result"
-  echo "$at_result" >&5
-else
-  echo "ERROR: $at_result" >&2
-  echo "ERROR: $at_result" >&5
-  {
-    echo
-    cat <<\_ASBOX
-## ------------------------ ##
-## Summary of the failures. ##
-## ------------------------ ##
-_ASBOX
-
-    # Summary of failed and skipped tests.
-    if test $at_fail_count != 0; then
-      echo "Failed tests:"
-      $SHELL "$0" $at_fail_list --list
-      echo
-    fi
-    if test $at_skip_count != 0; then
-      echo "Skipped tests:"
-      $SHELL "$0" $at_skip_list --list
-      echo
-    fi
-    if test $at_xpass_count != 0; then
-      echo "Unexpected passes:"
-      $SHELL "$0" $at_xpass_list --list
-      echo
-    fi
-    if test $at_fail_count != 0; then
-      cat <<\_ASBOX
-## ---------------------- ##
-## Detailed failed tests. ##
-## ---------------------- ##
-_ASBOX
-      echo
-      for at_group in $at_fail_list
-      do
-        at_group_normalized=$at_group
-
-  while :; do
-    case $at_group_normalized in #(
-    $at_format*) break;;
-    esac
-    at_group_normalized=0$at_group_normalized
-  done
-
-        cat "$at_suite_dir/$at_group_normalized/$as_me.log"
-        echo
-      done
-      echo
-    fi
-    if test -n "$at_top_srcdir"; then
-      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## ${at_top_build_prefix}config.log ##
-_ASBOX
-      sed 's/^/| /' ${at_top_build_prefix}config.log
-      echo
-    fi
-  } >&5
-
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## $as_me.log was created. ##
-_ASBOX
-
-  echo
-  echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:"
-  echo
-  echo "   To: <opendap-tech at opendap.org>"
-  echo "   Subject: [libdap 3.11.6] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}"
-  echo
-  if test $at_debug_p = false; then
-    echo
-    echo 'You may investigate any problem if you feel able to do so, in which'
-    echo 'case the test suite provides a good starting point.  Its output may'
-    echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
-    echo
-  fi
-    exit 1
-fi
-
-exit 0
-
+at_fn_check_status 0 $at_status "$at_srcdir/EXPRTest.at:102"
+$at_failed && at_fn_log_failure
+$at_traceon; }
 
 
+      set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_106
diff --git a/tests/EXPRTest.at b/tests/EXPRTest.at
index 14db4c2..f585e57 100644
--- a/tests/EXPRTest.at
+++ b/tests/EXPRTest.at
@@ -98,16 +98,16 @@ EXPR_RESPONSE_B([test.61], [i], [data.61a], [pass])
 EXPR_RESPONSE_B([test.61], [ i[[0:2]][[0:2]] ], [data.61b], [pass])
 EXPR_RESPONSE_B([test.61], [ i[[1:2]][[0:2]] ], [data.61c], [pass])
 EXPR_RESPONSE_B([test.61], [ i[[1:2]][[1:2]] ], [data.61d], [pass])
-EXPR_RESPONSE_B([test.c0], ["geogrid(SST)"], [data.z0], [pass])
+# EXPR_RESPONSE_B([test.c0], ["geogrid(SST)"], [data.z0], [pass])
 EXPR_RESPONSE_B([test.c0], [SST], [data.z1], [pass])
 
-EXPR_RESPONSE_B([test.c0], ["geogrid(SST,61,97,38,160)"], [data.z2], [pass])
-EXPR_RESPONSE_B([test.c1], ["geogrid(SST,61,97,38,160)"], [data.z3], [pass])
-EXPR_RESPONSE_B([test.c2], ["geogrid(SST,61,97,38,160)"], [data.z4], [pass])
-EXPR_RESPONSE_B([test.c2], ["geogrid(SST,61,97,38,160,\"time=1024\")"], [data.z5], [pass])
-EXPR_RESPONSE_B([test.c3], ["geogrid(SST,61,97,38,160)"], [data.z6], [pass])
-EXPR_RESPONSE_B([test.c4], ["geogrid(SST,61,97,38,160,\"time=1024\")"], [data.z7], [pass])
-EXPR_RESPONSE_B([test.c5], ["geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)"], [data.z8], [pass])
+#EXPR_RESPONSE_B([test.c0], ["geogrid(SST,61,97,38,160)"], [data.z2], [pass])
+#EXPR_RESPONSE_B([test.c1], ["geogrid(SST,61,97,38,160)"], [data.z3], [pass])
+#EXPR_RESPONSE_B([test.c2], ["geogrid(SST,61,97,38,160)"], [data.z4], [pass])
+#EXPR_RESPONSE_B([test.c2], ["geogrid(SST,61,97,38,160,\"time=1024\")"], [data.z5], [pass])
+#EXPR_RESPONSE_B([test.c3], ["geogrid(SST,61,97,38,160)"], [data.z6], [pass])
+#EXPR_RESPONSE_B([test.c4], ["geogrid(SST,61,97,38,160,\"time=1024\")"], [data.z7], [pass])
+#EXPR_RESPONSE_B([test.c5], ["geogrid(SST,61,97,38,160),geogrid(AIRT,61,97,38,160)"], [data.z8], [pass])
 
 # EXPR_RESPONSE_B([test.c0], ["geogrid(SST,lat,lon,61,97,38,160)"], [data.z2], [pass])
 # EXPR_RESPONSE_B([test.c1], ["geogrid(SST,lat_reversed,lon,61,97,38,160)"], [data.z3], [pass])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e66f0e2..70a270b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -6,28 +6,32 @@ AUTOMAKE_OPTIONS = foreign
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/GNU $(XML2_CFLAGS) $(CURL_CFLAGS)
 AM_CXXFLAGS =  
 
+if COMPILER_IS_GCC
+AM_CXXFLAGS += -Wall -W -Wcast-align
+endif
+
 # These are not used by automake but are often useful for certain types of
 # debugging. 
-CXXFLAGS_DEBUG = -g3 -O0 -fno-defer-pop -Wall -W -Wcast-align -Werror
+CXXFLAGS_DEBUG = -g3 -O0  -Wall -W -Wcast-align
 TEST_COV_FLAGS = -ftest-coverage -fprofile-arcs
 
 check_PROGRAMS = das-test dds-test expr-test 
-# noinst_PROGRAMS = io_test
 
 TESTS = DASTest DDSTest EXPRTest
-# EXPRTest
 
 dist_check_SCRIPTS = DASTest DDSTest EXPRTest atconfig atlocal
 
-##CLEANFILES = *.log *.sum
-
 # Build the test drivers. The drivers all use the
 # subclassed types in Test*.cc and the TestTypesFactory.
 
-noinst_LIBRARIES = libtest-types.a
+#noinst_LIBRARIES = libtest-types.a
+lib_LIBRARIES = libtest-types.a
 
 libtest_types_a_SOURCES = $(TESTSRCS) $(TEST_HDR)
 
+testheadersdir = $(pkgincludedir)/test
+testheaders_HEADERS = $(TEST_HDR)
+
 # io_test_SOURCES = io_test.cc
 # io_test_LDADD = ../libdap.la
 
@@ -37,7 +41,7 @@ das_test_LDADD =  libtest-types.a ../libdapserver.la ../libdap.la
 dds_test_SOURCES = dds-test.cc
 dds_test_LDADD = libtest-types.a ../libdapserver.la ../libdap.la 
 
-expr_test_SOURCES = expr-test.cc
+expr_test_SOURCES = expr-test.cc ResponseBuilder.cc ResponseBuilder.h
 expr_test_LDADD = libtest-types.a ../libdapserver.la ../libdapclient.la ../libdap.la
 
 TESTSRCS = TestByte.cc TestInt32.cc TestFloat64.cc TestStr.cc TestUrl.cc \
@@ -51,10 +55,6 @@ TEST_HDR = TestArray.h TestByte.h TestCommon.h TestFloat32.h TestFloat64.h    \
 
 DIRS_EXTRA = das-testsuite dds-testsuite expr-testsuite 
 
-# grid-func-testsuite cache-testsuite ais_testsuite rcreader-testsuite 
-# server-testsuite cgi-util-tests
-# ddx-testsuite	  
-
 EXTRA_DIST = DASTest.at  $(DASTESTSUITE) DDSTest.at  $(DDSTESTSUITE) \
 	EXPRTest.at $(EXPRTESTSUITE) atlocal.in $(srcdir)/package.m4 \
 	$(DIRS_EXTRA)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 72cb4ee..5c027c8 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.12 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,7 +17,25 @@
 
 # Tests
 
+
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -35,15 +53,17 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
+ at COMPILER_IS_GCC_TRUE@am__append_1 = -Wall -W -Wcast-align
 check_PROGRAMS = das-test$(EXEEXT) dds-test$(EXEEXT) \
 	expr-test$(EXEEXT)
 subdir = tests
 DIST_COMMON = README $(dist_check_SCRIPTS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/atlocal.in
+	$(srcdir)/Makefile.in $(srcdir)/atlocal.in \
+	$(testheaders_HEADERS) $(top_srcdir)/conf/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/btowc.m4 \
-	$(top_srcdir)/gl/m4/codeset.m4 \
+	$(top_srcdir)/gl/m4/byteswap.m4 $(top_srcdir)/gl/m4/codeset.m4 \
 	$(top_srcdir)/gl/m4/configmake.m4 \
 	$(top_srcdir)/gl/m4/extensions.m4 \
 	$(top_srcdir)/gl/m4/fcntl-o.m4 $(top_srcdir)/gl/m4/glibc21.m4 \
@@ -56,14 +76,19 @@ am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/locale-fr.m4 \
 	$(top_srcdir)/gl/m4/locale-ja.m4 \
 	$(top_srcdir)/gl/m4/locale-zh.m4 \
+	$(top_srcdir)/gl/m4/locale_h.m4 \
+	$(top_srcdir)/gl/m4/localeconv.m4 \
 	$(top_srcdir)/gl/m4/longlong.m4 $(top_srcdir)/gl/m4/malloc.m4 \
 	$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
-	$(top_srcdir)/gl/m4/mbstate_t.m4 \
+	$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \
 	$(top_srcdir)/gl/m4/multiarch.m4 \
 	$(top_srcdir)/gl/m4/nl_langinfo.m4 \
-	$(top_srcdir)/gl/m4/regex.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
-	$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \
-	$(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \
+	$(top_srcdir)/gl/m4/off_t.m4 $(top_srcdir)/gl/m4/regex.m4 \
+	$(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \
+	$(top_srcdir)/gl/m4/stddef_h.m4 $(top_srcdir)/gl/m4/stdint.m4 \
+	$(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \
+	$(top_srcdir)/gl/m4/strings_h.m4 \
+	$(top_srcdir)/gl/m4/sys_types_h.m4 \
 	$(top_srcdir)/gl/m4/unistd_h.m4 \
 	$(top_srcdir)/gl/m4/warn-on-use.m4 \
 	$(top_srcdir)/gl/m4/wchar_h.m4 $(top_srcdir)/gl/m4/wchar_t.m4 \
@@ -82,8 +107,35 @@ CONFIG_HEADER = $(top_builddir)/config.h \
 	$(top_builddir)/xdr-datatypes-config.h
 CONFIG_CLEAN_FILES = atlocal
 CONFIG_CLEAN_VPATH_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(testheadersdir)"
+LIBRARIES = $(lib_LIBRARIES)
 libtest_types_a_AR = $(AR) $(ARFLAGS)
 libtest_types_a_LIBADD =
 am__objects_1 = TestByte.$(OBJEXT) TestInt32.$(OBJEXT) \
@@ -103,7 +155,7 @@ am_dds_test_OBJECTS = dds-test.$(OBJEXT)
 dds_test_OBJECTS = $(am_dds_test_OBJECTS)
 dds_test_DEPENDENCIES = libtest-types.a ../libdapserver.la \
 	../libdap.la
-am_expr_test_OBJECTS = expr-test.$(OBJEXT)
+am_expr_test_OBJECTS = expr-test.$(OBJEXT) ResponseBuilder.$(OBJEXT)
 expr_test_OBJECTS = $(am_expr_test_OBJECTS)
 expr_test_DEPENDENCIES = libtest-types.a ../libdapserver.la \
 	../libdapclient.la ../libdap.la
@@ -133,10 +185,18 @@ SOURCES = $(libtest_types_a_SOURCES) $(das_test_SOURCES) \
 	$(dds_test_SOURCES) $(expr_test_SOURCES)
 DIST_SOURCES = $(libtest_types_a_SOURCES) $(das_test_SOURCES) \
 	$(dds_test_SOURCES) $(expr_test_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(testheaders_HEADERS)
 ETAGS = etags
 CTAGS = ctags
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=
+am__tty_colors_dummy = \
+  mgn= red= grn= lgn= blu= brg= std=; \
+  am__color_tests=no
+am__tty_colors = $(am__tty_colors_dummy)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
@@ -145,6 +205,7 @@ ALLOCA_H = @ALLOCA_H@
 AMTAR = @AMTAR@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
+ARFLAGS = @ARFLAGS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -154,6 +215,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
 BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
 BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
 BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+BYTESWAP_H = @BYTESWAP_H@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -196,15 +258,20 @@ GNULIB_ATOLL = @GNULIB_ATOLL@
 GNULIB_BTOWC = @GNULIB_BTOWC@
 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHDIR = @GNULIB_CHDIR@
 GNULIB_CHOWN = @GNULIB_CHOWN@
 GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DUP = @GNULIB_DUP@
 GNULIB_DUP2 = @GNULIB_DUP2@
 GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
 GNULIB_ENVIRON = @GNULIB_ENVIRON@
 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
 GNULIB_FCHDIR = @GNULIB_FCHDIR@
 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FFS = @GNULIB_FFS@
 GNULIB_FSYNC = @GNULIB_FSYNC@
 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
 GNULIB_GETCWD = @GNULIB_GETCWD@
@@ -219,9 +286,14 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
 GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
 GNULIB_LCHOWN = @GNULIB_LCHOWN@
 GNULIB_LINK = @GNULIB_LINK@
 GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
 GNULIB_LSEEK = @GNULIB_LSEEK@
 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
 GNULIB_MBRLEN = @GNULIB_MBRLEN@
@@ -229,6 +301,7 @@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
 GNULIB_MBSINIT = @GNULIB_MBSINIT@
 GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
 GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
@@ -237,11 +310,15 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
 GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
 GNULIB_PIPE = @GNULIB_PIPE@
 GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
 GNULIB_PREAD = @GNULIB_PREAD@
 GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
 GNULIB_PUTENV = @GNULIB_PUTENV@
 GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_READ = @GNULIB_READ@
 GNULIB_READLINK = @GNULIB_READLINK@
 GNULIB_READLINKAT = @GNULIB_READLINKAT@
 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
@@ -249,6 +326,8 @@ GNULIB_REALPATH = @GNULIB_REALPATH@
 GNULIB_RMDIR = @GNULIB_RMDIR@
 GNULIB_RPMATCH = @GNULIB_RPMATCH@
 GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
 GNULIB_SLEEP = @GNULIB_SLEEP@
 GNULIB_STRTOD = @GNULIB_STRTOD@
 GNULIB_STRTOLL = @GNULIB_STRTOLL@
@@ -256,19 +335,51 @@ GNULIB_STRTOULL = @GNULIB_STRTOULL@
 GNULIB_SYMLINK = @GNULIB_SYMLINK@
 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
 GNULIB_UNLINK = @GNULIB_UNLINK@
 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
 GNULIB_UNSETENV = @GNULIB_UNSETENV@
 GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_WCPCPY = @GNULIB_WCPCPY@
+GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
 GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
+GNULIB_WCSCAT = @GNULIB_WCSCAT@
+GNULIB_WCSCHR = @GNULIB_WCSCHR@
+GNULIB_WCSCMP = @GNULIB_WCSCMP@
+GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
+GNULIB_WCSCPY = @GNULIB_WCSCPY@
+GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
+GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSLEN = @GNULIB_WCSLEN@
+GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
+GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
+GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
+GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
+GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
 GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
+GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
 GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCSSPN = @GNULIB_WCSSPN@
+GNULIB_WCSSTR = @GNULIB_WCSSTR@
+GNULIB_WCSTOK = @GNULIB_WCSTOK@
+GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
+GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
 GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCTOMB = @GNULIB_WCTOMB@
+GNULIB_WCTRANS = @GNULIB_WCTRANS@
+GNULIB_WCTYPE = @GNULIB_WCTYPE@
 GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
+GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
+GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
+GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
+GNULIB_WMEMSET = @GNULIB_WMEMSET@
 GNULIB_WRITE = @GNULIB_WRITE@
 GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
@@ -278,23 +389,29 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
 HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFS = @HAVE_FFS@
 HAVE_FSYNC = @HAVE_FSYNC@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
@@ -304,6 +421,7 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
 HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
@@ -330,9 +448,12 @@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
 HAVE_OS_H = @HAVE_OS_H@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM = @HAVE_RANDOM@
 HAVE_RANDOM_H = @HAVE_RANDOM_H@
 HAVE_RANDOM_R = @HAVE_RANDOM_R@
 HAVE_READLINK = @HAVE_READLINK@
@@ -340,11 +461,14 @@ HAVE_READLINKAT = @HAVE_READLINKAT@
 HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
 HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
 HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
 HAVE_SLEEP = @HAVE_SLEEP@
 HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRTOD = @HAVE_STRTOD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
@@ -363,11 +487,42 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCPCPY = @HAVE_WCPCPY@
+HAVE_WCPNCPY = @HAVE_WCPNCPY@
 HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
+HAVE_WCSCAT = @HAVE_WCSCAT@
+HAVE_WCSCHR = @HAVE_WCSCHR@
+HAVE_WCSCMP = @HAVE_WCSCMP@
+HAVE_WCSCOLL = @HAVE_WCSCOLL@
+HAVE_WCSCPY = @HAVE_WCSCPY@
+HAVE_WCSCSPN = @HAVE_WCSCSPN@
+HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSLEN = @HAVE_WCSLEN@
+HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
+HAVE_WCSNCAT = @HAVE_WCSNCAT@
+HAVE_WCSNCMP = @HAVE_WCSNCMP@
+HAVE_WCSNCPY = @HAVE_WCSNCPY@
+HAVE_WCSNLEN = @HAVE_WCSNLEN@
 HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSPBRK = @HAVE_WCSPBRK@
+HAVE_WCSRCHR = @HAVE_WCSRCHR@
 HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCSSPN = @HAVE_WCSSPN@
+HAVE_WCSSTR = @HAVE_WCSSTR@
+HAVE_WCSTOK = @HAVE_WCSTOK@
+HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
+HAVE_WCSXFRM = @HAVE_WCSXFRM@
+HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
 HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
 HAVE_WINT_T = @HAVE_WINT_T@
+HAVE_WMEMCHR = @HAVE_WMEMCHR@
+HAVE_WMEMCMP = @HAVE_WMEMCMP@
+HAVE_WMEMCPY = @HAVE_WMEMCPY@
+HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
 HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -400,16 +555,22 @@ MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
 NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
 NEXT_STDINT_H = @NEXT_STDINT_H@
 NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRINGS_H = @NEXT_STRINGS_H@
+NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
 NEXT_UNISTD_H = @NEXT_UNISTD_H@
 NEXT_WCHAR_H = @NEXT_WCHAR_H@
 NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
@@ -443,17 +604,21 @@ REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
 REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
 REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
 REPLACE_LSEEK = @REPLACE_LSEEK@
 REPLACE_MALLOC = @REPLACE_MALLOC@
 REPLACE_MBRLEN = @REPLACE_MBRLEN@
@@ -462,20 +627,27 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
 REPLACE_NULL = @REPLACE_NULL@
 REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_REALLOC = @REPLACE_REALLOC@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
 REPLACE_UNLINK = @REPLACE_UNLINK@
 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
@@ -484,7 +656,9 @@ REPLACE_USLEEP = @REPLACE_USLEEP@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
 REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
@@ -505,10 +679,10 @@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOC
 UUID_LIBS = @UUID_LIBS@
 VERSION = @VERSION@
 WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
 WINT_T_SUFFIX = @WINT_T_SUFFIX@
 XML2_CFLAGS = @XML2_CFLAGS@
 XML2_LIBS = @XML2_LIBS@
-XML2_STATIC_LIBS = @XML2_STATIC_LIBS@
 YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -577,21 +751,23 @@ AUTOMAKE_OPTIONS = foreign
 
 # Arrange to build with the backward compatibility mode enabled.
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/GNU $(XML2_CFLAGS) $(CURL_CFLAGS)
-AM_CXXFLAGS = 
+AM_CXXFLAGS = $(am__append_1)
 
 # These are not used by automake but are often useful for certain types of
 # debugging. 
-CXXFLAGS_DEBUG = -g3 -O0 -fno-defer-pop -Wall -W -Wcast-align -Werror
+CXXFLAGS_DEBUG = -g3 -O0  -Wall -W -Wcast-align
 TEST_COV_FLAGS = -ftest-coverage -fprofile-arcs
-# noinst_PROGRAMS = io_test
 TESTS = DASTest DDSTest EXPRTest
-# EXPRTest
 dist_check_SCRIPTS = DASTest DDSTest EXPRTest atconfig atlocal
 
 # Build the test drivers. The drivers all use the
 # subclassed types in Test*.cc and the TestTypesFactory.
-noinst_LIBRARIES = libtest-types.a
+
+#noinst_LIBRARIES = libtest-types.a
+lib_LIBRARIES = libtest-types.a
 libtest_types_a_SOURCES = $(TESTSRCS) $(TEST_HDR)
+testheadersdir = $(pkgincludedir)/test
+testheaders_HEADERS = $(TEST_HDR)
 
 # io_test_SOURCES = io_test.cc
 # io_test_LDADD = ../libdap.la
@@ -599,7 +775,7 @@ das_test_SOURCES = das-test.cc
 das_test_LDADD = libtest-types.a ../libdapserver.la ../libdap.la 
 dds_test_SOURCES = dds-test.cc
 dds_test_LDADD = libtest-types.a ../libdapserver.la ../libdap.la 
-expr_test_SOURCES = expr-test.cc
+expr_test_SOURCES = expr-test.cc ResponseBuilder.cc ResponseBuilder.h
 expr_test_LDADD = libtest-types.a ../libdapserver.la ../libdapclient.la ../libdap.la
 TESTSRCS = TestByte.cc TestInt32.cc TestFloat64.cc TestStr.cc TestUrl.cc \
 	   TestArray.cc TestStructure.cc TestSequence.cc		 \
@@ -611,10 +787,6 @@ TEST_HDR = TestArray.h TestByte.h TestCommon.h TestFloat32.h TestFloat64.h    \
 	TestStructure.h TestTypeFactory.h TestUInt16.h TestUInt32.h TestUrl.h
 
 DIRS_EXTRA = das-testsuite dds-testsuite expr-testsuite 
-
-# grid-func-testsuite cache-testsuite ais_testsuite rcreader-testsuite 
-# server-testsuite cgi-util-tests
-# ddx-testsuite	  
 EXTRA_DIST = DASTest.at  $(DASTESTSUITE) DDSTest.at  $(DDSTESTSUITE) \
 	EXPRTest.at $(EXPRTESTSUITE) atlocal.in $(srcdir)/package.m4 \
 	$(DIRS_EXTRA)
@@ -666,10 +838,38 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 atlocal: $(top_builddir)/config.status $(srcdir)/atlocal.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  if test -f $$p; then \
+	    $(am__strip_dir) \
+	    echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
+	    ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
+	  else :; fi; \
+	done
+
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir)
 
-clean-noinstLIBRARIES:
-	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libtest-types.a: $(libtest_types_a_OBJECTS) $(libtest_types_a_DEPENDENCIES) 
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libtest-types.a: $(libtest_types_a_OBJECTS) $(libtest_types_a_DEPENDENCIES) $(EXTRA_libtest_types_a_DEPENDENCIES) 
 	-rm -f libtest-types.a
 	$(libtest_types_a_AR) libtest-types.a $(libtest_types_a_OBJECTS) $(libtest_types_a_LIBADD)
 	$(RANLIB) libtest-types.a
@@ -682,13 +882,13 @@ clean-checkPROGRAMS:
 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
 	echo " rm -f" $$list; \
 	rm -f $$list
-das-test$(EXEEXT): $(das_test_OBJECTS) $(das_test_DEPENDENCIES) 
+das-test$(EXEEXT): $(das_test_OBJECTS) $(das_test_DEPENDENCIES) $(EXTRA_das_test_DEPENDENCIES) 
 	@rm -f das-test$(EXEEXT)
 	$(CXXLINK) $(das_test_OBJECTS) $(das_test_LDADD) $(LIBS)
-dds-test$(EXEEXT): $(dds_test_OBJECTS) $(dds_test_DEPENDENCIES) 
+dds-test$(EXEEXT): $(dds_test_OBJECTS) $(dds_test_DEPENDENCIES) $(EXTRA_dds_test_DEPENDENCIES) 
 	@rm -f dds-test$(EXEEXT)
 	$(CXXLINK) $(dds_test_OBJECTS) $(dds_test_LDADD) $(LIBS)
-expr-test$(EXEEXT): $(expr_test_OBJECTS) $(expr_test_DEPENDENCIES) 
+expr-test$(EXEEXT): $(expr_test_OBJECTS) $(expr_test_DEPENDENCIES) $(EXTRA_expr_test_DEPENDENCIES) 
 	@rm -f expr-test$(EXEEXT)
 	$(CXXLINK) $(expr_test_OBJECTS) $(expr_test_LDADD) $(LIBS)
 
@@ -698,6 +898,7 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ResponseBuilder.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/TestArray.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/TestByte.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/TestCommon.Po at am__quote@
@@ -743,6 +944,27 @@ mostlyclean-libtool:
 
 clean-libtool:
 	-rm -rf .libs _libs
+install-testheadersHEADERS: $(testheaders_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(testheaders_HEADERS)'; test -n "$(testheadersdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(testheadersdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(testheadersdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(testheadersdir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(testheadersdir)" || exit $$?; \
+	done
+
+uninstall-testheadersHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(testheaders_HEADERS)'; test -n "$(testheadersdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(testheadersdir)'; $(am__uninstall_files_from_dir)
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -793,6 +1015,20 @@ GTAGS:
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscopelist:  $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS) $(LISP)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -806,7 +1042,7 @@ check-TESTS: $(TESTS)
 	    if test -f ./$$tst; then dir=./; \
 	    elif test -f $$tst; then dir=; \
 	    else dir="$(srcdir)/"; fi; \
-	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
 	      all=`expr $$all + 1`; \
 	      case " $(XFAIL_TESTS) " in \
 	      *[\ \	]$$tst[\ \	]*) \
@@ -877,14 +1113,15 @@ check-TESTS: $(TESTS)
 	  fi; \
 	  dashes=`echo "$$dashes" | sed s/./=/g`; \
 	  if test "$$failed" -eq 0; then \
-	    echo "$$grn$$dashes"; \
+	    col="$$grn"; \
 	  else \
-	    echo "$$red$$dashes"; \
+	    col="$$red"; \
 	  fi; \
-	  echo "$$banner"; \
-	  test -z "$$skipped" || echo "$$skipped"; \
-	  test -z "$$report" || echo "$$report"; \
-	  echo "$$dashes$$std"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
 	  test "$$failed" -eq 0; \
 	else :; fi
 
@@ -923,8 +1160,11 @@ check-am: all-am
 	  $(dist_check_SCRIPTS)
 	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
 check: check-am
-all-am: Makefile $(LIBRARIES)
+all-am: Makefile $(LIBRARIES) $(HEADERS)
 installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(testheadersdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -935,10 +1175,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
@@ -953,8 +1198,8 @@ maintainer-clean-generic:
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \
-	clean-noinstLIBRARIES mostlyclean-am
+clean-am: clean-checkPROGRAMS clean-generic clean-libLIBRARIES \
+	clean-libtool clean-local mostlyclean-am
 
 distclean: distclean-am
 	-rm -rf ./$(DEPDIR)
@@ -974,13 +1219,13 @@ info: info-am
 
 info-am:
 
-install-data-am:
+install-data-am: install-testheadersHEADERS
 
 install-dvi: install-dvi-am
 
 install-dvi-am:
 
-install-exec-am:
+install-exec-am: install-libLIBRARIES
 
 install-html: install-html-am
 
@@ -1020,23 +1265,26 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-libLIBRARIES uninstall-testheadersHEADERS
 
 .MAKE: check-am install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
-	clean-checkPROGRAMS clean-generic clean-libtool clean-local \
-	clean-noinstLIBRARIES ctags distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-local \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am
+	clean-checkPROGRAMS clean-generic clean-libLIBRARIES \
+	clean-libtool clean-local cscopelist ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-local distclean-tags distdir dvi dvi-am html html-am \
+	info info-am install install-am install-data install-data-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-info install-info-am \
+	install-libLIBRARIES install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip \
+	install-testheadersHEADERS installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-libLIBRARIES \
+	uninstall-testheadersHEADERS
 
 
 #check-local: check-das check-dds
diff --git a/tests/ResponseBuilder.cc b/tests/ResponseBuilder.cc
new file mode 100644
index 0000000..7270793
--- /dev/null
+++ b/tests/ResponseBuilder.cc
@@ -0,0 +1,488 @@
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2011 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#include "config.h"
+
+#include <signal.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <uuid/uuid.h>  // used to build CID header value for data ddx
+
+#ifndef WIN32
+#include <sys/wait.h>
+#else
+#include <io.h>
+#include <fcntl.h>
+#include <process.h>
+#endif
+
+#include <iostream>
+#include <string>
+#include <sstream>
+#include <fstream>
+
+#include <cstring>
+#include <ctime>
+
+//#define DODS_DEBUG
+
+#include "DAS.h"
+#include "DDS.h"
+#include "ConstraintEvaluator.h"
+#include "DDXParserSAX2.h"
+#include "Ancillary.h"
+#include "ResponseBuilder.h"
+#include "XDRStreamMarshaller.h"
+#include "XDRFileUnMarshaller.h"
+
+//#include "DAPCache3.h"
+//#include "ResponseCache.h"
+
+#include "debug.h"
+#include "mime_util.h"	// for last_modified_time() and rfc_822_date()
+#include "escaping.h"
+#include "util.h"
+
+#ifndef WIN32
+#include "SignalHandler.h"
+#include "EventHandler.h"
+#include "AlarmHandler.h"
+#endif
+
+#define CRLF "\r\n"             // Change here, expr-test.cc
+
+using namespace std;
+using namespace libdap;
+
+/** Called when initializing a ResponseBuilder that's not going to be passed
+ command line arguments. */
+void ResponseBuilder::initialize()
+{
+    // Set default values. Don't use the C++ constructor initialization so
+    // that a subclass can have more control over this process.
+    d_dataset = "";
+    d_ce = "";
+    d_btp_func_ce = "";
+    d_timeout = 0;
+
+    d_default_protocol = DAP_PROTOCOL_VERSION;
+}
+
+ResponseBuilder::~ResponseBuilder()
+{
+	// If an alarm was registered, delete it. The register code in SignalHandler
+	// always deletes the old alarm handler object, so only the one returned by
+	// remove_handler needs to be deleted at this point.
+	delete dynamic_cast<AlarmHandler*>(SignalHandler::instance()->remove_handler(SIGALRM));
+}
+
+/** Return the entire constraint expression in a string.  This
+ includes both the projection and selection clauses, but not the
+ question mark.
+
+ @brief Get the constraint expression.
+ @return A string object that contains the constraint expression. */
+string ResponseBuilder::get_ce() const
+{
+    return d_ce;
+}
+
+/** Set the constraint expression. This will filter the CE text removing
+ * any 'WWW' escape characters except space. Spaces are left in the CE
+ * because the CE parser uses whitespace to delimit tokens while some
+ * datasets have identifiers that contain spaces. It's possible to use
+ * double quotes around identifiers too, but most client software doesn't
+ * know about that.
+ *
+ * @@brief Set the CE
+ * @param _ce The constraint expression
+ */
+void ResponseBuilder::set_ce(string _ce)
+{
+    d_ce = www2id(_ce, "%", "%20");
+}
+
+/** The ``dataset name'' is the filename or other string that the
+ filter program will use to access the data. In some cases this
+ will indicate a disk file containing the data.  In others, it
+ may represent a database query or some other exotic data
+ access method.
+
+ @brief Get the dataset name.
+ @return A string object that contains the name of the dataset. */
+string ResponseBuilder::get_dataset_name() const
+{
+    return d_dataset;
+}
+
+/** Set the dataset name, which is a string used to access the dataset
+ * on the machine running the server. That is, this is typically a pathname
+ * to a data file, although it doesn't have to be. This is not
+ * echoed in error messages (because that would reveal server
+ * storage patterns that data providers might want to hide). All WWW-style
+ * escapes are replaced except for spaces.
+ *
+ * @brief Set the dataset pathname.
+ * @param ds The pathname (or equivalent) to the dataset.
+ */
+void ResponseBuilder::set_dataset_name(const string ds)
+{
+    d_dataset = www2id(ds, "%", "%20");
+}
+#if 0
+/** Set the server's timeout value. A value of zero (the default) means no
+ timeout.
+
+ @see To establish a timeout, call establish_timeout(ostream &)
+ @param t Server timeout in seconds. Default is zero (no timeout). */
+void ResponseBuilder::set_timeout(int t)
+{
+    d_timeout = t;
+}
+
+/** Get the server's timeout value. */
+int ResponseBuilder::get_timeout() const
+{
+    return d_timeout;
+}
+
+/** Use values of this instance to establish a timeout alarm for the server.
+ If the timeout value is zero, do nothing.
+*/
+void ResponseBuilder::establish_timeout(ostream &stream) const
+{
+#ifndef WIN32
+    if (d_timeout > 0) {
+        SignalHandler *sh = SignalHandler::instance();
+        EventHandler *old_eh = sh->register_handler(SIGALRM, new AlarmHandler(stream));
+        delete old_eh;
+        alarm(d_timeout);
+    }
+#endif
+}
+
+/**
+ *  Split the CE so that the server functions that compute new values are
+ *  separated into their own string and can be evaluated separately from
+ *  the rest of the CE (which can contain simple and slicing projection
+ *  as well as other types of function calls).
+ */
+void
+ResponseBuilder::split_ce(ConstraintEvaluator &eval, const string &expr)
+{
+    string ce;
+    if (!expr.empty())
+        ce = expr;
+    else
+        ce = d_ce;
+
+    string btp_function_ce = "";
+    string::size_type pos = 0;
+    DBG(cerr << "ce: " << ce << endl);
+
+    string::size_type first_paren = ce.find("(", pos);
+    string::size_type closing_paren = ce.find(")", pos);
+    while (first_paren != string::npos && closing_paren != string::npos) {
+        // Maybe a BTP function; get the name of the potential function
+        string name = ce.substr(pos, first_paren-pos);
+        DBG(cerr << "name: " << name << endl);
+        // is this a BTP function
+        btp_func f;
+        if (eval.find_function(name, &f)) {
+            // Found a BTP function
+            if (!btp_function_ce.empty())
+                btp_function_ce += ",";
+            btp_function_ce += ce.substr(pos, closing_paren+1-pos);
+            ce.erase(pos, closing_paren+1-pos);
+            if (ce[pos] == ',')
+                ce.erase(pos, 1);
+        }
+        else {
+            pos = closing_paren + 1;
+            // exception?
+            if (pos < ce.length() && ce.at(pos) == ',')
+                ++pos;
+        }
+
+        first_paren = ce.find("(", pos);
+        closing_paren = ce.find(")", pos);
+    }
+
+    DBG(cerr << "Modified constraint: " << ce << endl);
+    DBG(cerr << "BTP Function part: " << btp_function_ce << endl);
+
+    d_ce = ce;
+    d_btp_func_ce = btp_function_ce;
+}
+
+/** This function formats and prints an ASCII representation of a
+ DAS on stdout.  This has the effect of sending the DAS object
+ back to the client program.
+
+ @note This is the DAP2 attribute response.
+
+ @brief Send a DAS.
+
+ @param out The output stream to which the DAS is to be sent.
+ @param das The DAS object to be sent.
+ @param with_mime_headers If true (the default) send MIME headers.
+ @return void
+ @see DAS
+ @deprecated */
+void ResponseBuilder::send_das(ostream &out, DAS &das, bool with_mime_headers) const
+{
+    if (with_mime_headers)
+        set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), "2.0");
+
+    das.print(out);
+
+    out << flush;
+}
+
+/** Send the DAP2 DAS response to the given stream. This version of
+ * send_das() uses the DDS object, assuming that it contains attribute
+ * information. If there is a constraint expression associated with this
+ * instance of ResponseBuilder, then it will be applied. This means
+ * that CEs that contain server functions will populate the response cache
+ * even if the server's initial request is for a DAS. This is different
+ * from the older behavior of libdap where CEs were never evaluated for
+ * the DAS response. This does not actually change the resulting DAS,
+ * just the behavior 'under the covers'.
+ *
+ * @param out Send the response to this ostream
+ * @param dds Use this DDS object
+ * @param eval A Constraint Evaluator to use for any CE bound to this
+ * ResponseBuilder instance
+ * @param constrained Should the result be constrained
+ * @param with_mime_headers Should MIME headers be sent to out?
+ */
+void ResponseBuilder::send_das(ostream &out, DDS &dds, ConstraintEvaluator &eval, bool constrained, bool with_mime_headers)
+{
+    // Set up the alarm.
+    establish_timeout(out);
+    dds.set_timeout(d_timeout);
+
+    if (!constrained) {
+        if (with_mime_headers)
+            set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), "2.0");
+
+        dds.print_das(out);
+        out << flush;
+
+        return;
+    }
+
+    split_ce(eval);
+
+    // If there are functions, parse them and eval.
+    // Use that DDS and parse the non-function ce
+    // Serialize using the second ce and the second dds
+    if (!d_btp_func_ce.empty()) {
+        DDS *fdds = 0;
+        string cache_token = "";
+
+        if (responseCache()) {
+            DBG(cerr << "Using the cache for the server function CE" << endl);
+            fdds = responseCache()->read_cached_dataset(dds, d_btp_func_ce, this, &eval, cache_token);
+        }
+        else {
+            DBG(cerr << "Cache not found; (re)calculating" << endl);
+            eval.parse_constraint(d_btp_func_ce, dds);
+            fdds = eval.eval_function_clauses(dds);
+        }
+
+        if (with_mime_headers)
+            set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
+
+        fdds->print_das(out);
+
+        if (responseCache())
+        	responseCache()->unlock_and_close(cache_token);
+
+        delete fdds;
+    }
+    else {
+        DBG(cerr << "Simple constraint" << endl);
+
+        eval.parse_constraint(d_ce, dds); // Throws Error if the ce doesn't parse.
+
+        if (with_mime_headers)
+            set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
+
+        dds.print_das(out);
+    }
+
+    out << flush;
+}
+
+/** This function formats and prints an ASCII representation of a
+ DDS on stdout. Either an entire DDS or a constrained DDS may be sent.
+ This function looks in the local cache and uses a DDS object there
+ if it's valid. Otherwise, if the request CE contains server functions
+ that build data for the response, the resulting DDS will be cached.
+
+ @brief Transmit a DDS.
+ @param out The output stream to which the DAS is to be sent.
+ @param dds The DDS to send back to a client.
+ @param eval A reference to the ConstraintEvaluator to use.
+ @param constrained If this argument is true, evaluate the
+ current constraint expression and send the `constrained DDS'
+ back to the client.
+ @param constrained If true, apply the constraint bound to this instance
+ of ResponseBuilder
+ @param with_mime_headers If true (default) send MIME headers.
+ @return void
+ @see DDS */
+void ResponseBuilder::send_dds(ostream &out, DDS &dds, ConstraintEvaluator &eval, bool constrained,
+        bool with_mime_headers)
+{
+    if (!constrained) {
+        if (with_mime_headers)
+            set_mime_text(out, dods_dds, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
+
+        dds.print(out);
+        out << flush;
+        return;
+    }
+
+    // Set up the alarm.
+    establish_timeout(out);
+    dds.set_timeout(d_timeout);
+
+    // Split constraint into two halves
+    split_ce(eval);
+
+    // If there are functions, parse them and eval.
+    // Use that DDS and parse the non-function ce
+    // Serialize using the second ce and the second dds
+    if (!d_btp_func_ce.empty()) {
+        string cache_token = "";
+        DDS *fdds = 0;
+
+        if (responseCache()) {
+            DBG(cerr << "Using the cache for the server function CE" << endl);
+            fdds = responseCache()->read_cached_dataset(dds, d_btp_func_ce, this, &eval, cache_token);
+        }
+        else {
+            DBG(cerr << "Cache not found; (re)calculating" << endl);
+            eval.parse_constraint(d_btp_func_ce, dds);
+            fdds = eval.eval_function_clauses(dds);
+        }
+
+        // Server functions might mark variables to use their read()
+        // methods. Clear that so the CE in d_ce will control what is
+        // sent. If that is empty (there was only a function call) all
+        // of the variables in the intermediate DDS (i.e., the function
+        // result) will be sent.
+        fdds->mark_all(false);
+
+        eval.parse_constraint(d_ce, *fdds);
+
+        if (with_mime_headers)
+            set_mime_text(out, dods_dds, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
+
+        fdds->print_constrained(out);
+
+        if (responseCache())
+        	responseCache()->unlock_and_close(cache_token);
+
+        delete fdds;
+    }
+    else {
+        DBG(cerr << "Simple constraint" << endl);
+
+        eval.parse_constraint(d_ce, dds); // Throws Error if the ce doesn't parse.
+
+        if (with_mime_headers)
+            set_mime_text(out, dods_dds, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
+
+        dds.print_constrained(out);
+    }
+
+    out << flush;
+}
+#endif
+/**
+ * Build/return the BLOB part of the DAP2 data response.
+ */
+void ResponseBuilder::dataset_constraint(ostream &out, DDS & dds, ConstraintEvaluator & eval, bool ce_eval)
+{
+    // send constrained DDS
+    DBG(cerr << "Inside dataset_constraint" << endl);
+
+    dds.print_constrained(out);
+    out << "Data:\n";
+    out << flush;
+
+    XDRStreamMarshaller m(out);
+
+    try {
+        // Send all variables in the current projection (send_p())
+        for (DDS::Vars_iter i = dds.var_begin(); i != dds.var_end(); i++)
+            if ((*i)->send_p()) {
+                (*i)->serialize(eval, dds, m, ce_eval);
+            }
+    }
+    catch (Error & e) {
+        throw;
+    }
+}
+
+/** Send the data in the DDS object back to the client program. The data is
+ encoded using a Marshaller, and enclosed in a MIME document which is all sent
+ to \c data_stream.
+
+ @note This is the DAP2 data response.
+
+ @brief Transmit data.
+ @param dds A DDS object containing the data to be sent.
+ @param eval A reference to the ConstraintEvaluator to use.
+ @param data_stream Write the response to this stream.
+ @param anc_location A directory to search for ancillary files (in
+ addition to the CWD).  This is used in a call to
+ get_data_last_modified_time().
+ @param with_mime_headers If true, include the MIME headers in the response.
+ Defaults to true.
+ @return void */
+void ResponseBuilder::send_data(ostream &data_stream, DDS &dds, ConstraintEvaluator &eval, bool with_mime_headers)
+{
+        DBG(cerr << "Simple constraint" << endl);
+
+        eval.parse_constraint(d_ce, dds); // Throws Error if the ce doesn't parse.
+
+        dds.tag_nested_sequences(); // Tag Sequences as Parent or Leaf node.
+
+        if (dds.get_response_limit() != 0 && dds.get_request_size(true) > dds.get_response_limit()) {
+            string msg = "The Request for " + long_to_string(dds.get_request_size(true) / 1024)
+                    + "KB is too large; requests for this user are limited to "
+                    + long_to_string(dds.get_response_limit() / 1024) + "KB.";
+            throw Error(msg);
+        }
+
+        if (with_mime_headers)
+            set_mime_binary(data_stream, dods_data, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
+
+        dataset_constraint(data_stream, dds, eval);
+    data_stream << flush;
+}
diff --git a/tests/ResponseBuilder.h b/tests/ResponseBuilder.h
new file mode 100644
index 0000000..9cd5b65
--- /dev/null
+++ b/tests/ResponseBuilder.h
@@ -0,0 +1,74 @@
+
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2011 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#ifndef _response_builder_h
+#define _response_builder_h
+
+#include <string>
+
+class libdap::ConstraintEvaluator;
+class libdap::DDS;
+
+/**
+ * Used for testing only. This duplicates code in the bes/dap module.
+ * jhrg 6/11/13
+ */
+
+class ResponseBuilder
+{
+public:
+    friend class ResponseBuilderTest;
+
+protected:
+    std::string d_dataset;  		/// Name of the dataset/database
+    std::string d_ce;  		    /// Constraint expression
+    std::string d_btp_func_ce;   /// The BTP functions, extracted from the CE
+    int d_timeout;  		/// Response timeout after N seconds
+    std::string d_default_protocol;	/// Version std::string for the library's default protocol version
+
+    void initialize();
+
+public:
+
+    /** Make an empty instance. Use the set_*() methods to load with needed
+        values. You must call at least set_dataset_name() or be requesting
+        version information. */
+    ResponseBuilder() {
+        initialize();
+    }
+
+    virtual ~ResponseBuilder();
+
+    virtual std::string get_ce() const;
+    virtual void set_ce(std::string _ce);
+
+    virtual std::string get_dataset_name() const;
+    virtual void set_dataset_name(const std::string _dataset);
+
+    virtual void dataset_constraint(std::ostream &out, libdap::DDS &dds, libdap::ConstraintEvaluator &eval, bool ce_eval = true);
+    virtual void send_data(std::ostream &data_stream, libdap::DDS &dds, libdap::ConstraintEvaluator &eval, bool with_mime_headers = true);
+};
+
+#endif // _response_builder_h
diff --git a/tests/TestArray.cc b/tests/TestArray.cc
index 1ccdbce..7f15e12 100644
--- a/tests/TestArray.cc
+++ b/tests/TestArray.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -49,7 +49,8 @@
 
 //#define DODS_DEBUG
 
-#include "ce_functions.h"
+//#include "ce_functions.h"
+#include "util.h"
 #include "debug.h"
 
 #include "TestArray.h"
@@ -155,10 +156,10 @@ void TestArray::constrained_matrix(char *constrained_array)
     Dim_iter d = dim_begin();
     while (d != dim_end())
         unconstrained_size *= dimension_size(d++, false);
-    char *whole_array = new char[unconstrained_size * width()];
+    char *whole_array = new char[unconstrained_size * width(true)];
     DBG(cerr << "unconstrained size: " << unconstrained_size << endl);
 
-    int elem_width = var()->width(); // size of an element
+    int elem_width = var()->width(true); // size of an element
     char *elem_val = new char[elem_width];
 
     for (int i = 0; i < unconstrained_size; ++i) {
@@ -286,7 +287,7 @@ bool TestArray::read()
         case dods_float64_c: {
 
             //char *tmp = new char[width()];
-            vector<char> tmp(width());
+            vector<char> tmp(width(true));
 
             unsigned int elem_wid = var()->width(); // size of an element
             char *elem_val = 0; // Null forces buf2val to allocate memory
@@ -332,7 +333,7 @@ bool TestArray::read()
         case dods_str_c:
         case dods_url_c: {
             // char *tmp = new char[width()];
-            vector<char> tmp(width());
+            vector<char> tmp(width(true));
             unsigned int elem_wid = var()->width(); // size of an element
             char *elem_val = 0; // Null forces buf2val to allocate memory
 
diff --git a/tests/TestArray.h b/tests/TestArray.h
index 55944c2..98a3bd4 100644
--- a/tests/TestArray.h
+++ b/tests/TestArray.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/tests/TestByte.cc b/tests/TestByte.cc
index ec6aa8b..25d1ca8 100644
--- a/tests/TestByte.cc
+++ b/tests/TestByte.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -46,9 +46,11 @@
 
 #include "config.h"
 
-#ifndef WIN32
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#else
+#endif
+
+#ifdef WIN32
 #include <io.h>
 #include <fcntl.h>
 #include <process.h>
@@ -82,13 +84,13 @@ TestByte::_duplicate(const TestByte &ts)
 
 TestByte::TestByte(const string &n) : Byte(n), d_series_values(false)
 {
-    _buf = 255;
+    d_buf = 255;
 }
 
 TestByte::TestByte(const string &n, const string &d)
     : Byte(n, d), d_series_values(false)
 {
-    _buf = 255;
+    d_buf = 255;
 }
 
 BaseType *
@@ -136,15 +138,15 @@ TestByte::read()
 	sleep(test_variable_sleep_interval);
 
     if (get_series_values()) {
-         _buf++;
+         d_buf++;
     }
     else {
-        _buf = 255;
+        d_buf = 255;
     }
 
     set_read_p(true);
 
-    DBG(cerr << "In TestByte::read, _buf = " << (int)_buf << endl);
+    DBG(cerr << "In TestByte::read, _buf = " << (int)d_buf << endl);
 
     return true;
 }
diff --git a/tests/TestByte.h b/tests/TestByte.h
index af6dab3..5c3e377 100644
--- a/tests/TestByte.h
+++ b/tests/TestByte.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestCommon.h b/tests/TestCommon.h
index a798909..071a9df 100644
--- a/tests/TestCommon.h
+++ b/tests/TestCommon.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/tests/TestFloat32.cc b/tests/TestFloat32.cc
index f472de6..f0c97ee 100644
--- a/tests/TestFloat32.cc
+++ b/tests/TestFloat32.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
@@ -66,13 +66,13 @@ TestFloat32::_duplicate(const TestFloat32 &ts)
 
 TestFloat32::TestFloat32(const string &n) : Float32(n), d_series_values(false)
 {
-    _buf = 0.0;
+    d_buf = 0.0;
 }
 
 TestFloat32::TestFloat32(const string &n, const string &d)
     : Float32(n, d), d_series_values(false)
 {
-    _buf = 0.0;
+    d_buf = 0.0;
 }
 
 TestFloat32::TestFloat32(const TestFloat32 &rhs) : Float32(rhs), TestCommon(rhs)
@@ -116,19 +116,19 @@ TestFloat32::read()
 	sleep(test_variable_sleep_interval);
 
     if (get_series_values()) {
-        _buf += 10.0;
-        _buf = (float)(trunc(10000 * sin(trunc(_buf))) / 100);
+        d_buf += 10.0;
+        d_buf = (float)(trunc(10000 * sin(trunc(d_buf))) / 100);
 	/*
-	_buf -= 0.11 ;
+	d_buf -= 0.11 ;
 	*/
     }
     else {
-        _buf = (float)99.999;
+        d_buf = (float)99.999;
     }
     
     set_read_p(true);
 
-    DBG(cerr << "In TestFloat32::read, _buf = " << _buf << endl);
+    DBG(cerr << "In TestFloat32::read, _buf = " << d_buf << endl);
     
     return true;
 }
diff --git a/tests/TestFloat32.h b/tests/TestFloat32.h
index ce97e40..450f753 100644
--- a/tests/TestFloat32.h
+++ b/tests/TestFloat32.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestFloat64.cc b/tests/TestFloat64.cc
index b252704..405aa3f 100644
--- a/tests/TestFloat64.cc
+++ b/tests/TestFloat64.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
@@ -65,13 +65,13 @@ TestFloat64::_duplicate(const TestFloat64 &ts)
 
 TestFloat64::TestFloat64(const string &n) : Float64(n), d_series_values(false)
 {
-    _buf = 0.0;
+    d_buf = 0.0;
 }
 
 TestFloat64::TestFloat64(const string &n, const string &d)
     : Float64(n, d), d_series_values(false)
 {
-    _buf = 0.0;
+    d_buf = 0.0;
 }
 
 TestFloat64::TestFloat64(const TestFloat64 &rhs) : Float64(rhs) , TestCommon(rhs)
@@ -114,11 +114,11 @@ TestFloat64::read()
 	sleep(test_variable_sleep_interval);
 
     if (get_series_values()) {
-        _buf += 10.0;
-        _buf = (float)(trunc(10000 * cos(trunc(_buf))) / 100);
+        d_buf += 10.0;
+        d_buf = (float)(trunc(10000 * cos(trunc(d_buf))) / 100);
     }
     else {
-        _buf = 99.999;
+        d_buf = 99.999;
     }
     
     set_read_p(true);
diff --git a/tests/TestFloat64.h b/tests/TestFloat64.h
index 115e634..919c906 100644
--- a/tests/TestFloat64.h
+++ b/tests/TestFloat64.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestGrid.cc b/tests/TestGrid.cc
index 5ef5279..d506941 100644
--- a/tests/TestGrid.cc
+++ b/tests/TestGrid.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestGrid.h b/tests/TestGrid.h
index 19d1a68..5063409 100644
--- a/tests/TestGrid.h
+++ b/tests/TestGrid.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestInt16.cc b/tests/TestInt16.cc
index f9fabe2..f8c575e 100644
--- a/tests/TestInt16.cc
+++ b/tests/TestInt16.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
@@ -56,13 +56,13 @@ TestInt16::_duplicate(const TestInt16 &ts)
 
 TestInt16::TestInt16(const string &n) : Int16(n), d_series_values(false)
 {
-    _buf = 1;
+    d_buf = 1;
 }
 
 TestInt16::TestInt16(const string &n, const string &d)
     : Int16(n, d), d_series_values(false)
 {
-    _buf = 1;
+    d_buf = 1;
 }
 
 TestInt16::TestInt16(const TestInt16 &rhs) : Int16(rhs), TestCommon(rhs)
@@ -106,10 +106,10 @@ TestInt16::read()
 	sleep(test_variable_sleep_interval);
 
     if (get_series_values()) {
-       _buf = (short)(16 * _buf);
+       d_buf = (short)(16 * d_buf);
     }
     else {
-        _buf = 32000;
+        d_buf = 32000;
     }
 
     set_read_p(true);
diff --git a/tests/TestInt16.h b/tests/TestInt16.h
index c035425..f1a0cbf 100644
--- a/tests/TestInt16.h
+++ b/tests/TestInt16.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestInt32.cc b/tests/TestInt32.cc
index 1a3251d..f0f8e0d 100644
--- a/tests/TestInt32.cc
+++ b/tests/TestInt32.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
@@ -59,13 +59,13 @@ TestInt32::_duplicate(const TestInt32 &ts)
 
 TestInt32::TestInt32(const string &n) : Int32(n), d_series_values(false)
 {
-    _buf = 1;
+    d_buf = 1;
 }
 
 TestInt32::TestInt32(const string &n, const string &)
     : Int32(n), d_series_values(false)
 {
-    _buf = 1;
+    d_buf = 1;
 }
 
 TestInt32::TestInt32(const TestInt32 &rhs) : Int32(rhs), TestCommon(rhs)
@@ -109,17 +109,17 @@ TestInt32::read()
 	sleep(test_variable_sleep_interval);
 
     if (get_series_values()) {
-        _buf = 32 * _buf;
-        if (!_buf)
-            _buf = 32;
+        d_buf = 32 * d_buf;
+        if (!d_buf)
+            d_buf = 32;
     }
     else {
-        _buf = 123456789;
+        d_buf = 123456789;
     }
 
     set_read_p(true);
 
-    DBG(cerr << "In TestInt32::read, _buf = " << _buf << endl);
+    DBG(cerr << "In TestInt32::read, _buf = " << d_buf << endl);
     
     return true;
 }
diff --git a/tests/TestInt32.h b/tests/TestInt32.h
index f26e334..5bbc41a 100644
--- a/tests/TestInt32.h
+++ b/tests/TestInt32.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestSequence.cc b/tests/TestSequence.cc
index aeb2324..3400b60 100644
--- a/tests/TestSequence.cc
+++ b/tests/TestSequence.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestSequence.h b/tests/TestSequence.h
index 8cbb462..8ac1d0b 100644
--- a/tests/TestSequence.h
+++ b/tests/TestSequence.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestStr.cc b/tests/TestStr.cc
index 15ac15a..bfca5b0 100644
--- a/tests/TestStr.cc
+++ b/tests/TestStr.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestStr.h b/tests/TestStr.h
index cb99601..74d4cf2 100644
--- a/tests/TestStr.h
+++ b/tests/TestStr.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestStructure.cc b/tests/TestStructure.cc
index fcfe699..2b5300d 100644
--- a/tests/TestStructure.cc
+++ b/tests/TestStructure.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/tests/TestStructure.h b/tests/TestStructure.h
index 18ba4c8..526a542 100644
--- a/tests/TestStructure.h
+++ b/tests/TestStructure.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestTypeFactory.cc b/tests/TestTypeFactory.cc
index c9cf15a..5d2c998 100644
--- a/tests/TestTypeFactory.cc
+++ b/tests/TestTypeFactory.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/tests/TestTypeFactory.h b/tests/TestTypeFactory.h
index c40a923..ee5dbcf 100644
--- a/tests/TestTypeFactory.h
+++ b/tests/TestTypeFactory.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/tests/TestUInt16.cc b/tests/TestUInt16.cc
index b9cb0f7..fbc5d97 100644
--- a/tests/TestUInt16.cc
+++ b/tests/TestUInt16.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
@@ -57,13 +57,13 @@ TestUInt16::_duplicate(const TestUInt16 &ts)
 
 TestUInt16::TestUInt16(const string &n) : UInt16(n), d_series_values(false)
 {
-    _buf = 1;
+    d_buf = 1;
 }
 
 TestUInt16::TestUInt16(const string &n, const string &d)
     : UInt16(n, d), d_series_values(false)
 {
-    _buf = 1;
+    d_buf = 1;
 }
 
 TestUInt16::TestUInt16(const TestUInt16 &rhs) : UInt16(rhs), TestCommon(rhs)
@@ -107,10 +107,10 @@ TestUInt16::read()
 	sleep(test_variable_sleep_interval);
 
     if (get_series_values()) {
-        _buf = (short)(16 * _buf);
+        d_buf = (short)(16 * d_buf);
     }
     else {
-        _buf = 64000;
+        d_buf = 64000;
     }
     
     set_read_p(true);
diff --git a/tests/TestUInt16.h b/tests/TestUInt16.h
index 1a10d6e..278c3f8 100644
--- a/tests/TestUInt16.h
+++ b/tests/TestUInt16.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestUInt32.cc b/tests/TestUInt32.cc
index 5026a6f..faea396 100644
--- a/tests/TestUInt32.cc
+++ b/tests/TestUInt32.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
@@ -57,13 +57,13 @@ TestUInt32::_duplicate(const TestUInt32 &ts)
 
 TestUInt32::TestUInt32(const string &n) : UInt32(n), d_series_values(false)
 {
-    _buf = 1;
+    d_buf = 1;
 }
 
 TestUInt32::TestUInt32(const string &n, const string &d)
     : UInt32(n, d), d_series_values(false)
 {
-    _buf = 1;
+    d_buf = 1;
 }
 
 TestUInt32::TestUInt32(const TestUInt32 &rhs) : UInt32(rhs), TestCommon(rhs)
@@ -107,10 +107,10 @@ TestUInt32::read()
 	sleep(test_variable_sleep_interval);
 
     if (get_series_values()) {
-        _buf = 32 * _buf;
+        d_buf = 32 * d_buf;
     }
     else {
-        _buf = 0xf0000000;		// about 4 billion
+        d_buf = 0xf0000000;		// about 4 billion
     }
 
     set_read_p(true);
diff --git a/tests/TestUInt32.h b/tests/TestUInt32.h
index 00102d7..ffd63e3 100644
--- a/tests/TestUInt32.h
+++ b/tests/TestUInt32.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestUrl.cc b/tests/TestUrl.cc
index c771bc6..d76de94 100644
--- a/tests/TestUrl.cc
+++ b/tests/TestUrl.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/TestUrl.h b/tests/TestUrl.h
index 4c088d1..192fb09 100644
--- a/tests/TestUrl.h
+++ b/tests/TestUrl.h
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/tests/atconfig b/tests/atconfig
index 5b86370..d16bf52 100644
--- a/tests/atconfig
+++ b/tests/atconfig
@@ -1,16 +1,16 @@
 # Configurable variable values for building test suites.
 # Generated by ./config.status.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2012 Free Software Foundation, Inc.
 
 # The test suite will define top_srcdir=/../.. etc.
 at_testdir='tests'
-abs_builddir='/Users/jimg/src/hyrax_1.8_release/src/libdap/tests'
+abs_builddir='/home/jimg/src/hyrax_1.9_release/src/libdap/tests'
 at_srcdir='.'
-abs_srcdir='/Users/jimg/src/hyrax_1.8_release/src/libdap/tests'
+abs_srcdir='/home/jimg/src/hyrax_1.9_release/src/libdap/tests'
 at_top_srcdir='..'
-abs_top_srcdir='/Users/jimg/src/hyrax_1.8_release/src/libdap'
+abs_top_srcdir='/home/jimg/src/hyrax_1.9_release/src/libdap'
 at_top_build_prefix='../'
-abs_top_builddir='/Users/jimg/src/hyrax_1.8_release/src/libdap'
+abs_top_builddir='/home/jimg/src/hyrax_1.9_release/src/libdap'
 
 # Backward compatibility with Autotest <= 2.59b:
 at_top_builddir=$at_top_build_prefix
diff --git a/tests/das-test.cc b/tests/das-test.cc
index ede4475..b9985c4 100644
--- a/tests/das-test.cc
+++ b/tests/das-test.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -38,8 +38,6 @@
 
 #include "config.h"
 
-static char rcsid[] not_used = {"$Id: das-test.cc 22703 2010-05-11 18:10:01Z jimg $"};
-
 #include <cstdlib>
 #include <string>
 #include <GetOpt.h>
@@ -213,6 +211,7 @@ test_scanner()
 
 	  default:
 	    fprintf( stdout, "Error: Unrecognized input\n" ) ;
+	    break;
 	}
 	fprintf( stdout, "%s", prompt ) ; // print prompt after output
 	fflush( stdout ) ;
diff --git a/tests/dds-test.cc b/tests/dds-test.cc
index 4de7085..c658b98 100644
--- a/tests/dds-test.cc
+++ b/tests/dds-test.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -34,7 +34,7 @@
 
 #include "config.h"
 
-static char rcsid[] not_used = { "$Id: dds-test.cc 25021 2011-10-27 04:38:08Z jimg $" };
+#include <fstream>
 
 #include <GetOpt.h>
 
@@ -46,14 +46,20 @@ static char rcsid[] not_used = { "$Id: dds-test.cc 25021 2011-10-27 04:38:08Z ji
 #include "util.h"
 #include "Error.h"
 
+#ifdef DAP4
+#include "D4ParserSax2.h"
+#include "D4BaseTypeFactory.h"
+#endif
+
 using namespace libdap;
 
 void test_scanner();
 void test_parser(const string &name);
 void test_class();
+void test_dap4_parser(const string &name);
 
 int ddslex();
-int ddsparse(DDS &);
+// int ddsparse(DDS &);
 
 extern YYSTYPE ddslval;
 extern int ddsdebug;
@@ -70,9 +76,10 @@ void usage(string name) {
 }
 
 int main(int argc, char *argv[]) {
-    GetOpt getopt(argc, argv, "spP:dcx");
+    GetOpt getopt(argc, argv, "spP:dfF:cx");
     int option_char;
     int scanner_test = 0, parser_test = 0, class_test = 0;
+    int dap4_parser_test = 0;
     string name = "";
     // process options
 
@@ -91,6 +98,16 @@ int main(int argc, char *argv[]) {
             parser_test = 1;
             name = getopt.optarg;
             break;
+
+        case 'f':
+            dap4_parser_test = 1;
+            break;
+
+        case 'F':
+            dap4_parser_test = 1;
+            name = getopt.optarg;
+            break;
+
         case 'x':
             print_ddx = true;
             break;
@@ -103,24 +120,25 @@ int main(int argc, char *argv[]) {
             return 1;
         }
 
-    if (!scanner_test && !parser_test && !class_test) {
+    if (!scanner_test && !parser_test && !class_test && !dap4_parser_test) {
         usage(argv[0]);
         return 1;
     }
 
     try {
-        if (scanner_test) {
+        if (scanner_test)
             test_scanner();
-        }
 
-        if (parser_test) {
+        if (parser_test)
             test_parser(name);
-        }
 
-        if (class_test) {
+        if (dap4_parser_test)
+            test_dap4_parser(name);
+
+        if (class_test)
             test_class();
-        }
-    } catch (Error &e) {
+    }
+    catch (Error &e) {
         cerr << e.get_error_message() << endl;
     }
 }
@@ -203,6 +221,7 @@ void test_scanner(void) {
             break;
         default:
             cout << "Error: Unrecognized input" << endl;
+            break;
         }
         cout << prompt << flush; // print prompt after output
     }
@@ -235,6 +254,39 @@ void test_parser(const string &name) {
     factory = 0;
 }
 
+void test_dap4_parser(const string &/*name*/) {
+#ifdef DAP4
+    D4BaseTypeFactory factory;
+
+    DDS table(&factory);
+    D4ParserSax2 parser;
+    if (name.empty()) {
+        parser.intern(cin, &table);
+    }
+    else {
+        fstream in(name.c_str(), ios_base::in);
+        parser.intern(in, &table);
+    }
+
+    if (table.check_semantics())
+        cout << "DAP4 DDS past semantic check" << endl;
+    else
+        cout << "DAP4 DDS failed semantic check" << endl;
+
+    if (table.check_semantics(true))
+        cout << "DAP4 DDS past full semantic check" << endl;
+    else
+        cout << "DAP4 DDS failed full semantic check" << endl;
+
+    if (print_ddx)
+        table.print_xml_writer(cout, false, "");
+    else
+        table.print(cout);
+#else
+    cerr << "DAP4 parsing not supported by this version of libdap" << endl;
+#endif
+}
+
 void test_class(void) {
     BaseTypeFactory *factory = new BaseTypeFactory;
     DDS table(factory);
diff --git a/tests/expr-test.cc b/tests/expr-test.cc
index b1db239..278fc5d 100644
--- a/tests/expr-test.cc
+++ b/tests/expr-test.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -39,13 +39,12 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#ifndef WIN32
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #include <string.h>
 #include <errno.h>
 
-
 #include <iostream>
 #include <fstream>
 #include <string>
@@ -56,12 +55,8 @@
 #include "DDS.h"
 #include "DataDDS.h"
 #include "ConstraintEvaluator.h"
-#include "XDRFileUnMarshaller.h"
 #include "XDRStreamUnMarshaller.h"
 #include "XDRStreamMarshaller.h"
-#if 0
-#include "DODSFilter.h"
-#endif
 #include "ResponseBuilder.h"
 #include "Response.h"
 #include "Connect.h"
@@ -101,7 +96,7 @@ void intern_data_test(const string & dds_name, const bool constraint_expr,
                  const string & ce, const bool series_values);
 
 int ce_exprlex();               // exprlex() uses the global ce_exprlval
-int ce_exprparse(void *arg);
+// int ce_exprparse(void *arg);
 void ce_exprrestart(FILE * in);
 
 // Glue routines declared in expr.lex
@@ -111,7 +106,9 @@ void *ce_expr_string(const char *yy_str);
 
 extern int ce_exprdebug;
 
+#if 0
 static int keep_temps = 0;      // MT-safe; test code.
+#endif
 
 const string version = "version 1.12";
 const string prompt = "expr-test: ";
@@ -274,7 +271,6 @@ int main(int argc, char *argv[])
 
 // Instead of reading the tokens from stdin, read them from a string.
 
-
 void test_scanner(const string & str)
 {
     ce_exprrestart(0);
@@ -321,8 +317,8 @@ void test_scanner(bool show_prompt)
         case SCAN_REGEXP:
             cout << "REGEXP: " << ce_exprlval.op << endl;
             break;
-        case '*':
-            cout << "Dereference" << endl;
+        case SCAN_STAR:
+            cout << "STAR: " << ce_exprlval.op << endl;
             break;
         case '.':
             cout << "Field Selector" << endl;
@@ -354,8 +350,12 @@ void test_scanner(bool show_prompt)
         case '&':
             cout << "Ampersand" << endl;
             break;
+        case SCAN_HASH_INT32:
+            cout << "Hash Int32" << endl;
+            break;
         default:
             cout << "Error: Unrecognized input" << endl;
+            break;
         }
 
         cout << prompt << flush;  // print prompt after output
@@ -508,37 +508,22 @@ constrained_trans(const string & dds_name, const bool constraint_expr,
     ResponseBuilder df;
     df.set_ce(ce);
     df.set_dataset_name(dds_name);
-    // df.set_URL("test://test");
-    // df.set_response("DataDDS");
 
     ofstream out("expr-test-data.bin", ios::out|ios::trunc|ios::binary);
-#if 0
-    df.send_data(server, eval, out, "", false);
-#endif
     df.send_data(out, server, eval, true);
-    //cout << "Server protocol version: " << server.get_dap_major() << "." << server.get_dap_minor() << endl;
     out.close();
 
     // Now do what Connect::request_data() does:
     FILE *fp = fopen("expr-test-data.bin", "r");
 
     Response r(fp, 400);
-#if 0
-    r.set_type(dods_data);
-    r.set_protocol("3.2");
-#endif
     Connect c("http://dummy_argument");
 
     BaseTypeFactory factory;
     DataDDS dds(&factory, "Test_data", "DAP/3.2");      // Must use DataDDS on receiving end
 
-#if 0
-    c.read_data_no_mime(dds, &r);
-#endif
     c.read_data(dds, &r);
 
-    //cout << "Protocol version: " << dds.get_protocol() << endl;
-
     cout << "The data:" << endl;
     for (DDS::Vars_iter q = dds.var_begin(); q != dds.var_end(); q++) {
         (*q)->print_val(cout);
@@ -592,19 +577,6 @@ intern_data_test(const string & dds_name, const bool constraint_expr,
 
     server.tag_nested_sequences();      // Tag Sequences as Parent or Leaf node.
 
-#if 0
-    if (eval.functional_expression()) {
-        BaseType *var = eval.eval_function(server, dds_name);
-        if (!var)
-            throw Error(unknown_error, "Error calling the CE function.");
-
-        var->intern_data(eval, server);
-
-        var->set_send_p(true);
-        server.add_var(var);
-    }
-#endif
-
     if (eval.function_clauses()) {
         DDS *fdds = eval.eval_function_clauses(server);
 
diff --git a/tests/package.m4 b/tests/package.m4
index 216783b..162600e 100644
--- a/tests/package.m4
+++ b/tests/package.m4
@@ -1,6 +1,6 @@
 # Signature of the current package.
 m4_define([AT_PACKAGE_NAME],      [libdap])
 m4_define([AT_PACKAGE_TARNAME],   [libdap])
-m4_define([AT_PACKAGE_VERSION],   [3.11.6])
-m4_define([AT_PACKAGE_STRING],    [libdap 3.11.6])
+m4_define([AT_PACKAGE_VERSION],   [3.12.0])
+m4_define([AT_PACKAGE_STRING],    [libdap 3.12.0])
 m4_define([AT_PACKAGE_BUGREPORT], [opendap-tech at opendap.org])
diff --git a/unit-tests/ArrayGeoConstraintTest.cc b/unit-tests/ArrayGeoConstraintTest.cc
deleted file mode 100644
index 4f90b1e..0000000
--- a/unit-tests/ArrayGeoConstraintTest.cc
+++ /dev/null
@@ -1,231 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2006 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// Tests for the AISResources class.
-
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-//#define DODS_DEBUG
-
-#include "BaseType.h"
-
-#include "Byte.h"
-#include "Int32.h"
-#include "Float64.h"
-#include "Str.h"
-#include "Array.h"
-#include "Grid.h"
-#include "DDS.h"
-#include "DAS.h"
-
-#include "../tests/TestArray.h"
-#include "ArrayGeoConstraint.h"
-#include "ce_functions.h"
-
-#include "../tests/TestTypeFactory.h"
-
-#include "debug.h"
-
-using namespace CppUnit;
-using namespace libdap;
-using namespace std;
-
-int test_variable_sleep_interval = 0;
-
-namespace libdap
-{
-
-class ArrayGeoConstraintTest:public TestFixture
-{
-private:
-    TestTypeFactory btf;
-    ConstraintEvaluator ce;
-
-    TestArray *a1, *a2, *a3;
-
-public:
-    ArrayGeoConstraintTest()
-    {}
-    ~ArrayGeoConstraintTest()
-    {}
-
-    void setUp()
-    {
-        a1 = new TestArray("test1", new Int32("test1"));
-        a1->append_dim(21); // latitude
-        a1->append_dim(10); // longitude
-
-        a2 = new TestArray("test2", new Int32("test2"));
-        a2->append_dim(21); // latitude
-        a2->append_dim(10); // longitude
-
-        a3 = new TestArray("test3", new Byte("test3"));
-        a3->append_dim(10); // latitude
-        a3->append_dim(10); // longitude
-        dods_byte tmp_data[10][10] =
-                { { 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,41,42,43,44,45,46,47,48,49},
-                  { 50,51,52,53,54,55,56,57,58,59},
-                  { 60,61,62,63,64,65,66,67,68,69},
-                  { 70,71,72,73,74,75,76,77,78,79},
-                  { 80,81,82,83,84,85,86,87,88,89},
-                  { 90,91,92,93,94,95,96,97,98,99} };
-        a3->val2buf((void*)tmp_data);
-        a3->set_read_p(true);
-
-
-    }
-
-    void tearDown()
-    {
-        delete a1; a1 = 0;
-        delete a2; a2 = 0;
-        delete a3; a3 = 0;
-    }
-
-    CPPUNIT_TEST_SUITE( ArrayGeoConstraintTest );
-
-    CPPUNIT_TEST(constructor_test);
-    CPPUNIT_TEST(build_lat_lon_maps_test);
-    CPPUNIT_TEST(set_bounding_box_test);
-
-    CPPUNIT_TEST_SUITE_END();
-
-    void constructor_test() {
-        TestArray *ta = new TestArray("test", new Int32("test"));
-        ta->append_dim(10);
-
-        try {
-            ArrayGeoConstraint agc(ta);
-            CPPUNIT_ASSERT(!"Constructor should throw");
-        }
-        catch (Error &e) {
-            DBG(cerr << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_ASSERT("Caught Error");
-        }
-
-        try {
-            ArrayGeoConstraint agc(ta, 10, 10, 89.9, 89);
-            CPPUNIT_ASSERT(!"Constructor should throw");
-        }
-        catch (Error &e) {
-            DBG(cerr << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_ASSERT("Caught Error");
-        }
-
-        ta->append_dim(20);
-        try {
-            ArrayGeoConstraint agc(ta, 10, 10, 89.9, 89);
-            CPPUNIT_ASSERT(agc.d_extent.d_left == 10
-                           && agc.d_extent.d_top == 10
-                           && agc.d_extent.d_right == 89
-                           && agc.d_extent.d_bottom == 89.9);
-            CPPUNIT_ASSERT(agc.d_projection.d_name == "plat-carre"
-                           && agc.d_projection.d_datum == "wgs84");
-        }
-        catch (Error &e) {
-            DBG(cerr << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"Constructor should not throw");
-        }
-
-        try {
-            ArrayGeoConstraint agc(ta, 10, 10, 89.9, 89,
-                                   "plat-carre", "wgs84");
-            CPPUNIT_ASSERT(agc.d_extent.d_left == 10
-                           && agc.d_extent.d_top == 10
-                           && agc.d_extent.d_right == 89
-                           && agc.d_extent.d_bottom == 89.9);
-            CPPUNIT_ASSERT(agc.d_projection.d_name == "plat-carre"
-                           && agc.d_projection.d_datum == "wgs84");
-        }
-        catch (Error &e) {
-            DBG(cerr << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"Constructor should not throw");
-        }
-
-        try {
-            ArrayGeoConstraint agc(ta, 10, 10, 89.9, 89,
-                                   "plat-carre", "huh?");
-            CPPUNIT_ASSERT(!"Constructor should throw Error");
-        }
-        catch (Error &e) {
-            DBG(cerr << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_ASSERT("Caught Error");
-        }
-    }
-
-    void build_lat_lon_maps_test() {
-        // build_lat_lon_maps() is called in the ctor
-        ArrayGeoConstraint agc(a1, 90, 10, -90, 89);
-
-        CPPUNIT_ASSERT(agc.get_lon()[0] == 10.0);
-        DBG(cerr << "agc.get_lon()[9]: " << agc.get_lon()[9] << endl);
-        CPPUNIT_ASSERT(agc.get_lon()[9] == 89.0);
-        CPPUNIT_ASSERT(agc.get_lat()[0] == 90.0);
-        CPPUNIT_ASSERT(agc.get_lat()[20] == -90.0);
-    }
-
-    void set_bounding_box_test() {
-	try {
-	    ArrayGeoConstraint agc1(a1, 90, 10, -90, 89);
-	    agc1.set_bounding_box(90, 10, -90, 89);
-	    CPPUNIT_ASSERT(agc1.get_longitude_index_left() == 0);
-	    CPPUNIT_ASSERT(agc1.get_longitude_index_right() == 9);
-	    CPPUNIT_ASSERT(agc1.get_latitude_index_top() == 0);
-	    CPPUNIT_ASSERT(agc1.get_latitude_index_bottom() == 20);
-
-	    ArrayGeoConstraint agc2(a2, 90, 0, -90, 359);
-	    agc2.set_bounding_box(45, 10, -45, 89);
-	    DBG(cerr << "agc2.get_longitude_index_left(): " << agc2.get_longitude_index_left() << endl); DBG(cerr << "agc2.get_longitude_index_right(): " << agc2.get_longitude_index_right() << endl); DBG(cerr << "agc2.get_latitude_index_top(): " << agc2.get_latitude_index_top() << endl); DBG(cerr << "agc2.get_latitude_index_bottom(): " << agc2.get_latitude_index_bottom() << endl);
-	    CPPUNIT_ASSERT(agc2.get_longitude_index_left() == 0);
-	    CPPUNIT_ASSERT(agc2.get_longitude_index_right() == 3);
-	    CPPUNIT_ASSERT(agc2.get_latitude_index_top() == 5);
-	    CPPUNIT_ASSERT(agc2.get_latitude_index_bottom() == 15);
-	}
-	catch (Error &e) {
-	    CPPUNIT_FAIL(e.get_error_message());
-	}
-    }
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(ArrayGeoConstraintTest);
-
-} // namespace libdap
-
-int
-main( int, char** )
-{
-    CppUnit::TextTestRunner runner;
-    runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
-
-    bool wasSuccessful = runner.run( "", false ) ;
-
-    return wasSuccessful ? 0 : 1;
-}
diff --git a/unit-tests/ArrayTest.cc b/unit-tests/ArrayTest.cc
index 9ce2ebc..51d0426 100644
--- a/unit-tests/ArrayTest.cc
+++ b/unit-tests/ArrayTest.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/unit-tests/AttrTableTest.cc b/unit-tests/AttrTableTest.cc
index abb1b82..2f16a88 100644
--- a/unit-tests/AttrTableTest.cc
+++ b/unit-tests/AttrTableTest.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -124,9 +124,9 @@ class AttrTableTest: public TestFixture {
         }
 
         CPPUNIT_TEST_SUITE( AttrTableTest );
+#if 1
 
         CPPUNIT_TEST(clone_test);
-#if 1
         CPPUNIT_TEST(find_container_test);
         CPPUNIT_TEST(get_parent_test);
         CPPUNIT_TEST(recurrsive_find_test);
@@ -135,7 +135,9 @@ class AttrTableTest: public TestFixture {
         CPPUNIT_TEST(assignment);
         CPPUNIT_TEST(erase_test);
         CPPUNIT_TEST(names_with_spaces_test);
+#endif
         CPPUNIT_TEST(containers_with_spaces_test);
+#if 1
         CPPUNIT_TEST(get_attr_iter_test);
         CPPUNIT_TEST(del_attr_table_test);
         CPPUNIT_TEST(append_attr_vector_test);
@@ -277,11 +279,14 @@ class AttrTableTest: public TestFixture {
             AttrTable *t = new AttrTable;
             t->append_attr("long name", "String", "first");
             t->append_attr("longer name", "String", "\"second test\"");
-            string sof;
-            FILE2string(sof, of, t->print(of, ""));
+            //string sof;
+            ostringstream oss;
+            t->print(oss, "");
+            //FILE2string(sof, of, t->print(of, ""));
             string attrs = "String long%20name \"first\";\n\
 String longer%20name \"second test\";";
-            CPPUNIT_ASSERT(sof.find(attrs) != string::npos);
+            //CPPUNIT_ASSERT(sof.find(attrs) != string::npos);
+            CPPUNIT_ASSERT(oss.str().find(attrs) != string::npos);
             delete t; t = 0;
         }
 
@@ -297,14 +302,18 @@ String longer%20name \"second test\";";
                 CPPUNIT_ASSERT("Caught Error exception!" && false);
             }
             try {
+#if 0
                 string sof;
                 FILE2string(sof, of, top->print(of, ""));
-                Regex r("Data%20Field \\{\n\
+#endif
+                ostringstream oss;
+                top->print(oss);
+                Regex r(".*Data%20Field \\{\n\
 .*String long%20name \"first\";\n\
 .*Alias an%20alias long%20name;\n\
-\\}\n\n");
-                DBG(cout << sof << endl);
-                CPPUNIT_ASSERT(re_match(r, sof.c_str()));
+.*\\}\n");
+                DBG(cout << ">" << oss.str() << "<" << endl);
+                CPPUNIT_ASSERT(re_match(r, oss.str().c_str()));
                 delete top; top = 0;
             }
             catch (Error &e) {
diff --git a/unit-tests/ByteTest.cc b/unit-tests/ByteTest.cc
index 6ead22d..70f8469 100644
--- a/unit-tests/ByteTest.cc
+++ b/unit-tests/ByteTest.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/unit-tests/CEFunctionsTest.cc b/unit-tests/CEFunctionsTest.cc
deleted file mode 100644
index 9126cba..0000000
--- a/unit-tests/CEFunctionsTest.cc
+++ /dev/null
@@ -1,582 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2006 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// Tests for the AISResources class.
-
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-//#define DODS_DEBUG
-
-#include "BaseType.h"
-#include "Int32.h"
-#include "Float64.h"
-#include "Str.h"
-#include "Array.h"
-#include "Grid.h"
-#include "DDS.h"
-#include "DAS.h"
-#include "ce_functions.h"
-#include <test_config.h>
-
-#include "../tests/TestTypeFactory.h"
-
-#include "debug.h"
-
-#if 1
-#define TWO_GRID_DDS "ce-functions-testsuite/two_grid.dds"
-#define TWO_GRID_DAS "ce-functions-testsuite/two_grid.das"
-#else
-#define TWO_GRID_DDS "unit-tests/ce-functions-testsuite/two_grid.dds"
-#define TWO_GRID_DAS "unit-tests/ce-functions-testsuite/two_grid.das"
-#endif
-
-using namespace CppUnit;
-using namespace libdap;
-using namespace std;
-
-int test_variable_sleep_interval = 0;
-
-class CEFunctionsTest:public TestFixture
-{
-private:
-    DDS * dds;
-    TestTypeFactory btf;
-    ConstraintEvaluator ce;
-public:
-    CEFunctionsTest()
-    {}
-    ~CEFunctionsTest()
-    {}
-
-    void setUp()
-    {
-        try {
-            dds = new DDS(&btf);
-	    string dds_file = (string)TEST_SRC_DIR + "/" + TWO_GRID_DDS ;
-            dds->parse(dds_file);
-            DAS das;
-	    string das_file = (string)TEST_SRC_DIR + "/" + TWO_GRID_DAS ;
-            das.parse(das_file);
-            dds->transfer_attributes(&das);
-            DBG(dds->print_xml(stderr, false, "noBlob"));
-            // Load values into the grid variables
-            Grid & a = dynamic_cast < Grid & >(*dds->var("a"));
-            Array & m1 = dynamic_cast < Array & >(**a.map_begin());
-
-            dods_float64 first_a[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
-            m1.val2buf(first_a);
-            m1.set_read_p(true);
-
-            dods_byte tmp_data[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
-            a.get_array()->val2buf((void*)tmp_data);
-            a.get_array()->set_read_p(true);
-
-            Grid & b = dynamic_cast < Grid & >(*dds->var("b"));
-            Array & m2 = dynamic_cast < Array & >(**b.map_begin());
-            dods_float64 first_b[10] = { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
-
-            m2.val2buf(first_b);
-            m2.set_read_p(true);
-        }
-
-        catch (Error & e) {
-            cerr << "SetUp: " << e.get_error_message() << endl;
-            throw;
-        }
-    }
-
-    void tearDown()
-    {
-        delete dds; dds = 0;
-    }
-
-    CPPUNIT_TEST_SUITE( CEFunctionsTest );
-
-    // Test void projection_function_grid(int argc, BaseType *argv[], DDS &dds)
-
-    CPPUNIT_TEST(no_arguments_test);
-    CPPUNIT_TEST(one_argument_test);
-    CPPUNIT_TEST(one_argument_not_a_grid_test);
-    CPPUNIT_TEST(map_not_in_grid_test);
-    CPPUNIT_TEST(one_dim_grid_test);
-    CPPUNIT_TEST(one_dim_grid_two_expressions_test);
-    CPPUNIT_TEST(one_dim_grid_noninclusive_values_test);
-    CPPUNIT_TEST(one_dim_grid_descending_test);
-    CPPUNIT_TEST(one_dim_grid_two_expressions_descending_test);
-#if 0
-    // grid() is not required to handle this case.
-    CPPUNIT_TEST(values_outside_map_range_test);
-#endif
-
-    // Tests for linear_scale
-    CPPUNIT_TEST(linear_scale_args_test);
-    CPPUNIT_TEST(linear_scale_array_test);
-    CPPUNIT_TEST(linear_scale_grid_test);
-    CPPUNIT_TEST(linear_scale_grid_attributes_test);
-    CPPUNIT_TEST(linear_scale_grid_attributes_test2);
-    CPPUNIT_TEST(linear_scale_scalar_test);
-#if 0
-    // Not used and defined to throw by default. 2/23/11 jhrg
-    CPPUNIT_TEST(function_dap_1_test);
-    CPPUNIT_TEST(function_dap_2_test);
-    CPPUNIT_TEST(function_dap_3_test);
-#endif
-    CPPUNIT_TEST_SUITE_END();
-
-    void no_arguments_test()
-    {
-        try {
-            BaseType *btp = 0;
-            function_grid(0, 0, *dds, &btp);
-            CPPUNIT_ASSERT(true);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"no_arguments_test() should not have failed");
-        }
-    }
-
-    void one_argument_test()
-    {
-        try {
-            BaseType *argv[1];
-            argv[0] = dds->var("a");
-            CPPUNIT_ASSERT(argv[0] && "dds->var should find this");
-            BaseType *btp = 0;
-            function_grid(1, argv, *dds, &btp);
-            CPPUNIT_ASSERT("one_argument_not_a_grid_test() should work");
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"one_argument_test should not fail");
-        }
-    }
-
-    void one_argument_not_a_grid_test()
-    {
-        try {
-            BaseType *argv[1];
-            argv[0] = dds->var("lat");
-            CPPUNIT_ASSERT(argv[0] && "dds->var should find this, although it is not a grid");
-            BaseType *btp = 0;
-            function_grid(1, argv, *dds, &btp);
-            CPPUNIT_ASSERT(!"one_argument_not_a_grid_test() should have failed");
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(true);
-        }
-    }
-
-    void map_not_in_grid_test()
-    {
-        try {
-            BaseType *argv[2];
-            argv[0] = dds->var("a");
-            CPPUNIT_ASSERT(argv[0] && "dds->var should find this");
-            argv[1] = new Str("");
-            string expression = "3<second<=7";
-            dynamic_cast<Str*>(argv[1])->val2buf(&expression);
-            dynamic_cast<Str*>(argv[1])->set_read_p(true);
-            BaseType *btp = 0;
-            function_grid(2, argv, *dds, &btp);
-            CPPUNIT_ASSERT(!"map_not_in_grid_test() should have failed");
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(true);
-        }
-    }
-
-    void one_dim_grid_test()
-    {
-        try {
-            BaseType *argv[2];
-            argv[0] = dds->var("a");
-            CPPUNIT_ASSERT(argv[0] && "dds->var should find this");
-            argv[1] = new Str("");
-            string expression = "3<first<=7";
-            dynamic_cast<Str*>(argv[1])->val2buf(&expression);
-            dynamic_cast<Str*>(argv[1])->set_read_p(true);
-
-            BaseType *btp = 0;
-            function_grid(2, argv, *dds, &btp);
-            Grid &g = dynamic_cast<Grid&>(*btp);
-
-            //Grid &g = dynamic_cast<Grid&>(*argv[0]);
-            Array &m = dynamic_cast<Array&>(**g.map_begin());
-            CPPUNIT_ASSERT(m.dimension_start(m.dim_begin(), true) == 4);
-            CPPUNIT_ASSERT(m.dimension_stop(m.dim_begin(), true) == 7);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"one_dim_grid_test() should have worked");
-        }
-    }
-
-    void one_dim_grid_two_expressions_test()
-    {
-        try {
-            BaseType *argv[3];
-            argv[0] = dds->var("a");
-            CPPUNIT_ASSERT(argv[0] && "dds->var should find this");
-
-            argv[1] = new Str("");
-            string expression = "first>3";
-            dynamic_cast<Str*>(argv[1])->val2buf(&expression);
-            dynamic_cast<Str*>(argv[1])->set_read_p(true);
-
-            argv[2] = new Str("");
-            expression = "first<=7";
-            dynamic_cast<Str*>(argv[2])->val2buf(&expression);
-            dynamic_cast<Str*>(argv[2])->set_read_p(true);
-
-            //function_grid(3, argv, *dds);
-            BaseType *btp = 0;
-            function_grid(3, argv, *dds, &btp);
-            Grid &g = dynamic_cast<Grid&>(*btp);
-
-            //Grid &g = dynamic_cast<Grid&>(*function_grid(3, argv, *dds));
-            //Grid &g = dynamic_cast<Grid&>(*argv[0]);
-            Array &m = dynamic_cast<Array&>(**g.map_begin());
-            CPPUNIT_ASSERT(m.dimension_start(m.dim_begin(), true) == 4);
-            CPPUNIT_ASSERT(m.dimension_stop(m.dim_begin(), true) == 7);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"one_dim_grid_two_expressions_test() should have worked");
-        }
-    }
-
-    void one_dim_grid_descending_test()
-    {
-        try {
-            BaseType *argv[2];
-            argv[0] = dds->var("b");
-            CPPUNIT_ASSERT(argv[0] && "dds->var should find this");
-            argv[1] = new Str("");
-            string expression = "3<first<=7";
-            dynamic_cast<Str*>(argv[1])->val2buf(&expression);
-            dynamic_cast<Str*>(argv[1])->set_read_p(true);
-
-            BaseType *btp = 0;
-            function_grid(2, argv, *dds, &btp);
-            Grid &g = dynamic_cast<Grid&>(*btp);
-
-            //function_grid(2, argv, *dds);
-            //Grid &g = dynamic_cast<Grid&>(*function_grid(2, argv, *dds));
-            //Grid &g = dynamic_cast<Grid&>(*argv[0]);
-            Array &m = dynamic_cast<Array&>(**g.map_begin());
-            CPPUNIT_ASSERT(m.dimension_start(m.dim_begin(), true) == 2);
-            CPPUNIT_ASSERT(m.dimension_stop(m.dim_begin(), true) == 5);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"one_dim_grid_test() should have worked");
-        }
-    }
-
-    void one_dim_grid_two_expressions_descending_test()
-    {
-        try {
-            BaseType *argv[3];
-            argv[0] = dds->var("b");
-            CPPUNIT_ASSERT(argv[0] && "dds->var should find this");
-
-            argv[1] = new Str("");
-            string expression = "first>3";
-            dynamic_cast<Str*>(argv[1])->val2buf(&expression);
-            dynamic_cast<Str*>(argv[1])->set_read_p(true);
-
-            argv[2] = new Str("");
-            expression = "first<=7";
-            dynamic_cast<Str*>(argv[2])->val2buf(&expression);
-            dynamic_cast<Str*>(argv[2])->set_read_p(true);
-
-            BaseType *btp = 0;
-            function_grid(3, argv, *dds, &btp);
-            Grid &g = dynamic_cast<Grid&>(*btp);
-
-            //function_grid(3, argv, *dds);
-            //Grid &g = dynamic_cast<Grid&>(*function_grid(3, argv, *dds));
-            //Grid &g = dynamic_cast<Grid&>(*argv[0]);
-            Array &m = dynamic_cast<Array&>(**g.map_begin());
-            CPPUNIT_ASSERT(m.dimension_start(m.dim_begin(), true) == 2);
-            CPPUNIT_ASSERT(m.dimension_stop(m.dim_begin(), true) == 5);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"one_dim_grid_two_expressions_test() should have worked");
-        }
-    }
-
-    void one_dim_grid_noninclusive_values_test()
-    {
-        try {
-            BaseType *argv[2];
-            argv[0] = dds->var("a");
-            CPPUNIT_ASSERT(argv[0] && "dds->var should find this");
-            argv[1] = new Str("");
-            string expression = "7<first<=3";
-            dynamic_cast<Str*>(argv[1])->val2buf(&expression);
-            dynamic_cast<Str*>(argv[1])->set_read_p(true);
-
-            BaseType *btp = 0;
-            function_grid(2, argv, *dds, &btp);
-            //Grid &g = dynamic_cast<Grid&>(*btp);
-
-            // function_grid(2, argv, *dds);
-
-            CPPUNIT_ASSERT(!"one_dim_grid_noninclusive_values_test() should not have worked");
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(true);
-        }
-    }
-
-    // grid() is not required to handle this case. This test is not used.
-    void values_outside_map_range_test()
-    {
-        try {
-            BaseType *argv[2];
-            argv[0] = dds->var("a");
-            CPPUNIT_ASSERT(argv[0] && "dds->var should find this");
-            argv[1] = new Str("");
-            string expression = "3<=first<20";
-            dynamic_cast<Str*>(argv[1])->val2buf(&expression);
-            dynamic_cast<Str*>(argv[1])->set_read_p(true);
-
-            BaseType *btp = 0;
-            function_grid(2, argv, *dds, &btp);
-            //Grid &g = dynamic_cast<Grid&>(*btp);
-
-            // function_grid(2, argv, *dds);
-
-            CPPUNIT_ASSERT(!"values_outside_map_range_test() should not have worked");
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(true);
-        }
-    }
-
-    // linear_scale tests
-    void linear_scale_args_test() {
-        try {
-            BaseType *btp = 0;
-            function_linear_scale(0, 0, *dds, &btp);
-            CPPUNIT_ASSERT(true);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"linear_scale_args_test: should not throw Error");
-        }
-    }
-
-    void linear_scale_array_test() {
-        try {
-            Array *a = dynamic_cast<Grid&>(*dds->var("a")).get_array();
-            CPPUNIT_ASSERT(a);
-            BaseType *argv[3];
-            argv[0] = a;
-            argv[1] = new Float64("");
-            dynamic_cast<Float64*>(argv[1])->set_value(0.1);//m
-            argv[2] = new Float64("");
-            dynamic_cast<Float64*>(argv[2])->set_value(10);//b
-            BaseType *scaled = 0;
-            function_linear_scale(3, argv, *dds, &scaled);
-            CPPUNIT_ASSERT(scaled->type() == dods_array_c
-                           && scaled->var()->type() == dods_float64_c);
-            double *values = extract_double_array(dynamic_cast<Array*>(scaled));
-            CPPUNIT_ASSERT(values[0] == 10);
-            CPPUNIT_ASSERT(values[1] == 10.1);
-            CPPUNIT_ASSERT(values[9] == 10.9);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"Error in linear_scale_grid_test()");
-        }
-    }
-
-    void linear_scale_grid_test() {
-        try {
-            Grid *g = dynamic_cast<Grid*>(dds->var("a"));
-            CPPUNIT_ASSERT(g);
-            BaseType *argv[3];
-            argv[0] = g;
-            argv[1] = new Float64("");
-            dynamic_cast<Float64*>(argv[1])->set_value(0.1);
-            argv[2] = new Float64("");
-            dynamic_cast<Float64*>(argv[2])->set_value(10);
-            BaseType *scaled = 0;
-            function_linear_scale(3, argv, *dds, &scaled);
-            CPPUNIT_ASSERT(scaled->type() == dods_grid_c);
-            Grid *g_s = dynamic_cast<Grid*>(scaled);
-            CPPUNIT_ASSERT(g_s->get_array()->var()->type() == dods_float64_c);
-            double *values = extract_double_array(g_s->get_array());
-            CPPUNIT_ASSERT(values[0] == 10);
-            CPPUNIT_ASSERT(values[1] == 10.1);
-            CPPUNIT_ASSERT(values[9] == 10.9);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"Error in linear_scale_grid_test()");
-        }
-    }
-
-    void linear_scale_grid_attributes_test() {
-        try {
-            Grid *g = dynamic_cast<Grid*>(dds->var("a"));
-            CPPUNIT_ASSERT(g);
-            BaseType *argv[1];
-            argv[0] = g;
-            BaseType *scaled = 0;
-            function_linear_scale(1, argv, *dds, &scaled);
-            CPPUNIT_ASSERT(scaled->type() == dods_grid_c);
-            Grid *g_s = dynamic_cast<Grid*>(scaled);
-            CPPUNIT_ASSERT(g_s->get_array()->var()->type() == dods_float64_c);
-            double *values = extract_double_array(g_s->get_array());
-            CPPUNIT_ASSERT(values[0] == 10);
-            CPPUNIT_ASSERT(values[1] == 10.1);
-            CPPUNIT_ASSERT(values[9] == 10.9);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"Error in linear_scale_grid_test()");
-        }
-    }
-
-    // This tests the case where attributes are not found
-    void linear_scale_grid_attributes_test2() {
-        try {
-            Grid *g = dynamic_cast<Grid*>(dds->var("b"));
-            CPPUNIT_ASSERT(g);
-            BaseType *argv[1];
-            argv[0] = g;
-            BaseType *btp = 0;
-            function_linear_scale(1, argv, *dds, &btp);
-            CPPUNIT_FAIL("Should not get here; no params passed and no attributes set for grid 'b'");
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT("Caught exception");
-        }
-    }
-
-    void linear_scale_scalar_test() {
-        try {
-            Int32 *i = new Int32("linear_scale_test_int32");
-            CPPUNIT_ASSERT(i);
-            i->set_value(1);
-            BaseType *argv[3];
-            argv[0] = i;
-            argv[1] = new Float64("");
-            dynamic_cast<Float64*>(argv[1])->set_value(0.1);//m
-            argv[2] = new Float64("");
-            dynamic_cast<Float64*>(argv[2])->set_value(10);//b
-            BaseType *scaled = 0;
-            function_linear_scale(3, argv, *dds, &scaled);
-            CPPUNIT_ASSERT(scaled->type() == dods_float64_c);
-
-            CPPUNIT_ASSERT(dynamic_cast<Float64*>(scaled)->value() == 10.1);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT(!"Error in linear_scale_scalar_test()");
-        }
-    }
-
-
-    void function_dap_1_test() {
-        try {
-            Int32 *i = new Int32("function_dap_1_test_int32");
-            CPPUNIT_ASSERT(i);
-            i->set_value(2);
-            BaseType *argv[1];
-            argv[0] = i;
-
-            ConstraintEvaluator unused;
-            function_dap(1, argv, *dds, unused);
-
-            CPPUNIT_ASSERT(dds->get_dap_major() == 2);
-            CPPUNIT_ASSERT(dds->get_dap_minor() == 0);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_FAIL("Error in function_dap_1_test(): " + e.get_error_message());
-        }
-    }
-
-    void function_dap_2_test() {
-        try {
-            Float64 *d = new Float64("function_dap_1_test_float64");
-            CPPUNIT_ASSERT(d);
-            d->set_value(3.2);
-            BaseType *argv[1];
-            argv[0] = d;
-
-            ConstraintEvaluator unused;
-            function_dap(1, argv, *dds, unused);
-
-            CPPUNIT_ASSERT(dds->get_dap_major() == 3);
-            CPPUNIT_ASSERT(dds->get_dap_minor() == 2);
-        }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_FAIL("Error in function_dap_2_test(): " + e.get_error_message());
-        }
-    }
-
-    void function_dap_3_test() {
-        try {
-            cerr <<"In function_dap_3_test" << endl;
-            ConstraintEvaluator unused;
-            function_dap(0, 0, *dds, unused);
-
-            CPPUNIT_FAIL("Should have thrown an exception on no args");
-                    }
-        catch (Error &e) {
-            DBG(cerr << e.get_error_message() << endl);
-            CPPUNIT_ASSERT("Pass: Caught exception");
-        }
-    }
-
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(CEFunctionsTest);
-
-int
-main( int, char** )
-{
-    CppUnit::TextTestRunner runner;
-    runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
-
-    bool wasSuccessful = runner.run( "", false ) ;
-
-    return wasSuccessful ? 0 : 1;
-}
diff --git a/unit-tests/D4-xml/D4Dimensions_1.xml b/unit-tests/D4-xml/D4Dimensions_1.xml
new file mode 100644
index 0000000..e8344b5
--- /dev/null
+++ b/unit-tests/D4-xml/D4Dimensions_1.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Dimension name="first" size="10"/>
diff --git a/unit-tests/D4-xml/D4Dimensions_2.xml b/unit-tests/D4-xml/D4Dimensions_2.xml
new file mode 100644
index 0000000..ca25c65
--- /dev/null
+++ b/unit-tests/D4-xml/D4Dimensions_2.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Dimension name="first" size="10"/>
+<Dimension name="second" size="100"/>
diff --git a/unit-tests/D4-xml/D4Dimensions_3.xml b/unit-tests/D4-xml/D4Dimensions_3.xml
new file mode 100644
index 0000000..f19426f
--- /dev/null
+++ b/unit-tests/D4-xml/D4Dimensions_3.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Dimension name="first" size="10"/>
+<Dimension name="second" size="100"/>
+<Dimension name="third" unlimited="true"/>
diff --git a/unit-tests/D4-xml/D4Dimensions_4.xml b/unit-tests/D4-xml/D4Dimensions_4.xml
new file mode 100644
index 0000000..f9e0362
--- /dev/null
+++ b/unit-tests/D4-xml/D4Dimensions_4.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Dimension name="first" size="10"/>
+<Dimension name="odd" size="20"/>
+<Dimension name="second" size="100"/>
+<Dimension name="third" unlimited="true"/>
diff --git a/unit-tests/D4-xml/D4Dimensions_empty.xml b/unit-tests/D4-xml/D4Dimensions_empty.xml
new file mode 100644
index 0000000..89a325e
--- /dev/null
+++ b/unit-tests/D4-xml/D4Dimensions_empty.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
diff --git a/unit-tests/D4-xml/D4EnumDefs_1.xml b/unit-tests/D4-xml/D4EnumDefs_1.xml
new file mode 100644
index 0000000..eb80cc3
--- /dev/null
+++ b/unit-tests/D4-xml/D4EnumDefs_1.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Enumeration name="first" basetype="Byte">
+    <EnumConst name="red" value="1"/>
+    <EnumConst name="blue" value="2"/>
+</Enumeration>
diff --git a/unit-tests/D4-xml/D4EnumDefs_2.xml b/unit-tests/D4-xml/D4EnumDefs_2.xml
new file mode 100644
index 0000000..23b75a2
--- /dev/null
+++ b/unit-tests/D4-xml/D4EnumDefs_2.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Enumeration name="first" basetype="Byte">
+    <EnumConst name="red" value="1"/>
+    <EnumConst name="blue" value="2"/>
+</Enumeration>
+<Enumeration name="second" basetype="Int32">
+    <EnumConst name="snow" value="0"/>
+    <EnumConst name="ice" value="10000"/>
+</Enumeration>
diff --git a/unit-tests/D4-xml/D4EnumDefs_3.xml b/unit-tests/D4-xml/D4EnumDefs_3.xml
new file mode 100644
index 0000000..77a0666
--- /dev/null
+++ b/unit-tests/D4-xml/D4EnumDefs_3.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Enumeration name="second" basetype="Int32">
+    <EnumConst name="snow" value="0"/>
+    <EnumConst name="ice" value="10000"/>
+</Enumeration>
+<Enumeration name="first" basetype="Byte">
+    <EnumConst name="red" value="1"/>
+    <EnumConst name="blue" value="2"/>
+</Enumeration>
diff --git a/unit-tests/D4-xml/D4EnumDefs_empty.xml b/unit-tests/D4-xml/D4EnumDefs_empty.xml
new file mode 100644
index 0000000..89a325e
--- /dev/null
+++ b/unit-tests/D4-xml/D4EnumDefs_empty.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
diff --git a/unit-tests/D4-xml/D4EnumDefs_values_1.xml b/unit-tests/D4-xml/D4EnumDefs_values_1.xml
new file mode 100644
index 0000000..e036ffe
--- /dev/null
+++ b/unit-tests/D4-xml/D4EnumDefs_values_1.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<EnumConst name="red" value="1"/>
+<EnumConst name="blue" value="2"/>
diff --git a/unit-tests/D4-xml/README b/unit-tests/D4-xml/README
new file mode 100644
index 0000000..5cef568
--- /dev/null
+++ b/unit-tests/D4-xml/README
@@ -0,0 +1,7 @@
+README
+
+ Created on: Apr 1, 2013
+     Author: jimg
+
+This directory holds xml files that are the baselines for various unit test
+for the new DAP4 types and ancillary classes.
diff --git a/unit-tests/D4DimensionsTest.cc b/unit-tests/D4DimensionsTest.cc
new file mode 100644
index 0000000..b30ad9b
--- /dev/null
+++ b/unit-tests/D4DimensionsTest.cc
@@ -0,0 +1,183 @@
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2002,2003 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#include "config.h"
+
+#include <cppunit/TextTestRunner.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+//#define DODS_DEBUG
+
+#include "D4Dimensions.h"
+#include "XMLWriter.h"
+#include "debug.h"
+
+#include "testFile.h"
+#include "test_config.h"
+
+using namespace CppUnit;
+using namespace std;
+using namespace libdap;
+
+class D4DimensionsTest: public TestFixture {
+private:
+    XMLWriter *xml;
+    D4Dimensions *d;
+
+public:
+    D4DimensionsTest() {
+    }
+
+    ~D4DimensionsTest() {
+    }
+
+    void setUp() {
+        d = new D4Dimensions;
+        xml = new XMLWriter;
+    }
+
+    void tearDown() {
+        delete xml;
+        delete d;
+    }
+
+    // An empty D4Dimensions object prints nothing; the XMLWriter class adds
+    // a xml doc preface.
+    void test_print_empty() {
+        d->print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4Dimensions_empty.xml");
+        DBG(cerr << "test_print_empty: doc: " << doc << endl);
+        DBG(cerr << "test_print_empty: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_1() {
+        d->add_dim("first", 10);
+
+        d->print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4Dimensions_1.xml");
+        DBG(cerr << "test_print_1: doc: " << doc << endl);
+        DBG(cerr << "test_print_1: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_2() {
+        d->add_dim("first", 10);
+        d->add_dim("second", 100);
+
+        d->print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4Dimensions_2.xml");
+        DBG(cerr << "test_print_2: doc: " << doc << endl);
+        DBG(cerr << "test_print_2: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_varying() {
+        d->add_dim("first", 10);
+        d->add_dim("second", 100);
+        d->add_dim("third", 0, true);
+
+        d->print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4Dimensions_3.xml");
+        DBG(cerr << "test_print_varying: doc: " << doc << endl);
+        DBG(cerr << "test_print_varying: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_insert_dim() {
+        d->add_dim("first", 10);
+        d->add_dim("second", 100);
+        d->add_dim("third", 0, true);
+
+        //vector<D4Dimensions::dimension>::iterator i = d->dim_begin() + 1;
+        D4Dimensions::D4DimensionsIter i = d->dim_begin() + 1;
+        d->insert_dim("odd", 20, false /*varying*/, i);
+
+        d->print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4Dimensions_4.xml");
+        DBG(cerr << "test_print_insert_dim: doc: " << doc << endl);
+        DBG(cerr << "test_print_insert_dim: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_assignment() {
+        d->add_dim("first", 10);
+        d->add_dim("second", 100);
+        d->add_dim("third", 0, true);
+
+        D4Dimensions lhs = *d;
+
+        lhs.print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4Dimensions_3.xml");
+        DBG(cerr << "test_print_assignment: doc: " << doc << endl);
+        DBG(cerr << "test_print_assignment: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_copy_ctor() {
+        d->add_dim("first", 10);
+        d->add_dim("second", 100);
+        d->add_dim("third", 0, true);
+
+        D4Dimensions lhs(*d);
+
+        lhs.print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4Dimensions_3.xml");
+        DBG(cerr << "test_print_copy_ctor: doc: " << doc << endl);
+        DBG(cerr << "test_print_copy_ctor: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    CPPUNIT_TEST_SUITE( D4DimensionsTest );
+
+        CPPUNIT_TEST(test_print_empty);
+        CPPUNIT_TEST(test_print_1);
+        CPPUNIT_TEST(test_print_2);
+        CPPUNIT_TEST(test_print_varying);
+        CPPUNIT_TEST(test_print_insert_dim);
+        CPPUNIT_TEST(test_print_assignment);
+        CPPUNIT_TEST(test_print_copy_ctor);
+
+    CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(D4DimensionsTest);
+
+int main(int, char**) {
+    CppUnit::TextTestRunner runner;
+    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
+
+    bool wasSuccessful = runner.run("", false);
+
+    return wasSuccessful ? 0 : 1;
+}
+
diff --git a/unit-tests/D4EnumDefsTest.cc b/unit-tests/D4EnumDefsTest.cc
new file mode 100644
index 0000000..dfea4b3
--- /dev/null
+++ b/unit-tests/D4EnumDefsTest.cc
@@ -0,0 +1,190 @@
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2002,2003 OPeNDAP, Inc.
+// Author: James Gallagher <jgallagher at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+#include "config.h"
+
+#include <cppunit/TextTestRunner.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+//#define DODS_DEBUG
+
+#include "D4EnumDefs.h"
+#include "XMLWriter.h"
+#include "debug.h"
+
+#include "testFile.h"
+#include "test_config.h"
+
+using namespace CppUnit;
+using namespace std;
+using namespace libdap;
+
+class D4EnumDefsTest: public TestFixture {
+private:
+    XMLWriter *xml;
+    D4EnumDefs *d;
+
+    enumValues e, e2;
+
+public:
+    D4EnumDefsTest() {
+    }
+
+    ~D4EnumDefsTest() {
+    }
+
+    void setUp() {
+        d = new D4EnumDefs;
+        xml = new XMLWriter;
+
+        e.add_value("red", 1);
+        e.add_value("blue", 2);
+
+        e2.add_value("snow", 0);
+        e2.add_value("ice", 10000);
+    }
+
+    void tearDown() {
+        delete xml;
+        delete d;
+    }
+
+    // An empty D4Dimensions object prints nothing; the XMLWriter class adds
+    // a xml doc preface.
+    void test_print_empty() {
+        d->print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4EnumDefs_empty.xml");
+        DBG(cerr << "test_print_empty: doc: " << doc << endl);
+        DBG(cerr << "test_print_empty: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_enum_values_only() {
+        enumValues e;
+        e.add_value("red", 1);
+        e.add_value("blue", 2);
+
+        e.print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4EnumDefs_values_1.xml");
+        DBG(cerr << "test_print_enum_values_only: doc: " << doc << endl);
+        DBG(cerr << "test_print_enum_values_only: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+
+    }
+
+    void test_print_1() {
+        d->add_enum("first", dods_byte_c, e);
+
+        d->print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4EnumDefs_1.xml");
+        DBG(cerr << "test_print_1: doc: " << doc << endl);
+        DBG(cerr << "test_print_1: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+
+    void test_print_2() {
+        d->add_enum("first", dods_byte_c, e);
+        d->add_enum("second", dods_int32_c, e2);
+
+        d->print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4EnumDefs_2.xml");
+        DBG(cerr << "test_print_2: doc: " << doc << endl);
+        DBG(cerr << "test_print_2: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_insert_enum() {
+        d->add_enum("first", dods_byte_c, e);
+
+        // "second' winds up before 'first'
+        D4EnumDefs::D4EnumIter i = d->enum_begin();
+        d->insert_enum("second", dods_int32_c, e2, i);
+
+        d->print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4EnumDefs_3.xml");
+        DBG(cerr << "test_print_insert_enum: doc: " << doc << endl);
+        DBG(cerr << "test_print_insert_enum: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_assignment() {
+        d->add_enum("first", dods_byte_c, e);
+        d->add_enum("second", dods_int32_c, e2);
+
+        D4EnumDefs lhs = *d;
+
+        lhs.print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4EnumDefs_2.xml");
+        DBG(cerr << "test_print_assignment: doc: " << doc << endl);
+        DBG(cerr << "test_print_assignment: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    void test_print_copy_ctor() {
+        d->add_enum("first", dods_byte_c, e);
+        d->add_enum("second", dods_int32_c, e2);
+
+        D4EnumDefs lhs(*d);
+
+        lhs.print(*xml);
+        string doc = xml->get_doc();
+        string baseline = readTestBaseline(string(TEST_SRC_DIR) + "/D4-xml/D4EnumDefs_2.xml");
+        DBG(cerr << "test_print_copy_ctor: doc: " << doc << endl);
+        DBG(cerr << "test_print_copy_ctor: baseline: " << baseline << endl);
+        CPPUNIT_ASSERT(doc == baseline);
+    }
+
+    CPPUNIT_TEST_SUITE( D4EnumDefsTest );
+
+        CPPUNIT_TEST(test_print_empty);
+        CPPUNIT_TEST(test_print_enum_values_only);
+        CPPUNIT_TEST(test_print_1);
+        CPPUNIT_TEST(test_print_2);
+
+        CPPUNIT_TEST(test_print_insert_enum);
+        CPPUNIT_TEST(test_print_assignment);
+        CPPUNIT_TEST(test_print_copy_ctor);
+
+        CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(D4EnumDefsTest);
+
+int main(int, char**) {
+    CppUnit::TextTestRunner runner;
+    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
+
+    bool wasSuccessful = runner.run("", false);
+
+    return wasSuccessful ? 0 : 1;
+}
+
diff --git a/unit-tests/DAP4MarshallerTest.cc b/unit-tests/DAP4MarshallerTest.cc
new file mode 100644
index 0000000..0362d84
--- /dev/null
+++ b/unit-tests/DAP4MarshallerTest.cc
@@ -0,0 +1,311 @@
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestAssert.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/CompilerOutputter.h>
+
+#include "config.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <stdint.h>
+
+// #define DODS_DEBUG 1
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <cstring>
+
+#include "DAP4StreamMarshaller.h"
+
+#include "debug.h"
+
+using namespace std;
+using namespace libdap;
+
+class DAP4MarshallerTest: public CppUnit::TestFixture {
+
+    CPPUNIT_TEST_SUITE( DAP4MarshallerTest );
+
+    CPPUNIT_TEST(test_cmp);
+    CPPUNIT_TEST(test_scalars);
+    CPPUNIT_TEST(test_real_scalars);
+    CPPUNIT_TEST(test_str);
+    CPPUNIT_TEST(test_opaque);
+    CPPUNIT_TEST(test_vector);
+    CPPUNIT_TEST(test_varying_vector);
+
+    CPPUNIT_TEST_SUITE_END( );
+
+    /**
+     * Compare the contents of a file with a memory buffer
+     */
+    bool cmp(const char *buf, unsigned int len, string file) {
+        fstream in;
+        in.open(file.c_str(), fstream::binary | fstream::in);
+        if (!in) {
+            cerr << "Could not open file: " << file << endl;
+            return false;
+        }
+
+        vector<char> fbuf(len);
+        in.read(&fbuf[0], len);
+        if (!in) {
+            cerr << "Could not read " << len << " bytes from file." << endl;
+            return false;
+        }
+
+        for (unsigned int i = 0; i < len; ++i)
+            if (*buf++ != fbuf[i]) {
+                cerr << "Response differs from baseline at byte " << i << endl;
+                cerr << "Expected: " << setfill('0') << setw(2) << hex
+                        << (unsigned int)fbuf[i] << "; got: "
+                        << (unsigned int)buf[i] << dec << endl;
+                return false;
+            }
+
+        return true;
+    }
+
+    void write_binary_file(const char *buf, int len, string file) {
+        fstream out;
+        out.open(file.c_str(), fstream::binary | fstream::out);
+        if (!out) {
+            cerr << "Could not open file: " << file << endl;
+            return;
+        }
+
+        out.write(buf, len);
+    }
+
+public:
+    DAP4MarshallerTest() {
+    }
+
+    void setUp() {
+    }
+
+    void tearDown() {
+    }
+
+    void test_cmp() {
+        char buf[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+        CPPUNIT_ASSERT(cmp(buf, 16, "test_cmp.dat"));
+    }
+
+    void test_scalars() {
+        ostringstream oss;
+        // computes checksums and writes data
+        try {
+        DAP4StreamMarshaller dsm(oss);
+
+        dsm.reset_checksum();
+
+        dsm.put_byte(17);
+        dsm.put_checksum();
+        dsm.reset_checksum();
+
+        dsm.put_int16(17);
+        dsm.put_checksum();
+        dsm.reset_checksum();
+
+        dsm.put_int32(17);
+        dsm.put_checksum();
+        dsm.reset_checksum();
+
+        dsm.put_int64(17);
+        dsm.put_checksum();
+        dsm.reset_checksum();
+
+        dsm.put_uint16(17);
+        dsm.put_checksum();
+        dsm.reset_checksum();
+
+        dsm.put_uint32(17);
+        dsm.put_checksum();
+        dsm.reset_checksum();
+
+        dsm.put_uint64(17);
+        dsm.put_checksum();
+        dsm.reset_checksum();
+
+        //write_binary_file(oss.str().data(), oss.str().length(), "test_scalars_1_bin.dat");
+        CPPUNIT_ASSERT(cmp(oss.str().data(), oss.str().length(), "test_scalars_1_bin.dat"));
+        }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_real_scalars() {
+        ostringstream oss;
+        // computes checksums and writes data
+        try {
+        DAP4StreamMarshaller dsm(oss);
+
+        dsm.reset_checksum();
+
+        dsm.put_float32(17);
+        dsm.put_checksum();
+        dsm.reset_checksum();
+
+        dsm.put_float64(17);
+        dsm.put_checksum();
+        dsm.reset_checksum();
+
+        //write_binary_file(oss.str().data(), oss.str().length(), "test_scalars_2_bin.dat");
+        CPPUNIT_ASSERT(cmp(oss.str().data(), oss.str().length(), "test_scalars_2_bin.dat"));
+        }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_str() {
+        ostringstream oss;
+        try {
+            DAP4StreamMarshaller dsm(oss);
+
+            dsm.reset_checksum();
+
+            dsm.put_str("This is a test string with 40 characters");
+            dsm.put_checksum();
+            dsm.reset_checksum();
+
+            // 37 chars --> 0x25 --> 0x25 as a 128-bit varint
+            dsm.put_url("http://www.opendap.org/lame/unit/test");
+            dsm.put_checksum();
+            dsm.reset_checksum();
+
+            // True these are not really scalars...
+            //write_binary_file(oss.str().data(), oss.str().length(), "test_scalars_3_bin.dat");
+            CPPUNIT_ASSERT(cmp(oss.str().data(), oss.str().length(), "test_scalars_3_bin.dat"));
+       }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_opaque() {
+        ostringstream oss;
+        try {
+            DAP4StreamMarshaller dsm(oss);
+            vector<unsigned char> buf(32768);
+            for (int i = 0; i < 32768; ++i)
+                buf[i] = i % (1 << 7);
+
+            dsm.reset_checksum();
+
+            dsm.put_opaque(reinterpret_cast<char*>(&buf[0]), 32768);
+            dsm.put_checksum();
+            dsm.reset_checksum();
+
+            dsm.put_opaque(reinterpret_cast<char*>(&buf[0]), 32768);
+            dsm.put_checksum();
+
+            //write_binary_file(oss.str().data(), oss.str().length(), "test_opaque_1_bin.dat");
+            CPPUNIT_ASSERT(cmp(oss.str().data(), oss.str().length(), "test_opaque_1_bin.dat"));
+       }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_vector() {
+        ostringstream oss;
+        try {
+            DAP4StreamMarshaller dsm(oss);
+            vector<unsigned char> buf1(32768);
+            for (int i = 0; i < 32768; ++i)
+                buf1[i] = i % (1 << 7);
+
+            dsm.reset_checksum();
+
+            dsm.put_vector(reinterpret_cast<char*>(&buf1[0]), 32768);
+            dsm.put_checksum();
+            dsm.reset_checksum();
+
+            vector<dods_int32> buf2(32768);
+            for (int i = 0; i < 32768; ++i)
+                buf2[i] = i % (1 << 9);
+
+            dsm.put_vector(reinterpret_cast<char*>(&buf2[0]), 32768, sizeof(dods_int32), dods_int32_c);
+            dsm.put_checksum();
+            dsm.reset_checksum();
+
+            vector<dods_float64> buf3(32768);
+            for (int i = 0; i < 32768; ++i)
+                buf3[i] = i % (1 << 9);
+
+            dsm.put_vector(reinterpret_cast<char*>(&buf3[0]), 32768, sizeof(dods_float64), dods_float64_c);
+            dsm.put_checksum();
+
+            //write_binary_file(oss.str().data(), oss.str().length(), "test_vector_1_bin.dat");
+            CPPUNIT_ASSERT(cmp(oss.str().data(), oss.str().length(), "test_vector_1_bin.dat"));
+       }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_varying_vector() {
+        ostringstream oss;
+        try {
+            DAP4StreamMarshaller dsm(oss);
+            vector<unsigned char> buf1(32768);
+            for (int i = 0; i < 32768; ++i)
+                buf1[i] = i % (1 << 7);
+
+            dsm.reset_checksum();
+
+            dsm.put_varying_vector(reinterpret_cast<char*>(&buf1[0]), 32768);
+            dsm.put_checksum();
+            dsm.reset_checksum();
+
+            vector<dods_int32> buf2(32768);
+            for (int i = 0; i < 32768; ++i)
+                buf2[i] = i % (1 << 9);
+
+            dsm.put_varying_vector(reinterpret_cast<char*>(&buf2[0]), 32768, sizeof(dods_int32), dods_int32_c);
+            dsm.put_checksum();
+            dsm.reset_checksum();
+
+            vector<dods_float64> buf3(32768);
+            for (int i = 0; i < 32768; ++i)
+                buf3[i] = i % (1 << 9);
+
+            dsm.put_varying_vector(reinterpret_cast<char*>(&buf3[0]), 32768, sizeof(dods_float64), dods_float64_c);
+            dsm.put_checksum();
+
+            //write_binary_file(oss.str().data(), oss.str().length(), "test_vector_2_bin.dat");
+            CPPUNIT_ASSERT(cmp(oss.str().data(), oss.str().length(), "test_vector_2_bin.dat"));
+       }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( DAP4MarshallerTest ) ;
+
+int main(int, char **)
+{
+    CppUnit::TextUi::TestRunner runner;
+    CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
+    runner.addTest(registry.makeTest());
+    runner.setOutputter(CppUnit::CompilerOutputter::defaultOutputter(&runner.result(), std::cerr));
+    bool wasSuccessful = runner.run("", false);
+    return wasSuccessful ? 0 : 1;
+}
+
diff --git a/unit-tests/DAP4UnMarshallerTest.cc b/unit-tests/DAP4UnMarshallerTest.cc
new file mode 100644
index 0000000..2df8a5b
--- /dev/null
+++ b/unit-tests/DAP4UnMarshallerTest.cc
@@ -0,0 +1,362 @@
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestAssert.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/CompilerOutputter.h>
+
+#include "config.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <stdint.h>
+
+//#define DODS_DEBUG2 1
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <cstring>
+
+#include "DAP4StreamUnMarshaller.h"
+
+#include "debug.h"
+
+using namespace std;
+using namespace libdap;
+
+class DAP4UnMarshallerTest: public CppUnit::TestFixture {
+
+    CPPUNIT_TEST_SUITE( DAP4UnMarshallerTest );
+
+    CPPUNIT_TEST(test_scalars);
+    CPPUNIT_TEST(test_real_scalars);
+    CPPUNIT_TEST(test_str);
+    CPPUNIT_TEST(test_opaque);
+    CPPUNIT_TEST(test_vector);
+    CPPUNIT_TEST(test_varying_vector);
+
+    CPPUNIT_TEST_SUITE_END( );
+
+    static inline bool is_host_big_endian()
+    {
+#ifdef COMPUTE_ENDIAN_AT_RUNTIME
+
+        dods_int16 i = 0x0100;
+        char *c = reinterpret_cast<char*>(&i);
+        return *c;
+
+#else
+
+#ifdef WORDS_BIGENDIAN
+        return true;
+#else
+        return false;
+#endif
+
+#endif
+    }
+
+public:
+    DAP4UnMarshallerTest() {
+    }
+
+    void setUp() {
+    }
+
+    void tearDown() {
+    }
+
+    void test_scalars()
+    {
+        fstream in;
+        in.exceptions(ostream::failbit | ostream::badbit);
+
+        // computes checksums and writes data
+        try {
+            in.open("test_scalars_1_bin.dat", fstream::binary | fstream::in);
+            DAP4StreamUnMarshaller dsm(in, is_host_big_endian());
+
+            dods_byte b;
+            dsm.get_byte(b);
+            CPPUNIT_ASSERT(b == 17);
+            string ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "47ed733b8d10be225eceba344d533586");
+
+            dods_int16 i1;
+            dsm.get_int16(i1);
+            CPPUNIT_ASSERT(i1 == 17);
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "e2b50a7929c9fa04c82d9793b9fb710f");
+
+            dods_int32 i2;
+            dsm.get_int32(i2);
+            CPPUNIT_ASSERT(i2 == 17);
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "9ef06d55906276f617c008036beaba81");
+
+            dods_int64 i3;
+            dsm.get_int64(i3);
+            CPPUNIT_ASSERT(i3 == 17);
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "843fd2acf107350d495cae589a37913c");
+
+            dods_uint16 ui1;
+            dsm.get_uint16(ui1);
+            CPPUNIT_ASSERT(ui1 == 17);
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "e2b50a7929c9fa04c82d9793b9fb710f");
+
+            dods_uint32 ui2;
+            dsm.get_uint32(ui2);
+            CPPUNIT_ASSERT(ui2 == 17);
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "9ef06d55906276f617c008036beaba81");
+
+            dods_uint64 ui3;
+            dsm.get_uint64(ui3);
+            CPPUNIT_ASSERT(ui3 == 17);
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "843fd2acf107350d495cae589a37913c");
+        }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+        catch (istream::failure &e) {
+            cerr << "File error: " << e.what() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_real_scalars()
+    {
+        fstream in;
+        in.exceptions(ostream::failbit | ostream::badbit);
+
+        // computes checksums and writes data
+        try {
+            in.open("test_scalars_2_bin.dat", fstream::binary | fstream::in);
+            DAP4StreamUnMarshaller dsm(in, is_host_big_endian());
+
+            dods_float32 r1;
+            dsm.get_float32(r1);
+            CPPUNIT_ASSERT(r1 == 17.0);
+            string ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "104e50b0d8d66fcc1ed3ff3f43b71018");
+
+            dods_float64 r2;
+            dsm.get_float64(r2);
+            CPPUNIT_ASSERT(r2 == 17.0);
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "77a53e5b4de7c90741dcbe24b827e866");
+        }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+        catch (istream::failure &e) {
+            cerr << "File error: " << e.what() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_str() {
+        fstream in;
+        in.exceptions(ostream::failbit | ostream::badbit);
+
+        // computes checksums and writes data
+        try {
+            in.open("test_scalars_3_bin.dat", fstream::binary | fstream::in);
+            DAP4StreamUnMarshaller dsm(in, is_host_big_endian());
+
+            string s;
+            dsm.get_str(s);
+            CPPUNIT_ASSERT(s == "This is a test string with 40 characters");
+            string ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "263c8416bf984a01145f31b9328e6e8b");
+
+            string u;
+            dsm.get_url(u);
+            CPPUNIT_ASSERT(u == "http://www.opendap.org/lame/unit/test");
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "e761355247b5b64889492373e1758107");
+        }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+        catch (istream::failure &e) {
+            cerr << "File error: " << e.what() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_opaque() {
+        fstream in;
+        in.exceptions(ostream::failbit | ostream::badbit);
+
+        // computes checksums and writes data
+        try {
+            in.open("test_opaque_1_bin.dat", fstream::binary | fstream::in);
+            DAP4StreamUnMarshaller dsm(in, is_host_big_endian());
+
+            // Test both get_opaque calls; this one that expects the caller
+            // to allocate memory.
+            vector<unsigned char> buf(32768);
+            dsm.get_opaque(reinterpret_cast<char*>(&buf[0]), 32768);
+            for (int i = 0; i < 32768; ++i)
+                CPPUNIT_ASSERT(buf[i] == i % (1 << 7));
+            string ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "4188b46ae4fcbaeee1b2cb74850a7c65");
+
+            char *buf2;
+            unsigned int len;
+            dsm.get_opaque(&buf2, len);
+            CPPUNIT_ASSERT(len == 32768);
+            for (int i = 0; i < 32768; ++i)
+                CPPUNIT_ASSERT(buf2[i] == i % (1 << 7));
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "4188b46ae4fcbaeee1b2cb74850a7c65");
+
+            delete buf2;
+        }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+        catch (istream::failure &e) {
+            cerr << "File error: " << e.what() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_vector() {
+        fstream in;
+        in.exceptions(ostream::failbit | ostream::badbit);
+
+        // computes checksums and writes data
+        try {
+            in.open("test_vector_1_bin.dat", fstream::binary | fstream::in);
+            DAP4StreamUnMarshaller dsm(in, is_host_big_endian());
+
+            vector<unsigned char> buf1(32768);
+            dsm.get_vector(reinterpret_cast<char*>(&buf1[0]), 32768);
+            for (int i = 0; i < 32768; ++i)
+                CPPUNIT_ASSERT(buf1[i] == i % (1 << 7));
+            string ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "4188b46ae4fcbaeee1b2cb74850a7c65");
+
+            vector<dods_int32> buf2(32768);
+            dsm.get_vector(reinterpret_cast<char*>(&buf2[0]), 32768, sizeof(dods_int32), dods_int32_c);
+            for (int i = 0; i < 32768; ++i)
+                CPPUNIT_ASSERT(buf2[i] == i % (1 << 9));
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "bde002389f9caa5c590d315ce1b6e34e");
+
+            vector<dods_float64> buf3(32768);
+            dsm.get_vector(reinterpret_cast<char*>(&buf3[0]), 32768, sizeof(dods_float64), dods_float64_c);
+            for (int i = 0; i < 32768; ++i) {
+                if (buf3[i] != i % (1 << 9))
+                    cerr << "buf3[" << i << "]: " << buf3[i] << endl;
+                CPPUNIT_ASSERT(buf3[i] == i % (1 << 9));
+            }
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "f249b4d23ba0fd2afa290fe374a2556b");
+       }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+        catch (istream::failure &e) {
+            cerr << "File error: " << e.what() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+    void test_varying_vector() {
+        fstream in;
+        in.exceptions(ostream::failbit | ostream::badbit);
+
+        // computes checksums and writes data
+        try {
+            in.open("test_vector_2_bin.dat", fstream::binary | fstream::in);
+            DAP4StreamUnMarshaller dsm(in, is_host_big_endian());
+
+            // Reuse the same pointer for all of the data...
+            char *buf;
+            unsigned int len;
+            dsm.get_varying_vector(&buf, len);
+            CPPUNIT_ASSERT(len == 32768);
+            for (int i = 0; i < 32768; ++i)
+                CPPUNIT_ASSERT(buf[i] == i % (1 << 7));
+            string ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "4188b46ae4fcbaeee1b2cb74850a7c65");
+            delete buf;
+
+            dods_int32 *i_buf;
+            dsm.get_varying_vector(reinterpret_cast<char**>(&i_buf), len, sizeof(dods_int32), dods_int32_c);
+            CPPUNIT_ASSERT(len == 32768);
+            for (int i = 0; i < 32768; ++i) {
+                if (i_buf[i] != i % (1 << 9))
+                    cerr << "i_buf[" << i << "]: " << i_buf[i] << endl;
+                CPPUNIT_ASSERT(i_buf[i] == i % (1 << 9));
+            }
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "bde002389f9caa5c590d315ce1b6e34e");
+            delete i_buf;
+
+            dods_float64 *f_buf;
+            dsm.get_varying_vector(reinterpret_cast<char**>(&f_buf), len, sizeof(dods_float64), dods_float64_c);
+            CPPUNIT_ASSERT(len == 32768);
+            for (int i = 0; i < 32768; ++i)
+                CPPUNIT_ASSERT(f_buf[i] == i % (1 << 9));
+            ck = dsm.get_checksum(dsm.get_checksum());
+            DBG2(cerr << "ck: " << ck << endl);
+            CPPUNIT_ASSERT(ck == "f249b4d23ba0fd2afa290fe374a2556b");
+            delete f_buf;
+        }
+        catch (Error &e) {
+            cerr << "Error: " << e.get_error_message() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+        catch (istream::failure &e) {
+            cerr << "File error: " << e.what() << endl;
+            CPPUNIT_FAIL("Caught an exception.");
+        }
+    }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( DAP4UnMarshallerTest ) ;
+
+int main(int, char **)
+{
+    CppUnit::TextUi::TestRunner runner;
+    CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
+    runner.addTest(registry.makeTest());
+    runner.setOutputter(CppUnit::CompilerOutputter::defaultOutputter(&runner.result(), std::cerr));
+    bool wasSuccessful = runner.run("", false);
+    return wasSuccessful ? 0 : 1;
+}
+
diff --git a/unit-tests/DASTest.cc b/unit-tests/DASTest.cc
index 1f3e5c1..5ffbb33 100644
--- a/unit-tests/DASTest.cc
+++ b/unit-tests/DASTest.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/unit-tests/DDSTest.cc b/unit-tests/DDSTest.cc
index b613f55..eb9680a 100644
--- a/unit-tests/DDSTest.cc
+++ b/unit-tests/DDSTest.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -66,6 +66,8 @@ private:
     DDS *dds1, *dds2;
     BaseTypeFactory factory;
 
+    DDS *dds_dap4;
+
 public:
     DDSTest() {
     }
@@ -73,17 +75,17 @@ public:
     }
 
     void setUp() {
-        //factory = new BaseTypeFactory;
         dds1 = new DDS(&factory, "test1");
         dds2 = new DDS(&factory, "test2");
+
+        dds_dap4 = new DDS(&factory, "test2", "4.0");
     }
 
     void tearDown() {
-        delete dds1;
-        dds1 = 0;
-        delete dds2;
-        dds2 = 0;
-        //delete factory; factory = 0;
+        delete dds1; dds1 = 0;
+        delete dds2; dds2 = 0;
+
+        delete dds_dap4; dds_dap4 = 0;
     }
 
     bool re_match(Regex &r, const string &s) {
@@ -98,15 +100,16 @@ public:
     // to work with transfer_attributes() - if a handler builds a malformed
     // DAS, it will need to specialize the BaseType::transfer_attributes()
     // method.
-CPPUNIT_TEST_SUITE( DDSTest );
-
+    CPPUNIT_TEST_SUITE( DDSTest );
+#if 1
         CPPUNIT_TEST(transfer_attributes_test_1);
         CPPUNIT_TEST(transfer_attributes_test_2);
 
         CPPUNIT_TEST(symbol_name_test);
-
+#endif
         // These test both transfer_attributes() and print_xml()
         CPPUNIT_TEST(print_xml_test);
+#if 1
         CPPUNIT_TEST(print_xml_test2);
         CPPUNIT_TEST(print_xml_test3);
 
@@ -119,6 +122,7 @@ CPPUNIT_TEST_SUITE( DDSTest );
         // CPPUNIT_TEST(print_xml_test5_1);
         CPPUNIT_TEST(print_xml_test6);
         // CPPUNIT_TEST(print_xml_test6_1);
+        CPPUNIT_TEST(print_dmr_test);
 
         CPPUNIT_TEST(get_response_size_test);
         CPPUNIT_TEST(get_response_size_test_c);
@@ -126,6 +130,7 @@ CPPUNIT_TEST_SUITE( DDSTest );
         CPPUNIT_TEST(get_response_size_test_c3);
         CPPUNIT_TEST(get_response_size_test_seq);
         CPPUNIT_TEST(get_response_size_test_seq_c);
+#endif
 
     CPPUNIT_TEST_SUITE_END();
 
@@ -190,17 +195,16 @@ CPPUNIT_TEST_SUITE( DDSTest );
             dds2->parse((string) TEST_SRC_DIR + "/dds-testsuite/test.19b");
             ostringstream oss;
             dds2->print_xml_writer(oss, false, "http://localhost/dods/test.xyz");
-            DBG2(cerr << oss.str() << endl);
+            DBG2(cerr << "Printed DDX: " << oss.str() << endl);
+
+            string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/test.19b.xml");
+            DBG2(cerr << "The baseline: " << baseline << endl);
 
-            string baseline = testFile((string) TEST_SRC_DIR + "/dds-testsuite/test.19b.xml");
-            DBG2(cerr << baseline << endl);
             CPPUNIT_ASSERT(baseline == oss.str());
-        } catch (Error &e) {
+        }
+        catch (Error &e) {
             cerr << e.get_error_message() << endl;
             CPPUNIT_FAIL("Caught unexpected Error object");
-        } catch (...) {
-            cerr << "Caught an unknown exception." << endl;
-            CPPUNIT_FAIL("Caught an unknown exception");
         }
     }
 
@@ -216,7 +220,7 @@ CPPUNIT_TEST_SUITE( DDSTest );
 
         DBG2(cerr << oss.str() << endl);
 
-        string baseline = testFile((string) TEST_SRC_DIR + "/dds-testsuite/test.19c.xml");
+        string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/test.19c.xml");
         DBG2(cerr << baseline << endl);
         CPPUNIT_ASSERT(baseline == oss.str());
     }
@@ -233,7 +237,7 @@ CPPUNIT_TEST_SUITE( DDSTest );
 
         DBG2(cerr << oss.str() << endl);
 
-        string baseline = testFile((string) TEST_SRC_DIR + "/dds-testsuite/test.19d.xml");
+        string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/test.19d.xml");
         DBG2(cerr << baseline << endl);
         CPPUNIT_ASSERT(baseline == oss.str());
     }
@@ -252,7 +256,7 @@ CPPUNIT_TEST_SUITE( DDSTest );
 
         DBG2(cerr << oss.str() << endl);
 
-        string baseline = testFile((string) TEST_SRC_DIR + "/dds-testsuite/test.19d1.xml");
+        string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/test.19d1.xml");
         DBG2(cerr << baseline << endl);
         CPPUNIT_ASSERT(baseline == oss.str());
     }
@@ -271,7 +275,7 @@ CPPUNIT_TEST_SUITE( DDSTest );
 
         DBG(cerr << oss.str() << endl);
 
-        string baseline = testFile((string) TEST_SRC_DIR + "/dds-testsuite/test.19e.xml");
+        string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/test.19e.xml");
         DBG2(cerr << baseline << endl);
         CPPUNIT_ASSERT(baseline == oss.str());
     }
@@ -295,7 +299,7 @@ CPPUNIT_TEST_SUITE( DDSTest );
 
         DBG(cerr << oss.str() << endl);
 
-        string baseline = testFile((string) TEST_SRC_DIR + "/dds-testsuite/test.19f.xml");
+        string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/test.19f.xml");
         DBG2(cerr << baseline << endl);
         CPPUNIT_ASSERT(baseline == oss.str());
     }
@@ -321,7 +325,7 @@ CPPUNIT_TEST_SUITE( DDSTest );
 
         DBG(cerr << oss.str() << endl);
 
-        string baseline = testFile((string) TEST_SRC_DIR + "/dds-testsuite/test.19f1.xml");
+        string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/test.19f1.xml");
         DBG2(cerr << baseline << endl);
         CPPUNIT_ASSERT(baseline == oss.str());
     }
@@ -338,7 +342,7 @@ CPPUNIT_TEST_SUITE( DDSTest );
 
         DBG(cerr << oss.str() << endl);
 
-        string baseline = testFile((string) TEST_SRC_DIR + "/dds-testsuite/test.19b6.xml");
+        string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/test.19b6.xml");
         DBG2(cerr << baseline << endl);
         CPPUNIT_ASSERT(baseline == oss.str());
     }
@@ -364,11 +368,39 @@ CPPUNIT_TEST_SUITE( DDSTest );
 
         DBG(cerr << oss.str() << endl);
 
-        string baseline = testFile((string) TEST_SRC_DIR + "/dds-testsuite/test.19g.xml");
+        string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/test.19g.xml");
         DBG2(cerr << baseline << endl);
         CPPUNIT_ASSERT(baseline == oss.str());
     }
 
+    void print_dmr_test()
+    {
+        try {
+            dds_dap4->parse((string) TEST_SRC_DIR + "/dds-testsuite/fnoc1.nc.dds");
+            DAS das;
+            das.parse((string) TEST_SRC_DIR + "/dds-testsuite/fnoc1.nc.das");
+            dds_dap4->transfer_attributes(&das);
+#if 0
+            string file = (string) TEST_SRC_DIR + "/dds-testsuite/fnoc1.nc.dmr.xml";
+            ofstream d(file.c_str());
+            dds_dap4->print_dmr(d, false);
+            d.close();
+#endif
+            ostringstream oss;
+            dds_dap4->print_dmr(oss, false);
+
+            string baseline = readTestBaseline((string) TEST_SRC_DIR + "/dds-testsuite/fnoc1.nc.dmr.xml");
+
+            DBG(cerr << "Baseline: -->" << baseline << "<--" << endl);
+            DBG(cerr << "DMR: -->" << oss.str() << "<--" << endl);
+
+            CPPUNIT_ASSERT(baseline == oss.str());
+        }
+        catch (Error &e) {
+            CPPUNIT_FAIL(e.get_error_message());
+        }
+    }
+
     void get_response_size_test() {
         dds1->parse((string) TEST_SRC_DIR + "/dds-testsuite/3B42.980909.5.HDF.dds");
         CPPUNIT_ASSERT(dds1->get_request_size(false) == 230400);
@@ -435,7 +467,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(DDSTest);
 
 }
 
-int main(int, char**) {
+int main(int, char *[]) {
     CppUnit::TextTestRunner runner;
     runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
 
diff --git a/unit-tests/DDXParserTest.cc b/unit-tests/DDXParserTest.cc
index 0033cb2..deb3b7f 100644
--- a/unit-tests/DDXParserTest.cc
+++ b/unit-tests/DDXParserTest.cc
@@ -1,4 +1,3 @@
-
 // -*- mode: c++; c-basic-offset:4 -*-
 
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
@@ -19,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -29,16 +28,21 @@
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/extensions/HelperMacros.h>
 
-//#define DODS_DEBUG 1
+#include <istream>
 
 #include "DDXParserSAX2.h"
-//#include "DDXParser.h"
 #include "BaseTypeFactory.h"
 #include "ObjectType.h"
 #include "mime_util.h"
+#include "GetOpt.h"
 #include "debug.h"
 
-#include <test_config.h>
+#include "test_config.h"
+
+static bool debug = false;
+
+#undef DBG
+#define DBG(x) do { if (debug) (x); } while(false);
 
 using namespace CppUnit;
 using namespace std;
@@ -46,523 +50,629 @@ using namespace libdap;
 
 namespace libdap {
 
-class DDXParserTest : public TestFixture {
+class DDXParserTest: public TestFixture {
 private:
-    BaseTypeFactory *factory;
-    DDXParser *ddx_parser;
-    DDS *dds;
+	BaseTypeFactory *factory;
+	DDXParser *ddx_parser;
+	DDS *dds;
 
 public:
-    DDXParserTest() {}
-    ~DDXParserTest() {}
-
-    void setUp() {
-	factory = new BaseTypeFactory;
-	ddx_parser = new DDXParser(factory);
-	dds = new DDS(factory);
-    }
-
-    void tearDown() {
-	delete ddx_parser; ddx_parser = 0;
-	delete factory; factory = 0;
-	delete dds; dds = 0;
-    }
-
-    CPPUNIT_TEST_SUITE( DDXParserTest );
-
-    CPPUNIT_TEST(other_xml_parse_test1);
-    CPPUNIT_TEST(other_xml_parse_test2);
-    CPPUNIT_TEST(other_xml_parse_test3);
-    CPPUNIT_TEST(dap_version_test);
-    CPPUNIT_TEST(no_blob_version_32_test);
-    CPPUNIT_TEST(blob_in_version_32_test);
-    CPPUNIT_TEST(parsing_ddx_from_dataddx_test);
-    CPPUNIT_TEST(top_level_attribute_test);
-    CPPUNIT_TEST(top_level_attribute_container_test);
-    CPPUNIT_TEST(top_level_simple_types_test);
-    CPPUNIT_TEST(top_level_simple_types_with_attributes_test);
-    CPPUNIT_TEST(simple_arrays_test);
-    CPPUNIT_TEST(simple_arrays_multi_dim_test);
-    CPPUNIT_TEST(simple_arrays_attributes_test);
-    CPPUNIT_TEST(structure_test);
-    CPPUNIT_TEST(sequence_test);
-    CPPUNIT_TEST(grid_test);
-    CPPUNIT_TEST(intern_stream_test);
-    CPPUNIT_TEST(intern_ddx_from_dataddx_test);
-
-    // Error tests
-    CPPUNIT_TEST(unknown_tag_test);
-    CPPUNIT_TEST(bad_nesting_test);
-    CPPUNIT_TEST(unknown_end_tag_test);
-    CPPUNIT_TEST(variable_in_attribtue_container_test);
-    CPPUNIT_TEST(simple_type_missing_attribute_test);
-    CPPUNIT_TEST(array_missing_dimension_test);
-    CPPUNIT_TEST(array_missing_dimension_stream_read_test);
-
-    CPPUNIT_TEST_SUITE_END();
-
-    void other_xml_parse_test1() {
-        try {
-            string cid;
-            ddx_parser->intern((string)TEST_SRC_DIR + "/ddx-testsuite/test.1.other_xml.ddx", dds, cid);
-            DBG(dds->print_xml(cout, false, "    "));
-            CPPUNIT_ASSERT(dds->get_dataset_name() == "200803061600_HFRadar_USEGC_6km_rtv_SIO.nc");
-            CPPUNIT_ASSERT(dds->get_dap_major() == 3);
-            CPPUNIT_ASSERT(dds->get_dap_minor() == 3);
-        }
-        catch (DDXParseFailed &e) {
-            DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_FAIL("test.00.ddx failed.");
-        }
-    }
-
-    void other_xml_parse_test2() {
-        try {
-            string cid;
-            ddx_parser->intern((string)TEST_SRC_DIR + "/ddx-testsuite/test.2.other_xml.ddx", dds, cid);
-            DBG(dds->print_xml(cout, false, "    "));
-            CPPUNIT_ASSERT(dds->get_dataset_name() == "200803061600_HFRadar_USEGC_6km_rtv_SIO.nc");
-            CPPUNIT_ASSERT(dds->get_dap_major() == 3);
-            CPPUNIT_ASSERT(dds->get_dap_minor() == 3);
-        }
-        catch (DDXParseFailed &e) {
-            DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_FAIL("test.00.ddx failed.");
-        }
-    }
-
-    void other_xml_parse_test3() {
-        try {
-            string cid;
-            ddx_parser->intern((string)TEST_SRC_DIR + "/ddx-testsuite/test.3.other_xml.ddx", dds, cid);
-            DBG(dds->print_xml(cout, false, "    "));
-            CPPUNIT_ASSERT(dds->get_dataset_name() == "200803061600_HFRadar_USEGC_6km_rtv_SIO.nc");
-            CPPUNIT_ASSERT(dds->get_dap_major() == 3);
-            CPPUNIT_ASSERT(dds->get_dap_minor() == 3);
-        }
-        catch (DDXParseFailed &e) {
-            DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_FAIL("test.00.ddx failed.");
-        }
-    }
-
-    void dap_version_test() {
-    	FILE *in;
-    	try {
-    	    string blob;
-    	    ddx_parser->intern((string) TEST_SRC_DIR
-    		    + "/ddx-testsuite/test.00.ddx", dds, blob);
-    	    CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
-    	    CPPUNIT_ASSERT(dds->get_dap_major() == 3);
-    	    CPPUNIT_ASSERT(dds->get_dap_minor() == 2);
-
-	    DBG(dds->print_xml(cout, false));
-
-	    string name = string(TEST_SRC_DIR) + "/ddx-testsuite/test.00.ddx";
-	    in = fopen(name.c_str(), "r");
-
-	    ddx_parser->intern_stream(in, dds, blob);
-
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
-	    CPPUNIT_ASSERT(dds->get_dap_major() == 3);
-	    CPPUNIT_ASSERT(dds->get_dap_minor() == 2);
-
-	    DBG(dds->print_xml(cout, false));
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.00.ddx failed.");
-	}
-
-	fclose(in);
-    }
-
-    void no_blob_version_32_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.0c.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
-	    CPPUNIT_ASSERT(dds->get_dap_major() == 3);
-	    CPPUNIT_ASSERT(dds->get_dap_minor() == 2);
-
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.0c.ddx failed.");
-	}
-    }
-
-    void blob_in_version_32_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.0d.ddx", dds, blob);
-	    CPPUNIT_FAIL("Parsing test.0d.ddx should fail since it's a DAP 3.2 doc with a dataBLOB tag.");
-
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_ASSERT("test.0d.ddx failed as expected.");
-	}
-    }
-
-    void parsing_ddx_from_dataddx_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/DDX_from_dataddx.xml", dds, blob);
-	    CPPUNIT_ASSERT(true);
-	    DBG(dds->print_xml(cout, false));
-	}
-	catch (DDXParseFailed &e) {
-	    CPPUNIT_FAIL(e.get_error_message());
-	}
-
-    }
-
-    void top_level_attribute_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.01.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
-
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.01.ddx failed.");
-	}
-    }
-
-    void top_level_attribute_container_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.02.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.02.ddx failed.");
-	}
-    }
-
-    // ALiases are broken *** 05/29/03 jhrg
-    void top_level_attribute_alias_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.03.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.03.ddx failed.");
-	}
-    }
-
-    void top_level_simple_types_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.04.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "DDXParseFailed: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.04.ddx failed.");
-	}
-	catch (Error &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.04.ddx failed.");
-	}
-    }
-
-    void top_level_simple_types_with_attributes_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.05.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.05.ddx failed.");
-	}
-    }
-
-    void simple_arrays_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.06.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "OneDimensionalSimpleArrays");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.06.ddx failed.");
-	}
-    }
-
-    void simple_arrays_multi_dim_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.07.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "MultiDimensionalSimpleArrays");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.07.ddx failed.");
-	}
-    }
-
-    void simple_arrays_attributes_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.08.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.08.ddx failed.");
-	}
-    }
-
-    void structure_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.09.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.09.ddx failed.");
-	}
-    }
-
-    void sequence_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.0a.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.0a.ddx failed.");
-	}
-    }
-
-    void grid_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.0b.ddx", dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.0b.ddx failed.");
-	}
-    }
-
-    void intern_stream_test()
-    {
-	try {
-	    string file_name = (string) TEST_SRC_DIR
-		    + "/ddx-testsuite/test.0b.ddx";
-	    FILE *in = fopen(file_name.c_str(), "r");
-	    string blob;
-	    ddx_parser->intern_stream(in, dds, blob);
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
-	    DBG(dds->print_xml(cout, false))
-	    ;
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
-	    CPPUNIT_FAIL("test.0b.ddx failed.");
-	}
-    }
-
-    // Error tests start here.
-
-    void unknown_tag_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/error.01.ddx", dds, blob);
-	    CPPUNIT_FAIL("error.01.ddx should fail!");
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << "Error: " << e.get_error_message() << endl)
-	    ;
-	}
-    }
-
-    void bad_nesting_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/error.02.ddx", dds, blob);
-	    CPPUNIT_FAIL("error.02.ddx should fail!");
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << "Error: " << e.get_error_message() << endl)
-	    ;
-	}
-    }
-
-    void unknown_end_tag_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/error.03.ddx", dds, blob);
-	    CPPUNIT_FAIL("error.03.ddx should fail!");
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << "Error: " << e.get_error_message() << endl)
-	    ;
-	}
-    }
-
-    void variable_in_attribtue_container_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/error.04.ddx", dds, blob);
-	    CPPUNIT_FAIL("error.04.ddx should fail!");
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << "Error: " << e.get_error_message() << endl)
-	    ;
-	}
-    }
-
-    void array_missing_dimension_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/error.05.ddx", dds, blob);
-	    CPPUNIT_FAIL("error.05.ddx should fail!");
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << "Error: " << e.get_error_message() << endl)
-	    ;
-	}
-    }
-
-    void simple_type_missing_attribute_test()
-    {
-	try {
-	    string blob;
-	    ddx_parser->intern((string) TEST_SRC_DIR
-		    + "/ddx-testsuite/error.06.ddx", dds, blob);
-	    CPPUNIT_FAIL("error.06.ddx should fail!");
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << "Error: " << e.get_error_message() << endl)
-	    ;
-	}
-    }
-
-    void array_missing_dimension_stream_read_test()
-    {
-	try {
-	    string file_name = (string) TEST_SRC_DIR
-		    + "/ddx-testsuite/error.05.ddx";
-	    FILE *in = fopen(file_name.c_str(), "r");
-	    string blob;
-	    ddx_parser->intern_stream(in, dds, blob);
-	    CPPUNIT_FAIL("error.05.ddx should fail!");
-	}
-	catch (DDXParseFailed &e) {
-	    DBG(cerr << "Error: " << e.get_error_message() << endl)
-	    ;
-	}
-    }
-
-    void intern_ddx_from_dataddx_test()
-    {
-	try {
-	    string file_name = (string) TEST_SRC_DIR
-		    + "/ddx-testsuite/dataddx_without_top_headers.dap";
-	    FILE *in = fopen(file_name.c_str(), "r");
-
-	    // First read the initial set of 'part' headers for the DDX
-	    read_multipart_headers(in, "text/xml", dap4_ddx);
-
-	    string blob;
-	    ddx_parser->intern_stream(in, dds, blob, "--boundary-string-1");
-	    CPPUNIT_ASSERT(dds->get_dataset_name() == "fnoc1.nc");
-
-	    DBG(dds->print_xml(cout, false));
-	}
-	catch (Error &e) {
-	    CPPUNIT_FAIL(e.get_error_message());
-	}
-    }
+	DDXParserTest()
+	{
+	}
+	~DDXParserTest()
+	{
+	}
+
+	void setUp()
+	{
+		factory = new BaseTypeFactory;
+		ddx_parser = new DDXParser(factory);
+		dds = new DDS(factory);
+	}
+
+	void tearDown()
+	{
+		delete ddx_parser;
+		ddx_parser = 0;
+		delete factory;
+		factory = 0;
+		delete dds;
+		dds = 0;
+	}
+
+CPPUNIT_TEST_SUITE( DDXParserTest )
+	;
+
+	CPPUNIT_TEST(other_xml_parse_test1);
+	CPPUNIT_TEST(other_xml_parse_test2);
+	CPPUNIT_TEST(other_xml_parse_test3);
+	CPPUNIT_TEST(dap_version_test);
+	CPPUNIT_TEST(no_blob_version_32_test);
+	CPPUNIT_TEST(blob_in_version_32_test);
+	CPPUNIT_TEST(parsing_ddx_from_dataddx_test);
+	CPPUNIT_TEST(top_level_attribute_test);
+	CPPUNIT_TEST(top_level_attribute_container_test);
+	CPPUNIT_TEST(top_level_simple_types_test);
+	CPPUNIT_TEST(top_level_simple_types_with_attributes_test);
+	CPPUNIT_TEST(simple_arrays_test);
+	CPPUNIT_TEST(simple_arrays_multi_dim_test);
+	CPPUNIT_TEST(simple_arrays_attributes_test);
+	CPPUNIT_TEST(structure_test);
+	CPPUNIT_TEST(sequence_test);
+	CPPUNIT_TEST(grid_test);
+	CPPUNIT_TEST(intern_stream_test);
+	CPPUNIT_TEST(intern_ddx_from_dataddx_test);
+	// FILE I/O tests
+	CPPUNIT_TEST(top_level_simple_types_test_file_stream);
+	CPPUNIT_TEST(structure_test_file_ptr);
+	// C++ Stream I/O tests
+	CPPUNIT_TEST(top_level_simple_types_test_cpp_stream);
+	CPPUNIT_TEST(structure_test_cpp_stream);
+	CPPUNIT_TEST(sequence_test_cpp_stream);
+	CPPUNIT_TEST(grid_test_cpp_stream);
+
+	// Error tests
+	CPPUNIT_TEST(unknown_tag_test);
+	CPPUNIT_TEST(bad_nesting_test);
+	CPPUNIT_TEST(unknown_end_tag_test);
+	CPPUNIT_TEST(variable_in_attribtue_container_test);
+	CPPUNIT_TEST(simple_type_missing_attribute_test);
+	CPPUNIT_TEST(array_missing_dimension_test);
+	CPPUNIT_TEST(array_missing_dimension_stream_read_test);
+
+	CPPUNIT_TEST_SUITE_END()
+	;
+
+	void other_xml_parse_test1()
+	{
+		try {
+			string cid;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.1.other_xml.ddx", dds, cid);
+			DBG(dds->print_xml(cout, false, "    "));
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "200803061600_HFRadar_USEGC_6km_rtv_SIO.nc");
+			CPPUNIT_ASSERT(dds->get_dap_major() == 3);
+			CPPUNIT_ASSERT(dds->get_dap_minor() == 3);
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.00.ddx failed.");
+		}
+	}
+
+	void other_xml_parse_test2()
+	{
+		try {
+			string cid;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.2.other_xml.ddx", dds, cid);
+			DBG(dds->print_xml(cout, false, "    "));
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "200803061600_HFRadar_USEGC_6km_rtv_SIO.nc");
+			CPPUNIT_ASSERT(dds->get_dap_major() == 3);
+			CPPUNIT_ASSERT(dds->get_dap_minor() == 3);
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.00.ddx failed.");
+		}
+	}
+
+	void other_xml_parse_test3()
+	{
+		try {
+			string cid;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.3.other_xml.ddx", dds, cid);
+			DBG(dds->print_xml(cout, false, "    "));
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "200803061600_HFRadar_USEGC_6km_rtv_SIO.nc");
+			CPPUNIT_ASSERT(dds->get_dap_major() == 3);
+			CPPUNIT_ASSERT(dds->get_dap_minor() == 3);
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.00.ddx failed.");
+		}
+	}
+
+	void dap_version_test()
+	{
+		FILE *in;
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.00.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+			CPPUNIT_ASSERT(dds->get_dap_major() == 3);
+			CPPUNIT_ASSERT(dds->get_dap_minor() == 2);
+
+			DBG(dds->print_xml(cout, false));
+
+			string name = string(TEST_SRC_DIR) + "/ddx-testsuite/test.00.ddx";
+			in = fopen(name.c_str(), "r");
+
+			ddx_parser->intern_stream(in, dds, blob);
+
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+			CPPUNIT_ASSERT(dds->get_dap_major() == 3);
+			CPPUNIT_ASSERT(dds->get_dap_minor() == 2);
+
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.00.ddx failed.");
+		}
+
+		fclose(in);
+	}
+
+	void no_blob_version_32_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.0c.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+			CPPUNIT_ASSERT(dds->get_dap_major() == 3);
+			CPPUNIT_ASSERT(dds->get_dap_minor() == 2);
+
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.0c.ddx failed.");
+		}
+	}
+
+	void blob_in_version_32_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.0d.ddx", dds, blob);
+			CPPUNIT_FAIL("Parsing test.0d.ddx should fail since it's a DAP 3.2 doc with a dataBLOB tag.");
+
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_ASSERT("test.0d.ddx failed as expected.");
+		}
+	}
+
+	void parsing_ddx_from_dataddx_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/DDX_from_dataddx.xml", dds, blob);
+			CPPUNIT_ASSERT(true);
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			CPPUNIT_FAIL(e.get_error_message());
+		}
+
+	}
+
+	void top_level_attribute_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.01.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.01.ddx failed.");
+		}
+	}
+
+	void top_level_attribute_container_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.02.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.02.ddx failed.");
+		}
+	}
+
+	// ALiases are broken *** 05/29/03 jhrg
+	void top_level_attribute_alias_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.03.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.03.ddx failed.");
+		}
+	}
+
+	void top_level_simple_types_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.04.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "DDXParseFailed: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.04.ddx failed.");
+		}
+		catch (Error &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.04.ddx failed.");
+		}
+	}
+
+	void top_level_simple_types_test_file_stream()
+	{
+		FILE *in;
+		try {
+			string blob;
+			in = fopen(((string) TEST_SRC_DIR + "/ddx-testsuite/test.04.ddx").c_str(), "r");
+			ddx_parser->intern_stream(in, dds, blob);
+			fclose(in);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			fclose(in);
+			DBG(cerr << endl << "DDXParseFailed: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.04.ddx failed.");
+		}
+		catch (Error &e) {
+			fclose(in);
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.04.ddx failed.");
+		}
+	}
+
+	void top_level_simple_types_test_cpp_stream()
+	{
+		try {
+			string blob;
+			ifstream in(((string) TEST_SRC_DIR + "/ddx-testsuite/test.04.ddx").c_str());
+			ddx_parser->intern_stream(in, dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "DDXParseFailed: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.04.ddx failed.");
+		}
+		catch (Error &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.04.ddx failed.");
+		}
+	}
+
+	void top_level_simple_types_with_attributes_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.05.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "SimpleTypes");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.05.ddx failed.");
+		}
+	}
+
+	void simple_arrays_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.06.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "OneDimensionalSimpleArrays");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.06.ddx failed.");
+		}
+	}
+
+	void simple_arrays_multi_dim_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.07.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "MultiDimensionalSimpleArrays");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.07.ddx failed.");
+		}
+	}
+
+	void simple_arrays_attributes_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.08.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.08.ddx failed.");
+		}
+	}
+
+	void structure_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.09.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.09.ddx failed.");
+		}
+	}
+
+	void structure_test_file_ptr()
+	{
+		FILE *in;
+		try {
+			string blob;
+			in = fopen((string(TEST_SRC_DIR) + "/ddx-testsuite/test.09.ddx").c_str(), "r");
+			ddx_parser->intern_stream(in, dds, blob);
+			fclose(in);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			fclose(in);
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.09.ddx failed.");
+		}
+	}
+
+	void structure_test_cpp_stream()
+	{
+		try {
+			string blob;
+			ifstream input((string(TEST_SRC_DIR) + "/ddx-testsuite/test.09.ddx").c_str());
+			ddx_parser->intern_stream(input, dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.09.ddx failed.");
+		}
+	}
+
+	void sequence_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.0a.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.0a.ddx failed.");
+		}
+	}
+
+	void sequence_test_cpp_stream()
+	{
+		try {
+			string blob;
+			ifstream input((string(TEST_SRC_DIR) + "/ddx-testsuite/test.0a.ddx").c_str());
+			ddx_parser->intern_stream(input, dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.0a.ddx failed.");
+		}
+	}
+
+	void grid_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/test.0b.ddx", dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.0b.ddx failed.");
+		}
+	}
+
+	void grid_test_cpp_stream()
+	{
+		try {
+			string blob;
+			ifstream input((string(TEST_SRC_DIR) + "/ddx-testsuite/test.0b.ddx").c_str());
+			ddx_parser->intern_stream(input, dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.0b.ddx failed.");
+		}
+	}
+
+	void intern_stream_test()
+	{
+		try {
+			string file_name = (string) TEST_SRC_DIR + "/ddx-testsuite/test.0b.ddx";
+			FILE *in = fopen(file_name.c_str(), "r");
+			string blob;
+			ddx_parser->intern_stream(in, dds, blob);
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "testdata");
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << endl << "Error: " << e.get_error_message() << endl);
+			CPPUNIT_FAIL("test.0b.ddx failed.");
+		}
+	}
+
+	// Error tests start here.
+
+	void unknown_tag_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/error.01.ddx", dds, blob);
+			CPPUNIT_FAIL("error.01.ddx should fail!");
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << "Error: " << e.get_error_message() << endl);
+		}
+	}
+
+	void bad_nesting_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/error.02.ddx", dds, blob);
+			CPPUNIT_FAIL("error.02.ddx should fail!");
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << "Error: " << e.get_error_message() << endl);
+		}
+	}
+
+	void unknown_end_tag_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/error.03.ddx", dds, blob);
+			CPPUNIT_FAIL("error.03.ddx should fail!");
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << "Error: " << e.get_error_message() << endl);
+		}
+	}
+
+	void variable_in_attribtue_container_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/error.04.ddx", dds, blob);
+			CPPUNIT_FAIL("error.04.ddx should fail!");
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << "Error: " << e.get_error_message() << endl);
+		}
+	}
+
+	void array_missing_dimension_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/error.05.ddx", dds, blob);
+			CPPUNIT_FAIL("error.05.ddx should fail!");
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << "Error: " << e.get_error_message() << endl);
+		}
+	}
+
+	void simple_type_missing_attribute_test()
+	{
+		try {
+			string blob;
+			ddx_parser->intern((string) TEST_SRC_DIR + "/ddx-testsuite/error.06.ddx", dds, blob);
+			CPPUNIT_FAIL("error.06.ddx should fail!");
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << "Error: " << e.get_error_message() << endl);
+		}
+	}
+
+	void array_missing_dimension_stream_read_test()
+	{
+		try {
+			string file_name = (string) TEST_SRC_DIR + "/ddx-testsuite/error.05.ddx";
+			FILE *in = fopen(file_name.c_str(), "r");
+			string blob;
+			ddx_parser->intern_stream(in, dds, blob);
+			CPPUNIT_FAIL("error.05.ddx should fail!");
+		}
+		catch (DDXParseFailed &e) {
+			DBG(cerr << "Error: " << e.get_error_message() << endl);
+		}
+	}
+
+	void intern_ddx_from_dataddx_test()
+	{
+		try {
+			string file_name = (string) TEST_SRC_DIR + "/ddx-testsuite/dataddx_without_top_headers.dap";
+			FILE *in = fopen(file_name.c_str(), "r");
+
+			// First read the initial set of 'part' headers for the DDX
+			read_multipart_headers(in, "text/xml", dap4_ddx);
+
+			string blob;
+			ddx_parser->intern_stream(in, dds, blob, "--boundary-string-1");
+			CPPUNIT_ASSERT(dds->get_dataset_name() == "fnoc1.nc");
+
+			DBG(dds->print_xml(cout, false));
+		}
+		catch (Error &e) {
+			CPPUNIT_FAIL(e.get_error_message());
+		}
+	}
 };
 
 }
 
-CPPUNIT_TEST_SUITE_REGISTRATION( DDXParserTest );
+CPPUNIT_TEST_SUITE_REGISTRATION( DDXParserTest);
 
-int
-main( int, char** )
+int main(int argc, char*argv[])
 {
-    CppUnit::TextTestRunner runner;
-    runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
-
-    bool wasSuccessful = runner.run( "", false ) ;
-
-    return (wasSuccessful) ? 0 : 1;
+	CppUnit::TextTestRunner runner;
+	runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
+
+	GetOpt getopt(argc, argv, "d");
+	char option_char;
+	while ((option_char = getopt()) != EOF)
+		switch (option_char) {
+		case 'd':
+			debug = 1;  // debug is a static global
+			break;
+		default:
+			break;
+		}
+
+	bool wasSuccessful = true;
+	string test = "";
+	int i = getopt.optind;
+	if (i == argc) {
+		// run them all
+		wasSuccessful = runner.run("");
+	}
+	else {
+		while (i < argc) {
+			test = string("libdap::DDXParserTest::") + argv[i++];
+
+			wasSuccessful = wasSuccessful && runner.run(test);
+		}
+	}
+
+	return wasSuccessful ? 0 : 1;
 }
diff --git a/unit-tests/DODSFilterTest.cc b/unit-tests/DODSFilterTest.cc
deleted file mode 100644
index 9d13bd5..0000000
--- a/unit-tests/DODSFilterTest.cc
+++ /dev/null
@@ -1,353 +0,0 @@
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>  // for stat
-#include <cstring>
-#include <sstream>
-
-//#define DODS_DEBUG
-
-#include "DODSFilter.h"
-#include "DAS.h"
-#include "DDS.h"
-#include "GNURegex.h"
-#include "debug.h"
-
-#include "../tests/TestTypeFactory.h"
-#include "../tests/TestByte.h"
-
-#include <test_config.h>
-
-using namespace CppUnit;
-using namespace std;
-using namespace libdap;
-
-int test_variable_sleep_interval = 0;
-
-namespace libdap {
-
-class DODSFilterTest: public TestFixture {
-private:
-    DODSFilter *df, *df_conditional, *df1, *df2, *df3, *df4, *df5, *df6;
-
-    AttrTable *cont_a;
-    DAS *das;
-    DDS *dds;
-    ostringstream oss;
-    time_t now;
-    char now_array[256];
-
-public:
-    DODSFilterTest() {
-        now = time(0);
-        ostringstream time_string;
-        time_string << (int) now;
-        strncpy(now_array, time_string.str().c_str(), 255);
-        now_array[255] = '\0';
-    }
-
-    ~DODSFilterTest() {
-    }
-
-    void setUp() {
-        // Test pathname
-        string test_file = (string) TEST_SRC_DIR + "/server-testsuite/bears.data";
-        char *argv_1[] = { (char*) "test_case", (char *) test_file.c_str() };
-        df = new DODSFilter(2, argv_1);
-
-        char *argv_1_1[] = { (char*) "test_case", (char *) test_file.c_str(), (char*) "-l", &now_array[0] };
-        df_conditional = new DODSFilter(4, argv_1_1);
-
-        // Test missing file
-        argv_1[1] = (char*) "no-such-file";
-        df1 = new DODSFilter(2, argv_1);
-
-        // Test files in CWD. Note that the time is the GM time : Tue, 01 May
-        // 2001 01:08:14 -0700
-        argv_1[1] = (char*) "test_config.h";
-        df2 = new DODSFilter(2, argv_1);
-
-        // This file has an ancillary DAS in the server-testsuite dir.
-        // df3 is also used to test escaping stuff in URLs. 5/4/2001 jhrg
-        char *argv_2[8];
-        argv_2[0] = (char*) "test_case";
-        test_file = (string) TEST_SRC_DIR + "/server-testsuite/coads.data";
-        argv_2[1] = (char *) test_file.c_str();
-        argv_2[2] = (char*) "-l";
-        argv_2[3] = &now_array[0];
-        argv_2[4] = (char*) "-e";
-        argv_2[5] = (char*) "u,x,z[0]&grid(u,\"lat<10.0\")";
-        argv_2[6] = (char*) "-t";
-        argv_2[7] = (char*) "1";
-        df3 = new DODSFilter(6, argv_2);
-
-        // Go back to this data source to test w/o an ancillary DAS.
-        argv_2[0] = (char*) "test_case";
-        test_file = (string) TEST_SRC_DIR + "/server-testsuite/bears.data";
-        argv_2[1] = (char *) test_file.c_str();
-        argv_2[2] = (char*) "-l";
-        argv_2[3] = &now_array[0];
-        argv_2[4] = (char*) "-e";
-        argv_2[5] = (char*) "u,x,z[0]&grid(u,\"lat<10.0\")";
-        argv_2[6] = (char*) "-t";
-        argv_2[7] = (char*) "1";
-        df4 = new DODSFilter(6, argv_2);
-
-        // Test escaping stuff. 5/4/2001 jhrg
-        char *argv_3[] = { (char*) "test_case", (char*) "nowhere%5Bmydisk%5Dmyfile", (char*) "-e", (char*) "u%5B0%5D" };
-        df5 = new DODSFilter(4, argv_3);
-
-        char *argv_4[] = { (char*) "test_case", (char*) "nowhere%3a%5bmydisk%5dmyfile", (char*) "-e",
-                (char*) "Grid%20field%3au%5b0%5d,Grid%20field%3av" };
-        df6 = new DODSFilter(4, argv_4);
-
-        cont_a = new AttrTable;
-        cont_a->append_attr("size", "Int32", "7");
-        cont_a->append_attr("type", "String", "cars");
-        das = new DAS;
-        das->add_table("a", cont_a);
-
-        // This AttrTable looks like:
-        //      Attributes {
-        //          a {
-        //              Int32 size 7;
-        //              String type cars;
-        //          }
-        //      }
-
-        TestTypeFactory ttf;
-        dds = new DDS(&ttf, "test");
-        TestByte a("a");
-        dds->add_var(&a);
-
-        dds->transfer_attributes(das);
-        dds->set_dap_major(3);
-        dds->set_dap_minor(2);
-    }
-
-    void tearDown() {
-        delete df;
-        df = 0;
-        delete df_conditional;
-        df_conditional = 0;
-        delete df1;
-        df1 = 0;
-        delete df2;
-        df2 = 0;
-        delete df3;
-        df3 = 0;
-        delete df4;
-        df4 = 0;
-        delete df5;
-        df5 = 0;
-        delete df6;
-        df6 = 0;
-
-        delete das;
-        das = 0;
-    }
-
-    bool re_match(Regex &r, const string &s) {
-        DBG(cerr << "s.length(): " << s.length() << endl);
-        int pos = r.match(s.c_str(), s.length());
-        DBG(cerr << "r.match(s): " << pos << endl);
-        return pos > 0 && static_cast<unsigned> (pos) == s.length();
-    }
-
-    bool re_match_binary(Regex &r, const string &s) {
-        DBG(cerr << "s.length(): " << s.length() << endl);
-        int pos = r.match(s.c_str(), s.length());
-        DBG(cerr << "r.match(s): " << pos << endl);
-        return pos > 0;
-    }
-
-    void get_dataset_last_modified_time_test() {
-        time_t t = time(0);
-        CPPUNIT_ASSERT(df1->get_dataset_last_modified_time() == t);
-
-        struct stat st;
-        string test_file = (string) TEST_SRC_DIR + "/server-testsuite/bears.data";
-        stat(test_file.c_str(), &st);
-        CPPUNIT_ASSERT(df->get_dataset_last_modified_time() == st.st_mtime);
-
-        stat("test_config.h", &st);
-        CPPUNIT_ASSERT(df2->get_dataset_last_modified_time() == st.st_mtime);
-
-        test_file = (string) TEST_SRC_DIR + "/server-testsuite/coads.data";
-        stat(test_file.c_str(), &st);
-        CPPUNIT_ASSERT(df3->get_dataset_last_modified_time() == st.st_mtime);
-    }
-
-    void get_das_last_modified_time_test() {
-        // the dataset pointed to by df has no anc. DAS
-        struct stat st;
-        string test_file = (string) TEST_SRC_DIR + "/server-testsuite/bears.data";
-        stat(test_file.c_str(), &st);
-        CPPUNIT_ASSERT(df->get_das_last_modified_time() == st.st_mtime);
-
-        // the dataset pointed by df3 has an anc. DAS
-        test_file = (string) TEST_SRC_DIR + "/server-testsuite/coads.data.das";
-        stat(test_file.c_str(), &st);
-        CPPUNIT_ASSERT(df3->get_das_last_modified_time() == st.st_mtime);
-    }
-
-    void send_das_test() {
-        Regex
-                r1(
-                        "HTTP/1.0 200 OK\r\n\
-XDODS-Server: .*\
-XOPeNDAP-Server: .*\
-XDAP: .*\
-Date: .*\
-Last-Modified: .*\
-Content-Type: text/plain\r\n\
-Content-Description: dods_das\r\n\
-\r\n\
-Attributes \\{\n\
-    a \\{\n\
-        Int32 size 7;\n\
-        String type \"cars\";\n\
-    \\}\n\
-\\}\n");
-
-        df->send_das(oss, *das);
-
-        DBG(cerr << "DAS: " << oss.str() << endl);
-
-        CPPUNIT_ASSERT(re_match(r1, oss.str()));
-        oss.str("");
-
-        Regex r2("HTTP/1.0 304 NOT MODIFIED\r\n\
-Date: .*\r\n\
-\r\n");
-
-        df_conditional->send_das(oss, *das);
-        CPPUNIT_ASSERT(re_match(r2, oss.str()));
-    }
-
-    void send_dds_test() {
-        Regex
-                r1(
-                        "HTTP/1.0 200 OK\r\n\
-XDODS-Server: .*\
-XOPeNDAP-Server: .*\
-XDAP: .*\
-Date: .*\
-Last-Modified: .*\
-Content-Type: text/plain\r\n\
-Content-Description: dods_dds\r\n\
-\r\n\
-Dataset \\{\n\
-    Byte a;\n\
-\\} test;\n");
-
-        ConstraintEvaluator ce;
-
-        df->send_dds(oss, *dds, ce);
-
-        DBG(cerr << "DDS: " << oss.str() << endl);
-
-        CPPUNIT_ASSERT(re_match(r1, oss.str()));
-        oss.str("");
-
-        Regex r2("HTTP/1.0 304 NOT MODIFIED\r\n\
-Date: .*\r\n\
-\r\n");
-
-        df_conditional->send_dds(oss, *dds, ce);
-        CPPUNIT_ASSERT(re_match(r2, oss.str()));
-    }
-
-    void is_conditional_test() {
-        CPPUNIT_ASSERT(df->is_conditional() == false);
-        CPPUNIT_ASSERT(df3->is_conditional() == true);
-    }
-
-    void get_request_if_modified_since_test() {
-        CPPUNIT_ASSERT(df->get_request_if_modified_since() == -1);
-        CPPUNIT_ASSERT(df3->get_request_if_modified_since() == now);
-    }
-
-    void escape_code_test() {
-        // These should NOT be escaped.
-
-        DBG(cerr << df3->get_dataset_name() << endl); DBG(cerr << df3->get_ce() << endl);
-
-        CPPUNIT_ASSERT(df3->get_dataset_name() == (string)TEST_SRC_DIR + "/server-testsuite/coads.data");
-        CPPUNIT_ASSERT(df3->get_ce() == "u,x,z[0]&grid(u,\"lat<10.0\")");
-
-        // The DODSFIlter instance is feed escaped values; they should be
-        // unescaped by the ctor and the mutators. 5/4/2001 jhrg
-
-        DBG(cerr << df5->get_dataset_name() << endl); DBG(cerr << df5->get_ce() << endl);
-
-        CPPUNIT_ASSERT(df5->get_dataset_name() == "nowhere[mydisk]myfile");
-        CPPUNIT_ASSERT(df5->get_ce() == "u[0]");
-
-        df5->set_ce("u%5B0%5D");
-        CPPUNIT_ASSERT(df5->get_ce() == "u[0]");
-
-        DBG(cerr << df6->get_dataset_name() << endl); DBG(cerr << df6->get_ce() << endl);
-        df5->set_ce("Grid%20u%5B0%5D");
-        CPPUNIT_ASSERT(df5->get_ce() == "Grid%20u[0]");
-    }
-
-    // This tests reading the timeout value from argv[].
-    void timeout_test() {
-        CPPUNIT_ASSERT(df3->get_timeout() == 1);
-        CPPUNIT_ASSERT(df1->get_timeout() == 0);
-    }
-
-CPPUNIT_TEST_SUITE( DODSFilterTest );
-
-        CPPUNIT_TEST(get_dataset_last_modified_time_test);
-        CPPUNIT_TEST(get_das_last_modified_time_test);
-
-        CPPUNIT_TEST(send_das_test);
-        CPPUNIT_TEST(send_dds_test);
-
-        CPPUNIT_TEST(is_conditional_test);
-        CPPUNIT_TEST(get_request_if_modified_since_test);
-        CPPUNIT_TEST(escape_code_test);
-
-    CPPUNIT_TEST_SUITE_END();
-};
-CPPUNIT_TEST_SUITE_REGISTRATION(DODSFilterTest);
-}
-
-int main(int, char**) {
-    CppUnit::TextTestRunner runner;
-    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
-
-    bool wasSuccessful = runner.run("", false);
-
-    return wasSuccessful ? 0 : 1;
-}
-
diff --git a/unit-tests/GridGeoConstraintTest.cc b/unit-tests/GridGeoConstraintTest.cc
deleted file mode 100644
index 3199688..0000000
--- a/unit-tests/GridGeoConstraintTest.cc
+++ /dev/null
@@ -1,1312 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2006 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// Tests for the AISResources class.
-
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-// #define DODS_DEBUG
-
-#include "BaseType.h"
-#include "Int32.h"
-#include "Float64.h"
-#include "Str.h"
-#include "Array.h"
-#include "Grid.h"
-#include "DDS.h"
-#include "DAS.h"
-#include "GridGeoConstraint.h"
-#include "ce_functions.h"
-
-#include "../tests/TestTypeFactory.h"
-
-#include "debug.h"
-#include <test_config.h>
-
-using namespace CppUnit;
-using namespace libdap;
-using namespace std;
-
-int test_variable_sleep_interval = 0;
-
-namespace libdap
-{
-
-class GridGeoConstraintTest:public TestFixture
-{
-private:
-    TestTypeFactory btf;
-    ConstraintEvaluator ce;
-
-    DDS *geo_dds;
-    DDS *geo_dds_3d;
-    DDS *geo_dds_coads_lon;
-
-public:
-    GridGeoConstraintTest()
-    {}
-    ~GridGeoConstraintTest()
-    {}
-
-    void setUp()
-    {
-        // geo grid test data
-        try {
-            geo_dds = new DDS(&btf);
-            geo_dds->parse((string)TEST_SRC_DIR + "/ce-functions-testsuite/geo_grid.dds");
-            DAS das;
-            das.parse((string)TEST_SRC_DIR + "/ce-functions-testsuite/geo_grid.das");
-            geo_dds->transfer_attributes(&das);
-
-            DBG2(geo_dds->print_xml(stderr, false, "No blob"));
-
-            // Load values into the grid variables
-            Grid & sst1 = dynamic_cast < Grid & >(*geo_dds->var("SST1"));
-
-            Array & lon1 = dynamic_cast < Array & >(**sst1.map_begin());
-            dods_float64 tmp_lon1[10] =
-                { 0, 40, 80, 120, 160, 200, 240, 280, 320, 359 };
-            lon1.val2buf(tmp_lon1);
-            lon1.set_read_p(true);
-
-            Array & lat1 = dynamic_cast < Array & >(**(sst1.map_begin() + 1));
-            dods_float64 tmp_lat1[10] =
-                { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-            lat1.val2buf(tmp_lat1);
-            lat1.set_read_p(true);
-
-             dods_byte tmp_data[10][10] =
-                { { 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,41,42,43,44,45,46,47,48,49},
-                  { 50,51,52,53,54,55,56,57,58,59},
-                  { 60,61,62,63,64,65,66,67,68,69},
-                  { 70,71,72,73,74,75,76,77,78,79},
-                  { 80,81,82,83,84,85,86,87,88,89},
-                  { 90,91,92,93,94,95,96,97,98,99} };
-            sst1.get_array()->val2buf((void*)tmp_data);
-            sst1.get_array()->set_read_p(true);
-
-            // Load values into the grid variables
-            Grid & sst1_1 = dynamic_cast < Grid & >(*geo_dds->var("SST1_1"));
-
-            Array & lat1_1 = dynamic_cast < Array & >(**sst1_1.map_begin());
-            dods_float64 tmp_lat1_1[10] =
-                { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-            lat1_1.val2buf(tmp_lat1_1);
-            lat1_1.set_read_p(true);
-
-            Array & lon1_1 = dynamic_cast < Array & >(**(sst1_1.map_begin() + 1));
-            dods_float64 tmp_lon1_1[10] =
-                { 0, 40, 80, 120, 160, 200, 240, 280, 320, 359 };
-            lon1_1.val2buf(tmp_lon1_1);
-            lon1_1.set_read_p(true);
-
-            sst1_1.get_array()->val2buf((void*)tmp_data);
-            sst1_1.get_array()->set_read_p(true);
-
-            // Load values into the grid variables
-            Grid & sst2 = dynamic_cast < Grid & >(*geo_dds->var("SST2"));
-
-            Array & lon2 = dynamic_cast < Array & >(**sst2.map_begin());
-            dods_float64 tmp_lon2[10] =
-            //    { -180, -120, -80, -40, 0, 40, 80, 120, 160, 179 };
-		{ 0, 40, 80, 120, 160, -160, -120, -80, -40, -1};
-            lon2.val2buf(tmp_lon2);
-            lon2.set_read_p(true);
-            //unused BaseType *btp = lon2.var(0);
-            DBG2(cerr << "lon2[0]: " << dynamic_cast<Float64*>(btp)->value() << endl);
-
-            Array & lat2 = dynamic_cast < Array & >(**(sst2.map_begin() + 1));
-            dods_float64 tmp_lat2[10] =
-                { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-            lat2.val2buf(tmp_lat2);
-            lat2.set_read_p(true);
-
-            sst2.get_array()->val2buf((void*)tmp_data);
-            sst2.get_array()->set_read_p(true);
-
-            // Load values into the grid variables
-            Grid & sst3 = dynamic_cast < Grid & >(*geo_dds->var("SST3"));
-
-            Array & lat3 = dynamic_cast < Array & >(**sst3.map_begin());
-            dods_float64 tmp_lat3[10] =
-                { -40, -30, -20, -10, 0, 10, 20, 30, 40, 50 };
-            lat3.val2buf(tmp_lat3);
-            lat3.set_read_p(true);
-
-            Array & lon3 = dynamic_cast < Array & >(**(sst3.map_begin() + 1));
-            dods_float64 tmp_lon3[10] =
-                { 20, 60, 100, 140, 180, 220, 260, 300, 340, 379 };
-            lon3.val2buf(tmp_lon3);
-            lon3.set_read_p(true);
-
-            sst3.get_array()->val2buf((void*)tmp_data);
-            sst3.get_array()->set_read_p(true);
-
-
-
-            // Build the three dimensional grid
-            geo_dds_3d = new DDS(&btf);
-            geo_dds_3d->parse((string)TEST_SRC_DIR + "/ce-functions-testsuite/geo_grid_3d.dds");
-            // Load values into the grid variables
-            Grid & sst4 = dynamic_cast < Grid & >(*geo_dds_3d->var("SST4"));
-
-            Array & time = dynamic_cast<Array&>(**sst4.map_begin());
-            dods_int32 tmp_time[3] = { 0, 1, 2 };
-            time.val2buf(tmp_time);
-            time.set_read_p(true);
-
-            Array & lon4 = dynamic_cast < Array & >(**(sst4.map_begin()+1));
-            dods_float64 tmp_lon4[5] = { 160, 200, 240, 280, 320 };
-            lon4.val2buf(tmp_lon4);
-            lon4.set_read_p(true);
-
-            Array & lat4 = dynamic_cast < Array & >(**(sst4.map_begin()+2));
-            dods_float64 tmp_lat4[5] = { 40, 30, 20, 10, 0 };
-            lat4.val2buf(tmp_lat4);
-            lat4.set_read_p(true);
-
-            dods_byte tmp_data4[3][5][5] =
-                {
-                    { { 0, 1, 2, 3, 4},
-                      { 10,11,12,13,14},
-                      { 20,21,22,23,24},
-                      { 30,31,32,33,34},
-                      { 40,41,42,43,44}  },
-                    { { 100, 101, 102, 103, 104},
-                      { 110, 111, 112, 113, 114},
-                      { 120, 121, 122, 123, 124},
-                      { 130, 131, 132, 133, 134},
-                      { 140, 141, 142, 143, 144}  },
-                    { { 200, 201, 202, 203, 204},
-                      { 210, 211, 212, 213, 214},
-                      { 220, 221, 222, 223, 224},
-                      { 230, 231, 232, 233, 234},
-                      { 240, 241, 242, 243, 244}  }
-                };
-            sst4.get_array()->val2buf((void*)tmp_data4);
-            sst4.get_array()->set_read_p(true);
-
-            DBG2(sst4.print_val(stderr));
-
-            geo_dds_coads_lon = new DDS(&btf);
-            geo_dds_coads_lon->parse((string)TEST_SRC_DIR + "/ce-functions-testsuite/geo_grid_coads_lon.dds");
-            Grid & sst5 = dynamic_cast < Grid & >(*geo_dds_coads_lon->var("SST5"));
-            Array & lon5 = dynamic_cast < Array & >(**sst5.map_begin());
-            dods_float64 tmp_lon5[15] =
-                { 41, 81, 121, 161, 201, 241, 281, 321, 361, 365, 370, 375, 380, 385, 390 };
-            lon5.val2buf(tmp_lon5);
-            lon5.set_read_p(true);
-
-            Array & lat5 = dynamic_cast < Array & >(**(sst5.map_begin() + 1));
-            dods_float64 tmp_lat5[5] = { 20, 10, 0, -10, -20 };
-            lat5.val2buf(tmp_lat5);
-            lat5.set_read_p(true);
-
-            dods_byte tmp_data5[15][5] =
-                { { 0, 1, 2, 3, 4},
-                  { 10,11,12,13,14},
-                  { 20,21,22,23,24},
-                  { 30,31,32,33,34},
-                  { 40,41,42,43,44},
-                  { 100, 101, 102, 103, 104},
-                  { 110, 111, 112, 113, 114},
-                  { 120, 121, 122, 123, 124},
-                  { 130, 131, 132, 133, 134},
-                  { 140, 141, 142, 143, 144},
-                  { 200, 201, 202, 203, 204},
-                  { 210, 211, 212, 213, 214},
-                  { 220, 221, 222, 223, 224},
-                  { 230, 231, 232, 233, 234},
-                  { 240, 241, 242, 243, 244}  } ;
-            sst5.get_array()->val2buf((void*)tmp_data5);
-            sst5.get_array()->set_read_p(true);
-            DBG2(sst5.print_val(stderr));
-        }
-
-        catch (Error & e) {
-            cerr << "SetUp: " << e.get_error_message() << endl;
-            throw;
-        }
-    }
-
-    void tearDown()
-    {
-        delete geo_dds;
-    delete geo_dds_3d;
-    delete geo_dds_coads_lon;
-
-    }
-
-    CPPUNIT_TEST_SUITE( GridGeoConstraintTest );
-
-#if 1
-    CPPUNIT_TEST(geoconstraint_build_lat_lon_maps_test);
-    CPPUNIT_TEST(lat_lon_dimensions_ok_test);
-    CPPUNIT_TEST(transform_longitude_to_pos_notation_test);
-    CPPUNIT_TEST(find_longitude_indeces_test);
-    CPPUNIT_TEST(categorize_latitude_test);
-    CPPUNIT_TEST(find_latitude_indeces_test);
-    CPPUNIT_TEST(set_array_using_double_test);
-    CPPUNIT_TEST(reorder_longitude_map_test);
-    // See the comment at the function...
-    // CPPUNIT_TEST(reorder_data_longitude_axis_test);
-    CPPUNIT_TEST(set_bounding_box_test1);
-    CPPUNIT_TEST(set_bounding_box_test2);
-    CPPUNIT_TEST(set_bounding_box_test3);
-    CPPUNIT_TEST(set_bounding_box_test4);
-    CPPUNIT_TEST(set_bounding_box_test5);
-    CPPUNIT_TEST(set_bounding_box_test6);
-    CPPUNIT_TEST(set_bounding_box_test7);
-    CPPUNIT_TEST(apply_constriant_to_data_test);
-    CPPUNIT_TEST(apply_constriant_to_data_test2);
-    CPPUNIT_TEST(apply_constriant_to_data_test3);
-    CPPUNIT_TEST(apply_constriant_to_data_test4);
-#endif
-    CPPUNIT_TEST(apply_constriant_to_data_test_three_arg);
-    CPPUNIT_TEST(apply_constriant_to_data_test2_three_arg);
-    CPPUNIT_TEST(apply_constriant_to_data_test3_three_arg);
-    CPPUNIT_TEST(apply_constriant_to_data_test4_three_arg);
-
-    CPPUNIT_TEST_SUITE_END();
-
-    void geoconstraint_build_lat_lon_maps_test()
-    {
-        try {
-            Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-            CPPUNIT_ASSERT(g);
-            GridGeoConstraint gc1(g);
-            CPPUNIT_ASSERT(gc1.build_lat_lon_maps());
-
-            g = dynamic_cast<Grid*>(geo_dds->var("SST2"));
-            CPPUNIT_ASSERT(g);
-            GridGeoConstraint gc2(g);
-            CPPUNIT_ASSERT(gc2.build_lat_lon_maps());
-
-            g = dynamic_cast<Grid*>(geo_dds->var("SST3"));
-            CPPUNIT_ASSERT(g);
-            GridGeoConstraint gc3(g);
-            CPPUNIT_ASSERT(gc3.build_lat_lon_maps());
-
-            g = dynamic_cast<Grid*>(geo_dds_3d->var("SST4"));
-            CPPUNIT_ASSERT(g);
-            GridGeoConstraint gc4(g);
-            CPPUNIT_ASSERT(gc4.build_lat_lon_maps());
-            CPPUNIT_ASSERT(gc4.d_latitude == *(g->map_begin()+2));
-            CPPUNIT_ASSERT(gc4.d_longitude == *(g->map_begin()+1));
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"build_lat_lon_maps_test() failed");
-        }
-    }
-
-    void lat_lon_dimensions_ok_test()
-    {
-        try {
-            Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-            CPPUNIT_ASSERT(g);
-            GridGeoConstraint gc1(g);
-            CPPUNIT_ASSERT(gc1.build_lat_lon_maps());
-            CPPUNIT_ASSERT(gc1.lat_lon_dimensions_ok());
-            CPPUNIT_ASSERT(gc1.is_longitude_rightmost() == false);
-
-            Grid *g3 = dynamic_cast<Grid*>(geo_dds->var("SST3"));
-            CPPUNIT_ASSERT(g3);
-            GridGeoConstraint gc3(g3);
-            CPPUNIT_ASSERT(gc3.build_lat_lon_maps());
-            CPPUNIT_ASSERT(gc3.lat_lon_dimensions_ok());
-            CPPUNIT_ASSERT(gc3.is_longitude_rightmost() == true);
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"lat_lon_dimensions_ok_test() failed");
-        }
-    }
-
-    void transform_longitude_to_pos_notation_test()
-    {
-        try {
-            Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST2"));
-            CPPUNIT_ASSERT(g);
-            GridGeoConstraint gc2(g);
-            CPPUNIT_ASSERT(gc2.build_lat_lon_maps());
-
-            CPPUNIT_ASSERT(gc2.d_lon[0] == 0);
-            CPPUNIT_ASSERT(gc2.d_lon[gc2.d_lon_length-1] == -1);
-
-            GeoConstraint::Notation map_notation
-            = gc2.categorize_notation(gc2.d_lon[0], gc2.d_lon[gc2.d_lon_length-1]);
-            CPPUNIT_ASSERT(map_notation == GeoConstraint::neg_pos);
-
-            gc2.transform_longitude_to_pos_notation();
-            DBG(cerr << "gc2.d_lon[0]: " << gc2.d_lon[0] << endl);
-            CPPUNIT_ASSERT(gc2.d_lon[0] == 0);
-            DBG(cerr << "gc2.d_lon[gc2.d_lon_length-1]: " << gc2.d_lon[gc2.d_lon_length-1] << endl);
-            CPPUNIT_ASSERT(gc2.d_lon[gc2.d_lon_length-1] == 359);
-
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"transform_map_to_pos_notation_test() failed");
-        }
-    }
-
-    void find_longitude_indeces_test()
-    {
-	try {
-	    //  { 0, 40, 80, 120, 160, 200, 240, 280, 320, 359 };
-        Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-        CPPUNIT_ASSERT(g);
-        GridGeoConstraint gc1(g);
-
-        int left_i, right_i;
-        gc1.find_longitude_indeces(40.0, 200.0, left_i, right_i);
-        CPPUNIT_ASSERT(left_i == 1);
-        CPPUNIT_ASSERT(right_i == 5);
-
-        g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-        CPPUNIT_ASSERT(g);
-        GridGeoConstraint gc2(g);
-
-        gc2.find_longitude_indeces(200, 40.0, left_i, right_i);
-        CPPUNIT_ASSERT(left_i == 5);
-        CPPUNIT_ASSERT(right_i == 1);
-
-        g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-        CPPUNIT_ASSERT(g);
-        GridGeoConstraint gc3(g);
-
-        gc3.find_longitude_indeces(5.0, 81.0, left_i, right_i);
-        DBG(cerr << "left_i: " << left_i << endl);
-        DBG(cerr << "right_i: " << right_i << endl);
-        CPPUNIT_ASSERT(left_i == 0);
-        CPPUNIT_ASSERT(right_i == 3);
-
-        g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-        CPPUNIT_ASSERT(g);
-        GridGeoConstraint gc4(g);
-
-        gc4.find_longitude_indeces(81.0, 5.0, left_i, right_i);
-        DBG(cerr << "left_i: " << left_i << endl);
-        DBG(cerr << "right_i: " << right_i << endl);
-        CPPUNIT_ASSERT(left_i == 2);
-        CPPUNIT_ASSERT(right_i == 1);
-
-	    // lon: { 41, 81, 121, 161, 201, 241, 281, 321, 361, 365, 370, 375, 380, 385, 390 };
-        g = dynamic_cast<Grid*>(geo_dds_coads_lon->var("SST5"));
-        CPPUNIT_ASSERT(g);
-        GridGeoConstraint gc5(g);
-
-        gc5.find_longitude_indeces(5.0, 81.0, left_i, right_i);
-        DBG(cerr << "left_i: " << left_i << endl);
-        DBG(cerr << "right_i: " << right_i << endl);
-        CPPUNIT_ASSERT(left_i == 9);
-        CPPUNIT_ASSERT(right_i == 1);
-
-        g = dynamic_cast<Grid*>(geo_dds_coads_lon->var("SST5"));
-        CPPUNIT_ASSERT(g);
-        GridGeoConstraint gc6(g);
-
-        gc6.find_longitude_indeces(81.0, 5.0, left_i, right_i);
-        DBG(cerr << "left_i: " << left_i << endl);
-        DBG(cerr << "right_i: " << right_i << endl);
-        CPPUNIT_ASSERT(left_i == 1);
-        CPPUNIT_ASSERT(right_i == 9);
-	}
-	catch (Error &e) {
-	    CPPUNIT_FAIL(e.get_error_message());
-	}
-    }
-
-    void categorize_latitude_test()
-    {
-        Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-        CPPUNIT_ASSERT(g);
-        GridGeoConstraint gc1(g);
-
-        CPPUNIT_ASSERT(gc1.categorize_latitude() == GeoConstraint::normal);
-
-        Grid *g3 = dynamic_cast<Grid*>(geo_dds->var("SST3"));
-        CPPUNIT_ASSERT(g3);
-        GridGeoConstraint gc3(g3);
-
-        CPPUNIT_ASSERT(gc3.categorize_latitude() == GeoConstraint::inverted);
-    }
-
-    void find_latitude_indeces_test()
-    {
-        // SST1 lat: { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-        Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-        int top_i, bottom_i;
-
-        CPPUNIT_ASSERT(g);
-
-        GridGeoConstraint gc0(g);
-        gc0.find_latitude_indeces(20, -20, GeoConstraint::normal, top_i, bottom_i);
-        DBG(cerr << "SST1, top: " << top_i << ", bottom: " << bottom_i << endl);
-        CPPUNIT_ASSERT(top_i == 2);
-        CPPUNIT_ASSERT(bottom_i == 6);
-
-        // SST1 lat: { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-        GridGeoConstraint gc1(g);
-        gc1.find_latitude_indeces(35, 5, GeoConstraint::normal, top_i, bottom_i);
-        DBG(cerr << "SST1, top: " << top_i << ", bottom: " << bottom_i << endl);
-        CPPUNIT_ASSERT(top_i == 0);
-        CPPUNIT_ASSERT(bottom_i == 4);
-
-        // SST1 lat: { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-        GridGeoConstraint gc2(g);
-        gc2.find_latitude_indeces(25, -25, GeoConstraint::normal, top_i, bottom_i);
-        DBG(cerr << "SST1, top: " << top_i << ", bottom: " << bottom_i << endl);
-        CPPUNIT_ASSERT(top_i == 1);
-        CPPUNIT_ASSERT(bottom_i == 7);
-
-        // SST1 lat: { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-        GridGeoConstraint gc3(g);
-        gc3.find_latitude_indeces(-15, -35, GeoConstraint::normal, top_i, bottom_i);
-        DBG(cerr << "SST1, top: " << top_i << ", bottom: " << bottom_i << endl);
-        CPPUNIT_ASSERT(top_i == 5);
-        CPPUNIT_ASSERT(bottom_i == 8);
-
-        // SST3 lat: { -40, -30, -20, -10, 0, 10, 20, 30, 40, 50 };
-        g = dynamic_cast<Grid*>(geo_dds->var("SST3"));
-        CPPUNIT_ASSERT(g);
-
-        GridGeoConstraint gc4(g);
-        gc4.find_latitude_indeces(20, -20, GeoConstraint::inverted, top_i, bottom_i);
-        DBG(cerr << "SST3, top: " << top_i << ", bottom: " << bottom_i << endl);
-        CPPUNIT_ASSERT(top_i == 6);
-        CPPUNIT_ASSERT(bottom_i == 2);
-
-        // SST3 lat: { -40, -30, -20, -10, 0, 10, 20, 30, 40, 50 };
-        GridGeoConstraint gc5(g);
-        gc5.find_latitude_indeces(35, 5, GeoConstraint::inverted, top_i, bottom_i);
-        DBG(cerr << "SST3, top: " << top_i << ", bottom: " << bottom_i << endl);
-        CPPUNIT_ASSERT(top_i == 8);
-        CPPUNIT_ASSERT(bottom_i == 4);
-
-        // SST3 lat: { -40, -30, -20, -10, 0, 10, 20, 30, 40, 50 };
-        GridGeoConstraint gc6(g);
-        gc6.find_latitude_indeces(-5, -35, GeoConstraint::inverted, top_i, bottom_i);
-        DBG(cerr << "SST3, top: " << top_i << ", bottom: " << bottom_i << endl);
-        CPPUNIT_ASSERT(top_i == 4);
-        CPPUNIT_ASSERT(bottom_i == 0);
-
-        // SST3 lat: { -40, -30, -20, -10, 0, 10, 20, 30, 40, 50 };
-        GridGeoConstraint gc7(g);
-        gc7.find_latitude_indeces(25, -25, GeoConstraint::inverted, top_i, bottom_i);
-        DBG(cerr << "SST3, top: " << top_i << ", bottom: " << bottom_i << endl);
-        CPPUNIT_ASSERT(top_i == 7);
-        CPPUNIT_ASSERT(bottom_i == 1);
-    }
-
-    void set_array_using_double_test()
-    {
-        try {
-            Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-            Array *lon = dynamic_cast<Array*>(*g->map_begin());
-            double ten_values[10] = {-1,1,2,3,4,5,6,7,8,9};
-            set_array_using_double(lon, ten_values, 10);
-            CPPUNIT_ASSERT(extract_double_value(lon->var(0)) == ten_values[0]);
-            CPPUNIT_ASSERT(extract_double_value(lon->var(9)) == ten_values[9]);
-
-            Int32 *i = new Int32("");
-            Array *a = new Array("", i);
-            a->append_dim(10);
-            int dummy_values[10] = {10,11,12,13,14,15,16,17,18,19};
-            a->val2buf((void*)dummy_values);
-            a->set_read_p(true);
-            CPPUNIT_ASSERT(extract_double_value(a->var(0)) == 10.0);
-            CPPUNIT_ASSERT(extract_double_value(a->var(9)) == 19.0);
-            set_array_using_double(a, ten_values, 10);
-            CPPUNIT_ASSERT(extract_double_value(a->var(0)) == ten_values[0]);
-            CPPUNIT_ASSERT(extract_double_value(a->var(9)) == ten_values[9]);
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"Error in set_array_using_double_test.");
-        }
-    }
-
-    void reorder_longitude_map_test()
-    {
-        Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-        CPPUNIT_ASSERT(g);
-        GridGeoConstraint gc1(g);
-        // Longitude map: { 0, 40, 80, 120, 160, 200, 240, 280, 320, 359 }
-
-        gc1.reorder_longitude_map(7);
-
-        CPPUNIT_ASSERT(gc1.d_lon[0] == 280);
-        CPPUNIT_ASSERT(gc1.d_lon[2] == 359);
-        CPPUNIT_ASSERT(gc1.d_lon[3] == 0);
-        CPPUNIT_ASSERT(gc1.d_lon[6] == 120);
-        CPPUNIT_ASSERT(gc1.d_lon[9] == 240);
-    }
-#if 0
-    // This test is broken because reorder...() uses read and I haven't worked
-    // out how to get the data used here into the grid so that read() called
-    // elsewhere will return it. Might try using the series_values property to
-    // create a predictable set of values...
-    void reorder_data_longitude_axis_test()
-    {
-        try {
-            Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-            CPPUNIT_ASSERT(g);
-            GridGeoConstraint gc1(g);
-            /* Data values for Grid SST1:
-                    { { 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,41,42,43,44,45,46,47,48,49},
-                      { 50,51,52,53,54,55,56,57,58,59},
-                      { 60,61,62,63,64,65,66,67,68,69},
-                      { 70,71,72,73,74,75,76,77,78,79},
-                      { 80,81,82,83,84,85,86,87,88,89},
-                      { 90,91,92,93,94,95,96,97,98,99} };
-            */
-            gc1.d_longitude_index_left = 5;
-            gc1.d_longitude_index_right = 1;
-
-            cerr << "Before gc1.reorder_data_longitude_axis();" << endl;
-            gc1.reorder_data_longitude_axis();
-            cerr << "past gc1.reorder_data_longitude_axis();" << endl;
-
-            // Read the data out into local storage
-            dods_byte *tmp_data2=0;
-            dods_byte **tmp_data2_ptr = &tmp_data2;
-            int size = g->get_array()->buf2val((void**)tmp_data2_ptr);
-            cerr << "size = " << size << endl;
-
-            cerr << "tmp_data2[0]: " << (int)tmp_data2[0] << endl;
-            CPPUNIT_ASSERT(tmp_data2[0] == 5);
-            CPPUNIT_ASSERT(tmp_data2[9] == 4);
-            CPPUNIT_ASSERT(tmp_data2[10] == 15);
-            CPPUNIT_ASSERT(tmp_data2[90] == 95);
-            CPPUNIT_ASSERT(tmp_data2[99] == 94);
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"Error in reorder_data_longitude_axis_test.");
-        }
-    }
-#endif
-
-    void set_bounding_box_test1()
-    {
-        try {
-            // SST1 uses pos notation; constraint uses pos
-            Grid *g = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-            CPPUNIT_ASSERT(g);
-            GridGeoConstraint gc1(g);
-            // lat: { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-            // This should be lon 1 to 5 and lat 0 to 3
-            gc1.set_bounding_box(40.0, 40.0, 10.0, 200.0);
-
-            CPPUNIT_ASSERT(gc1.d_longitude_index_left == 1);
-            CPPUNIT_ASSERT(gc1.d_longitude_index_right == 5);
-
-            CPPUNIT_ASSERT(gc1.d_latitude_index_top == 0);
-            CPPUNIT_ASSERT(gc1.d_latitude_index_bottom == 3);
-
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"Error in set_bounding_box_test.");
-        }
-    }
-
-    void set_bounding_box_test2()
-    {
-        try {
-            Grid *g2 = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-            CPPUNIT_ASSERT(g2);
-            GridGeoConstraint gc2(g2);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            gc2.set_bounding_box(40.0, 40.0, 10.0, -160.0);
-            CPPUNIT_ASSERT(gc2.d_longitude_index_left == 1);
-            CPPUNIT_ASSERT(gc2.d_longitude_index_right == 5);
-
-            CPPUNIT_ASSERT(gc2.d_latitude_index_top == 0);
-            CPPUNIT_ASSERT(gc2.d_latitude_index_bottom == 3);
-
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"Error in set_bounding_box_test.");
-        }
-    }
-
-    void set_bounding_box_test3()
-    {
-        try {
-            Grid *g3 = dynamic_cast<Grid*>(geo_dds_3d->var("SST4"));
-            CPPUNIT_ASSERT(g3);
-            GridGeoConstraint gc3(g3);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            gc3.set_bounding_box(30.0, 200.0, 20.0, 280.0);
-            CPPUNIT_ASSERT(gc3.d_longitude_index_left == 1);
-            CPPUNIT_ASSERT(gc3.d_longitude_index_right == 3);
-
-            CPPUNIT_ASSERT(gc3.d_latitude_index_top == 1);
-            CPPUNIT_ASSERT(gc3.d_latitude_index_bottom == 2);
-
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"Error in set_bounding_box_test.");
-        }
-    }
-
-    void set_bounding_box_test4()
-    {
-        // lon: { 160, 200, 240, 280, 320 }
-        // lat: { 40, 30, 20, 10, 0 }
-        try {
-            Grid *g3 = dynamic_cast<Grid*>(geo_dds_3d->var("SST4"));
-            CPPUNIT_ASSERT(g3);
-            GridGeoConstraint gc3(g3);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            gc3.set_bounding_box(30.0, 0, 20.0, 150);
-            CPPUNIT_ASSERT(!"Should fail since the BB box contains no data");
-
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT("Caught Error.");
-        }
-    }
-
-    void set_bounding_box_test5()
-    {
-        // lon: { 160, 200, 240, 280, 320 }
-        // lat: { 40, 30, 20, 10, 0 }
-        try {
-            Grid *g3 = dynamic_cast<Grid*>(geo_dds_3d->var("SST4"));
-            CPPUNIT_ASSERT(g3);
-            GridGeoConstraint gc3(g3);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            gc3.set_bounding_box(30.0, 0, 20.0, 170);
-            CPPUNIT_ASSERT("Should not fail since the BB box contains data");
-
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"Should not throw Error.");
-        }
-    }
-
-    void set_bounding_box_test6()
-    {
-        // lon: { 160, 200, 240, 280, 320 }
-        // lat: { 40, 30, 20, 10, 0 }
-        try {
-            Grid *g3 = dynamic_cast<Grid*>(geo_dds_3d->var("SST4"));
-            CPPUNIT_ASSERT(g3);
-            GridGeoConstraint gc3(g3);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            gc3.set_bounding_box(60.0, 170, 50.0, 270);
-            CPPUNIT_FAIL("Should fail since the BB box contains no data");
-
-        }
-        catch (Error &e) {
-            DBG(cerr << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_ASSERT("Cought Error.");
-        }
-    }
-
-    void set_bounding_box_test7()
-    {
-        // lon: 20 --> 359
-        // lat: { -40, -30, -20, -10, 0, 10, 20, 30, 40, 50 };
-        try {
-            Grid *g3 = dynamic_cast<Grid*>(geo_dds->var("SST3"));
-            CPPUNIT_ASSERT(g3);
-            GridGeoConstraint gc3(g3);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            gc3.set_bounding_box(70.0, 170, 60.0, 270);
-            CPPUNIT_ASSERT(!"Should fail since the BB box contains no data");
-
-        }
-        catch (Error &e) {
-            DBG(cerr << "Error: " << e.get_error_message() << endl);
-            CPPUNIT_ASSERT("Cought Error.");
-        }
-    }
-
-    void apply_constriant_to_data_test()
-    {
-        try {
-            Grid *g2 = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-            CPPUNIT_ASSERT(g2);
-            g2->set_send_p(true);
-
-            DBG(g2->print_decl(cerr, "    ", true, false, true));
-            DBG(g2->print_val(cerr, "    ", false));
-            DBG(cerr << endl << endl);
-
-            GridGeoConstraint gc2(g2);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            // This should result in a constraint lat from 5 to 8 and
-            // from lon 1 to 5
-            gc2.set_bounding_box(30, 40, 10, 120);
-
-            /* lat: { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-               lon: { 0, 40, 80, 120, 160, 200, 240, 280, 320, 359 };
-
-               Data values for Grid SST1:
-                    { { 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,41,42,43,44,45,46,47,48,49},
-                      { 50,51,52,53,54,55,56,57,58,59},
-                      { 60,61,62,63,64,65,66,67,68,69},
-                      { 70,71,72,73,74,75,76,77,78,79},
-                      { 80,81,82,83,84,85,86,87,88,89},
-                      { 90,91,92,93,94,95,96,97,98,99} };
-            */
-
-            gc2.apply_constraint_to_data();
-
-            CPPUNIT_ASSERT(gc2.d_latitude->length() == 3);
-            CPPUNIT_ASSERT(gc2.d_longitude->length() == 3);
-
-            double *lats = 0;
-            double **lats_ptr = &lats;
-            gc2.d_latitude->buf2val((void**)lats_ptr);
-            CPPUNIT_ASSERT(lats[0] == 30.0);
-            CPPUNIT_ASSERT(lats[2] == 10.0);
-
-            double *lons = 0;
-            double **lons_ptr = &lons;
-            gc2.d_longitude->buf2val((void**)lons_ptr);
-            CPPUNIT_ASSERT(lons[0] == 40.0);
-            CPPUNIT_ASSERT(lons[2] == 120.0);
-
-            DBG(gc2.get_constrained_grid()->print_decl(cerr, "    ", true, false, true));
-            DBG(gc2.get_constrained_grid()->print_val(cerr, "    ", false));
-            DBG(cerr << endl << endl);
-        }
-        catch (Error &e) {
-            CPPUNIT_FAIL(e.get_error_message());
-        }
-    }
-
-    void apply_constriant_to_data_test_three_arg()
-    {
-        try {
-            Grid *g2 = dynamic_cast<Grid*>(geo_dds->var("SST1"));
-            CPPUNIT_ASSERT(g2);
-            g2->set_send_p(true);
-
-            DBG(g2->print_decl(cerr, "    ", true, false, true));
-            DBG(g2->print_val(cerr, "    ", false));
-            DBG(cerr << endl << endl);
-
-            Array *lat2 = dynamic_cast<Array*>(geo_dds->var("SST1.lat"));
-            CPPUNIT_ASSERT(lat2);
-            Array *lon2 = dynamic_cast<Array*>(geo_dds->var("SST1.lon"));
-            CPPUNIT_ASSERT(lon2);
-
-            GridGeoConstraint gc2(g2, lat2, lon2);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            // This should result in a constraint lat from 5 to 8 and
-            // from lon 1 to 5
-            gc2.set_bounding_box(30, 40, 10, 120);
-
-            /* lat: { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-               lon: { 0, 40, 80, 120, 160, 200, 240, 280, 320, 359 };
-
-               Data values for Grid SST1:
-                    { { 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,41,42,43,44,45,46,47,48,49},
-                      { 50,51,52,53,54,55,56,57,58,59},
-                      { 60,61,62,63,64,65,66,67,68,69},
-                      { 70,71,72,73,74,75,76,77,78,79},
-                      { 80,81,82,83,84,85,86,87,88,89},
-                      { 90,91,92,93,94,95,96,97,98,99} };
-            */
-
-            gc2.apply_constraint_to_data();
-
-            CPPUNIT_ASSERT(gc2.d_latitude->length() == 3);
-            CPPUNIT_ASSERT(gc2.d_longitude->length() == 3);
-
-            double *lats = 0;
-            double **lats_ptr = &lats;
-            gc2.d_latitude->buf2val((void**)lats_ptr);
-            CPPUNIT_ASSERT(lats[0] == 30.0);
-            CPPUNIT_ASSERT(lats[2] == 10.0);
-
-            double *lons = 0;
-            double **lons_ptr = &lons;
-            gc2.d_longitude->buf2val((void**)lons_ptr);
-            CPPUNIT_ASSERT(lons[0] == 40.0);
-            CPPUNIT_ASSERT(lons[2] == 120.0);
-
-            DBG(gc2.get_constrained_grid()->print_decl(cerr, "    ", true, false, true));
-            DBG(gc2.get_constrained_grid()->print_val(cerr, "    ", false));
-            DBG(cerr << endl << endl);
-        }
-        catch (Error &e) {
-            CPPUNIT_FAIL(e.get_error_message());
-        }
-    }
-
-    void apply_constriant_to_data_test2()
-    {
-        try {
-            Grid *g = dynamic_cast<Grid*>(geo_dds_3d->var("SST4"));
-            CPPUNIT_ASSERT(g);
-            g->set_send_p(true);
-
-            GridGeoConstraint gc(g);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            // This should result in a constraint from lon 1 to 5 and lat from
-            // 5 to 8
-            gc.set_bounding_box(30.0, 200.0, 20.0, 280.0);
-
-            /* time[3] = { 0, 1, 2 };
-               lon4[5] = { 160, 200, 240, 280, 320 };
-               lat4[5] = { 40, 30, 20, 10, 0 };
-                dods_byte tmp_data4[3][5][5] =
-                    {
-                      { { 0, 1, 2, 3, 4},
-                        { 10,11,12,13,14},
-                        { 20,21,22,23,24},
-                        { 30,31,32,33,34},
-                        { 40,41,42,43,44}  },
-                      { { 100, 101, 102, 103, 104},
-                        { 110, 111, 112, 113, 114},
-                        { 120, 121, 122, 123, 124},
-                        { 130, 131, 132, 133, 134},
-                        { 140, 141, 142, 143, 144}  },
-                      { { 200, 201, 202, 203, 204},
-                        { 210, 211, 212, 213, 214},
-                        { 220, 221, 222, 223, 224},
-                        { 230, 231, 232, 233, 234},
-                        { 240, 241, 242, 243, 244}  }
-                    };
-            */
-
-            gc.apply_constraint_to_data();
-
-            CPPUNIT_ASSERT(gc.d_latitude->length() == 2);
-            CPPUNIT_ASSERT(gc.d_longitude->length() == 3);
-
-            double *lats = 0;
-            double **lats_ptr = &lats;
-            gc.d_latitude->buf2val((void**)lats_ptr);
-            CPPUNIT_ASSERT(lats[0] == 30.0);
-            CPPUNIT_ASSERT(lats[1] == 20.0);
-
-            double *lons = 0;
-            double **lons_ptr = &lons;
-            gc.d_longitude->buf2val((void**)lons_ptr);
-            CPPUNIT_ASSERT(lons[0] == 200.0);
-            CPPUNIT_ASSERT(lons[2] == 280.0);
-#ifdef DODS_DEBUG
-            gc.get_constrained_grid()->print_decl(cerr, "    ", true, false, true);
-            gc.get_constrained_grid()->print_val(cerr, "    ", false);
-            cerr << endl << endl;
-#endif
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"apply_constriant_to_data_test caught Error");
-        }
-    }
-
-    void apply_constriant_to_data_test2_three_arg()
-    {
-        try {
-            Grid *g = dynamic_cast<Grid*>(geo_dds_3d->var("SST4"));
-            CPPUNIT_ASSERT(g);
-            g->set_send_p(true);
-
-            Array *lat = dynamic_cast<Array*>(geo_dds_3d->var("SST4.lat"));
-            CPPUNIT_ASSERT(lat);
-            Array *lon = dynamic_cast<Array*>(geo_dds_3d->var("SST4.lon"));
-            CPPUNIT_ASSERT(lon);
-
-            GridGeoConstraint gc(g, lat, lon);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            // This should result in a constraint from lon 1 to 5 and lat from
-            // 5 to 8
-            gc.set_bounding_box(30.0, 200.0, 20.0, 280.0);
-
-            /* time[3] = { 0, 1, 2 };
-               lon4[5] = { 160, 200, 240, 280, 320 };
-               lat4[5] = { 40, 30, 20, 10, 0 };
-                dods_byte tmp_data4[3][5][5] =
-                    {
-                      { { 0, 1, 2, 3, 4},
-                        { 10,11,12,13,14},
-                        { 20,21,22,23,24},
-                        { 30,31,32,33,34},
-                        { 40,41,42,43,44}  },
-                      { { 100, 101, 102, 103, 104},
-                        { 110, 111, 112, 113, 114},
-                        { 120, 121, 122, 123, 124},
-                        { 130, 131, 132, 133, 134},
-                        { 140, 141, 142, 143, 144}  },
-                      { { 200, 201, 202, 203, 204},
-                        { 210, 211, 212, 213, 214},
-                        { 220, 221, 222, 223, 224},
-                        { 230, 231, 232, 233, 234},
-                        { 240, 241, 242, 243, 244}  }
-                    };
-            */
-
-            gc.apply_constraint_to_data();
-
-            CPPUNIT_ASSERT(gc.d_latitude->length() == 2);
-            CPPUNIT_ASSERT(gc.d_longitude->length() == 3);
-
-            double *lats = 0;
-            double **lats_ptr = &lats;
-            gc.d_latitude->buf2val((void**)lats_ptr);
-            CPPUNIT_ASSERT(lats[0] == 30.0);
-            CPPUNIT_ASSERT(lats[1] == 20.0);
-
-            double *lons = 0;
-            double **lons_ptr = &lons;
-            gc.d_longitude->buf2val((void**)lons_ptr);
-            CPPUNIT_ASSERT(lons[0] == 200.0);
-            CPPUNIT_ASSERT(lons[2] == 280.0);
-#ifdef DODS_DEBUG
-            gc.get_constrained_grid()->print_decl(cerr, "    ", true, false, true);
-            gc.get_constrained_grid()->print_val(cerr, "    ", false);
-            cerr << endl << endl;
-#endif
-        }
-        catch (Error &e) {
-            cerr << "Error: " << e.get_error_message() << endl;
-            CPPUNIT_ASSERT(!"apply_constriant_to_data_test caught Error");
-        }
-    }
-
-    // This tests the 'stitch' feature of the GridGeoConstraint/GeoConstraint
-    void apply_constriant_to_data_test3()
-    {
-        try {
-            Grid *g2 = dynamic_cast<Grid*>(geo_dds->var("SST3"));
-            CPPUNIT_ASSERT(g2);
-            g2->set_send_p(true);
-
-            GridGeoConstraint gc2(g2);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            // This should result in a constraint lat from 5 to 8 and
-            // from lon 1 to 5
-            gc2.set_bounding_box(30, 300, 30, 60);
-
-            /* lat:  { -40, -30, -20, -10, 0, 10, 20, 30, 40, 50 };
-               lon: { 20, 60, 100, 140, 180, 220, 260, 300, 340, 379 };
-
-               Data values for Grid SST1:
-                    { { 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,41,42,43,44,45,46,47,48,49},
-                      { 50,51,52,53,54,55,56,57,58,59},
-                      { 60,61,62,63,64,65,66,67,68,69},
-                      { 70,71,72,73,74,75,76,77,78,79},
-                      { 80,81,82,83,84,85,86,87,88,89},
-                      { 90,91,92,93,94,95,96,97,98,99} };
-            */
-
-            gc2.apply_constraint_to_data();
-
-            DBG(cerr << "gc2.d_latitude->length(): " << gc2.d_latitude->length() << endl);
-            DBG(cerr << "gc2.d_longitude->length(): " << gc2.d_longitude->length() << endl);
-
-            double *lats = 0;
-            double **lats_ptr = &lats;
-            gc2.d_latitude->buf2val((void**)lats_ptr);
-            DBG(cerr << "lats[0]: " << lats[0] << endl);
-
-            double *lons = 0;
-            double **lons_ptr = &lons;
-            gc2.d_longitude->buf2val((void**)lons_ptr);
-            DBG(cerr << "lons[0]: " << lons[0] << endl);
-            DBG(cerr << "lons[gc2.d_longitude->length()-1]: " << lons[gc2.d_longitude->length()-1] << endl);
-            //CPPUNIT_ASSERT(lons[0] == 260.0);
-            //CPPUNIT_ASSERT(lons[4] == 20.0);
-
-            CPPUNIT_ASSERT(gc2.d_latitude->length() == 1);
-            CPPUNIT_ASSERT(gc2.d_longitude->length() == 5);
-
-            CPPUNIT_ASSERT(lats[0] == 30.0);
-
-            CPPUNIT_ASSERT(lons[0] == 300.0);
-            CPPUNIT_ASSERT(lons[4] == 60.0);
-#ifdef DODS_DEBUG
-            gc2.get_constrained_grid()->print_decl(cerr, "    ", true, false, true);
-            gc2.get_constrained_grid()->print_val(cerr, "    ", false);
-            cerr << endl << endl;
-#endif
-        }
-        catch (Error &e) {
-            CPPUNIT_FAIL(e.get_error_message());
-        }
-    }
-
-    // This tests the 'stitch' feature of the GridGeoConstraint/GeoConstraint
-    void apply_constriant_to_data_test3_three_arg()
-    {
-        try {
-            Grid *g2 = dynamic_cast<Grid*>(geo_dds->var("SST3"));
-            CPPUNIT_ASSERT(g2);
-            g2->set_send_p(true);
-
-            Array *lat2 = dynamic_cast<Array*>(geo_dds->var("SST3.lat"));
-            CPPUNIT_ASSERT(lat2);
-            Array *lon2 = dynamic_cast<Array*>(geo_dds->var("SST3.lon"));
-            CPPUNIT_ASSERT(lon2);
-
-            GridGeoConstraint gc2(g2, lat2, lon2);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            // This should result in a constraint lat from 5 to 8 and
-            // from lon 1 to 5
-            gc2.set_bounding_box(30, 300, 30, 60);
-
-            /* lat:  { -40, -30, -20, -10, 0, 10, 20, 30, 40, 50 };
-               lon: { 20, 60, 100, 140, 180, 220, 260, 300, 340, 379 };
-
-               Data values for Grid SST1:
-                    { { 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,41,42,43,44,45,46,47,48,49},
-                      { 50,51,52,53,54,55,56,57,58,59},
-                      { 60,61,62,63,64,65,66,67,68,69},
-                      { 70,71,72,73,74,75,76,77,78,79},
-                      { 80,81,82,83,84,85,86,87,88,89},
-                      { 90,91,92,93,94,95,96,97,98,99} };
-            */
-
-            gc2.apply_constraint_to_data();
-
-            DBG(cerr << "gc2.d_latitude->length(): " << gc2.d_latitude->length() << endl);
-            DBG(cerr << "gc2.d_longitude->length(): " << gc2.d_longitude->length() << endl);
-
-            double *lats = 0;
-            double **lats_ptr = &lats;
-            gc2.d_latitude->buf2val((void**)lats_ptr);
-            DBG(cerr << "lats[0]: " << lats[0] << endl);
-
-            double *lons = 0;
-            double **lons_ptr = &lons;
-            gc2.d_longitude->buf2val((void**)lons_ptr);
-            DBG(cerr << "lons[0]: " << lons[0] << endl);
-            DBG(cerr << "lons[gc2.d_longitude->length()-1]: " << lons[gc2.d_longitude->length()-1] << endl);
-            //CPPUNIT_ASSERT(lons[0] == 260.0);
-            //CPPUNIT_ASSERT(lons[4] == 20.0);
-
-            CPPUNIT_ASSERT(gc2.d_latitude->length() == 1);
-            CPPUNIT_ASSERT(gc2.d_longitude->length() == 5);
-
-            CPPUNIT_ASSERT(lats[0] == 30.0);
-
-            CPPUNIT_ASSERT(lons[0] == 300.0);
-            CPPUNIT_ASSERT(lons[4] == 60.0);
-#ifdef DODS_DEBUG
-            gc2.get_constrained_grid()->print_decl(cerr, "    ", true, false, true);
-            gc2.get_constrained_grid()->print_val(cerr, "    ", false);
-            cerr << endl << endl;
-#endif
-        }
-        catch (Error &e) {
-            CPPUNIT_FAIL(e.get_error_message());
-        }
-    }
-
-    // This tests the 'stitch' feature of the GridGeoConstraint/GeoConstraint
-    void apply_constriant_to_data_test4()
-    {
-        try {
-            Grid *g2 = dynamic_cast<Grid*>(geo_dds->var("SST1_1"));
-            CPPUNIT_ASSERT(g2);
-            g2->set_send_p(true);
-
-            GridGeoConstraint gc2(g2);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            // This should result in a constraint lat from 5 to 8 and
-            // from lon 1 to 5
-            gc2.set_bounding_box(30, 280, 30, 40);
-
-            /* lat: { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-	       lon: { 0, 40, 80, 120, 160, 200, 240, 280, 320, 359 };
-               Data values for Grid SST1_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,41,42,43,44,45,46,47,48,49},
-                      { 50,51,52,53,54,55,56,57,58,59},
-                      { 60,61,62,63,64,65,66,67,68,69},
-                      { 70,71,72,73,74,75,76,77,78,79},
-                      { 80,81,82,83,84,85,86,87,88,89},
-                      { 90,91,92,93,94,95,96,97,98,99} };
-            */
-
-            gc2.apply_constraint_to_data();
-
-            DBG(cerr << "gc2.d_latitude->length(): " << gc2.d_latitude->length() << endl);
-            DBG(cerr << "gc2.d_longitude->length(): " << gc2.d_longitude->length() << endl);
-
-            double *lats = 0;
-            double **lats_ptr = &lats;
-            gc2.d_latitude->buf2val((void**)lats_ptr);
-            DBG(cerr << "lats[0]: " << lats[0] << endl);
-            //CPPUNIT_ASSERT(lats[3] == -40.0);
-
-            double *lons = 0;
-            double **lons_ptr = &lons;
-            gc2.d_longitude->buf2val((void**)lons_ptr);
-            DBG(cerr << "lons[0]: " << lons[0] << endl);
-            DBG(cerr << "lons[3]: " << lons[4] << endl);
-            //CPPUNIT_ASSERT(lons[0] == 260.0);
-            //CPPUNIT_ASSERT(lons[4] == 20.0);
-
-            CPPUNIT_ASSERT(gc2.d_latitude->length() == 1);
-            CPPUNIT_ASSERT(gc2.d_longitude->length() == 5);
-
-            CPPUNIT_ASSERT(lats[0] == 30.0);
-            //CPPUNIT_ASSERT(lats[3] == -40.0);
-
-            CPPUNIT_ASSERT(lons[0] == 280.0);
-            CPPUNIT_ASSERT(lons[4] == 40.0);
-#ifdef DODS_DEBUG
-            gc2.get_constrained_grid()->print_decl(cerr, "    ", true, false, true);
-            gc2.get_constrained_grid()->print_val(cerr, "    ", false);
-            cerr << endl << endl;
-#endif
-        }
-        catch (Error &e) {
-            CPPUNIT_FAIL(e.get_error_message());
-        }
-    }
-
-    void apply_constriant_to_data_test4_three_arg()
-    {
-        try {
-            Grid *g2 = dynamic_cast<Grid*>(geo_dds->var("SST1_1"));
-            CPPUNIT_ASSERT(g2);
-            g2->set_send_p(true);
-
-            Array *lat2 = dynamic_cast<Array*>(geo_dds->var("SST1_1.lat"));
-            CPPUNIT_ASSERT(lat2);
-            Array *lon2 = dynamic_cast<Array*>(geo_dds->var("SST1_1.lon"));
-            CPPUNIT_ASSERT(lon2);
-
-            GridGeoConstraint gc2(g2, lat2, lon2);
-            // SST1 with a constraint that uses neg_pos notation for lon
-            // This should result in a constraint lat from 5 to 8 and
-            // from lon 1 to 5
-            gc2.set_bounding_box(30, 280, 30, 40);
-
-            /* lat: { 40, 30, 20, 10, 0, -10, -20, -30, -40, -50 };
-	       lon: { 0, 40, 80, 120, 160, 200, 240, 280, 320, 359 };
-               Data values for Grid SST1_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,41,42,43,44,45,46,47,48,49},
-                      { 50,51,52,53,54,55,56,57,58,59},
-                      { 60,61,62,63,64,65,66,67,68,69},
-                      { 70,71,72,73,74,75,76,77,78,79},
-                      { 80,81,82,83,84,85,86,87,88,89},
-                      { 90,91,92,93,94,95,96,97,98,99} };
-            */
-
-            gc2.apply_constraint_to_data();
-
-            DBG(cerr << "gc2.d_latitude->length(): " << gc2.d_latitude->length() << endl);
-            DBG(cerr << "gc2.d_longitude->length(): " << gc2.d_longitude->length() << endl);
-
-            double *lats = 0;
-            double **lats_ptr = &lats;
-            gc2.d_latitude->buf2val((void**)lats_ptr);
-            DBG(cerr << "lats[0]: " << lats[0] << endl);
-            //CPPUNIT_ASSERT(lats[3] == -40.0);
-
-            double *lons = 0;
-            double **lons_ptr = &lons;
-            gc2.d_longitude->buf2val((void**)lons_ptr);
-            DBG(cerr << "lons[0]: " << lons[0] << endl);
-            DBG(cerr << "lons[3]: " << lons[4] << endl);
-            //CPPUNIT_ASSERT(lons[0] == 260.0);
-            //CPPUNIT_ASSERT(lons[4] == 20.0);
-
-            CPPUNIT_ASSERT(gc2.d_latitude->length() == 1);
-            CPPUNIT_ASSERT(gc2.d_longitude->length() == 5);
-
-            CPPUNIT_ASSERT(lats[0] == 30.0);
-            //CPPUNIT_ASSERT(lats[3] == -40.0);
-
-            CPPUNIT_ASSERT(lons[0] == 280.0);
-            CPPUNIT_ASSERT(lons[4] == 40.0);
-#ifdef DODS_DEBUG
-            gc2.get_constrained_grid()->print_decl(cerr, "    ", true, false, true);
-            gc2.get_constrained_grid()->print_val(cerr, "    ", false);
-            cerr << endl << endl;
-#endif
-        }
-        catch (Error &e) {
-            CPPUNIT_FAIL(e.get_error_message());
-        }
-    }
-
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(GridGeoConstraintTest);
-
-} // namespace libdap
-
-int
-main( int, char** )
-{
-    CppUnit::TextTestRunner runner;
-    runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
-
-    bool wasSuccessful = runner.run( "", false ) ;
-
-    return wasSuccessful ? 0 : 1;
-}
diff --git a/unit-tests/HTTPCacheTest.cc b/unit-tests/HTTPCacheTest.cc
index 344ebd3..cff8263 100644
--- a/unit-tests/HTTPCacheTest.cc
+++ b/unit-tests/HTTPCacheTest.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -45,6 +45,7 @@
 #include "RCReader.h"		// ditto
 
 //#define DODS_DEBUG 1
+//#define DODS_DEBUG2 2
 #include "debug.h"
 
 #if defined(DODS_DEBUG) || defined(DODS_DEBUG2)
@@ -70,11 +71,13 @@ file_size(string name)
     return s.st_size;
 }
 
+#if 0
 inline static void
 print_entry(HTTPCache *, HTTPCacheTable::CacheEntry **e)
 {
     cerr << "Entry: " << (*e)->get_cachename() << endl;
 }
+#endif
 
 // Note that because this test class uses the fixture 'hc' we must always
 // force access to the single user/process lock for the cache. This is
@@ -99,7 +102,7 @@ public:
 	putenv((char*)"DODS_CONF=./cache-testsuite/dodsrc");
 	http_conn = new HTTPConnect(RCReader::instance());
 
-	DBG2(cerr << "Entring HTTPCacheTest ctor... ");
+	DBG2(cerr << "Entering HTTPCacheTest ctor... ");
 	hash_value = 656;
 	localhost_url = "http://test.opendap.org/test-304.html";
 	index_file_line = "http://test.opendap.org/test-304.html cache-testsuite/dods_cache/656/dodsKbcD0h \"3f62c-157-139c2680\" 1121283146 -1 343 0 656 1 7351 1121360379 3723 0";
@@ -144,7 +147,7 @@ public:
     }
 
     CPPUNIT_TEST_SUITE(HTTPCacheTest);
-
+#if 1
     CPPUNIT_TEST(constructor_test);
     CPPUNIT_TEST(cache_index_read_test);
     CPPUNIT_TEST(cache_index_parse_line_test);
@@ -162,8 +165,13 @@ public:
     CPPUNIT_TEST(calculate_time_test);
     CPPUNIT_TEST(write_metadata_test);
     CPPUNIT_TEST(cache_response_test);
-
+#endif
+#if 0
+    // This test does not seem to work in New Zealand - maybe because
+    // of the dateline??? jhrg 1/31/13
     CPPUNIT_TEST(is_url_valid_test);
+#endif
+#if 1
     CPPUNIT_TEST(get_cached_response_test);
 
     CPPUNIT_TEST(perform_garbage_collection_test);
@@ -172,8 +180,6 @@ public:
     CPPUNIT_TEST(get_conditional_response_headers_test);
     CPPUNIT_TEST(update_response_test);
     CPPUNIT_TEST(cache_gc_test);
-#if 0
-    CPPUNIT_TEST(interrupt_test);
 #endif
 
     CPPUNIT_TEST_SUITE_END();
diff --git a/unit-tests/HTTPConnectTest.cc b/unit-tests/HTTPConnectTest.cc
index 377d7f8..803ea6a 100644
--- a/unit-tests/HTTPConnectTest.cc
+++ b/unit-tests/HTTPConnectTest.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -114,23 +114,21 @@ class HTTPConnectTest: public TestFixture {
     }
 
     CPPUNIT_TEST_SUITE(HTTPConnectTest);
-#if 1
+
     CPPUNIT_TEST(read_url_test);
     CPPUNIT_TEST(fetch_url_test);
     CPPUNIT_TEST(get_response_headers_test);
     CPPUNIT_TEST(server_version_test);
     CPPUNIT_TEST(type_test);
-#endif
+
     CPPUNIT_TEST(cache_test);
-#if 1
+
     CPPUNIT_TEST(set_accept_deflate_test);
     CPPUNIT_TEST(set_xdap_protocol_test);
     CPPUNIT_TEST(read_url_password_test);
     CPPUNIT_TEST(read_url_password_test2);
-#endif
-#if 0
-    CPPUNIT_TEST(read_url_password_proxy_test);
-#endif
+
+  // CPPUNIT_TEST(read_url_password_proxy_test);
 
     CPPUNIT_TEST_SUITE_END();
 
@@ -188,10 +186,13 @@ class HTTPConnectTest: public TestFixture {
     }
 
     void fetch_url_test() {
+        DBG(cerr << "Entering fetch_url_test" << endl);
         HTTPResponse *stuff = 0;
         char c;
         try {
+            DBG(cerr << "    First request..." << endl;)
             stuff = http->fetch_url(localhost_url);
+            DBG(cerr << "    Back from first request." << endl);
             CPPUNIT_ASSERT(fread(&c, 1, 1, stuff->get_stream()) == 1
                            && !ferror(stuff->get_stream())
                            && !feof(stuff->get_stream()));
@@ -214,6 +215,7 @@ class HTTPConnectTest: public TestFixture {
         // is not called, then a failed test can leave the cache with locked
         // entries
         catch (...) {
+            cerr << "Caught unknown exception" << endl;
             delete stuff; stuff = 0;
             throw;
         }
diff --git a/unit-tests/Keywords2Test.cc b/unit-tests/Keywords2Test.cc
deleted file mode 100644
index c15c67e..0000000
--- a/unit-tests/Keywords2Test.cc
+++ /dev/null
@@ -1,217 +0,0 @@
-
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2006 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-// Tests for the AISResources class.
-
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-//#define DODS_DEBUG
-
-#include "BaseType.h"
-#include "Int32.h"
-#include "Float64.h"
-#include "Str.h"
-#include "Array.h"
-#include "Grid.h"
-#include "DDS.h"
-#include "DAS.h"
-#include "ce_functions.h"
-#include "Keywords2.h"
-
-#include <test_config.h>
-
-#include "../tests/TestTypeFactory.h"
-
-#include "debug.h"
-
-using namespace CppUnit;
-using namespace libdap;
-using namespace std;
-
-int test_variable_sleep_interval = 0;
-
-class KeywordsTest:public TestFixture
-{
-private:
-    Keywords *k;
-public:
-    KeywordsTest()
-    {}
-
-    ~KeywordsTest()
-    {}
-
-    void setUp()
-    {
-	k = new Keywords();
-    }
-
-    void tearDown()
-    {
-        delete k; k = 0;
-    }
-
-    CPPUNIT_TEST_SUITE( KeywordsTest );
-
-    CPPUNIT_TEST(no_keywords_test_1);
-    CPPUNIT_TEST(no_keywords_test_2);
-
-    CPPUNIT_TEST(one_keyword_test_1);
-    CPPUNIT_TEST(one_keyword_test_2);
-
-    CPPUNIT_TEST(two_keyword_test_1);
-    CPPUNIT_TEST(two_keyword_test_2);
-
-    CPPUNIT_TEST(bad_keyword_test_1);
-    CPPUNIT_TEST(bad_keyword_test_2);
-    CPPUNIT_TEST(bad_keyword_test_3);
-    CPPUNIT_TEST(bad_keyword_test_4);
-
-    CPPUNIT_TEST_SUITE_END();
-
-    void no_keywords_test_1()
-    {
-	string ce = k->parse_keywords("");
-	CPPUNIT_ASSERT(!k->has_keyword("dap"));
-	CPPUNIT_ASSERT(ce == "");
-	CPPUNIT_ASSERT(k->get_keywords().size() == 0);
-    }
-
-    void no_keywords_test_2()
-    {
-	string ce = k->parse_keywords("u,v");
-	CPPUNIT_ASSERT(!k->has_keyword("dap"));
-	CPPUNIT_ASSERT(ce == "u,v");
-	CPPUNIT_ASSERT(k->get_keywords().size() == 0);
-    }
-
-    void one_keyword_test_1()
-    {
-	CPPUNIT_ASSERT(k->is_known_keyword("dap"));
-
-	string ce = k->parse_keywords("dap(2)");
-	CPPUNIT_ASSERT(ce == "");
-	CPPUNIT_ASSERT(k->has_keyword("dap"));
-	CPPUNIT_ASSERT(k->get_keyword_value("dap") == "2");
-	CPPUNIT_ASSERT(k->get_keywords().size() == 1);
-    }
-
-    void one_keyword_test_2()
-    {
-	string ce = k->parse_keywords("dap(2),u,v&v<7");
-	CPPUNIT_ASSERT(ce == "u,v&v<7");
-	CPPUNIT_ASSERT(k->has_keyword("dap"));
-	CPPUNIT_ASSERT(k->get_keyword_value("dap") == "2");
-	CPPUNIT_ASSERT(k->get_keywords().size() == 1);
-    }
-
-    void two_keyword_test_1()
-    {
-	string ce = k->parse_keywords("dap(2),dap(3.2)");
-	CPPUNIT_ASSERT(ce == "");
-	CPPUNIT_ASSERT(k->has_keyword("dap"));
-	CPPUNIT_ASSERT(k->get_keyword_value("dap") == "3.2");
-	CPPUNIT_ASSERT(k->get_keywords().size() == 1);
-
-	CPPUNIT_ASSERT(k->is_known_keyword("dap"));
-    }
-
-    void two_keyword_test_2()
-    {
-	string ce = k->parse_keywords("dap(2),dap(3.2),u,v&v<7");
-	CPPUNIT_ASSERT(ce == "u,v&v<7");
-	CPPUNIT_ASSERT(k->has_keyword("dap"));
-	CPPUNIT_ASSERT(k->get_keyword_value("dap") == "3.2");
-	CPPUNIT_ASSERT(k->get_keywords().size() == 1);
-    }
-
-    void bad_keyword_test_1()
-    {
-	try {
-	    string ce = k->parse_keywords("dap7");
-	    // Even though this is pretty obviously wrong, we soldier on because
-	    // The keyword processing code has no way of knowing what will be
-	    // valid variable names.
-	    CPPUNIT_ASSERT(ce == "dap7");
-	}
-	catch (Error &e) {
-	    CPPUNIT_FAIL("Should not get here");
-	}
-    }
-    void bad_keyword_test_2()
-    {
-	try {
-	    string ce = k->parse_keywords("dap(7");
-	    // Even though this is pretty obviously wrong, we soldier on because
-	    // The keyword processing code has no way of knowing what will be
-	    // valid variable names.
-	    CPPUNIT_ASSERT(ce == "dap(7");
-	}
-	catch (Error &e) {
-	    CPPUNIT_FAIL("Should not get here");
-	}
-    }
-    void bad_keyword_test_3()
-    {
-	try {
-	    string ce = k->parse_keywords("dap7)");
-	    // Even though this is pretty obviously wrong, we soldier on because
-	    // The keyword processing code has no way of knowing what will be
-	    // valid variable names.
-	    CPPUNIT_ASSERT(ce == "dap7)");
-	}
-	catch (Error &e) {
-	    CPPUNIT_FAIL("Should not get here");
-	}
-    }
-    void bad_keyword_test_4()
-    {
-	try {
-	    string ce = k->parse_keywords("dap(7)");
-	    // Even though this is pretty obviously wrong, we soldier on because
-	    // The keyword processing code has no way of knowing what will be
-	    // valid variable names.
-	    CPPUNIT_FAIL("Should throw - bad value to keyword/function");
-	}
-	catch (Error &e) {
-	    CPPUNIT_ASSERT("Should throw - bad value to keyword/function");
-	}
-    }
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(KeywordsTest);
-
-int
-main( int, char** )
-{
-    CppUnit::TextTestRunner runner;
-    runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
-
-    bool wasSuccessful = runner.run( "", false ) ;
-
-    return wasSuccessful ? 0 : 1;
-}
diff --git a/unit-tests/MIMEUtilTest.cc b/unit-tests/MIMEUtilTest.cc
index 044736b..3b256b5 100644
--- a/unit-tests/MIMEUtilTest.cc
+++ b/unit-tests/MIMEUtilTest.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/unit-tests/Makefile.am b/unit-tests/Makefile.am
index 16a1cf1..0551973 100644
--- a/unit-tests/Makefile.am
+++ b/unit-tests/Makefile.am
@@ -7,7 +7,7 @@ AUTOMAKE_OPTIONS = foreign
 
 # Headers in 'tests' are used by the arrayT unit tests.
 
-AM_CPPFLAGS = -I$(top_srcdir)/GNU -I$(top_srcdir) -I$(top_srcdir)/tests  $(XML2_CFLAGS) $(CURL_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/GNU -I$(top_srcdir) -I$(top_srcdir)/tests $(CURL_CFLAGS) $(XML2_CFLAGS)
 AM_LDADD =
 if CPPUNIT
 AM_CPPFLAGS += $(CPPUNIT_CFLAGS)
@@ -16,7 +16,7 @@ endif
 
 # These are not used by automake but are often useful for certain types of
 # debugging. Set CXXFLAGS to this in the nightly build using export ...
-CXXFLAGS_DEBUG = -g3 -O0 -fno-defer-pop -Wall -W -Wcast-align -Werror
+CXXFLAGS_DEBUG = -g3 -O0  -Wall -W -Wcast-align -Werror
 TEST_COV_FLAGS = -ftest-coverage -fprofile-arcs
 
 # This determines what gets built by make check
@@ -28,8 +28,7 @@ TESTS = $(UNIT_TESTS)
 noinst_HEADERS = test_config.h
 
 DIRS_EXTRA = das-testsuite dds-testsuite ddx-testsuite		\
-	rcreader-testsuite server-testsuite cgi-util-tests	\
-	ce-functions-testsuite
+	rcreader-testsuite server-testsuite cgi-util-tests D4-xml
 
 EXTRA_DIST = $(DIRS_EXTRA) testFile.cc testFile.h test_config.h.in
 
@@ -48,13 +47,17 @@ if CPPUNIT
 UNIT_TESTS = marshT arrayT attrTableT structT sequenceT ddsT dasT	\
 	RegexTest                                                       \
 	ArrayTest AttrTableTest ByteTest MIMEUtilTest ancT DASTest 	\
-	DDSTest	DDXParserTest DODSFilterTest generalUtilTest 		\
+	DDSTest	DDXParserTest generalUtilTest 		\
 	HTTPCacheTest HTTPConnectTest parserUtilTest RCReaderTest 	\
-	SequenceTest SignalHandlerTest CEFunctionsTest 			\
-	GridGeoConstraintTest ArrayGeoConstraintTest MarshallerTest \
-	ResponseBuilderTest Keywords2Test
-
-#	fdiostreamTest
+	SequenceTest SignalHandlerTest  MarshallerTest                  \
+	ServerFunctionsListUnitTest 
+	
+# ResponseBuilderTest ResponseCacheTest Keywords2Test DODSFilterTest 
+	
+if DAP4_DEFINED
+    UNIT_TESTS += DAP4MarshallerTest DAP4UnMarshallerTest \
+    D4DimensionsTest D4EnumDefsTest
+endif
 
 else
 UNIT_TESTS =
@@ -69,6 +72,7 @@ check-local:
 endif
 
 TEST_SRC = testFile.cc testFile.h
+
 RegexTest_SOURCES = RegexTest.cc
 RegexTest_LDADD = ../libdap.la $(AM_LDADD)
 
@@ -97,16 +101,16 @@ DDXParserTest_SOURCES = DDXParserTest.cc
 DDXParserTest_CPPFLAGS = $(AM_CPPFLAGS) $(XML2_CFLAGS)
 DDXParserTest_LDADD = ../libdap.la $(AM_LDADD)
 
-DODSFilterTest_SOURCES = DODSFilterTest.cc $(TEST_SRC)
-DODSFilterTest_LDADD = ../libdapserver.la ../libdap.la \
-	../tests/libtest-types.a $(AM_LDADD)
+# DODSFilterTest_SOURCES = DODSFilterTest.cc $(TEST_SRC)
+# DODSFilterTest_LDADD = ../libdapserver.la ../libdap.la \
+#	../tests/libtest-types.a $(AM_LDADD)
 
-ResponseBuilderTest_SOURCES = ResponseBuilderTest.cc $(TEST_SRC)
-ResponseBuilderTest_LDADD = ../libdapserver.la ../libdap.la \
-	../tests/libtest-types.a $(AM_LDADD)
+# ResponseBuilderTest_SOURCES = ResponseBuilderTest.cc $(TEST_SRC)
+# ResponseBuilderTest_LDADD = ../libdapserver.la ../libdap.la \
+#	../tests/libtest-types.a $(AM_LDADD)
 
-Keywords2Test_SOURCES = Keywords2Test.cc
-Keywords2Test_LDADD = ../libdap.la $(AM_LDADD)
+# Keywords2Test_SOURCES = Keywords2Test.cc
+# Keywords2Test_LDADD = ../libdap.la $(AM_LDADD)
 
 generalUtilTest_SOURCES = generalUtilTest.cc
 generalUtilTest_LDADD = ../libdap.la $(AM_LDADD)
@@ -155,14 +159,24 @@ ddsT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
 dasT_SOURCES = dasT.cc $(TEST_SRC)
 dasT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
 
-CEFunctionsTest_SOURCES = CEFunctionsTest.cc
-CEFunctionsTest_LDADD = ../tests/libtest-types.a  ../libdap.la $(AM_LDADD)
+ServerFunctionsListUnitTest_SOURCES = ServerFunctionsListUnitTest.cc
+ServerFunctionsListUnitTest_LDADD = ../libdap.la $(AM_LDADD)
+
+# ResponseCacheTest_SOURCES = ResponseCacheTest.cc
+# ResponseCacheTest_LDADD = ../tests/libtest-types.a ../libdapserver.la ../libdap.la $(AM_LDADD)
 
-GridGeoConstraintTest_SOURCES = GridGeoConstraintTest.cc
-GridGeoConstraintTest_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
+if DAP4_DEFINED
 
-ArrayGeoConstraintTest_SOURCES = ArrayGeoConstraintTest.cc
-ArrayGeoConstraintTest_LDADD =  ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
+DAP4MarshallerTest_SOURCES = DAP4MarshallerTest.cc
+DAP4MarshallerTest_LDADD = ../libdap.la $(AM_LDADD)
 
-# fdiostreamTest_SOURCES = fdiostreamTest.cc
-# fdiostreamTest_LDADD = ../libdapclient.la ../libdap.la $(AM_LDADD)
+DAP4UnMarshallerTest_SOURCES = DAP4UnMarshallerTest.cc
+DAP4UnMarshallerTest_LDADD = ../libdap.la $(AM_LDADD)
+
+D4DimensionsTest_SOURCES = D4DimensionsTest.cc $(TEST_SRC)
+D4DimensionsTest_LDADD = ../libdap.la $(AM_LDADD)
+
+D4EnumDefsTest_SOURCES = D4EnumDefsTest.cc $(TEST_SRC)
+D4EnumDefsTest_LDADD = ../libdap.la $(AM_LDADD)
+
+endif
diff --git a/unit-tests/Makefile.in b/unit-tests/Makefile.in
index a619579..a399ca7 100644
--- a/unit-tests/Makefile.in
+++ b/unit-tests/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.12 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -35,15 +52,20 @@ build_triplet = @build@
 host_triplet = @host@
 @CPPUNIT_TRUE at am__append_1 = $(CPPUNIT_CFLAGS)
 @CPPUNIT_TRUE at am__append_2 = $(CPPUNIT_LIBS)
-check_PROGRAMS = $(am__EXEEXT_1)
-TESTS = $(am__EXEEXT_1)
+check_PROGRAMS = $(am__EXEEXT_2)
+TESTS = $(am__EXEEXT_2)
+
+# ResponseBuilderTest ResponseCacheTest Keywords2Test DODSFilterTest 
+ at CPPUNIT_TRUE@@DAP4_DEFINED_TRUE at am__append_3 = DAP4MarshallerTest DAP4UnMarshallerTest \
+ at CPPUNIT_TRUE@@DAP4_DEFINED_TRUE@    D4DimensionsTest D4EnumDefsTest
+
 subdir = unit-tests
 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in
+	$(srcdir)/Makefile.in $(top_srcdir)/conf/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/btowc.m4 \
-	$(top_srcdir)/gl/m4/codeset.m4 \
+	$(top_srcdir)/gl/m4/byteswap.m4 $(top_srcdir)/gl/m4/codeset.m4 \
 	$(top_srcdir)/gl/m4/configmake.m4 \
 	$(top_srcdir)/gl/m4/extensions.m4 \
 	$(top_srcdir)/gl/m4/fcntl-o.m4 $(top_srcdir)/gl/m4/glibc21.m4 \
@@ -56,14 +78,19 @@ am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/locale-fr.m4 \
 	$(top_srcdir)/gl/m4/locale-ja.m4 \
 	$(top_srcdir)/gl/m4/locale-zh.m4 \
+	$(top_srcdir)/gl/m4/locale_h.m4 \
+	$(top_srcdir)/gl/m4/localeconv.m4 \
 	$(top_srcdir)/gl/m4/longlong.m4 $(top_srcdir)/gl/m4/malloc.m4 \
 	$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
-	$(top_srcdir)/gl/m4/mbstate_t.m4 \
+	$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \
 	$(top_srcdir)/gl/m4/multiarch.m4 \
 	$(top_srcdir)/gl/m4/nl_langinfo.m4 \
-	$(top_srcdir)/gl/m4/regex.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
-	$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \
-	$(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \
+	$(top_srcdir)/gl/m4/off_t.m4 $(top_srcdir)/gl/m4/regex.m4 \
+	$(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \
+	$(top_srcdir)/gl/m4/stddef_h.m4 $(top_srcdir)/gl/m4/stdint.m4 \
+	$(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \
+	$(top_srcdir)/gl/m4/strings_h.m4 \
+	$(top_srcdir)/gl/m4/sys_types_h.m4 \
 	$(top_srcdir)/gl/m4/unistd_h.m4 \
 	$(top_srcdir)/gl/m4/warn-on-use.m4 \
 	$(top_srcdir)/gl/m4/wchar_h.m4 $(top_srcdir)/gl/m4/wchar_t.m4 \
@@ -82,33 +109,30 @@ CONFIG_HEADER = $(top_builddir)/config.h \
 	$(top_builddir)/xdr-datatypes-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
- at CPPUNIT_TRUE@am__EXEEXT_1 = marshT$(EXEEXT) arrayT$(EXEEXT) \
+ at CPPUNIT_TRUE@@DAP4_DEFINED_TRUE at am__EXEEXT_1 =  \
+ at CPPUNIT_TRUE@@DAP4_DEFINED_TRUE@	DAP4MarshallerTest$(EXEEXT) \
+ at CPPUNIT_TRUE@@DAP4_DEFINED_TRUE@	DAP4UnMarshallerTest$(EXEEXT) \
+ at CPPUNIT_TRUE@@DAP4_DEFINED_TRUE@	D4DimensionsTest$(EXEEXT) \
+ at CPPUNIT_TRUE@@DAP4_DEFINED_TRUE@	D4EnumDefsTest$(EXEEXT)
+ at CPPUNIT_TRUE@am__EXEEXT_2 = marshT$(EXEEXT) arrayT$(EXEEXT) \
 @CPPUNIT_TRUE@	attrTableT$(EXEEXT) structT$(EXEEXT) \
 @CPPUNIT_TRUE@	sequenceT$(EXEEXT) ddsT$(EXEEXT) dasT$(EXEEXT) \
 @CPPUNIT_TRUE@	RegexTest$(EXEEXT) ArrayTest$(EXEEXT) \
 @CPPUNIT_TRUE@	AttrTableTest$(EXEEXT) ByteTest$(EXEEXT) \
 @CPPUNIT_TRUE@	MIMEUtilTest$(EXEEXT) ancT$(EXEEXT) \
 @CPPUNIT_TRUE@	DASTest$(EXEEXT) DDSTest$(EXEEXT) \
- at CPPUNIT_TRUE@	DDXParserTest$(EXEEXT) DODSFilterTest$(EXEEXT) \
- at CPPUNIT_TRUE@	generalUtilTest$(EXEEXT) HTTPCacheTest$(EXEEXT) \
- at CPPUNIT_TRUE@	HTTPConnectTest$(EXEEXT) parserUtilTest$(EXEEXT) \
- at CPPUNIT_TRUE@	RCReaderTest$(EXEEXT) SequenceTest$(EXEEXT) \
- at CPPUNIT_TRUE@	SignalHandlerTest$(EXEEXT) \
- at CPPUNIT_TRUE@	CEFunctionsTest$(EXEEXT) \
- at CPPUNIT_TRUE@	GridGeoConstraintTest$(EXEEXT) \
- at CPPUNIT_TRUE@	ArrayGeoConstraintTest$(EXEEXT) \
+ at CPPUNIT_TRUE@	DDXParserTest$(EXEEXT) generalUtilTest$(EXEEXT) \
+ at CPPUNIT_TRUE@	HTTPCacheTest$(EXEEXT) HTTPConnectTest$(EXEEXT) \
+ at CPPUNIT_TRUE@	parserUtilTest$(EXEEXT) RCReaderTest$(EXEEXT) \
+ at CPPUNIT_TRUE@	SequenceTest$(EXEEXT) SignalHandlerTest$(EXEEXT) \
 @CPPUNIT_TRUE@	MarshallerTest$(EXEEXT) \
- at CPPUNIT_TRUE@	ResponseBuilderTest$(EXEEXT) \
- at CPPUNIT_TRUE@	Keywords2Test$(EXEEXT)
-am_ArrayGeoConstraintTest_OBJECTS = ArrayGeoConstraintTest.$(OBJEXT)
-ArrayGeoConstraintTest_OBJECTS = $(am_ArrayGeoConstraintTest_OBJECTS)
+ at CPPUNIT_TRUE@	ServerFunctionsListUnitTest$(EXEEXT) \
+ at CPPUNIT_TRUE@	$(am__EXEEXT_1)
+am_ArrayTest_OBJECTS = ArrayTest.$(OBJEXT)
+ArrayTest_OBJECTS = $(am_ArrayTest_OBJECTS)
 am__DEPENDENCIES_1 =
 @CPPUNIT_TRUE at am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
 am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2)
-ArrayGeoConstraintTest_DEPENDENCIES = ../tests/libtest-types.a \
-	../libdap.la $(am__DEPENDENCIES_3)
-am_ArrayTest_OBJECTS = ArrayTest.$(OBJEXT)
-ArrayTest_OBJECTS = $(am_ArrayTest_OBJECTS)
 ArrayTest_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
 am__objects_1 = testFile.$(OBJEXT)
 am_AttrTableTest_OBJECTS = AttrTableTest.$(OBJEXT) $(am__objects_1)
@@ -117,10 +141,32 @@ AttrTableTest_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
 am_ByteTest_OBJECTS = ByteTest.$(OBJEXT) $(am__objects_1)
 ByteTest_OBJECTS = $(am_ByteTest_OBJECTS)
 ByteTest_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
-am_CEFunctionsTest_OBJECTS = CEFunctionsTest.$(OBJEXT)
-CEFunctionsTest_OBJECTS = $(am_CEFunctionsTest_OBJECTS)
-CEFunctionsTest_DEPENDENCIES = ../tests/libtest-types.a ../libdap.la \
-	$(am__DEPENDENCIES_3)
+am__D4DimensionsTest_SOURCES_DIST = D4DimensionsTest.cc testFile.cc \
+	testFile.h
+ at DAP4_DEFINED_TRUE@am_D4DimensionsTest_OBJECTS =  \
+ at DAP4_DEFINED_TRUE@	D4DimensionsTest.$(OBJEXT) $(am__objects_1)
+D4DimensionsTest_OBJECTS = $(am_D4DimensionsTest_OBJECTS)
+ at DAP4_DEFINED_TRUE@D4DimensionsTest_DEPENDENCIES = ../libdap.la \
+ at DAP4_DEFINED_TRUE@	$(am__DEPENDENCIES_3)
+am__D4EnumDefsTest_SOURCES_DIST = D4EnumDefsTest.cc testFile.cc \
+	testFile.h
+ at DAP4_DEFINED_TRUE@am_D4EnumDefsTest_OBJECTS =  \
+ at DAP4_DEFINED_TRUE@	D4EnumDefsTest.$(OBJEXT) $(am__objects_1)
+D4EnumDefsTest_OBJECTS = $(am_D4EnumDefsTest_OBJECTS)
+ at DAP4_DEFINED_TRUE@D4EnumDefsTest_DEPENDENCIES = ../libdap.la \
+ at DAP4_DEFINED_TRUE@	$(am__DEPENDENCIES_3)
+am__DAP4MarshallerTest_SOURCES_DIST = DAP4MarshallerTest.cc
+ at DAP4_DEFINED_TRUE@am_DAP4MarshallerTest_OBJECTS =  \
+ at DAP4_DEFINED_TRUE@	DAP4MarshallerTest.$(OBJEXT)
+DAP4MarshallerTest_OBJECTS = $(am_DAP4MarshallerTest_OBJECTS)
+ at DAP4_DEFINED_TRUE@DAP4MarshallerTest_DEPENDENCIES = ../libdap.la \
+ at DAP4_DEFINED_TRUE@	$(am__DEPENDENCIES_3)
+am__DAP4UnMarshallerTest_SOURCES_DIST = DAP4UnMarshallerTest.cc
+ at DAP4_DEFINED_TRUE@am_DAP4UnMarshallerTest_OBJECTS =  \
+ at DAP4_DEFINED_TRUE@	DAP4UnMarshallerTest.$(OBJEXT)
+DAP4UnMarshallerTest_OBJECTS = $(am_DAP4UnMarshallerTest_OBJECTS)
+ at DAP4_DEFINED_TRUE@DAP4UnMarshallerTest_DEPENDENCIES = ../libdap.la \
+ at DAP4_DEFINED_TRUE@	$(am__DEPENDENCIES_3)
 am_DASTest_OBJECTS = DASTest.$(OBJEXT)
 DASTest_OBJECTS = $(am_DASTest_OBJECTS)
 DASTest_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
@@ -130,14 +176,6 @@ DDSTest_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
 am_DDXParserTest_OBJECTS = DDXParserTest-DDXParserTest.$(OBJEXT)
 DDXParserTest_OBJECTS = $(am_DDXParserTest_OBJECTS)
 DDXParserTest_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
-am_DODSFilterTest_OBJECTS = DODSFilterTest.$(OBJEXT) $(am__objects_1)
-DODSFilterTest_OBJECTS = $(am_DODSFilterTest_OBJECTS)
-DODSFilterTest_DEPENDENCIES = ../libdapserver.la ../libdap.la \
-	../tests/libtest-types.a $(am__DEPENDENCIES_3)
-am_GridGeoConstraintTest_OBJECTS = GridGeoConstraintTest.$(OBJEXT)
-GridGeoConstraintTest_OBJECTS = $(am_GridGeoConstraintTest_OBJECTS)
-GridGeoConstraintTest_DEPENDENCIES = ../tests/libtest-types.a \
-	../libdap.la $(am__DEPENDENCIES_3)
 am_HTTPCacheTest_OBJECTS = HTTPCacheTest-HTTPCacheTest.$(OBJEXT)
 HTTPCacheTest_OBJECTS = $(am_HTTPCacheTest_OBJECTS)
 HTTPCacheTest_DEPENDENCIES = ../libdapclient.la ../libdap.la \
@@ -147,9 +185,6 @@ am_HTTPConnectTest_OBJECTS =  \
 HTTPConnectTest_OBJECTS = $(am_HTTPConnectTest_OBJECTS)
 HTTPConnectTest_DEPENDENCIES = ../libdapclient.la ../libdap.la \
 	$(am__DEPENDENCIES_3)
-am_Keywords2Test_OBJECTS = Keywords2Test.$(OBJEXT)
-Keywords2Test_OBJECTS = $(am_Keywords2Test_OBJECTS)
-Keywords2Test_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
 am_MIMEUtilTest_OBJECTS = MIMEUtilTest.$(OBJEXT)
 MIMEUtilTest_OBJECTS = $(am_MIMEUtilTest_OBJECTS)
 MIMEUtilTest_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
@@ -164,15 +199,16 @@ RCReaderTest_DEPENDENCIES = ../libdapclient.la ../libdap.la \
 am_RegexTest_OBJECTS = RegexTest.$(OBJEXT)
 RegexTest_OBJECTS = $(am_RegexTest_OBJECTS)
 RegexTest_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
-am_ResponseBuilderTest_OBJECTS = ResponseBuilderTest.$(OBJEXT) \
-	$(am__objects_1)
-ResponseBuilderTest_OBJECTS = $(am_ResponseBuilderTest_OBJECTS)
-ResponseBuilderTest_DEPENDENCIES = ../libdapserver.la ../libdap.la \
-	../tests/libtest-types.a $(am__DEPENDENCIES_3)
 am_SequenceTest_OBJECTS = SequenceTest.$(OBJEXT)
 SequenceTest_OBJECTS = $(am_SequenceTest_OBJECTS)
 SequenceTest_DEPENDENCIES = ../tests/libtest-types.a ../libdap.la \
 	$(am__DEPENDENCIES_3)
+am_ServerFunctionsListUnitTest_OBJECTS =  \
+	ServerFunctionsListUnitTest.$(OBJEXT)
+ServerFunctionsListUnitTest_OBJECTS =  \
+	$(am_ServerFunctionsListUnitTest_OBJECTS)
+ServerFunctionsListUnitTest_DEPENDENCIES = ../libdap.la \
+	$(am__DEPENDENCIES_3)
 am_SignalHandlerTest_OBJECTS = SignalHandlerTest.$(OBJEXT)
 SignalHandlerTest_OBJECTS = $(am_SignalHandlerTest_OBJECTS)
 SignalHandlerTest_DEPENDENCIES = ../libdap.la $(am__DEPENDENCIES_3)
@@ -236,34 +272,35 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-SOURCES = $(ArrayGeoConstraintTest_SOURCES) $(ArrayTest_SOURCES) \
-	$(AttrTableTest_SOURCES) $(ByteTest_SOURCES) \
-	$(CEFunctionsTest_SOURCES) $(DASTest_SOURCES) \
+SOURCES = $(ArrayTest_SOURCES) $(AttrTableTest_SOURCES) \
+	$(ByteTest_SOURCES) $(D4DimensionsTest_SOURCES) \
+	$(D4EnumDefsTest_SOURCES) $(DAP4MarshallerTest_SOURCES) \
+	$(DAP4UnMarshallerTest_SOURCES) $(DASTest_SOURCES) \
 	$(DDSTest_SOURCES) $(DDXParserTest_SOURCES) \
-	$(DODSFilterTest_SOURCES) $(GridGeoConstraintTest_SOURCES) \
 	$(HTTPCacheTest_SOURCES) $(HTTPConnectTest_SOURCES) \
-	$(Keywords2Test_SOURCES) $(MIMEUtilTest_SOURCES) \
-	$(MarshallerTest_SOURCES) $(RCReaderTest_SOURCES) \
-	$(RegexTest_SOURCES) $(ResponseBuilderTest_SOURCES) \
-	$(SequenceTest_SOURCES) $(SignalHandlerTest_SOURCES) \
-	$(ancT_SOURCES) $(arrayT_SOURCES) $(attrTableT_SOURCES) \
-	$(dasT_SOURCES) $(ddsT_SOURCES) $(generalUtilTest_SOURCES) \
-	$(marshT_SOURCES) $(parserUtilTest_SOURCES) \
-	$(sequenceT_SOURCES) $(structT_SOURCES)
-DIST_SOURCES = $(ArrayGeoConstraintTest_SOURCES) $(ArrayTest_SOURCES) \
-	$(AttrTableTest_SOURCES) $(ByteTest_SOURCES) \
-	$(CEFunctionsTest_SOURCES) $(DASTest_SOURCES) \
+	$(MIMEUtilTest_SOURCES) $(MarshallerTest_SOURCES) \
+	$(RCReaderTest_SOURCES) $(RegexTest_SOURCES) \
+	$(SequenceTest_SOURCES) $(ServerFunctionsListUnitTest_SOURCES) \
+	$(SignalHandlerTest_SOURCES) $(ancT_SOURCES) $(arrayT_SOURCES) \
+	$(attrTableT_SOURCES) $(dasT_SOURCES) $(ddsT_SOURCES) \
+	$(generalUtilTest_SOURCES) $(marshT_SOURCES) \
+	$(parserUtilTest_SOURCES) $(sequenceT_SOURCES) \
+	$(structT_SOURCES)
+DIST_SOURCES = $(ArrayTest_SOURCES) $(AttrTableTest_SOURCES) \
+	$(ByteTest_SOURCES) $(am__D4DimensionsTest_SOURCES_DIST) \
+	$(am__D4EnumDefsTest_SOURCES_DIST) \
+	$(am__DAP4MarshallerTest_SOURCES_DIST) \
+	$(am__DAP4UnMarshallerTest_SOURCES_DIST) $(DASTest_SOURCES) \
 	$(DDSTest_SOURCES) $(DDXParserTest_SOURCES) \
-	$(DODSFilterTest_SOURCES) $(GridGeoConstraintTest_SOURCES) \
 	$(HTTPCacheTest_SOURCES) $(HTTPConnectTest_SOURCES) \
-	$(Keywords2Test_SOURCES) $(MIMEUtilTest_SOURCES) \
-	$(MarshallerTest_SOURCES) $(RCReaderTest_SOURCES) \
-	$(RegexTest_SOURCES) $(ResponseBuilderTest_SOURCES) \
-	$(SequenceTest_SOURCES) $(SignalHandlerTest_SOURCES) \
-	$(ancT_SOURCES) $(arrayT_SOURCES) $(attrTableT_SOURCES) \
-	$(dasT_SOURCES) $(ddsT_SOURCES) $(generalUtilTest_SOURCES) \
-	$(marshT_SOURCES) $(parserUtilTest_SOURCES) \
-	$(sequenceT_SOURCES) $(structT_SOURCES)
+	$(MIMEUtilTest_SOURCES) $(MarshallerTest_SOURCES) \
+	$(RCReaderTest_SOURCES) $(RegexTest_SOURCES) \
+	$(SequenceTest_SOURCES) $(ServerFunctionsListUnitTest_SOURCES) \
+	$(SignalHandlerTest_SOURCES) $(ancT_SOURCES) $(arrayT_SOURCES) \
+	$(attrTableT_SOURCES) $(dasT_SOURCES) $(ddsT_SOURCES) \
+	$(generalUtilTest_SOURCES) $(marshT_SOURCES) \
+	$(parserUtilTest_SOURCES) $(sequenceT_SOURCES) \
+	$(structT_SOURCES)
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
 	install-dvi-recursive install-exec-recursive \
@@ -271,6 +308,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 HEADERS = $(noinst_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
@@ -279,8 +321,10 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
 	distdir
 ETAGS = etags
 CTAGS = ctags
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=
+am__tty_colors_dummy = \
+  mgn= red= grn= lgn= blu= brg= std=; \
+  am__color_tests=no
+am__tty_colors = $(am__tty_colors_dummy)
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
@@ -315,6 +359,7 @@ ALLOCA_H = @ALLOCA_H@
 AMTAR = @AMTAR@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
+ARFLAGS = @ARFLAGS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -324,6 +369,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
 BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
 BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
 BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+BYTESWAP_H = @BYTESWAP_H@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -366,15 +412,20 @@ GNULIB_ATOLL = @GNULIB_ATOLL@
 GNULIB_BTOWC = @GNULIB_BTOWC@
 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHDIR = @GNULIB_CHDIR@
 GNULIB_CHOWN = @GNULIB_CHOWN@
 GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DUP = @GNULIB_DUP@
 GNULIB_DUP2 = @GNULIB_DUP2@
 GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
 GNULIB_ENVIRON = @GNULIB_ENVIRON@
 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
 GNULIB_FCHDIR = @GNULIB_FCHDIR@
 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FFS = @GNULIB_FFS@
 GNULIB_FSYNC = @GNULIB_FSYNC@
 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
 GNULIB_GETCWD = @GNULIB_GETCWD@
@@ -389,9 +440,14 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
 GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
 GNULIB_LCHOWN = @GNULIB_LCHOWN@
 GNULIB_LINK = @GNULIB_LINK@
 GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
 GNULIB_LSEEK = @GNULIB_LSEEK@
 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
 GNULIB_MBRLEN = @GNULIB_MBRLEN@
@@ -399,6 +455,7 @@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
 GNULIB_MBSINIT = @GNULIB_MBSINIT@
 GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
 GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
@@ -407,11 +464,15 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
 GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
 GNULIB_PIPE = @GNULIB_PIPE@
 GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
 GNULIB_PREAD = @GNULIB_PREAD@
 GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
 GNULIB_PUTENV = @GNULIB_PUTENV@
 GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_READ = @GNULIB_READ@
 GNULIB_READLINK = @GNULIB_READLINK@
 GNULIB_READLINKAT = @GNULIB_READLINKAT@
 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
@@ -419,6 +480,8 @@ GNULIB_REALPATH = @GNULIB_REALPATH@
 GNULIB_RMDIR = @GNULIB_RMDIR@
 GNULIB_RPMATCH = @GNULIB_RPMATCH@
 GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
 GNULIB_SLEEP = @GNULIB_SLEEP@
 GNULIB_STRTOD = @GNULIB_STRTOD@
 GNULIB_STRTOLL = @GNULIB_STRTOLL@
@@ -426,19 +489,51 @@ GNULIB_STRTOULL = @GNULIB_STRTOULL@
 GNULIB_SYMLINK = @GNULIB_SYMLINK@
 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
 GNULIB_UNLINK = @GNULIB_UNLINK@
 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
 GNULIB_UNSETENV = @GNULIB_UNSETENV@
 GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_WCPCPY = @GNULIB_WCPCPY@
+GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
 GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
+GNULIB_WCSCAT = @GNULIB_WCSCAT@
+GNULIB_WCSCHR = @GNULIB_WCSCHR@
+GNULIB_WCSCMP = @GNULIB_WCSCMP@
+GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
+GNULIB_WCSCPY = @GNULIB_WCSCPY@
+GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
+GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSLEN = @GNULIB_WCSLEN@
+GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
+GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
+GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
+GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
+GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
 GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
+GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
 GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCSSPN = @GNULIB_WCSSPN@
+GNULIB_WCSSTR = @GNULIB_WCSSTR@
+GNULIB_WCSTOK = @GNULIB_WCSTOK@
+GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
+GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
 GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCTOMB = @GNULIB_WCTOMB@
+GNULIB_WCTRANS = @GNULIB_WCTRANS@
+GNULIB_WCTYPE = @GNULIB_WCTYPE@
 GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
+GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
+GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
+GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
+GNULIB_WMEMSET = @GNULIB_WMEMSET@
 GNULIB_WRITE = @GNULIB_WRITE@
 GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
@@ -448,23 +543,29 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
 HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFS = @HAVE_FFS@
 HAVE_FSYNC = @HAVE_FSYNC@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
@@ -474,6 +575,7 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
 HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
@@ -500,9 +602,12 @@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
 HAVE_OS_H = @HAVE_OS_H@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM = @HAVE_RANDOM@
 HAVE_RANDOM_H = @HAVE_RANDOM_H@
 HAVE_RANDOM_R = @HAVE_RANDOM_R@
 HAVE_READLINK = @HAVE_READLINK@
@@ -510,11 +615,14 @@ HAVE_READLINKAT = @HAVE_READLINKAT@
 HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
 HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
 HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
 HAVE_SLEEP = @HAVE_SLEEP@
 HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRTOD = @HAVE_STRTOD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
@@ -533,11 +641,42 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCPCPY = @HAVE_WCPCPY@
+HAVE_WCPNCPY = @HAVE_WCPNCPY@
 HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
+HAVE_WCSCAT = @HAVE_WCSCAT@
+HAVE_WCSCHR = @HAVE_WCSCHR@
+HAVE_WCSCMP = @HAVE_WCSCMP@
+HAVE_WCSCOLL = @HAVE_WCSCOLL@
+HAVE_WCSCPY = @HAVE_WCSCPY@
+HAVE_WCSCSPN = @HAVE_WCSCSPN@
+HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSLEN = @HAVE_WCSLEN@
+HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
+HAVE_WCSNCAT = @HAVE_WCSNCAT@
+HAVE_WCSNCMP = @HAVE_WCSNCMP@
+HAVE_WCSNCPY = @HAVE_WCSNCPY@
+HAVE_WCSNLEN = @HAVE_WCSNLEN@
 HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSPBRK = @HAVE_WCSPBRK@
+HAVE_WCSRCHR = @HAVE_WCSRCHR@
 HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCSSPN = @HAVE_WCSSPN@
+HAVE_WCSSTR = @HAVE_WCSSTR@
+HAVE_WCSTOK = @HAVE_WCSTOK@
+HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
+HAVE_WCSXFRM = @HAVE_WCSXFRM@
+HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
 HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
 HAVE_WINT_T = @HAVE_WINT_T@
+HAVE_WMEMCHR = @HAVE_WMEMCHR@
+HAVE_WMEMCMP = @HAVE_WMEMCMP@
+HAVE_WMEMCPY = @HAVE_WMEMCPY@
+HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
 HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -570,16 +709,22 @@ MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
 NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
 NEXT_STDINT_H = @NEXT_STDINT_H@
 NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRINGS_H = @NEXT_STRINGS_H@
+NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
 NEXT_UNISTD_H = @NEXT_UNISTD_H@
 NEXT_WCHAR_H = @NEXT_WCHAR_H@
 NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
@@ -613,17 +758,21 @@ REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
 REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
 REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
 REPLACE_LSEEK = @REPLACE_LSEEK@
 REPLACE_MALLOC = @REPLACE_MALLOC@
 REPLACE_MBRLEN = @REPLACE_MBRLEN@
@@ -632,20 +781,27 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
 REPLACE_NULL = @REPLACE_NULL@
 REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_REALLOC = @REPLACE_REALLOC@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
 REPLACE_UNLINK = @REPLACE_UNLINK@
 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
@@ -654,7 +810,9 @@ REPLACE_USLEEP = @REPLACE_USLEEP@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
 REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
@@ -675,10 +833,10 @@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOC
 UUID_LIBS = @UUID_LIBS@
 VERSION = @VERSION@
 WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
 WINT_T_SUFFIX = @WINT_T_SUFFIX@
 XML2_CFLAGS = @XML2_CFLAGS@
 XML2_LIBS = @XML2_LIBS@
-XML2_STATIC_LIBS = @XML2_STATIC_LIBS@
 YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -750,38 +908,33 @@ AUTOMAKE_OPTIONS = foreign
 
 # Headers in 'tests' are used by the arrayT unit tests.
 AM_CPPFLAGS = -I$(top_srcdir)/GNU -I$(top_srcdir) \
-	-I$(top_srcdir)/tests $(XML2_CFLAGS) $(CURL_CFLAGS) \
+	-I$(top_srcdir)/tests $(CURL_CFLAGS) $(XML2_CFLAGS) \
 	$(am__append_1)
 AM_LDADD = $(am__append_2)
 
 # These are not used by automake but are often useful for certain types of
 # debugging. Set CXXFLAGS to this in the nightly build using export ...
-CXXFLAGS_DEBUG = -g3 -O0 -fno-defer-pop -Wall -W -Wcast-align -Werror
+CXXFLAGS_DEBUG = -g3 -O0  -Wall -W -Wcast-align -Werror
 TEST_COV_FLAGS = -ftest-coverage -fprofile-arcs
 noinst_HEADERS = test_config.h
 DIRS_EXTRA = das-testsuite dds-testsuite ddx-testsuite		\
-	rcreader-testsuite server-testsuite cgi-util-tests	\
-	ce-functions-testsuite
+	rcreader-testsuite server-testsuite cgi-util-tests D4-xml
 
 EXTRA_DIST = $(DIRS_EXTRA) testFile.cc testFile.h test_config.h.in
 CLEANFILES = testout .dodsrc  *.gcda *.gcno
 DISTCLEANFILES = test_config.h *.strm *.file tmp.txt
-
-#	fdiostreamTest
 @CPPUNIT_FALSE at UNIT_TESTS = 
 
 ############################################################################
 # Unit Tests
 #
- at CPPUNIT_TRUE@UNIT_TESTS = marshT arrayT attrTableT structT sequenceT ddsT dasT	\
- at CPPUNIT_TRUE@	RegexTest                                                       \
- at CPPUNIT_TRUE@	ArrayTest AttrTableTest ByteTest MIMEUtilTest ancT DASTest 	\
- at CPPUNIT_TRUE@	DDSTest	DDXParserTest DODSFilterTest generalUtilTest 		\
- at CPPUNIT_TRUE@	HTTPCacheTest HTTPConnectTest parserUtilTest RCReaderTest 	\
- at CPPUNIT_TRUE@	SequenceTest SignalHandlerTest CEFunctionsTest 			\
- at CPPUNIT_TRUE@	GridGeoConstraintTest ArrayGeoConstraintTest MarshallerTest \
- at CPPUNIT_TRUE@	ResponseBuilderTest Keywords2Test
-
+ at CPPUNIT_TRUE@UNIT_TESTS = marshT arrayT attrTableT structT sequenceT \
+ at CPPUNIT_TRUE@	ddsT dasT RegexTest ArrayTest AttrTableTest \
+ at CPPUNIT_TRUE@	ByteTest MIMEUtilTest ancT DASTest DDSTest \
+ at CPPUNIT_TRUE@	DDXParserTest generalUtilTest HTTPCacheTest \
+ at CPPUNIT_TRUE@	HTTPConnectTest parserUtilTest RCReaderTest \
+ at CPPUNIT_TRUE@	SequenceTest SignalHandlerTest MarshallerTest \
+ at CPPUNIT_TRUE@	ServerFunctionsListUnitTest $(am__append_3)
 TEST_SRC = testFile.cc testFile.h
 RegexTest_SOURCES = RegexTest.cc
 RegexTest_LDADD = ../libdap.la $(AM_LDADD)
@@ -802,16 +955,17 @@ DDSTest_LDADD = ../libdap.la $(AM_LDADD)
 DDXParserTest_SOURCES = DDXParserTest.cc
 DDXParserTest_CPPFLAGS = $(AM_CPPFLAGS) $(XML2_CFLAGS)
 DDXParserTest_LDADD = ../libdap.la $(AM_LDADD)
-DODSFilterTest_SOURCES = DODSFilterTest.cc $(TEST_SRC)
-DODSFilterTest_LDADD = ../libdapserver.la ../libdap.la \
-	../tests/libtest-types.a $(AM_LDADD)
 
-ResponseBuilderTest_SOURCES = ResponseBuilderTest.cc $(TEST_SRC)
-ResponseBuilderTest_LDADD = ../libdapserver.la ../libdap.la \
-	../tests/libtest-types.a $(AM_LDADD)
+# DODSFilterTest_SOURCES = DODSFilterTest.cc $(TEST_SRC)
+# DODSFilterTest_LDADD = ../libdapserver.la ../libdap.la \
+#	../tests/libtest-types.a $(AM_LDADD)
 
-Keywords2Test_SOURCES = Keywords2Test.cc
-Keywords2Test_LDADD = ../libdap.la $(AM_LDADD)
+# ResponseBuilderTest_SOURCES = ResponseBuilderTest.cc $(TEST_SRC)
+# ResponseBuilderTest_LDADD = ../libdapserver.la ../libdap.la \
+#	../tests/libtest-types.a $(AM_LDADD)
+
+# Keywords2Test_SOURCES = Keywords2Test.cc
+# Keywords2Test_LDADD = ../libdap.la $(AM_LDADD)
 generalUtilTest_SOURCES = generalUtilTest.cc
 generalUtilTest_LDADD = ../libdap.la $(AM_LDADD)
 HTTPCacheTest_SOURCES = HTTPCacheTest.cc
@@ -844,12 +998,19 @@ ddsT_SOURCES = ddsT.cc $(TEST_SRC)
 ddsT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
 dasT_SOURCES = dasT.cc $(TEST_SRC)
 dasT_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
-CEFunctionsTest_SOURCES = CEFunctionsTest.cc
-CEFunctionsTest_LDADD = ../tests/libtest-types.a  ../libdap.la $(AM_LDADD)
-GridGeoConstraintTest_SOURCES = GridGeoConstraintTest.cc
-GridGeoConstraintTest_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
-ArrayGeoConstraintTest_SOURCES = ArrayGeoConstraintTest.cc
-ArrayGeoConstraintTest_LDADD = ../tests/libtest-types.a ../libdap.la $(AM_LDADD)
+ServerFunctionsListUnitTest_SOURCES = ServerFunctionsListUnitTest.cc
+ServerFunctionsListUnitTest_LDADD = ../libdap.la $(AM_LDADD)
+
+# ResponseCacheTest_SOURCES = ResponseCacheTest.cc
+# ResponseCacheTest_LDADD = ../tests/libtest-types.a ../libdapserver.la ../libdap.la $(AM_LDADD)
+ at DAP4_DEFINED_TRUE@DAP4MarshallerTest_SOURCES = DAP4MarshallerTest.cc
+ at DAP4_DEFINED_TRUE@DAP4MarshallerTest_LDADD = ../libdap.la $(AM_LDADD)
+ at DAP4_DEFINED_TRUE@DAP4UnMarshallerTest_SOURCES = DAP4UnMarshallerTest.cc
+ at DAP4_DEFINED_TRUE@DAP4UnMarshallerTest_LDADD = ../libdap.la $(AM_LDADD)
+ at DAP4_DEFINED_TRUE@D4DimensionsTest_SOURCES = D4DimensionsTest.cc $(TEST_SRC)
+ at DAP4_DEFINED_TRUE@D4DimensionsTest_LDADD = ../libdap.la $(AM_LDADD)
+ at DAP4_DEFINED_TRUE@D4EnumDefsTest_SOURCES = D4EnumDefsTest.cc $(TEST_SRC)
+ at DAP4_DEFINED_TRUE@D4EnumDefsTest_LDADD = ../libdap.la $(AM_LDADD)
 all: all-recursive
 
 .SUFFIXES:
@@ -893,94 +1054,91 @@ clean-checkPROGRAMS:
 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
 	echo " rm -f" $$list; \
 	rm -f $$list
-ArrayGeoConstraintTest$(EXEEXT): $(ArrayGeoConstraintTest_OBJECTS) $(ArrayGeoConstraintTest_DEPENDENCIES) 
-	@rm -f ArrayGeoConstraintTest$(EXEEXT)
-	$(CXXLINK) $(ArrayGeoConstraintTest_OBJECTS) $(ArrayGeoConstraintTest_LDADD) $(LIBS)
-ArrayTest$(EXEEXT): $(ArrayTest_OBJECTS) $(ArrayTest_DEPENDENCIES) 
+ArrayTest$(EXEEXT): $(ArrayTest_OBJECTS) $(ArrayTest_DEPENDENCIES) $(EXTRA_ArrayTest_DEPENDENCIES) 
 	@rm -f ArrayTest$(EXEEXT)
 	$(CXXLINK) $(ArrayTest_OBJECTS) $(ArrayTest_LDADD) $(LIBS)
-AttrTableTest$(EXEEXT): $(AttrTableTest_OBJECTS) $(AttrTableTest_DEPENDENCIES) 
+AttrTableTest$(EXEEXT): $(AttrTableTest_OBJECTS) $(AttrTableTest_DEPENDENCIES) $(EXTRA_AttrTableTest_DEPENDENCIES) 
 	@rm -f AttrTableTest$(EXEEXT)
 	$(CXXLINK) $(AttrTableTest_OBJECTS) $(AttrTableTest_LDADD) $(LIBS)
-ByteTest$(EXEEXT): $(ByteTest_OBJECTS) $(ByteTest_DEPENDENCIES) 
+ByteTest$(EXEEXT): $(ByteTest_OBJECTS) $(ByteTest_DEPENDENCIES) $(EXTRA_ByteTest_DEPENDENCIES) 
 	@rm -f ByteTest$(EXEEXT)
 	$(CXXLINK) $(ByteTest_OBJECTS) $(ByteTest_LDADD) $(LIBS)
-CEFunctionsTest$(EXEEXT): $(CEFunctionsTest_OBJECTS) $(CEFunctionsTest_DEPENDENCIES) 
-	@rm -f CEFunctionsTest$(EXEEXT)
-	$(CXXLINK) $(CEFunctionsTest_OBJECTS) $(CEFunctionsTest_LDADD) $(LIBS)
-DASTest$(EXEEXT): $(DASTest_OBJECTS) $(DASTest_DEPENDENCIES) 
+D4DimensionsTest$(EXEEXT): $(D4DimensionsTest_OBJECTS) $(D4DimensionsTest_DEPENDENCIES) $(EXTRA_D4DimensionsTest_DEPENDENCIES) 
+	@rm -f D4DimensionsTest$(EXEEXT)
+	$(CXXLINK) $(D4DimensionsTest_OBJECTS) $(D4DimensionsTest_LDADD) $(LIBS)
+D4EnumDefsTest$(EXEEXT): $(D4EnumDefsTest_OBJECTS) $(D4EnumDefsTest_DEPENDENCIES) $(EXTRA_D4EnumDefsTest_DEPENDENCIES) 
+	@rm -f D4EnumDefsTest$(EXEEXT)
+	$(CXXLINK) $(D4EnumDefsTest_OBJECTS) $(D4EnumDefsTest_LDADD) $(LIBS)
+DAP4MarshallerTest$(EXEEXT): $(DAP4MarshallerTest_OBJECTS) $(DAP4MarshallerTest_DEPENDENCIES) $(EXTRA_DAP4MarshallerTest_DEPENDENCIES) 
+	@rm -f DAP4MarshallerTest$(EXEEXT)
+	$(CXXLINK) $(DAP4MarshallerTest_OBJECTS) $(DAP4MarshallerTest_LDADD) $(LIBS)
+DAP4UnMarshallerTest$(EXEEXT): $(DAP4UnMarshallerTest_OBJECTS) $(DAP4UnMarshallerTest_DEPENDENCIES) $(EXTRA_DAP4UnMarshallerTest_DEPENDENCIES) 
+	@rm -f DAP4UnMarshallerTest$(EXEEXT)
+	$(CXXLINK) $(DAP4UnMarshallerTest_OBJECTS) $(DAP4UnMarshallerTest_LDADD) $(LIBS)
+DASTest$(EXEEXT): $(DASTest_OBJECTS) $(DASTest_DEPENDENCIES) $(EXTRA_DASTest_DEPENDENCIES) 
 	@rm -f DASTest$(EXEEXT)
 	$(CXXLINK) $(DASTest_OBJECTS) $(DASTest_LDADD) $(LIBS)
-DDSTest$(EXEEXT): $(DDSTest_OBJECTS) $(DDSTest_DEPENDENCIES) 
+DDSTest$(EXEEXT): $(DDSTest_OBJECTS) $(DDSTest_DEPENDENCIES) $(EXTRA_DDSTest_DEPENDENCIES) 
 	@rm -f DDSTest$(EXEEXT)
 	$(CXXLINK) $(DDSTest_OBJECTS) $(DDSTest_LDADD) $(LIBS)
-DDXParserTest$(EXEEXT): $(DDXParserTest_OBJECTS) $(DDXParserTest_DEPENDENCIES) 
+DDXParserTest$(EXEEXT): $(DDXParserTest_OBJECTS) $(DDXParserTest_DEPENDENCIES) $(EXTRA_DDXParserTest_DEPENDENCIES) 
 	@rm -f DDXParserTest$(EXEEXT)
 	$(CXXLINK) $(DDXParserTest_OBJECTS) $(DDXParserTest_LDADD) $(LIBS)
-DODSFilterTest$(EXEEXT): $(DODSFilterTest_OBJECTS) $(DODSFilterTest_DEPENDENCIES) 
-	@rm -f DODSFilterTest$(EXEEXT)
-	$(CXXLINK) $(DODSFilterTest_OBJECTS) $(DODSFilterTest_LDADD) $(LIBS)
-GridGeoConstraintTest$(EXEEXT): $(GridGeoConstraintTest_OBJECTS) $(GridGeoConstraintTest_DEPENDENCIES) 
-	@rm -f GridGeoConstraintTest$(EXEEXT)
-	$(CXXLINK) $(GridGeoConstraintTest_OBJECTS) $(GridGeoConstraintTest_LDADD) $(LIBS)
-HTTPCacheTest$(EXEEXT): $(HTTPCacheTest_OBJECTS) $(HTTPCacheTest_DEPENDENCIES) 
+HTTPCacheTest$(EXEEXT): $(HTTPCacheTest_OBJECTS) $(HTTPCacheTest_DEPENDENCIES) $(EXTRA_HTTPCacheTest_DEPENDENCIES) 
 	@rm -f HTTPCacheTest$(EXEEXT)
 	$(CXXLINK) $(HTTPCacheTest_OBJECTS) $(HTTPCacheTest_LDADD) $(LIBS)
-HTTPConnectTest$(EXEEXT): $(HTTPConnectTest_OBJECTS) $(HTTPConnectTest_DEPENDENCIES) 
+HTTPConnectTest$(EXEEXT): $(HTTPConnectTest_OBJECTS) $(HTTPConnectTest_DEPENDENCIES) $(EXTRA_HTTPConnectTest_DEPENDENCIES) 
 	@rm -f HTTPConnectTest$(EXEEXT)
 	$(CXXLINK) $(HTTPConnectTest_OBJECTS) $(HTTPConnectTest_LDADD) $(LIBS)
-Keywords2Test$(EXEEXT): $(Keywords2Test_OBJECTS) $(Keywords2Test_DEPENDENCIES) 
-	@rm -f Keywords2Test$(EXEEXT)
-	$(CXXLINK) $(Keywords2Test_OBJECTS) $(Keywords2Test_LDADD) $(LIBS)
-MIMEUtilTest$(EXEEXT): $(MIMEUtilTest_OBJECTS) $(MIMEUtilTest_DEPENDENCIES) 
+MIMEUtilTest$(EXEEXT): $(MIMEUtilTest_OBJECTS) $(MIMEUtilTest_DEPENDENCIES) $(EXTRA_MIMEUtilTest_DEPENDENCIES) 
 	@rm -f MIMEUtilTest$(EXEEXT)
 	$(CXXLINK) $(MIMEUtilTest_OBJECTS) $(MIMEUtilTest_LDADD) $(LIBS)
-MarshallerTest$(EXEEXT): $(MarshallerTest_OBJECTS) $(MarshallerTest_DEPENDENCIES) 
+MarshallerTest$(EXEEXT): $(MarshallerTest_OBJECTS) $(MarshallerTest_DEPENDENCIES) $(EXTRA_MarshallerTest_DEPENDENCIES) 
 	@rm -f MarshallerTest$(EXEEXT)
 	$(CXXLINK) $(MarshallerTest_OBJECTS) $(MarshallerTest_LDADD) $(LIBS)
-RCReaderTest$(EXEEXT): $(RCReaderTest_OBJECTS) $(RCReaderTest_DEPENDENCIES) 
+RCReaderTest$(EXEEXT): $(RCReaderTest_OBJECTS) $(RCReaderTest_DEPENDENCIES) $(EXTRA_RCReaderTest_DEPENDENCIES) 
 	@rm -f RCReaderTest$(EXEEXT)
 	$(CXXLINK) $(RCReaderTest_OBJECTS) $(RCReaderTest_LDADD) $(LIBS)
-RegexTest$(EXEEXT): $(RegexTest_OBJECTS) $(RegexTest_DEPENDENCIES) 
+RegexTest$(EXEEXT): $(RegexTest_OBJECTS) $(RegexTest_DEPENDENCIES) $(EXTRA_RegexTest_DEPENDENCIES) 
 	@rm -f RegexTest$(EXEEXT)
 	$(CXXLINK) $(RegexTest_OBJECTS) $(RegexTest_LDADD) $(LIBS)
-ResponseBuilderTest$(EXEEXT): $(ResponseBuilderTest_OBJECTS) $(ResponseBuilderTest_DEPENDENCIES) 
-	@rm -f ResponseBuilderTest$(EXEEXT)
-	$(CXXLINK) $(ResponseBuilderTest_OBJECTS) $(ResponseBuilderTest_LDADD) $(LIBS)
-SequenceTest$(EXEEXT): $(SequenceTest_OBJECTS) $(SequenceTest_DEPENDENCIES) 
+SequenceTest$(EXEEXT): $(SequenceTest_OBJECTS) $(SequenceTest_DEPENDENCIES) $(EXTRA_SequenceTest_DEPENDENCIES) 
 	@rm -f SequenceTest$(EXEEXT)
 	$(CXXLINK) $(SequenceTest_OBJECTS) $(SequenceTest_LDADD) $(LIBS)
-SignalHandlerTest$(EXEEXT): $(SignalHandlerTest_OBJECTS) $(SignalHandlerTest_DEPENDENCIES) 
+ServerFunctionsListUnitTest$(EXEEXT): $(ServerFunctionsListUnitTest_OBJECTS) $(ServerFunctionsListUnitTest_DEPENDENCIES) $(EXTRA_ServerFunctionsListUnitTest_DEPENDENCIES) 
+	@rm -f ServerFunctionsListUnitTest$(EXEEXT)
+	$(CXXLINK) $(ServerFunctionsListUnitTest_OBJECTS) $(ServerFunctionsListUnitTest_LDADD) $(LIBS)
+SignalHandlerTest$(EXEEXT): $(SignalHandlerTest_OBJECTS) $(SignalHandlerTest_DEPENDENCIES) $(EXTRA_SignalHandlerTest_DEPENDENCIES) 
 	@rm -f SignalHandlerTest$(EXEEXT)
 	$(CXXLINK) $(SignalHandlerTest_OBJECTS) $(SignalHandlerTest_LDADD) $(LIBS)
-ancT$(EXEEXT): $(ancT_OBJECTS) $(ancT_DEPENDENCIES) 
+ancT$(EXEEXT): $(ancT_OBJECTS) $(ancT_DEPENDENCIES) $(EXTRA_ancT_DEPENDENCIES) 
 	@rm -f ancT$(EXEEXT)
 	$(CXXLINK) $(ancT_OBJECTS) $(ancT_LDADD) $(LIBS)
-arrayT$(EXEEXT): $(arrayT_OBJECTS) $(arrayT_DEPENDENCIES) 
+arrayT$(EXEEXT): $(arrayT_OBJECTS) $(arrayT_DEPENDENCIES) $(EXTRA_arrayT_DEPENDENCIES) 
 	@rm -f arrayT$(EXEEXT)
 	$(CXXLINK) $(arrayT_OBJECTS) $(arrayT_LDADD) $(LIBS)
-attrTableT$(EXEEXT): $(attrTableT_OBJECTS) $(attrTableT_DEPENDENCIES) 
+attrTableT$(EXEEXT): $(attrTableT_OBJECTS) $(attrTableT_DEPENDENCIES) $(EXTRA_attrTableT_DEPENDENCIES) 
 	@rm -f attrTableT$(EXEEXT)
 	$(CXXLINK) $(attrTableT_OBJECTS) $(attrTableT_LDADD) $(LIBS)
-dasT$(EXEEXT): $(dasT_OBJECTS) $(dasT_DEPENDENCIES) 
+dasT$(EXEEXT): $(dasT_OBJECTS) $(dasT_DEPENDENCIES) $(EXTRA_dasT_DEPENDENCIES) 
 	@rm -f dasT$(EXEEXT)
 	$(CXXLINK) $(dasT_OBJECTS) $(dasT_LDADD) $(LIBS)
-ddsT$(EXEEXT): $(ddsT_OBJECTS) $(ddsT_DEPENDENCIES) 
+ddsT$(EXEEXT): $(ddsT_OBJECTS) $(ddsT_DEPENDENCIES) $(EXTRA_ddsT_DEPENDENCIES) 
 	@rm -f ddsT$(EXEEXT)
 	$(CXXLINK) $(ddsT_OBJECTS) $(ddsT_LDADD) $(LIBS)
-generalUtilTest$(EXEEXT): $(generalUtilTest_OBJECTS) $(generalUtilTest_DEPENDENCIES) 
+generalUtilTest$(EXEEXT): $(generalUtilTest_OBJECTS) $(generalUtilTest_DEPENDENCIES) $(EXTRA_generalUtilTest_DEPENDENCIES) 
 	@rm -f generalUtilTest$(EXEEXT)
 	$(CXXLINK) $(generalUtilTest_OBJECTS) $(generalUtilTest_LDADD) $(LIBS)
-marshT$(EXEEXT): $(marshT_OBJECTS) $(marshT_DEPENDENCIES) 
+marshT$(EXEEXT): $(marshT_OBJECTS) $(marshT_DEPENDENCIES) $(EXTRA_marshT_DEPENDENCIES) 
 	@rm -f marshT$(EXEEXT)
 	$(CXXLINK) $(marshT_OBJECTS) $(marshT_LDADD) $(LIBS)
-parserUtilTest$(EXEEXT): $(parserUtilTest_OBJECTS) $(parserUtilTest_DEPENDENCIES) 
+parserUtilTest$(EXEEXT): $(parserUtilTest_OBJECTS) $(parserUtilTest_DEPENDENCIES) $(EXTRA_parserUtilTest_DEPENDENCIES) 
 	@rm -f parserUtilTest$(EXEEXT)
 	$(CXXLINK) $(parserUtilTest_OBJECTS) $(parserUtilTest_LDADD) $(LIBS)
-sequenceT$(EXEEXT): $(sequenceT_OBJECTS) $(sequenceT_DEPENDENCIES) 
+sequenceT$(EXEEXT): $(sequenceT_OBJECTS) $(sequenceT_DEPENDENCIES) $(EXTRA_sequenceT_DEPENDENCIES) 
 	@rm -f sequenceT$(EXEEXT)
 	$(CXXLINK) $(sequenceT_OBJECTS) $(sequenceT_LDADD) $(LIBS)
-structT$(EXEEXT): $(structT_OBJECTS) $(structT_DEPENDENCIES) 
+structT$(EXEEXT): $(structT_OBJECTS) $(structT_DEPENDENCIES) $(EXTRA_structT_DEPENDENCIES) 
 	@rm -f structT$(EXEEXT)
 	$(CXXLINK) $(structT_OBJECTS) $(structT_LDADD) $(LIBS)
 
@@ -990,25 +1148,24 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ArrayGeoConstraintTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ArrayTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/AttrTableTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ByteTest.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/CEFunctionsTest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/D4DimensionsTest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/D4EnumDefsTest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DAP4MarshallerTest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DAP4UnMarshallerTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DASTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DDSTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DDXParserTest-DDXParserTest.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DODSFilterTest.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/GridGeoConstraintTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/HTTPCacheTest-HTTPCacheTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/HTTPConnectTest-HTTPConnectTest.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Keywords2Test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MIMEUtilTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MarshallerTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/RCReaderTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/RegexTest.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ResponseBuilderTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SequenceTest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ServerFunctionsListUnitTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SignalHandlerTest.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ancT.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/arrayT.Po at am__quote@
@@ -1092,13 +1249,13 @@ clean-libtool:
 	-rm -rf .libs _libs
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -1123,7 +1280,7 @@ $(RECURSIVE_TARGETS):
 	fi; test -z "$$fail"
 
 $(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -1160,6 +1317,10 @@ ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
+cscopelist-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -1223,6 +1384,20 @@ GTAGS:
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS) $(LISP)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -1236,7 +1411,7 @@ check-TESTS: $(TESTS)
 	    if test -f ./$$tst; then dir=./; \
 	    elif test -f $$tst; then dir=; \
 	    else dir="$(srcdir)/"; fi; \
-	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
 	      all=`expr $$all + 1`; \
 	      case " $(XFAIL_TESTS) " in \
 	      *[\ \	]$$tst[\ \	]*) \
@@ -1307,14 +1482,15 @@ check-TESTS: $(TESTS)
 	  fi; \
 	  dashes=`echo "$$dashes" | sed s/./=/g`; \
 	  if test "$$failed" -eq 0; then \
-	    echo "$$grn$$dashes"; \
+	    col="$$grn"; \
 	  else \
-	    echo "$$red$$dashes"; \
+	    col="$$red"; \
 	  fi; \
-	  echo "$$banner"; \
-	  test -z "$$skipped" || echo "$$skipped"; \
-	  test -z "$$report" || echo "$$report"; \
-	  echo "$$dashes$$std"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
 	  test "$$failed" -eq 0; \
 	else :; fi
 
@@ -1350,13 +1526,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -1394,10 +1567,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
@@ -1483,22 +1661,24 @@ ps-am:
 uninstall-am:
 
 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
-	ctags-recursive install-am install-strip tags-recursive
+	cscopelist-recursive ctags-recursive install-am install-strip \
+	tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
 	all all-am check check-TESTS check-am check-local clean \
-	clean-checkPROGRAMS clean-generic clean-libtool ctags \
-	ctags-recursive distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-recursive uninstall uninstall-am
+	clean-checkPROGRAMS clean-generic clean-libtool cscopelist \
+	cscopelist-recursive ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
 
 
 test_config.h: test_config.h.in Makefile
@@ -1512,9 +1692,6 @@ test_config.h: test_config.h.in Makefile
 @CPPUNIT_FALSE@	@echo "**********************************************************"
 @CPPUNIT_FALSE@	@echo ""
 
-# fdiostreamTest_SOURCES = fdiostreamTest.cc
-# fdiostreamTest_LDADD = ../libdapclient.la ../libdap.la $(AM_LDADD)
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/unit-tests/MarshallerTest.cc b/unit-tests/MarshallerTest.cc
index f79c224..f850d11 100644
--- a/unit-tests/MarshallerTest.cc
+++ b/unit-tests/MarshallerTest.cc
@@ -12,7 +12,7 @@
 #endif
 #include <fcntl.h>
 
-//#define DODS_DEBUG 1
+// #define DODS_DEBUG 1
 
 #include <iostream>
 #include <fstream>
@@ -81,13 +81,16 @@ CPPUNIT_TEST_SUITE( MarshallerTest );
         CPPUNIT_TEST( structure_stream_deserialize_test );
         CPPUNIT_TEST( grid_stream_deserialize_test );
         CPPUNIT_TEST( sequence_stream_deserialize_test );
+
 #if CHECKSUMS
         CPPUNIT_TEST( simple_types_stream_serialize_checksum_test );
         CPPUNIT_TEST( array_stream_serialize_checksum_test );
         CPPUNIT_TEST( structure_stream_serialize_checksum_test );
         CPPUNIT_TEST( grid_stream_serialize_checksum_test );
+#if 0
         CPPUNIT_TEST( sequence_stream_serialize_checksum_test );
 #endif
+#endif
     CPPUNIT_TEST_SUITE_END( );
 
     TestByte *b;
@@ -158,6 +161,7 @@ public:
         arr->append_dim(3, "dim2");
         arr->read();
         arr->set_read_p(true);
+
         db = new dods_byte[arr->length() * sizeof(dods_byte)];
         for (int i = 0; i < arr->length(); ++i)
             db[i] = 126;
@@ -317,13 +321,6 @@ public:
         try {
             FILE *f = fopen("struct_test.file", "w");
             XDRFileMarshaller fm(f);
-#if 0
-            TestStructure s("s");
-            s->add_var(i32);
-            s->add_var(str);
-            s->add_var(arr);
-            s->set_send_p(true);
-#endif
             s->serialize(eval, dds, fm, false);
         }
         catch( Error &e ) {
@@ -730,13 +727,6 @@ public:
         try {
             ofstream strm("struct_test.strm", ios::out | ios::trunc);
             XDRStreamMarshaller sm(strm);
-#if 0
-            TestStructure s("s");
-            s->add_var(i32);
-            s->add_var(str);
-            s->add_var(arr);
-            s->set_send_p(true);
-#endif
             s->serialize(eval, dds, sm, false);
         }
         catch( Error &e ) {
@@ -976,46 +966,53 @@ public:
 
             sm.reset_checksum();
             b->serialize(eval, dds, sm, false);
-            // cerr << sm.get_checksum() << endl;
-            // NB: Checksum can be called at most once between calls to
-            // reset_checksum().
-            CPPUNIT_ASSERT(sm.get_checksum() == "00594fd4f42ba43fc1ca0427a0576295");
+            DBG(cerr << sm.get_checksum() << endl);
+            CPPUNIT_ASSERT(sm.get_checksum() == "85e53271e14006f0265921d02d4d736cdc580b0b");
 
             sm.reset_checksum();
             i16->serialize(eval, dds, sm, false);
-            CPPUNIT_ASSERT(sm.get_checksum() == "e1542bf1157a45fa5434ef0f8ead95fe");
+            DBG(cerr << sm.get_checksum() << endl);
+            CPPUNIT_ASSERT(sm.get_checksum() == "fb7cc6f64453ad5a9926a1ba40955198004f6b31");
 
             sm.reset_checksum();
             i32->serialize(eval, dds, sm, false);
-            CPPUNIT_ASSERT(sm.get_checksum() == "623ad5eda301ae082d466141a7f6dcaf");
+            DBG(cerr << sm.get_checksum() << endl);
+            CPPUNIT_ASSERT(sm.get_checksum() == "d245351a7b5cf9244f146fa0763b4dd036245666");
 
             sm.reset_checksum();
             ui16->serialize(eval, dds, sm, false);
-            CPPUNIT_ASSERT(sm.get_checksum() == "97e5469b504c8e8fdff3870a9c170505");
+            DBG(cerr << sm.get_checksum() << endl);
+            CPPUNIT_ASSERT(sm.get_checksum() == "f1e39479b3f84f40a6dca061ace8c910036cb867");
 
             sm.reset_checksum();
             ui32->serialize(eval, dds, sm, false);
-            CPPUNIT_ASSERT(sm.get_checksum() == "def59b1b1c5b8571629665d94c06dece");
+            DBG(cerr << sm.get_checksum() << endl);
+            CPPUNIT_ASSERT(sm.get_checksum() == "0d75307097b3f51d5b327f59e775165d4b1bfefa");
 
             sm.reset_checksum();
             f32->serialize(eval, dds, sm, false);
-            CPPUNIT_ASSERT(sm.get_checksum() == "f598b75413dfea585f918dc5fd3bd4af");
+            DBG(cerr << sm.get_checksum() << endl);
+            CPPUNIT_ASSERT(sm.get_checksum() == "16b84e7d293b3a53ceb97b9e50999b7ca2d17204");
 
             sm.reset_checksum();
             f64->serialize(eval, dds, sm, false);
-            CPPUNIT_ASSERT(sm.get_checksum() == "db81ae031cbc240bcc699ddf9a2ffe03");
+            DBG(cerr << sm.get_checksum() << endl);
+            CPPUNIT_ASSERT(sm.get_checksum() == "e8f339d9807f4998d8dc11e4c9d6f2ed05ca50cb");
 
             sm.reset_checksum();
             str->serialize(eval, dds, sm, false);
             string cs = sm.get_checksum();
             DBG(cerr << "cs: " << cs << endl);
-            CPPUNIT_ASSERT(cs == "34a13db3c3fc434ec6016f2b46ce01b2");
+            // This value changes with the number of times str is serialized
+            // since the TestStr class returns different values for each call
+            // to read().
+            CPPUNIT_ASSERT(cs == "77b52cf559aec21b5bb06785693c915cdd7983c3");
 
             sm.reset_checksum();
             url->serialize(eval, dds, sm, false);
             cs = sm.get_checksum();
             DBG(cerr << "cs: " << cs << endl);
-            CPPUNIT_ASSERT(cs == "98e8fb12c7b3467d3489a4a04e9eddff");
+            CPPUNIT_ASSERT(cs == "18c61893206349dfc1ee4d030cfa18f924d44571");
         }
         catch( Error &e ) {
             string err = "failed:" + e.get_error_message();
@@ -1034,7 +1031,7 @@ public:
             string cs = sm.get_checksum();
 
             DBG(cerr << cs << endl);
-            CPPUNIT_ASSERT(cs == "9ddd02276e5c30436e3b530eba05ad6a");
+            CPPUNIT_ASSERT(cs == "9f39fdfeaf3d34181b346e2eec26abe9d9cdde3a");
         }
         catch( Error &e ) {
             string err = "failed:" + e.get_error_message();
@@ -1047,19 +1044,12 @@ public:
         try {
             ofstream strm("struct_test.strm", ios::out | ios::trunc);
             XDRStreamMarshaller sm(strm, true);
-#if 0
-            TestStructure s("s");
-            s->add_var(i32);
-            s->add_var(str);
-            s->add_var(arr);
-            s->set_send_p(true);
-#endif
             sm.reset_checksum();
             s->serialize(eval, dds, sm, false);
             string cs = sm.get_checksum();
 
             DBG(cerr << cs << endl);
-            CPPUNIT_ASSERT(cs == "c02e69c6e59c7ba0cbb40d7a1311399d");
+            CPPUNIT_ASSERT(cs == "9f39fdfeaf3d34181b346e2eec26abe9d9cdde3a");
         }
         catch( Error &e ) {
             string err = "failed:" + e.get_error_message();
@@ -1096,7 +1086,7 @@ public:
             string cs = sm.get_checksum();
 
             DBG(cerr << cs << endl);
-            CPPUNIT_ASSERT(cs == "176612ebf0983a27635d963fd3148eea");
+            CPPUNIT_ASSERT(cs == "ed67de94237ec33d220d8fb75734c195d64d4794");
         }
         catch( Error &e ) {
             string err = "failed:" + e.get_error_message();
@@ -1129,7 +1119,7 @@ public:
             string cs = sm.get_checksum();
 
             DBG(cerr << cs << endl);
-            CPPUNIT_ASSERT(cs == "d0c837cf518882338dceb7e7428e2cd1");
+            CPPUNIT_ASSERT(cs == "7b99e35c2fb361eb27f51aec30fc2a17ac8cda50");
         }
         catch( Error &e ) {
             string err = "failed:" + e.get_error_message();
diff --git a/unit-tests/RCReaderTest.cc b/unit-tests/RCReaderTest.cc
index bba9fa7..1a66c76 100644
--- a/unit-tests/RCReaderTest.cc
+++ b/unit-tests/RCReaderTest.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/unit-tests/RegexTest.cc b/unit-tests/RegexTest.cc
index 38bf974..f07a2a1 100644
--- a/unit-tests/RegexTest.cc
+++ b/unit-tests/RegexTest.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/unit-tests/ResponseBuilderTest.cc b/unit-tests/ResponseBuilderTest.cc
deleted file mode 100644
index 140e3df..0000000
--- a/unit-tests/ResponseBuilderTest.cc
+++ /dev/null
@@ -1,428 +0,0 @@
-// -*- mode: c++; c-basic-offset:4 -*-
-
-// This file is part of libdap, A C++ implementation of the OPeNDAP Data
-// Access Protocol.
-
-// Copyright (c) 2002,2003 OPeNDAP, Inc.
-// Author: James Gallagher <jgallagher at opendap.org>
-//
-// This 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.
-//
-// This 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 this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-//
-// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
-
-#include "config.h"
-
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>  // for stat
-#include <cstring>
-#include <sstream>
-
-//#define DODS_DEBUG
-
-#include "ObjectType.h"
-#include "EncodingType.h"
-#include "ResponseBuilder.h"
-#include "DAS.h"
-#include "DDS.h"
-#include "ce_functions.h"
-
-#include "GNURegex.h"
-#include "util.h"
-#include "debug.h"
-
-#include "../tests/TestTypeFactory.h"
-#include "../tests/TestByte.h"
-
-#include "testFile.h"
-#include "test_config.h"
-
-using namespace CppUnit;
-using namespace std;
-using namespace libdap;
-
-int test_variable_sleep_interval = 0;
-
-namespace libdap {
-
-class ResponseBuilderTest: public TestFixture {
-private:
-    ResponseBuilder *df, *df1, *df2, *df3, *df4, *df5;
-
-    AttrTable *cont_a;
-    DAS *das;
-    DDS *dds;
-    ostringstream oss;
-    time_t now;
-    char now_array[256];
-
-public:
-    ResponseBuilderTest() {
-        now = time(0);
-        ostringstream time_string;
-        time_string << (int) now;
-        strncpy(now_array, time_string.str().c_str(), 255);
-        now_array[255] = '\0';
-    }
-
-    ~ResponseBuilderTest() {
-    }
-
-    void setUp() {
-        // Test pathname
-        df = new ResponseBuilder();
-        // Test missing file
-        df1 = new ResponseBuilder();
-        df1->set_dataset_name("no-such-file");
-
-        // Test files in CWD. Note that the time is the GM time : Tue, 01 May
-        // 2001 01:08:14 -0700
-        df2 = new ResponseBuilder();
-        df2->set_dataset_name("test_config.h");
-
-        // This file has an ancillary DAS in the server-testsuite dir.
-        // df3 is also used to test escaping stuff in URLs. 5/4/2001 jhrg
-        df3 = new ResponseBuilder();
-        df3->set_dataset_name((string) TEST_SRC_DIR + "/server-testsuite/coads.data");
-        df3->set_ce("u,x,z[0]&grid(u,\"lat<10.0\")");
-        df3->set_timeout(1);
-
-        // Go back to this data source to test w/o an ancillary DAS.
-        df4 = new ResponseBuilder();
-        df4->set_dataset_name((string) TEST_SRC_DIR + "/server-testsuite/bears.data");
-        df4->set_ce("u,x,z[0]&grid(u,\"lat<10.0\")");
-        df4->set_timeout(1);
-
-        // Test escaping stuff. 5/4/2001 jhrg
-        df5 = new ResponseBuilder();
-        df5->set_dataset_name("nowhere%5Bmydisk%5Dmyfile");
-        df5->set_ce("u%5B0%5D");
-
-        cont_a = new AttrTable;
-        cont_a->append_attr("size", "Int32", "7");
-        cont_a->append_attr("type", "String", "cars");
-        das = new DAS;
-        das->add_table("a", cont_a);
-
-        // This AttrTable looks like:
-        //      Attributes {
-        //          a {
-        //              Int32 size 7;
-        //              String type cars;
-        //          }
-        //      }
-
-        TestTypeFactory ttf;
-        dds = new DDS(&ttf, "test");
-        TestByte a("a");
-        dds->add_var(&a);
-
-        dds->transfer_attributes(das);
-        dds->set_dap_major(3);
-        dds->set_dap_minor(2);
-    }
-
-    void tearDown() {
-        delete df;
-        df = 0;
-        delete df1;
-        df1 = 0;
-        delete df2;
-        df2 = 0;
-        delete df3;
-        df3 = 0;
-        delete df4;
-        df4 = 0;
-        delete df5;
-        df5 = 0;
-
-        delete das;
-        das = 0;
-    }
-
-    bool re_match(Regex &r, const string &s) {
-        DBG(cerr << "s.length(): " << s.length() << endl);
-        int pos = r.match(s.c_str(), s.length());
-        DBG(cerr << "r.match(s): " << pos << endl);
-        return pos > 0 && static_cast<unsigned> (pos) == s.length();
-    }
-
-    bool re_match_binary(Regex &r, const string &s) {
-        DBG(cerr << "s.length(): " << s.length() << endl);
-        int pos = r.match(s.c_str(), s.length());
-        DBG(cerr << "r.match(s): " << pos << endl);
-        return pos > 0;
-    }
-
-   void send_das_test() {
-        Regex
-                r1(
-                        "HTTP/1.0 200 OK\r\n\
-XDODS-Server: .*\
-XOPeNDAP-Server: .*\
-XDAP: .*\
-Date: .*\
-Last-Modified: .*\
-Content-Type: text/plain\r\n\
-Content-Description: dods_das\r\n\
-\r\n\
-Attributes \\{\n\
-    a \\{\n\
-        Int32 size 7;\n\
-        String type \"cars\";\n\
-    \\}\n\
-\\}\n");
-
-        df->send_das(oss, *das);
-
-        DBG(cerr << "DAS: " << oss.str() << endl);
-
-        CPPUNIT_ASSERT(re_match(r1, oss.str()));
-        oss.str("");
-    }
-
-    void send_dds_test() {
-        Regex
-                r1(
-                        "HTTP/1.0 200 OK\r\n\
-XDODS-Server: .*\
-XOPeNDAP-Server: .*\
-XDAP: .*\
-Date: .*\
-Last-Modified: .*\
-Content-Type: text/plain\r\n\
-Content-Description: dods_dds\r\n\
-\r\n\
-Dataset \\{\n\
-    Byte a;\n\
-\\} test;\n");
-
-        ConstraintEvaluator ce;
-
-        df->send_dds(oss, *dds, ce);
-
-        DBG(cerr << "DDS: " << oss.str() << endl);
-
-        CPPUNIT_ASSERT(re_match(r1, oss.str()));
-        oss.str("");
-    }
-
-    void send_ddx_test() {
-        string baseline = testFile((string) TEST_SRC_DIR + "/ddx-testsuite/response_builder_send_ddx_test.xml");
-        Regex r1(baseline.c_str());
-        ConstraintEvaluator ce;
-
-        try {
-            df->send_ddx(oss, *dds, ce);
-
-            DBG(cerr << "DDX: " << oss.str() << endl);
-
-            CPPUNIT_ASSERT(re_match(r1, baseline));
-            //CPPUNIT_ASSERT(re_match(r1, oss.str()));
-            //oss.str("");
-        } catch (Error &e) {
-            CPPUNIT_FAIL("Error: " + e.get_error_message());
-        }
-    }
-
-    void send_data_ddx_test() {
-        string baseline = testFile((string) TEST_SRC_DIR + "/tmp.xml"); //"/ddx-testsuite/response_builder_send_data_ddx_test_3.xml");
-        Regex r1(baseline.c_str());
-        // I do not look for the closing '--boundary' because the binary
-        // data breaks the regex functions in the c library WRT subsequent
-        // pattern matches. jhrg
-        //--boundary--\r\n");
-
-        ConstraintEvaluator ce;
-
-        try {
-            df->send_data_ddx(oss, *dds, ce, "start at opendap.org", "boundary", true);
-
-            DBG(cerr << "DataDDX: " << oss.str() << endl);
-            //DBG(cerr << "glob: " << glob(baseline.c_str(), oss.str().c_str()) << endl);
-            //CPPUNIT_ASSERT(glob(baseline.c_str(), oss.str().c_str()) == 0);
-            CPPUNIT_ASSERT(re_match_binary(r1, oss.str()));
-            //oss.str("");
-        } catch (Error &e) {
-            CPPUNIT_FAIL("Error: " + e.get_error_message());
-        }
-    }
-
-    void send_data_ddx_test2() {
-        Regex
-                r1(
-                        "--boundary\r\n\
-Content-Type: Text/xml; charset=iso-8859-1\r\n\
-Content-Id: <start at opendap.org>\r\n\
-Content-Description: dap4-ddx\r\n\
-\r\n\
-<\\?xml version=\"1.0\" encoding=\"UTF-8\"\\?>.*\
-<Dataset name=\"test\".*\
-.*\
-dapVersion=\"3.2\">.*\
-.*\
-    <Byte name=\"a\">.*\
-        <Attribute name=\"size\" type=\"Int32\">.*\
-            <value>7</value>.*\
-        </Attribute>.*\
-        <Attribute name=\"type\" type=\"String\">.*\
-            <value>cars</value>.*\
-        </Attribute>.*\
-    </Byte>.*\
-.*\
-    <blob href=\"cid:.*@.*\"/>.*\
-</Dataset>.*\
---boundary\r\n\
-Content-Type: application/octet-stream\r\n\
-Content-Id: <.*@.*>\r\n\
-Content-Description: dap4-data\r\n\
-Content-Encoding: binary\r\n\
-\r\n\
-.*");
-
-        ConstraintEvaluator ce;
-
-        try {
-            df->send_data_ddx(oss, *dds, ce, "start at opendap.org", "boundary", false);
-            DBG(cerr << "DataDDX: " << oss.str() << endl);
-            CPPUNIT_ASSERT(re_match_binary(r1, oss.str()));
-
-            // Unlike the test where the full headers are generated, there's
-            // no check for a conditional response here because that feature
-            // of ResponseBuilder is only supported when MIME headers are built by
-            // the class. In order to return a '304' response, headers must be
-            // built.
-        } catch (Error &e) {
-            CPPUNIT_FAIL("Error: " + e.get_error_message());
-        }
-    }
-
-    void escape_code_test() {
-        // These should NOT be escaped.
-
-        DBG(cerr << df3->get_dataset_name() << endl); DBG(cerr << df3->get_ce() << endl);
-
-        CPPUNIT_ASSERT(df3->get_dataset_name() == (string)TEST_SRC_DIR + "/server-testsuite/coads.data");
-        CPPUNIT_ASSERT(df3->get_ce() == "u,x,z[0]&grid(u,\"lat<10.0\")");
-
-        // The ResponseBuilder instance is feed escaped values; they should be
-        // unescaped by the ctor and the mutators. 5/4/2001 jhrg
-
-        DBG(cerr << df5->get_dataset_name() << endl); DBG(cerr << df5->get_ce() << endl);
-
-        CPPUNIT_ASSERT(df5->get_dataset_name() == "nowhere[mydisk]myfile");
-        CPPUNIT_ASSERT(df5->get_ce() == "u[0]");
-
-        df5->set_ce("u%5B0%5D");
-        CPPUNIT_ASSERT(df5->get_ce() == "u[0]");
-
-        df5->set_ce("Grid%20u%5B0%5D");
-        CPPUNIT_ASSERT(df5->get_ce() == "Grid%20u[0]");
-    }
-
-    // This tests reading the timeout value from argv[].
-    void timeout_test() {
-        CPPUNIT_ASSERT(df3->get_timeout() == 1);
-        CPPUNIT_ASSERT(df1->get_timeout() == 0);
-    }
-
-    void split_ce_test_1() {
-        ConstraintEvaluator eval;
-        register_functions(eval);
-        df->split_ce(eval, "x,y,z");
-        CPPUNIT_ASSERT(df->get_ce() == "x,y,z");
-        CPPUNIT_ASSERT(df->get_btp_func_ce() == "");
-    }
-
-    void split_ce_test_2() {
-        ConstraintEvaluator eval;
-        register_functions(eval);
-        df->split_ce(eval, "honker(noise),x,y,z");
-        CPPUNIT_ASSERT(df->get_ce() == "honker(noise),x,y,z");
-        CPPUNIT_ASSERT(df->get_btp_func_ce() == "");
-    }
-
-    void split_ce_test_3() {
-        ConstraintEvaluator eval;
-        register_functions(eval);
-        df->split_ce(eval, "grid(noise),x,y,z");
-        CPPUNIT_ASSERT(df->get_ce() == "x,y,z");
-        CPPUNIT_ASSERT(df->get_btp_func_ce() == "grid(noise)");
-    }
-
-    void split_ce_test_4() {
-        ConstraintEvaluator eval;
-        register_functions(eval);
-        df->split_ce(eval, "grid(noise),linear_scale(noise2),x,y,z");
-        CPPUNIT_ASSERT(df->get_ce() == "x,y,z");
-        CPPUNIT_ASSERT(df->get_btp_func_ce() == "grid(noise),linear_scale(noise2)");
-    }
-
-    void split_ce_test_5() {
-         ConstraintEvaluator eval;
-         register_functions(eval);
-         df->split_ce(eval, "grid(noise),honker(foo),grid(noise2),x,y,z");
-         CPPUNIT_ASSERT(df->get_ce() == "honker(foo),x,y,z");
-         CPPUNIT_ASSERT(df->get_btp_func_ce() == "grid(noise),grid(noise2)");
-     }
-
-    void split_ce_test_6() {
-         ConstraintEvaluator eval;
-         register_functions(eval);
-         df->split_ce(eval, "grid(noise),honker(foo),grid(noise2),x,y,z,foo()");
-         CPPUNIT_ASSERT(df->get_ce() == "honker(foo),x,y,z,foo()");
-         CPPUNIT_ASSERT(df->get_btp_func_ce() == "grid(noise),grid(noise2)");
-     }
-
-CPPUNIT_TEST_SUITE( ResponseBuilderTest );
-
-        CPPUNIT_TEST(send_das_test);
-        CPPUNIT_TEST(send_dds_test);
-        CPPUNIT_TEST(send_ddx_test);
-
-        // These tests fail because the regex comparison code is hosed.
-        // I've tried using some simpler globbing code, but that fails, too,
-        // likely because of the MIME header line termination chars. These
-        // methods do work and I'm spending more time on the these two tests
-        // than on all of the XMLWriter methods!
-        // CPPUNIT_TEST(send_data_ddx_test);
-        // CPPUNIT_TEST(send_data_ddx_test2);
-        CPPUNIT_TEST(escape_code_test);
-
-        CPPUNIT_TEST(split_ce_test_1);
-        CPPUNIT_TEST(split_ce_test_2);
-        CPPUNIT_TEST(split_ce_test_3);
-        CPPUNIT_TEST(split_ce_test_4);
-        CPPUNIT_TEST(split_ce_test_5);
-        CPPUNIT_TEST(split_ce_test_6);
-
-    CPPUNIT_TEST_SUITE_END();
-};
-CPPUNIT_TEST_SUITE_REGISTRATION(ResponseBuilderTest);
-}
-
-int main(int, char**) {
-    CppUnit::TextTestRunner runner;
-    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
-
-    bool wasSuccessful = runner.run("", false);
-
-    return wasSuccessful ? 0 : 1;
-}
-
diff --git a/unit-tests/SequenceTest.cc b/unit-tests/SequenceTest.cc
index bbcdb16..98a3da1 100644
--- a/unit-tests/SequenceTest.cc
+++ b/unit-tests/SequenceTest.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/unit-tests/ServerFunctionsListUnitTest.cc b/unit-tests/ServerFunctionsListUnitTest.cc
new file mode 100644
index 0000000..f4a6c96
--- /dev/null
+++ b/unit-tests/ServerFunctionsListUnitTest.cc
@@ -0,0 +1,213 @@
+// -*- mode: c++; c-basic-offset:4 -*-
+
+// This file is part of libdap, A C++ implementation of the OPeNDAP Data
+// Access Protocol.
+
+// Copyright (c) 2013 OPeNDAP, Inc.
+// Author: Nathan David Potter <ndp at opendap.org>
+//
+// This 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.
+//
+// This 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 this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
+
+//#include <cstdio>
+
+#include <pthread.h>
+
+#include <cppunit/TextTestRunner.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "debug.h"
+#include "util.h"
+
+#include "GetOpt.h"
+#include "BaseType.h"
+#include "Str.h"
+#include "DDS.h"
+#include "ServerFunction.h"
+#include "ServerFunctionsList.h"
+
+static bool debug = false;
+
+#undef DBG
+#define DBG(x) do { if (debug) (x); } while(false);
+
+
+void sflut(int argc, libdap::BaseType *argv[], libdap::DDS &dds, libdap::BaseType **btpp)
+{
+    string info = string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
+            + "<function name=\"ugr4\" version=\"0.1\">\n"
+            + "ServeFunctionsList Unit Test.\n" + "usage: sflut()"
+            + "\n"+"</function>";
+
+    libdap::Str *response = new libdap::Str("info");
+    response->set_value(info);
+    *btpp = response;
+    return;
+
+}
+
+class SFLUT : public libdap::ServerFunction {
+public :
+    SFLUT() {
+        setName("sflut");
+        setDescriptionString("This is a unit test to test the ServerFunctionList class.");
+        setUsageString("sflut()");
+        setRole("http://services.opendap.org/dap4/unit-tests/ServerFunctionList");
+        setDocUrl("http://docs.opendap.org/index.php/unit-tests");
+        setFunction(sflut);
+        setVersion("1.0");
+
+    }
+};
+
+
+namespace libdap {
+class ServerFunctionsListUnitTest: public CppUnit::TestFixture {
+
+public:
+
+    // Called once before everything gets tested
+    ServerFunctionsListUnitTest() {
+        //    DBG(cerr << " BindTest - Constructor" << endl);
+
+    }
+
+    // Called at the end of the test
+    ~ServerFunctionsListUnitTest() {
+       //    DBG(cerr << " BindTest - Destructor" << endl);
+    }
+
+    // Called before each test
+    void setup() {
+        //    DBG(cerr << " BindTest - setup()" << endl);
+    }
+
+    // Called after each test
+    void tearDown() {
+        //    DBG(cerr << " tearDown()" << endl);
+    }
+
+    CPPUNIT_TEST_SUITE( libdap::ServerFunctionsListUnitTest );
+
+    CPPUNIT_TEST(sflut_test);
+    //CPPUNIT_TEST(always_pass);
+
+    CPPUNIT_TEST_SUITE_END();
+
+    void printFunctionNames(){
+        vector<string> *names = new vector<string>();
+        printFunctionNames(names);
+        delete names;
+    }
+
+
+    void printFunctionNames(vector<string> *names){
+        DBG(cerr << "Server_Function_List_Unit_Test::printFunctionNames() - ServerFunctionList::getFunctionNames(): " << endl);
+        if(names->empty()){
+            DBG(cerr << "     Function list is empty." << endl);
+            return;
+        }
+
+        for(int i=0; i<names->size() ;i++){
+            DBG(cerr <<  "   name["<< i << "]: "<< (*names)[i] << endl);
+        }
+    }
+    void always_pass(){
+        CPPUNIT_ASSERT(true);
+    }
+
+
+    void sflut_test(){
+        DBG(cerr << endl);
+
+        SFLUT *ssf = new SFLUT();
+        ssf->setName("Server_Function_List_Unit_Test");
+
+        vector<string> names;
+        libdap::ServerFunctionsList::TheList()->getFunctionNames(&names);
+        printFunctionNames(&names);
+
+        CPPUNIT_ASSERT(names.size()==0);
+
+
+        DBG(cerr << "ServerFunctionsListUnitTest::sflut_test() - Adding function(): " << ssf->getName() << endl);
+        libdap::ServerFunctionsList::TheList()->add_function(ssf);
+
+        names.clear();
+        libdap::ServerFunctionsList::TheList()->getFunctionNames(&names);
+        printFunctionNames(&names);
+        CPPUNIT_ASSERT(names.size()==1);
+
+#if 0
+        DBG(cerr << "ServerFunctionsListUnitTest::sflut_test() - Deleting the List." << endl);
+        libdap::ServerFunctionsList::delete_instance();
+
+        // This is needed because we used pthread_once to ensure that
+        // initialize_instance() is called at most once. We manually call
+        // the delete method, so the object must be remade. This would never
+        // be done by non-test code. jhrg 5/2/13
+        libdap::ServerFunctionsList::initialize_instance();
+
+        names.clear();
+        libdap::ServerFunctionsList::TheList()->getFunctionNames(&names);
+        printFunctionNames(&names);
+        CPPUNIT_ASSERT(names.size()==0);
+#endif
+
+    }
+
+};
+} // libdap namespace
+
+// BindTest
+
+CPPUNIT_TEST_SUITE_REGISTRATION(libdap::ServerFunctionsListUnitTest);
+
+
+int main(int argc, char*argv[]) {
+    CppUnit::TextTestRunner runner;
+    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
+
+    GetOpt getopt(argc, argv, "d");
+    char option_char;
+    while ((option_char = getopt()) != EOF)
+        switch (option_char) {
+        case 'd':
+            debug = 1;  // debug is a static global
+            break;
+        default:
+            break;
+        }
+
+    bool wasSuccessful = true;
+    string test = "";
+    int i = getopt.optind;
+    if (i == argc) {
+        // run them all
+        wasSuccessful = runner.run("");
+    }
+    else {
+        while (i < argc) {
+            test = string("libdap::ServerFunctionsListUnitTest::") + argv[i++];
+
+            wasSuccessful = wasSuccessful && runner.run(test);
+        }
+    }
+
+    return wasSuccessful ? 0 : 1;
+}
+
diff --git a/unit-tests/SignalHandlerTest.cc b/unit-tests/SignalHandlerTest.cc
index 7d281db..3679ba6 100644
--- a/unit-tests/SignalHandlerTest.cc
+++ b/unit-tests/SignalHandlerTest.cc
@@ -1,4 +1,3 @@
-
 // -*- mode: c++; c-basic-offset:4 -*-
 
 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
@@ -19,10 +18,10 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
- 
+
 #include <cppunit/TextTestRunner.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/extensions/HelperMacros.h>
@@ -34,79 +33,87 @@
 #include <fcntl.h>
 #include <process.h>
 #endif
- 
+
 #include "SignalHandler.h"
 #include "debug.h"
 
 using namespace CppUnit;
 using namespace std;
 
-namespace libdap
-{
+namespace libdap {
 
-class SignalHandlerTest : public TestFixture {
+class SignalHandlerTest: public TestFixture {
 private:
-    SignalHandler *sh;
-    TestHandler *th;
-
-public: 
-    SignalHandlerTest() {}
-    ~SignalHandlerTest() {}
-
-    void setUp() {
-	sh = SignalHandler::instance();
-	th = new TestHandler;
-    }
-
-    void tearDown() {
-	delete th; th = 0;
-    }
-
-    // Tests for methods
-    void register_handler_test() {
-	sh->register_handler(SIGALRM, th);
-	CPPUNIT_ASSERT(sh->d_signal_handlers[SIGALRM] == th);
-    }
-
-    void remove_handler_test() {
-	CPPUNIT_ASSERT(sh->remove_handler(SIGALRM) == th);
-    }
-
-    void alarm_test() {
-	// Ignore the alarm signal and then register our handler. Without
-	// setting alram to ignore first the SignalHandler will call our
-	// EventHandler and then perform the default action for the signal,
-	// which is call exit() with EXIT_FAILURE.
-	signal(SIGALRM, SIG_IGN);
-	sh->register_handler(SIGALRM, th);
-	alarm(1);
-	sleep(10);
-	CPPUNIT_ASSERT(th->flag == 1);
-    }
-
-    CPPUNIT_TEST_SUITE( SignalHandlerTest );
-
-    CPPUNIT_TEST(register_handler_test);
-    CPPUNIT_TEST(remove_handler_test);
-    CPPUNIT_TEST(alarm_test);
-
-    CPPUNIT_TEST_SUITE_END();
+	SignalHandler *sh;
+	TestHandler *th;
+
+public:
+	SignalHandlerTest()
+	{
+	}
+	~SignalHandlerTest()
+	{
+	}
+
+	void setUp()
+	{
+		sh = SignalHandler::instance();
+		th = new TestHandler;
+	}
+
+	void tearDown()
+	{
+		delete th;
+		th = 0;
+	}
+
+	// Tests for methods
+	void register_handler_test()
+	{
+		sh->register_handler(SIGALRM, th);
+		CPPUNIT_ASSERT(sh->d_signal_handlers[SIGALRM] == th);
+	}
+
+	void remove_handler_test()
+	{
+		CPPUNIT_ASSERT(sh->remove_handler(SIGALRM) == th);
+	}
+
+	void alarm_test()
+	{
+		// Ignore the alarm signal and then register our handler. Without
+		// setting alram to ignore first the SignalHandler will call our
+		// EventHandler and then perform the default action for the signal,
+		// which is call exit() with EXIT_FAILURE.
+		signal(SIGALRM, SIG_IGN);
+		sh->register_handler(SIGALRM, th);
+		alarm(1);
+		sleep(10);
+		CPPUNIT_ASSERT(th->flag == 1);
+	}
+
+CPPUNIT_TEST_SUITE( SignalHandlerTest )
+	;
+
+	CPPUNIT_TEST(register_handler_test);
+	CPPUNIT_TEST(remove_handler_test);
+	CPPUNIT_TEST(alarm_test);
+
+	CPPUNIT_TEST_SUITE_END()
+	;
 };
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SignalHandlerTest);
 
 }
 
-int 
-main( int, char** )
+int main(int, char**)
 {
-    CppUnit::TextTestRunner runner;
-    runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
+	CppUnit::TextTestRunner runner;
+	runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
 
-    bool wasSuccessful = runner.run( "", false ) ;
+	bool wasSuccessful = runner.run("", false);
 
-    return wasSuccessful ? 0 : 1;
+	return wasSuccessful ? 0 : 1;
 }
 
-
-
diff --git a/unit-tests/ancT.cc b/unit-tests/ancT.cc
index 6caadca..1db225f 100644
--- a/unit-tests/ancT.cc
+++ b/unit-tests/ancT.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/unit-tests/arrayT.cc b/unit-tests/arrayT.cc
index 0e5126f..2e07526 100644
--- a/unit-tests/arrayT.cc
+++ b/unit-tests/arrayT.cc
@@ -51,7 +51,7 @@ public:
 
 	try
 	{
-	    int w = ar.width() ;
+	    int w = ar.width(true) ;
 	    cerr << "w = " << w << endl;
 	    cerr << "(int)bt->width() " << (int)bt->width() << endl;
 	    cerr << "L " << l << endl;
diff --git a/unit-tests/cache-testsuite/Makefile.in b/unit-tests/cache-testsuite/Makefile.in
index 54dbda4..9d07d73 100644
--- a/unit-tests/cache-testsuite/Makefile.in
+++ b/unit-tests/cache-testsuite/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.12 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -38,7 +55,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/btowc.m4 \
-	$(top_srcdir)/gl/m4/codeset.m4 \
+	$(top_srcdir)/gl/m4/byteswap.m4 $(top_srcdir)/gl/m4/codeset.m4 \
 	$(top_srcdir)/gl/m4/configmake.m4 \
 	$(top_srcdir)/gl/m4/extensions.m4 \
 	$(top_srcdir)/gl/m4/fcntl-o.m4 $(top_srcdir)/gl/m4/glibc21.m4 \
@@ -51,14 +68,19 @@ am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
 	$(top_srcdir)/gl/m4/locale-fr.m4 \
 	$(top_srcdir)/gl/m4/locale-ja.m4 \
 	$(top_srcdir)/gl/m4/locale-zh.m4 \
+	$(top_srcdir)/gl/m4/locale_h.m4 \
+	$(top_srcdir)/gl/m4/localeconv.m4 \
 	$(top_srcdir)/gl/m4/longlong.m4 $(top_srcdir)/gl/m4/malloc.m4 \
 	$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
-	$(top_srcdir)/gl/m4/mbstate_t.m4 \
+	$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \
 	$(top_srcdir)/gl/m4/multiarch.m4 \
 	$(top_srcdir)/gl/m4/nl_langinfo.m4 \
-	$(top_srcdir)/gl/m4/regex.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
-	$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \
-	$(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \
+	$(top_srcdir)/gl/m4/off_t.m4 $(top_srcdir)/gl/m4/regex.m4 \
+	$(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \
+	$(top_srcdir)/gl/m4/stddef_h.m4 $(top_srcdir)/gl/m4/stdint.m4 \
+	$(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \
+	$(top_srcdir)/gl/m4/strings_h.m4 \
+	$(top_srcdir)/gl/m4/sys_types_h.m4 \
 	$(top_srcdir)/gl/m4/unistd_h.m4 \
 	$(top_srcdir)/gl/m4/warn-on-use.m4 \
 	$(top_srcdir)/gl/m4/wchar_h.m4 $(top_srcdir)/gl/m4/wchar_t.m4 \
@@ -80,6 +102,11 @@ CONFIG_CLEAN_VPATH_FILES =
 SCRIPTS = $(noinst_SCRIPTS)
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 pkglibexecdir = @pkglibexecdir@
 ACLOCAL = @ACLOCAL@
@@ -88,6 +115,7 @@ ALLOCA_H = @ALLOCA_H@
 AMTAR = @AMTAR@
 APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
 AR = @AR@
+ARFLAGS = @ARFLAGS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -97,6 +125,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
 BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
 BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
 BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+BYTESWAP_H = @BYTESWAP_H@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -139,15 +168,20 @@ GNULIB_ATOLL = @GNULIB_ATOLL@
 GNULIB_BTOWC = @GNULIB_BTOWC@
 GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
 GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHDIR = @GNULIB_CHDIR@
 GNULIB_CHOWN = @GNULIB_CHOWN@
 GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DUP = @GNULIB_DUP@
 GNULIB_DUP2 = @GNULIB_DUP2@
 GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
 GNULIB_ENVIRON = @GNULIB_ENVIRON@
 GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
 GNULIB_FCHDIR = @GNULIB_FCHDIR@
 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FFS = @GNULIB_FFS@
 GNULIB_FSYNC = @GNULIB_FSYNC@
 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
 GNULIB_GETCWD = @GNULIB_GETCWD@
@@ -162,9 +196,14 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
 GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
 GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
 GNULIB_LCHOWN = @GNULIB_LCHOWN@
 GNULIB_LINK = @GNULIB_LINK@
 GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
 GNULIB_LSEEK = @GNULIB_LSEEK@
 GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
 GNULIB_MBRLEN = @GNULIB_MBRLEN@
@@ -172,6 +211,7 @@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
 GNULIB_MBSINIT = @GNULIB_MBSINIT@
 GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
 GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
 GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
 GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
 GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
@@ -180,11 +220,15 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
 GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
 GNULIB_PIPE = @GNULIB_PIPE@
 GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
 GNULIB_PREAD = @GNULIB_PREAD@
 GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
 GNULIB_PUTENV = @GNULIB_PUTENV@
 GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
 GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_READ = @GNULIB_READ@
 GNULIB_READLINK = @GNULIB_READLINK@
 GNULIB_READLINKAT = @GNULIB_READLINKAT@
 GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
@@ -192,6 +236,8 @@ GNULIB_REALPATH = @GNULIB_REALPATH@
 GNULIB_RMDIR = @GNULIB_RMDIR@
 GNULIB_RPMATCH = @GNULIB_RPMATCH@
 GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
 GNULIB_SLEEP = @GNULIB_SLEEP@
 GNULIB_STRTOD = @GNULIB_STRTOD@
 GNULIB_STRTOLL = @GNULIB_STRTOLL@
@@ -199,19 +245,51 @@ GNULIB_STRTOULL = @GNULIB_STRTOULL@
 GNULIB_SYMLINK = @GNULIB_SYMLINK@
 GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
 GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
 GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
 GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
 GNULIB_UNLINK = @GNULIB_UNLINK@
 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
 GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
 GNULIB_UNSETENV = @GNULIB_UNSETENV@
 GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_WCPCPY = @GNULIB_WCPCPY@
+GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
 GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
+GNULIB_WCSCAT = @GNULIB_WCSCAT@
+GNULIB_WCSCHR = @GNULIB_WCSCHR@
+GNULIB_WCSCMP = @GNULIB_WCSCMP@
+GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
+GNULIB_WCSCPY = @GNULIB_WCSCPY@
+GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
+GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSLEN = @GNULIB_WCSLEN@
+GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
+GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
+GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
+GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
+GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
 GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
+GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
 GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCSSPN = @GNULIB_WCSSPN@
+GNULIB_WCSSTR = @GNULIB_WCSSTR@
+GNULIB_WCSTOK = @GNULIB_WCSTOK@
+GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
+GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
 GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCTOMB = @GNULIB_WCTOMB@
+GNULIB_WCTRANS = @GNULIB_WCTRANS@
+GNULIB_WCTYPE = @GNULIB_WCTYPE@
 GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
+GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
+GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
+GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
+GNULIB_WMEMSET = @GNULIB_WMEMSET@
 GNULIB_WRITE = @GNULIB_WRITE@
 GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
@@ -221,23 +299,29 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
 HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFS = @HAVE_FFS@
 HAVE_FSYNC = @HAVE_FSYNC@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
@@ -247,6 +331,7 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
 HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
@@ -273,9 +358,12 @@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
 HAVE_OS_H = @HAVE_OS_H@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM = @HAVE_RANDOM@
 HAVE_RANDOM_H = @HAVE_RANDOM_H@
 HAVE_RANDOM_R = @HAVE_RANDOM_R@
 HAVE_READLINK = @HAVE_READLINK@
@@ -283,11 +371,14 @@ HAVE_READLINKAT = @HAVE_READLINKAT@
 HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
 HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
 HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
 HAVE_SLEEP = @HAVE_SLEEP@
 HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRTOD = @HAVE_STRTOD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
@@ -306,11 +397,42 @@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCPCPY = @HAVE_WCPCPY@
+HAVE_WCPNCPY = @HAVE_WCPNCPY@
 HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
+HAVE_WCSCAT = @HAVE_WCSCAT@
+HAVE_WCSCHR = @HAVE_WCSCHR@
+HAVE_WCSCMP = @HAVE_WCSCMP@
+HAVE_WCSCOLL = @HAVE_WCSCOLL@
+HAVE_WCSCPY = @HAVE_WCSCPY@
+HAVE_WCSCSPN = @HAVE_WCSCSPN@
+HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSLEN = @HAVE_WCSLEN@
+HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
+HAVE_WCSNCAT = @HAVE_WCSNCAT@
+HAVE_WCSNCMP = @HAVE_WCSNCMP@
+HAVE_WCSNCPY = @HAVE_WCSNCPY@
+HAVE_WCSNLEN = @HAVE_WCSNLEN@
 HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSPBRK = @HAVE_WCSPBRK@
+HAVE_WCSRCHR = @HAVE_WCSRCHR@
 HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCSSPN = @HAVE_WCSSPN@
+HAVE_WCSSTR = @HAVE_WCSSTR@
+HAVE_WCSTOK = @HAVE_WCSTOK@
+HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
+HAVE_WCSXFRM = @HAVE_WCSXFRM@
+HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
 HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
 HAVE_WINT_T = @HAVE_WINT_T@
+HAVE_WMEMCHR = @HAVE_WMEMCHR@
+HAVE_WMEMCMP = @HAVE_WMEMCMP@
+HAVE_WMEMCPY = @HAVE_WMEMCPY@
+HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
 HAVE__BOOL = @HAVE__BOOL@
 HAVE__EXIT = @HAVE__EXIT@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -343,16 +465,22 @@ MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
 NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
 NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
 NEXT_STDINT_H = @NEXT_STDINT_H@
 NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRINGS_H = @NEXT_STRINGS_H@
+NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
 NEXT_UNISTD_H = @NEXT_UNISTD_H@
 NEXT_WCHAR_H = @NEXT_WCHAR_H@
 NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
@@ -386,17 +514,21 @@ REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
 REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
 REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
 REPLACE_LSEEK = @REPLACE_LSEEK@
 REPLACE_MALLOC = @REPLACE_MALLOC@
 REPLACE_MBRLEN = @REPLACE_MBRLEN@
@@ -405,20 +537,27 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
 REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
 REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
 REPLACE_NULL = @REPLACE_NULL@
 REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_REALLOC = @REPLACE_REALLOC@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_RMDIR = @REPLACE_RMDIR@
 REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
 REPLACE_UNLINK = @REPLACE_UNLINK@
 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
@@ -427,7 +566,9 @@ REPLACE_USLEEP = @REPLACE_USLEEP@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
 REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
@@ -448,10 +589,10 @@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOC
 UUID_LIBS = @UUID_LIBS@
 VERSION = @VERSION@
 WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
 WINT_T_SUFFIX = @WINT_T_SUFFIX@
 XML2_CFLAGS = @XML2_CFLAGS@
 XML2_LIBS = @XML2_LIBS@
-XML2_STATIC_LIBS = @XML2_STATIC_LIBS@
 YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -564,6 +705,8 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
+cscope cscopelist:
+
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -609,10 +752,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/unit-tests/ce-functions-testsuite/geo_grid.das b/unit-tests/ce-functions-testsuite/geo_grid.das
deleted file mode 100644
index 7edcb1d..0000000
--- a/unit-tests/ce-functions-testsuite/geo_grid.das
+++ /dev/null
@@ -1,35 +0,0 @@
-Attributes {
-    SST1 {
-        lon {
-            String units "degrees_east";
-            String long_name "longitude";
-        }
-        lat{
-            String units "degrees_north";
-            String long_name "latitude";
-        }
-    }
-
-    SST2 {
-        lon {
-            String units "degrees_E";
-            String long_name "longitude";
-        }
-        lat{
-            String units "degrees_N";
-            String long_name "latitude";
-        }
-    }
-
-    SST3 {
-        lon {
-            String units "degree_east";
-            String long_name "longitude";
-        }
-        lat{
-            String units "degree_N";
-            String long_name "latitude";
-        }
-    }
-}
-     
\ No newline at end of file
diff --git a/unit-tests/ce-functions-testsuite/geo_grid.dds b/unit-tests/ce-functions-testsuite/geo_grid.dds
deleted file mode 100644
index 6b1a50d..0000000
--- a/unit-tests/ce-functions-testsuite/geo_grid.dds
+++ /dev/null
@@ -1,38 +0,0 @@
-Dataset {
-    # SST1 will have a lon map that uses 0/360 notation
-    Grid {
-      Array:
-        Byte SST[lon=10][lat=10];
-      Maps:
-        Float64 lon[10];
-        Float64 lat[10];
-    } SST1;
-    
-    # SST1_1 will have a lon map that uses 0/360 notation; this has lon as its 
-    # rightmost dimension so it can be used with a CE that requires 'stitching'
-    Grid {
-      Array:
-        Byte SST[lat=10][lon=10];
-      Maps:
-        Float64 lat[10];
-        Float64 lon[10];
-    } SST1_1;
-    
-    # SST2 will have a lon map that uses -180/180 notation
-    Grid {
-      Array:
-        Byte SST[lon=10][lat=10];
-      Maps:
-        Float64 lon[10];
-        Float64 lat[10];
-    } SST2;
-    
-    # SST3 will have a lon map that uses 0/360 notation and runs from 20 to 379
-    Grid {
-      Array:
-        Byte SST[lat=10][lon=10];
-      Maps:
-        Float64 lat[10];
-        Float64 lon[10];
-    } SST3;
-} geo_grid;
diff --git a/unit-tests/ce-functions-testsuite/geo_grid_3d.dds b/unit-tests/ce-functions-testsuite/geo_grid_3d.dds
deleted file mode 100644
index fbb3be5..0000000
--- a/unit-tests/ce-functions-testsuite/geo_grid_3d.dds
+++ /dev/null
@@ -1,11 +0,0 @@
-Dataset {
-    # SST4 will be a three dimensional Grid
-    Grid {
-      Array:
-        Byte SST4[time=3][lon=5][lat=5];
-      Maps:
-        Int32 time[3];
-        Float64 lon[5];
-        Float64 lat[5];
-    } SST4;
-} geo_grid_3d;
diff --git a/unit-tests/ce-functions-testsuite/geo_grid_coads_lon.dds b/unit-tests/ce-functions-testsuite/geo_grid_coads_lon.dds
deleted file mode 100644
index 765115f..0000000
--- a/unit-tests/ce-functions-testsuite/geo_grid_coads_lon.dds
+++ /dev/null
@@ -1,10 +0,0 @@
-Dataset {
-    # SST4 will be a three dimensional Grid
-    Grid {
-      Array:
-        Byte SST5[lon=15][lat=5];
-      Maps:
-        Float64 lon[15];
-        Float64 lat[5];
-    } SST5;
-} geo_grid_coads_lon;
diff --git a/unit-tests/ce-functions-testsuite/two_grid.das b/unit-tests/ce-functions-testsuite/two_grid.das
deleted file mode 100644
index 923726d..0000000
--- a/unit-tests/ce-functions-testsuite/two_grid.das
+++ /dev/null
@@ -1,8 +0,0 @@
-Attributes {
-    a {
-    	a {
-    	    string scale_factor 0.1;
-    	    string add_offset 10;
-    	}
-    }
-}
\ No newline at end of file
diff --git a/unit-tests/ce-functions-testsuite/two_grid.dds b/unit-tests/ce-functions-testsuite/two_grid.dds
deleted file mode 100644
index cbe6d79..0000000
--- a/unit-tests/ce-functions-testsuite/two_grid.dds
+++ /dev/null
@@ -1,28 +0,0 @@
-Dataset {
-    Grid {
-      Array:
-        Byte a[first=10];
-      Maps:
-        Float64 first[10];
-    } a;
-    
-    # Use this grid to look at Maps with values that go from big to small,
-    # which should not be an issue, but...
-    Grid {
-      Array:
-        Byte b[first=10];
-      Maps:
-        Float64 first[10];
-    } b;
-    
-    Grid {
-      Array:
-        Byte val[lon=14][lat=14];
-      Maps:
-        Float32 lon[14];
-        Float32 lat[14];
-    } values;
-    
-    Float32 lat[14];
-    Float32 lon[14];
-} two_grids;
diff --git a/unit-tests/dds-testsuite/fnoc1.nc.dmr.xml b/unit-tests/dds-testsuite/fnoc1.nc.dmr.xml
new file mode 100644
index 0000000..a99b7b1
--- /dev/null
+++ b/unit-tests/dds-testsuite/fnoc1.nc.dmr.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Group xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xml.opendap.org/ns/DAP/4.0# http://xml.opendap.org/dap/dap4.0.xsd" xmlns="http://xml.opendap.org/ns/DAP/4.0#" dapVersion="4.0" dmrVersion="1.0" name="fnoc1.nc">
+    <Attribute name="NC_GLOBAL" type="Container">
+        <Attribute name="base_time" type="String">
+            <value>88- 10-00:00:00</value>
+        </Attribute>
+        <Attribute name="title" type="String">
+            <value> FNOC UV wind components from 1988- 10 to 1988- 13.</value>
+        </Attribute>
+    </Attribute>
+    <Attribute name="DODS_EXTRA" type="Container">
+        <Attribute name="Unlimited_Dimension" type="String">
+            <value>time_a</value>
+        </Attribute>
+    </Attribute>
+    <Array name="u">
+        <Attribute name="units" type="String">
+            <value>meter per second</value>
+        </Attribute>
+        <Attribute name="long_name" type="String">
+            <value>Vector wind eastward component</value>
+        </Attribute>
+        <Attribute name="missing_value" type="String">
+            <value>-32767</value>
+        </Attribute>
+        <Attribute name="scale_factor" type="String">
+            <value>0.005</value>
+        </Attribute>
+        <Attribute name="DODS_Name" type="String">
+            <value>UWind</value>
+        </Attribute>
+        <Int16/>
+        <dimension name="time_a" size="16"/>
+        <dimension name="lat" size="17"/>
+        <dimension name="lon" size="21"/>
+    </Array>
+    <Array name="v">
+        <Attribute name="units" type="String">
+            <value>meter per second</value>
+        </Attribute>
+        <Attribute name="long_name" type="String">
+            <value>Vector wind northward component</value>
+        </Attribute>
+        <Attribute name="missing_value" type="String">
+            <value>-32767</value>
+        </Attribute>
+        <Attribute name="scale_factor" type="String">
+            <value>0.005</value>
+        </Attribute>
+        <Attribute name="DODS_Name" type="String">
+            <value>VWind</value>
+        </Attribute>
+        <Int16/>
+        <dimension name="time_a" size="16"/>
+        <dimension name="lat" size="17"/>
+        <dimension name="lon" size="21"/>
+    </Array>
+    <Array name="lat">
+        <Attribute name="units" type="String">
+            <value>degree North</value>
+        </Attribute>
+        <Float32/>
+        <dimension name="lat" size="17"/>
+    </Array>
+    <Array name="lon">
+        <Attribute name="units" type="String">
+            <value>degree East</value>
+        </Attribute>
+        <Float32/>
+        <dimension name="lon" size="21"/>
+    </Array>
+    <Array name="time">
+        <Attribute name="units" type="String">
+            <value>hours from base_time</value>
+        </Attribute>
+        <Float32/>
+        <dimension name="time" size="16"/>
+    </Array>
+</Group>
diff --git a/unit-tests/dds-testsuite/test.19b.xml b/unit-tests/dds-testsuite/test.19b.xml
index 7df78ac..14b297f 100644
--- a/unit-tests/dds-testsuite/test.19b.xml
+++ b/unit-tests/dds-testsuite/test.19b.xml
@@ -17,4 +17,4 @@
         </Map>
     </Grid>
     <dataBLOB href=""/>
-</Dataset>
\ No newline at end of file
+</Dataset>
diff --git a/unit-tests/dds-testsuite/test.19b6.xml b/unit-tests/dds-testsuite/test.19b6.xml
index d002cde..3534ed6 100644
--- a/unit-tests/dds-testsuite/test.19b6.xml
+++ b/unit-tests/dds-testsuite/test.19b6.xml
@@ -50,4 +50,4 @@
         </Map>
     </Grid>
     <dataBLOB href=""/>
-</Dataset>
\ No newline at end of file
+</Dataset>
diff --git a/unit-tests/dds-testsuite/test.19c.xml b/unit-tests/dds-testsuite/test.19c.xml
index 3e37753..773b3bd 100644
--- a/unit-tests/dds-testsuite/test.19c.xml
+++ b/unit-tests/dds-testsuite/test.19c.xml
@@ -14,4 +14,4 @@
     </Attribute>
     <Int32 name="a"/>
     <dataBLOB href=""/>
-</Dataset>
\ No newline at end of file
+</Dataset>
diff --git a/unit-tests/dds-testsuite/test.19d.xml b/unit-tests/dds-testsuite/test.19d.xml
index 3c3d382..5a3c1ed 100644
--- a/unit-tests/dds-testsuite/test.19d.xml
+++ b/unit-tests/dds-testsuite/test.19d.xml
@@ -8,4 +8,4 @@
         <dimension size="10"/>
     </Array>
     <dataBLOB href=""/>
-</Dataset>
\ No newline at end of file
+</Dataset>
diff --git a/unit-tests/dds-testsuite/test.19e.xml b/unit-tests/dds-testsuite/test.19e.xml
index 1ba9a64..b7cba51 100644
--- a/unit-tests/dds-testsuite/test.19e.xml
+++ b/unit-tests/dds-testsuite/test.19e.xml
@@ -14,4 +14,4 @@
         </Attribute>
     </Float64>
     <dataBLOB href=""/>
-</Dataset>
\ No newline at end of file
+</Dataset>
diff --git a/unit-tests/dds-testsuite/test.19f.xml b/unit-tests/dds-testsuite/test.19f.xml
index 63dabbd..c213fbd 100644
--- a/unit-tests/dds-testsuite/test.19f.xml
+++ b/unit-tests/dds-testsuite/test.19f.xml
@@ -17,4 +17,4 @@
         </Map>
     </Grid>
     <dataBLOB href=""/>
-</Dataset>
\ No newline at end of file
+</Dataset>
diff --git a/unit-tests/ddsT.cc b/unit-tests/ddsT.cc
index 70c4308..78d764c 100644
--- a/unit-tests/ddsT.cc
+++ b/unit-tests/ddsT.cc
@@ -32,7 +32,7 @@
 #include "TestInt16.h"
 #include "TestStr.h"
 #include "TestTypeFactory.h"
-#include "ce_functions.h"
+//#include "ce_functions.h"
 #include "util.h"
 #include "debug.h"
 
diff --git a/unit-tests/ddx-testsuite/test.09.ddx b/unit-tests/ddx-testsuite/test.09.ddx
index 6738841..cf00ae9 100644
--- a/unit-tests/ddx-testsuite/test.09.ddx
+++ b/unit-tests/ddx-testsuite/test.09.ddx
@@ -13,7 +13,7 @@ xsi:schemaLocation="http://www.dods.org/ns/DODS  http://dods.coas.oregonstate.ed
 		<dimension name="twizzle" size="41024"/>
 		<dimension name="dizzle" size="25211"/>
 	</Array>
-	<Structure name="bunghole">
+	<Structure name="mystruct">
 	    <Attribute name="leaf04a" type="Float64">
 		<value>1451.87567</value>
 	    </Attribute>
diff --git a/unit-tests/generalUtilTest.cc b/unit-tests/generalUtilTest.cc
index 1830cb0..dd98684 100644
--- a/unit-tests/generalUtilTest.cc
+++ b/unit-tests/generalUtilTest.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/unit-tests/parserUtilTest.cc b/unit-tests/parserUtilTest.cc
index e40a5d7..f79a11a 100644
--- a/unit-tests/parserUtilTest.cc
+++ b/unit-tests/parserUtilTest.cc
@@ -19,7 +19,7 @@
 // 
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
  
diff --git a/unit-tests/server-testsuite/config/unix.exp b/unit-tests/server-testsuite/config/unix.exp
deleted file mode 100644
index 5e4e223..0000000
--- a/unit-tests/server-testsuite/config/unix.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-
-# Tcl/Expect code for the geturl test. This really is designed to test the
-# various servers (hdf, dsp, netcdf, matlab, ...) on serveral different
-# platforms. 
-# 
-# $Id: unix.exp 11906 2005-08-08 19:51:43Z root $
-
-# Make sure the global var GETURL is set correctly.
-
-global GETURL
-if ![info exists GETURL] then {
-    set GETURL [transform ./geturl]
-}
-
-# The four `required' procs are _start, _load, _exit and _version.
-
-proc geturl_start { {switches ""} {urls ""} {file ""}} {
-    global verbose
-    global GETURL
-    global comp_output
-    global spawn_id
-
-    if ![string compare $file ""] {
-	if {$verbose >= 1} {
-	    send_user "Testing geturl $switches $urls ...\n"
-	    exp_internal 1
-	}
-	catch "exec $GETURL $switches $urls" comp_output
-    } else {
-	if {$verbose >= 1} {
-	    send_user "Testing geturl $switches $urls >& $file ...\n"
-	    exp_internal 1
-	}
-	catch "exec $GETURL $switches $urls > $file" comp_output
-    }
-}
-
-proc geturl_load {} {
-}
-
-proc geturl_exit {} {
-    send -raw ""
-}
-
-proc geturl_version {} {
-    send_user "geturl test suite 1.0\n"
-}
-
diff --git a/unit-tests/server-testsuite/geturl.0/dodsdev.exp b/unit-tests/server-testsuite/geturl.0/dodsdev.exp
deleted file mode 100644
index 2077db9..0000000
--- a/unit-tests/server-testsuite/geturl.0/dodsdev.exp
+++ /dev/null
@@ -1,102 +0,0 @@
-
-# Copy this file and change the host name and/or the test_dir names to test
-# servers on other hosts or other versions of the servers.
-
-# $Log: dodsdev.exp,v $
-# Revision 1.6  2005/05/23 16:07:06  jimg
-# Now uses local common-tests.exp and test.opendap.org.
-#
-# Revision 1.5  2005/03/30 23:12:02  jimg
-# Modified to use the new factory class.
-#
-# Revision 1.4  2003/12/11 01:08:38  jimg
-# More fixes after resolving conflicts. This code still fails some tests.
-#
-# Revision 1.3.2.1  2003/11/19 18:56:30  jimg
-# Switched back to dodsdev & remote access.
-#
-# Revision 1.3  2003/04/22 19:40:30  jimg
-# Merged with 3.3.1.
-#
-# Revision 1.2.2.1  2003/04/18 03:37:30  jimg
-# Set the host to localhost and the test dir to dods-test (the current
-# release).
-#
-# Revision 1.2  2002/06/03 22:21:17  jimg
-# Merged with release-3-2-9
-#
-# Revision 1.1.2.1  2002/04/16 17:07:20  jimg
-# Added/Fixed tests so that they use the client test data collection on
-# dodsdev. This data collection will form the basis for all the client
-# testing.
-#
-# Revision 1.2.46.2  2001/07/28 01:12:29  jimg
-# Updated to work with the new escaping code. Some of our tests assumed
-# that dashes (-) were not OK in symbol names. However, changes in the
-# DAP parsers along with changes in the escaping functions now make this
-# possible.
-#
-# Revision 1.2.46.1  2001/05/03 20:26:43  jimg
-# These are now more configurable.
-#
-# Revision 1.2  1997/09/22 23:14:45  jimg
-# *** empty log message ***
-#
-
-global comp_output		# contains output from das-test_start
-global verbose			# this and srcdir are set by runtest.exp
-global srcdir
-global host
-
-source common_tests.exp
-
-# Server machine name
-set host "test.opendap.org"
-# set host "localhost"
-# CGI directory on $host
-set test_dir "dods-3.4"
-
-source "server-testsuite/geturl.0/urls.tcl"
-
-set test_name "dodedev"
-
-# The `1' in compare_stdout means call xfail if the test fails.
-
-geturl_start "-D" "${bears}?${bears_ce}"
-compare_stdout "server-testsuite/bears.data" "${test_name}: NetCDF/bears"
-
-geturl_start "-D" "${fnoc1}?${fnoc1_ce}"
-compare_stdout "server-testsuite/fnoc1.data" "$test_name: NetCDF/fnoc1"
-
-geturl_start "-D" "${dsp_1}?${dsp_1_ce}"
-compare_stdout "server-testsuite/dsp_1.data" "$test_name: DSP"
-
-geturl_start "-D" "${nscat_s2}?${nscat_s2_ce}"
-compare_stdout "server-testsuite/nscat_s2.data" "$test_name: Matlab"
-
-geturl_start "-D" "${nscat_hdf}?${nscat_hdf_ce}"
-compare_stdout "server-testsuite/nscat_hdf.data" "$test_name: HDF"
-
-geturl_start "-D" "${jg_test}?${jg_test_ce}"
-compare_stdout "server-testsuite/jg_test.data" "$test_name: JGOFS"
-
-geturl_start "-d" "${ff_test1}"
-compare_stdout $ff_test1_dds "$test_name: FF DDS check"
-
-geturl_start "-D" "${ff_test1}?${ff_test1_ce1}"
-compare_stdout "server-testsuite/ff_test1_ce1.data" "$test_name: FF"
-
-geturl_start "-D" "${ff_test1}?${ff_test1_ce2}"
-compare_stdout "server-testsuite/ff_test1_ce2.data" "$test_name: FF, compund name"
-
-geturl_start "-d" "${ff_test2}"
-compare_stdout $ff_test2_dds "$test_name: FF DDS check"
-
-geturl_start "-D" "${ff_test2}?${ff_test2_ce1}"
-compare_stdout "server-testsuite/ff_test2_ce1.data" "$test_name: FF"
-
-geturl_start "-D" "${ff_test2}?${ff_test2_ce2}"
-compare_stdout "server-testsuite/ff_test2_ce2.data" "$test_name: FF, compund name, with escaped space"
-
-geturl_start "-D" "\"${ff_test2}?${ff_test2_ce3}\""
-compare_stdout "server-testsuite/ff_test2_ce3.data" "$test_name: FF, compund name, with unescaped space"
diff --git a/unit-tests/server-testsuite/geturl.0/urls.tcl b/unit-tests/server-testsuite/geturl.0/urls.tcl
deleted file mode 100644
index ee88d8a..0000000
--- a/unit-tests/server-testsuite/geturl.0/urls.tcl
+++ /dev/null
@@ -1,275 +0,0 @@
-
-# $Id: urls.tcl 11906 2005-08-08 19:51:43Z root $
-
-# Datasets and their expected output (the information that writeval sends to
-# stdout - not the stuff that should be going into the file).
-
-# URI/BEARS:
-set bears "http://$host/$test_dir/nph-dods/data/nc/bears.nc"
-set bears_ce "bears"
-set bears_dds "Dataset {
-    Grid {
-     ARRAY:
-        String bears\[i = 2\]\[j = 3\]\[l = 3\];
-     MAPS:
-        Int32 i\[i = 2\];
-        Float64 j\[j = 3\];
-        Int32 l\[l = 3\];
-    } bears;
-    Grid {
-     ARRAY:
-        Int32 order\[i = 2\]\[j = 3\];
-     MAPS:
-        Int32 i\[i = 2\];
-        Float64 j\[j = 3\];
-    } order;
-    Grid {
-     ARRAY:
-        Int32 shot\[i = 2\]\[j = 3\];
-     MAPS:
-        Int32 i\[i = 2\];
-        Float64 j\[j = 3\];
-    } shot;
-    Grid {
-     ARRAY:
-        Float64 aloan\[i = 2\]\[j = 3\];
-     MAPS:
-        Int32 i\[i = 2\];
-        Float64 j\[j = 3\];
-    } aloan;
-    Grid {
-     ARRAY:
-        Float64 cross\[i = 2\]\[j = 3\];
-     MAPS:
-        Int32 i\[i = 2\];
-        Float64 j\[j = 3\];
-    } cross;
-    Int32 i\[i = 2\];
-    Float64 j\[j = 3\];
-    Int32 l\[l = 3\];
-} bears;"
-
-# URI/FNOC
-set fnoc1 "http://$host/$test_dir/nph-dods/data/nc/fnoc1.nc"
-set fnoc1_ce "u\\\[0:0\\\]\\\[0:9\\\]\\\[0:9\\\]"
-set fnoc1_dds "Dataset {
-    Int32 u\[time_a = 16\]\[lat = 17\]\[lon = 21\];
-    Int32 v\[time_a = 16\]\[lat = 17\]\[lon = 21\];
-    Float64 lat\[lat = 17\];
-    Float64 lon\[lon = 21\];
-    Float64 time\[time = 16\];
-} fnoc1;"
-
-# URI/DSP:
-set dsp_1 "http://$host/$test_dir/nph-dods/data/dsp/east.coast.pvu"
-set dsp_1_ce "dsp_band_1\\\[20:30\\\]\\\[20:30\\\]"
-set dsp_1_dds "Dataset {
-    Byte dsp_band_1\\\[line = 512\\\]\\\[pixel = 512\\\];
-} east.coast.pvu;"
-
-# URI/MatLab:
-set nscat_s2 "http://$host/$test_dir/nph-dods/data/mat/NSCAT_S2.mat"
-set nscat_s2_ce "NSCAT_S2\\\[75:75\\\]\\\[0:5\\\]"
-set nscat_s2_dds "Dataset {
-    Float64 NSCAT_S2\[NSCAT_S2_row = 153\]\[NSCAT_S2_column = 843\];
-} NSCAT_S2;"
-
-# URI/NSCAT:
-set nscat_hdf "http://$host/$test_dir/nph-dods/data/hdf/S2000415.HDF"
-set nscat_hdf_ce "WVC_Lat\\\[200:201\\\]\\\[20:21\\\]"
-set nscat_hdf_dds "Dataset {
-    Int32 WVC_Lat\[row = 458\]\[WVC = 24\];
-    UInt32 WVC_Lon\[row = 458\]\[WVC = 24\];
-    UInt32 Num_Sigma0\[row = 458\]\[WVC = 24\];
-    UInt32 Num_Beam_12\[row = 458\]\[WVC = 24\];
-    UInt32 Num_Beam_34\[row = 458\]\[WVC = 24\];
-    UInt32 Num_Beam_56\[row = 458\]\[WVC = 24\];
-    UInt32 Num_Beam_78\[row = 458\]\[WVC = 24\];
-    UInt32 WVC_Quality_Flag\[row = 458\]\[WVC = 24\];
-    UInt32 Mean_Wind\[row = 458\]\[WVC = 24\];
-    UInt32 Wind_Speed\[row = 458\]\[WVC = 24\]\[position = 4\];
-    UInt32 Wind_Dir\[row = 458\]\[WVC = 24\]\[position = 4\];
-    UInt32 Error_Speed\[row = 458\]\[WVC = 24\]\[position = 4\];
-    UInt32 Error_Dir\[row = 458\]\[WVC = 24\]\[position = 4\];
-    Int32 MLE_Likelihood\[row = 458\]\[WVC = 24\]\[position = 4\];
-    UInt32 Num_Ambigs\[row = 458\]\[WVC = 24\];
-    Sequence {
-        Structure {
-            Int32 begin__0;
-        } begin;
-    } SwathIndex;
-    Sequence {
-        Structure {
-            String Mean_Time__0;
-        } Mean_Time;
-        Structure {
-            UInt32 Low_Wind_Speed_Flag__0;
-        } Low_Wind_Speed_Flag;
-        Structure {
-            UInt32 High_Wind_Speed_Flag__0;
-        } High_Wind_Speed_Flag;
-    } NSCAT%20L2;
-} S2000415%2eHDF;"
-
-# URI/NSCAT Level 3 - here to test grids with the hdf server.
-set nscat_l3 "http://$host/$test_dir/nph-dods/data/hdf/S3097057.HDF"
-set nscat_l3_ce1 "WVC_Count\\\[200:201\\\]\\\[20:119\\\]"
-set nscat_l3_ce2 "Avg_Wind_Vel_U\\\[200:201\\\]\\\[20:119\\\]"
-set nscat_l3_dds "Dataset {
-    Grid {
-     ARRAY:
-        UInt32 WVC_Count\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } WVC_Count;
-    Grid {
-     ARRAY:
-        UInt32 Map_Day_Fraction\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } Map_Day_Fraction;
-    Grid {
-     ARRAY:
-        UInt32 Avg_Sigma0_Count\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } Avg_Sigma0_Count;
-    Grid {
-     ARRAY:
-        Int32 Avg_Wind_Vel_U\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } Avg_Wind_Vel_U;
-    Grid {
-     ARRAY:
-        Int32 Avg_Wind_Vel_V\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } Avg_Wind_Vel_V;
-    Grid {
-     ARRAY:
-        UInt32 Avg_Wind_Speed\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } Avg_Wind_Speed;
-    Grid {
-     ARRAY:
-        UInt32 RMS_Wind_Speed\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } RMS_Wind_Speed;
-    Grid {
-     ARRAY:
-        UInt32 Map_Day_Fraction_StdDev\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } Map_Day_Fraction_StdDev;
-    Grid {
-     ARRAY:
-        UInt32 Wind_Vel_U_StdDev\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } Wind_Vel_U_StdDev;
-    Grid {
-     ARRAY:
-        UInt32 Wind_Vel_V_StdDev\[row = 300\]\[column = 720\];
-     MAPS:
-        Float64 row\[300\];
-        Float64 column\[720\];
-    } Wind_Vel_V_StdDev;
-    Sequence {
-        Structure {
-            String bin_meth__0;
-        } bin_meth;
-        Structure {
-            String grid_origin__0;
-        } grid_origin;
-        Structure {
-            Float64 hsize__0;
-        } hsize;
-        Structure {
-            Int32 max_east__0;
-        } max_east;
-        Structure {
-            Int32 max_north__0;
-        } max_north;
-        Structure {
-            Int32 max_south__0;
-        } max_south;
-        Structure {
-            Int32 max_west__0;
-        } max_west;
-        Structure {
-            String registration__0;
-        } registration;
-        Structure {
-            Float64 vsize__0;
-        } vsize;
-    } Lat%2fLon;
-} S3097057%2eHDF;"
-
-# URI/JGOFS:
-set jg_test "http://$host/$test_dir/nph-dods/test"
-set jg_test_ce "year,month,lat,lon,sal&lat>37.5&lat<38.0"
-set jg_test_dds "Dataset {
-    Sequence {
-        String leg;
-        String year;
-        String month;
-        Sequence {
-            String station;
-            String lat;
-            String lon;
-            Sequence {
-                String press;
-                String temp;
-                String sal;
-                String o2;
-                String sigth;
-            } Level_2;
-        } Level_1;
-    } Level_0;
-} test;"
-
-# FF server tests. These also test asking for stuff when the variable names
-# contain spaces. 7/26/2001 jhrg
-
-set ff_test1 "http://$host/$test_dir/nph-dods/data/ff/jplpath.dat"
-set ff_test1_ce1 "year"
-set ff_test1_ce2 "JPL_Pathfinder.year"
-set ff_test1_dds "Dataset {
-    Sequence {
-        Int32 year;
-        Int32 day;
-        Int32 hours;
-        Int32 minutes;
-        Int32 seconds;
-        String DODS_URL;
-    } JPL_Pathfinder;
-} jplpath.dat;
-"
-
-set ff_test2 "http://$host/$test_dir/nph-dods/data/ff/jplpath_space.dat"
-set ff_test2_ce1 "year"
-set ff_test2_ce2 "JPL%20Pathfinder.year"
-set ff_test2_ce3 "JPL Pathfinder.year"
-set ff_test2_dds "Dataset {
-    Sequence {
-        Int32 year;
-        Int32 day;
-        Int32 hours;
-        Int32 minutes;
-        Int32 seconds;
-        String DODS_URL;
-    } JPL%20Pathfinder;
-} jplpath_space.dat;
-"
\ No newline at end of file
diff --git a/unit-tests/server-testsuite/response_builder_invoke_server_side_function_test.txt b/unit-tests/server-testsuite/response_builder_invoke_server_side_function_test.txt
new file mode 100644
index 0000000..f58b9b0
--- /dev/null
+++ b/unit-tests/server-testsuite/response_builder_invoke_server_side_function_test.txt
@@ -0,0 +1,19 @@
+HTTP/1.0 200 OK
+XDODS-Server: .*
+XOPeNDAP-Server: .*
+XDAP: .*
+Date: .*
+Last-Modified: .*
+Content-Type: application/octet-stream
+Content-Description: dods_data
+
+Dataset .
+    String version;
+. function_result_test;
+Data:
+.<.xml version="1.0" encoding="UTF-8".>
+<ds:functions xmlns:ds="http://xml.opendap.org/ns/DAP/4.0/dataset-services#">
+    <ds:function  name="rbFuncTest" version="1.0" type="basetype" role="http://services.opendap.org/dap4/unit-tests/ResponseBuilderTest" >
+        <ds:Description href="http://docs.opendap.org/index.php/Hyrax:_Server_Side_Functions">Returns a list of the functions held in the ServerFunctionsList object</ds:Description>
+    </ds:function>
+</functions>
diff --git a/unit-tests/server-testsuite/send_das_baseline.txt b/unit-tests/server-testsuite/send_das_baseline.txt
new file mode 100644
index 0000000..e429beb
--- /dev/null
+++ b/unit-tests/server-testsuite/send_das_baseline.txt
@@ -0,0 +1,15 @@
+HTTP/1.0 200 OK.*
+XDODS-Server:.*
+XOPeNDAP-Server:.*
+XDAP:.*
+Date:.*
+Last-Modified:.*
+Content-Type: text/plain.*
+Content-Description: dods_das.*
+.*
+Attributes \{
+    a \{
+        Int32 size 7;
+        String type "cars";
+    \}
+\}.*
\ No newline at end of file
diff --git a/unit-tests/server-testsuite/send_dds_baseline.txt b/unit-tests/server-testsuite/send_dds_baseline.txt
new file mode 100644
index 0000000..6e8bc62
--- /dev/null
+++ b/unit-tests/server-testsuite/send_dds_baseline.txt
@@ -0,0 +1,12 @@
+HTTP/1.0 200 OK.*
+XDODS-Server:.*
+XOPeNDAP-Server:.*
+XDAP:.*
+Date:.*
+Last-Modified:.*
+Content-Type: text/plain.*
+Content-Description: dods_dds.*
+.*
+Dataset \{
+    Byte a;
+\} test;.*
\ No newline at end of file
diff --git a/unit-tests/server-testsuite/simple_function_baseline.txt b/unit-tests/server-testsuite/simple_function_baseline.txt
new file mode 100644
index 0000000..a1532db
--- /dev/null
+++ b/unit-tests/server-testsuite/simple_function_baseline.txt
@@ -0,0 +1,13 @@
+HTTP/1.0 200 OK.*
+XDODS-Server:.*
+XOPeNDAP-Server:.*
+XDAP:.*
+Date:.*
+Last-Modified:.*
+Content-Type: application/octet-stream.*
+Content-Description: dods_data.*
+.*
+Dataset \{
+    String result;
+\} function_result_test;
+.*
\ No newline at end of file
diff --git a/unit-tests/structT.cc b/unit-tests/structT.cc
index 18d93a4..3b8e1a5 100644
--- a/unit-tests/structT.cc
+++ b/unit-tests/structT.cc
@@ -1,4 +1,3 @@
-
 #include <cppunit/TestFixture.h>
 #include <cppunit/TestAssert.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
@@ -16,139 +15,140 @@
 #include "util.h"
 //#include "Pix.h"
 
-using std::cerr ;
-using std::endl ;
-using std::ostringstream ;
+using std::cerr;
+using std::endl;
+using std::ostringstream;
 
 int test_variable_sleep_interval = 0; // Used in Test* classes for testing
-				      // timeouts. 
-string ExpectedPrint1( "Structure {\n\
+// timeouts.
+string ExpectedPrint1(
+		"Structure {\n\
     Int16 name_int16;\n\
     String name_str;\n\
     Int16 array_int[dim1 = 4][dim2 = 3][dim3 = 2];\n\
-} my_structure = { 32000, \"Silly test string: 1\", {{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}}} };\n") ;
+} my_structure = { 32000, \"Silly test string: 1\", {{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}}} };\n");
 
-string ExpectedPrint2( "Structure {\n\
+string ExpectedPrint2(
+		"Structure {\n\
     Int16 name_int16;\n\
     Int16 array_int[dim1 = 4][dim2 = 3][dim3 = 2];\n\
-} my_structure = { 32000, {{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}}} };\n") ;
+} my_structure = { 32000, {{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}},{{32000, 32000},{32000, 32000},{32000, 32000}}} };\n");
 
-class structT : public CppUnit::TestFixture {
+class structT: public CppUnit::TestFixture {
 
-CPPUNIT_TEST_SUITE( structT ) ;
-CPPUNIT_TEST( structT_test ) ;
-CPPUNIT_TEST_SUITE_END( ) ;
+CPPUNIT_TEST_SUITE( structT );
+	CPPUNIT_TEST( structT_test );
+	CPPUNIT_TEST_SUITE_END( )
+	;
 
 private:
-    /* TEST PRIVATE DATA */
-    TestTypeFactory *factory;
-    
+	/* TEST PRIVATE DATA */
+	TestTypeFactory *factory;
+
 public:
-    void setUp()
-    {
-        factory = new TestTypeFactory;
-    }
-
-    void tearDown() 
-    {
-        delete factory; factory = 0;
-    }
-
-    void structT_test()
-    {
-	TestStructure s( "my_structure" ) ;
-
-	BaseType *bt = factory->NewInt16( "name_int16" ) ;
-	s.add_var( bt ) ;
-	delete bt ; bt = 0 ;
-
-	bt = factory->NewStr( "name_str" ) ;
-	s.add_var( bt ) ;
-	delete bt ; bt = 0 ;
-
-	Array *abt = factory->NewArray( "name_array", factory->NewInt16( "array_int" ) ) ;
-	abt->append_dim( 4, "dim1" ) ;
-	abt->append_dim( 3, "dim2" ) ;
-	abt->append_dim( 2, "dim3" ) ;
-	s.add_var( abt ) ;
-	delete abt ; abt = 0 ;
-
-	bt = 0 ;
-	bt = s.var( "name_str", true ) ;
-	CPPUNIT_ASSERT( bt && bt->name() == "name_str" ) ;
-
-	bt = 0 ;
-	bt = s.var( "name_str", false ) ;
-	CPPUNIT_ASSERT( bt && bt->name() == "name_str" ) ;
-
-	vector<string> varnames ;
-	varnames.push_back( "name_int16" ) ;
-	varnames.push_back( "name_str" ) ;
-	varnames.push_back( "array_int" ) ;
-	typedef vector<string>::const_iterator niter ;
-
-	Structure::Vars_iter viter = s.var_begin() ;
-	niter n = varnames.begin() ;
-	for( ; viter != s.var_end() && n != varnames.end(); viter++, n++ )
+	void setUp()
 	{
-	    CPPUNIT_ASSERT( (*viter)->name() == *n ) ;
+		factory = new TestTypeFactory;
 	}
-	CPPUNIT_ASSERT( viter == s.var_end() && n == varnames.end() ) ;
-	if( viter != s.var_end() && n == varnames.end() )
+
+	void tearDown()
 	{
-	    CPPUNIT_FAIL( "Too many variables" ) ;
+		delete factory;
+		factory = 0;
 	}
-	else if( viter == s.var_end() && n != varnames.end() )
+
+	void structT_test()
 	{
-	    CPPUNIT_FAIL( "Too few varialbes" ) ;
+		TestStructure s("my_structure");
+
+		BaseType *bt = factory->NewInt16("name_int16");
+		s.add_var(bt);
+		delete bt;
+		bt = 0;
+
+		bt = factory->NewStr("name_str");
+		s.add_var(bt);
+		delete bt;
+		bt = 0;
+
+		Array *abt = factory->NewArray("name_array", factory->NewInt16("array_int"));
+		abt->append_dim(4, "dim1");
+		abt->append_dim(3, "dim2");
+		abt->append_dim(2, "dim3");
+		s.add_var(abt);
+		delete abt;
+		abt = 0;
+
+		bt = 0;
+		bt = s.var("name_str", true);
+		CPPUNIT_ASSERT( bt && bt->name() == "name_str" );
+
+		bt = 0;
+		bt = s.var("name_str", false);
+		CPPUNIT_ASSERT( bt && bt->name() == "name_str" );
+
+		vector<string> varnames;
+		varnames.push_back("name_int16");
+		varnames.push_back("name_str");
+		varnames.push_back("array_int");
+		typedef vector<string>::const_iterator niter;
+
+		Structure::Vars_iter viter = s.var_begin();
+		niter n = varnames.begin();
+		for (; viter != s.var_end() && n != varnames.end(); viter++, n++) {
+			CPPUNIT_ASSERT( (*viter)->name() == *n );
+		}
+		CPPUNIT_ASSERT( viter == s.var_end() && n == varnames.end() );
+		if (viter != s.var_end() && n == varnames.end()) {
+			CPPUNIT_FAIL( "Too many variables" );
+		}
+		else if( viter == s.var_end() && n != varnames.end() )
+		{
+			CPPUNIT_FAIL( "Too few varialbes" );
+		}
+
+		int num_elems = s.element_count();
+		CPPUNIT_ASSERT( num_elems == 3 );
+
+		unsigned int w = s.width();
+		unsigned int wsb = sizeof(string) + sizeof(dods_int16) + 24 * sizeof(dods_int16);
+		cerr << "s.width(): " << s.width() << endl;
+		CPPUNIT_ASSERT( w == wsb );
+
+		bool is_read = s.read();
+		CPPUNIT_ASSERT( is_read == true );
+
+		ostringstream sstrm1;
+		s.print_val(sstrm1);
+		CPPUNIT_ASSERT( sstrm1.str() == ExpectedPrint1 );
+
+		s.del_var("name_str");
+
+		bt = 0;
+		bt = s.var("name_str", false);
+		CPPUNIT_ASSERT( bt == 0 );
+
+		w = s.width();
+		wsb = +sizeof(dods_int16) + 24 * sizeof(dods_int16);
+		CPPUNIT_ASSERT( w == wsb );
+
+		ostringstream sstrm2;
+		s.print_val(sstrm2);
+		CPPUNIT_ASSERT( sstrm2.str() == ExpectedPrint2 );
 	}
-
-	int num_elems = s.element_count( ) ;
-	CPPUNIT_ASSERT( num_elems == 3 ) ;
-
-	unsigned int w = s.width() ;
-	unsigned int wsb = sizeof(string)
-			   + sizeof(dods_int16)
-			   + 24*sizeof(dods_int16) ;
-	CPPUNIT_ASSERT( w == wsb ) ;
-
-	bool is_read = s.read() ;
-	CPPUNIT_ASSERT( is_read == true ) ;
-
-	ostringstream sstrm1 ;
-	s.print_val( sstrm1 ) ;
-	CPPUNIT_ASSERT( sstrm1.str() == ExpectedPrint1 ) ;
-
-	s.del_var( "name_str" ) ;
-
-	bt = 0 ;
-	bt = s.var( "name_str", false ) ;
-	CPPUNIT_ASSERT( bt == 0 ) ;
-
-	w = s.width() ;
-	wsb = + sizeof(dods_int16) + 24*sizeof(dods_int16) ;
-	CPPUNIT_ASSERT( w == wsb ) ;
-
-	ostringstream sstrm2 ;
-	s.print_val( sstrm2 ) ;
-	CPPUNIT_ASSERT( sstrm2.str() == ExpectedPrint2 ) ;
-    }
 };
 
-CPPUNIT_TEST_SUITE_REGISTRATION( structT ) ;
+CPPUNIT_TEST_SUITE_REGISTRATION( structT );
 
 /* NOTHING NEEDS TO BE CHANGED BELOW HERE */
 
-int main( int, char ** )
+int main(int, char **)
 {
-    CppUnit::TextUi::TestRunner runner ;
-    CppUnit::TestFactoryRegistry &registry =
-	CppUnit::TestFactoryRegistry::getRegistry() ;
-    runner.addTest( registry.makeTest() ) ;
-    runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter( 
-                                                        &runner.result(),
-                                                        std::cerr ) );
-    bool wasSuccessful = runner.run( "", false ) ;
-    return wasSuccessful ? 0 : 1;
+	CppUnit::TextUi::TestRunner runner;
+	CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
+	runner.addTest(registry.makeTest());
+	runner.setOutputter(CppUnit::CompilerOutputter::defaultOutputter(&runner.result(), std::cerr));
+	bool wasSuccessful = runner.run("", false);
+	return wasSuccessful ? 0 : 1;
 }
 
diff --git a/unit-tests/testFile.cc b/unit-tests/testFile.cc
index e5e3f14..2f9d938 100644
--- a/unit-tests/testFile.cc
+++ b/unit-tests/testFile.cc
@@ -2,29 +2,34 @@
 
 #include <fstream>
 #include <string>
-#include <sstream>
-
-#include "InternalErr.h"
+#include <vector>
 
 #include "testFile.h"
 
 using namespace std;
-using namespace libdap;
 
 string
-testFile(const string &fn)
+readTestBaseline(const string &fn)
 {
-    ifstream ifs(fn.c_str());
-    if (!ifs)
-        throw InternalErr(__FILE__, __LINE__, "Could not open file");
-
-    ostringstream strm;
-    char line[1024];
-    while (!ifs.eof()) {
-        ifs.getline(line, 1024);
-        strm << line << endl;
-    }
-    ifs.close();
-    
-    return strm.str();
+    int length;
+
+    ifstream is;
+    is.open (fn.c_str(), ios::binary );
+
+    // get length of file:
+    is.seekg (0, ios::end);
+    length = is.tellg();
+
+    // back to start
+    is.seekg (0, ios::beg);
+
+    // allocate memory:
+    vector<char> buffer(length+1);
+
+    // read data as a block:
+    is.read (&buffer[0], length);
+    is.close();
+    buffer[length] = '\0';
+
+    return string(&buffer[0]);
 }
diff --git a/unit-tests/testFile.h b/unit-tests/testFile.h
index 4d8b859..a5d8530 100644
--- a/unit-tests/testFile.h
+++ b/unit-tests/testFile.h
@@ -7,15 +7,15 @@
 
 using namespace std;
 
-// Mever use this!
+#if 0
+// Never use this!
 #define FILE2string(s,f,c) do {\
         FILE *(f) = fopen("testout", "w");\
         c;\
         fclose(f);\
-        s = testFile("testout");\
+        s = readTestBaseline("testout");\
         unlink("testout");\
 } while(0);
+#endif
 
-string testFile(const string &fn);
-
-// string testFile(char *fn);
+string readTestBaseline(const string &fn);
diff --git a/unit-tests/test_config.h b/unit-tests/test_config.h
index bb29dea..9f03448 100644
--- a/unit-tests/test_config.h
+++ b/unit-tests/test_config.h
@@ -1,7 +1,7 @@
 #ifndef E_test_config_h
 #define E_test_config_h
 
-#define TEST_SRC_DIR "/Users/jimg/src/hyrax_1.8_release/src/libdap/unit-tests"
+#define TEST_SRC_DIR "/home/jimg/src/hyrax_1.9_release/src/libdap/unit-tests"
 
 #endif
 
diff --git a/util.cc b/util.cc
index d071cec..90a8e1b 100644
--- a/util.cc
+++ b/util.cc
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -35,14 +35,11 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: util.cc 26028 2012-11-07 20:34:13Z jimg $"
-    };
-
 #include <fstream>
 
 #include <cassert>
 #include <cstring>
+#include <climits>
 
 #include <ctype.h>
 #ifndef TM_IN_SYS_TIME
@@ -69,11 +66,18 @@ static char rcsid[] not_used =
 #include <stdexcept>
 
 #include "BaseType.h"
+#include "Byte.h"
+#include "Int16.h"
+#include "Int32.h"
+#include "UInt16.h"
+#include "UInt32.h"
+#include "Float32.h"
+#include "Float64.h"
 #include "Str.h"
-#include "Url.h"
-#include "Sequence.h"
+#include "Array.h"
+
 #include "Error.h"
-#include "parser.h"
+
 #include "util.h"
 #include "GNURegex.h"
 #include "debug.h"
@@ -82,6 +86,222 @@ using namespace std;
 
 namespace libdap {
 
+/** Given a BaseType pointer, extract the string value it contains and return
+ it.
+
+ @param arg The BaseType pointer
+ @return A C++ string
+ @exception Error thrown if the referenced BaseType object does not contain
+ a DAP String. */
+string extract_string_argument(BaseType * arg)
+{
+	assert(arg);
+
+    if (arg->type() != dods_str_c)
+        throw Error(malformed_expr,
+                "The function requires a DAP string argument.");
+
+    if (!arg->read_p())
+        throw InternalErr(__FILE__, __LINE__,
+                "The CE Evaluator built an argument list where some constants held no values.");
+
+    string s = static_cast<Str*>(arg)->value();
+
+    DBG(cerr << "s: " << s << endl);
+
+    return s;
+}
+
+template<class T> static void set_array_using_double_helper(Array * a, double *src, int src_len)
+{
+    T *values = new T[src_len];
+    // TODO Replace new with vector<T> (vector<T> values(src_len);)
+    for (int i = 0; i < src_len; ++i)
+        values[i] = (T) src[i];
+
+#ifdef VAL2BUF
+    a->val2buf(values, true);
+#else
+    a->set_value(values, src_len);
+#endif
+
+    delete[]values;
+}
+
+/** Given an array that holds some sort of numeric data, load it with values
+ using an array of doubles. This function makes several assumptions. First,
+ it assumes the caller really wants to put the doubles into whatever types
+ the array holds! Caveat emptor. Second, it assumes that if the size of
+ source (\e src) array is different than the destination (\e dest) the
+ caller has made a mistake. In that case it will throw an Error object.
+
+ After setting the values, this method sets the \c read_p property for
+ \e dest. Setting \e read_p tells the serialization methods in libdap
+ that this variable already holds data values and, given that, the
+ serialization code will not try to read the values.
+
+ @param dest An Array. The values are written to this array, reusing
+ its storage. Existing values are lost.
+ @param src The source data.
+ @param src_len The number of elements in the \e src array.
+ @exception Error Thrown if \e dest is not a numeric-type array (Byte, ...,
+ Float64) or if the number of elements in \e src does not match the number
+ is \e dest. */
+void set_array_using_double(Array * dest, double *src, int src_len)
+{
+    // Simple types are Byte, ..., Float64, String and Url.
+    if ((dest->type() == dods_array_c && !dest->var()->is_simple_type())
+    || dest->var()->type() == dods_str_c
+    || dest->var()->type() == dods_url_c)
+        throw InternalErr(__FILE__, __LINE__,
+                "The function requires a DAP numeric-type array argument.");
+
+    // Test sizes. Note that Array::length() takes any constraint into account
+    // when it returns the length. Even if this was removed, the 'helper'
+    // function this uses calls Vector::val2buf() which uses Vector::width()
+    // which in turn uses length().
+    if (dest->length() != src_len)
+        throw InternalErr(__FILE__, __LINE__,
+                "The source and destination array sizes don't match ("
+                + long_to_string(src_len) + " versus "
+                + long_to_string(dest->length()) + ").");
+
+    // The types of arguments that the CE Parser will build for numeric
+    // constants are limited to Uint32, Int32 and Float64. See ce_expr.y.
+    // Expanded to work for any numeric type so it can be used for more than
+    // just arguments.
+    switch (dest->var()->type()) {
+    case dods_byte_c:
+        set_array_using_double_helper<dods_byte>(dest, src, src_len);
+        break;
+    case dods_uint16_c:
+        set_array_using_double_helper<dods_uint16>(dest, src, src_len);
+        break;
+    case dods_int16_c:
+        set_array_using_double_helper<dods_int16>(dest, src, src_len);
+        break;
+    case dods_uint32_c:
+        set_array_using_double_helper<dods_uint32>(dest, src, src_len);
+        break;
+    case dods_int32_c:
+        set_array_using_double_helper<dods_int32>(dest, src, src_len);
+        break;
+    case dods_float32_c:
+        set_array_using_double_helper<dods_float32>(dest, src, src_len);
+        break;
+    case dods_float64_c:
+        set_array_using_double_helper<dods_float64>(dest, src, src_len);
+        break;
+    default:
+        throw InternalErr(__FILE__, __LINE__,
+                "The argument list built by the CE parser contained an unsupported numeric type.");
+    }
+
+    // Set the read_p property.
+    dest->set_read_p(true);
+}
+
+template<class T> static double *extract_double_array_helper(Array * a)
+{
+    int length = a->length();
+    // Could improve this using vector<T>. jhrg
+    T *b = new T[length];
+    a->value(b);
+
+    double *dest = new double[length];
+    for (int i = 0; i < length; ++i)
+        dest[i] = (double) b[i];
+    delete[]b;
+
+    return dest;
+}
+
+/** Given a pointer to an Array which holds a numeric type, extract the
+ values and return in an array of doubles. This function allocates the
+ array using 'new double[n]' so delete[] MUST be used when you are done
+ the data. */
+double *extract_double_array(Array * a)
+{
+    // Simple types are Byte, ..., Float64, String and Url.
+    if ((a->type() == dods_array_c && !a->var()->is_simple_type())
+    || a->var()->type() == dods_str_c || a->var()->type() == dods_url_c)
+        throw Error(malformed_expr,
+                "The function requires a DAP numeric-type array argument.");
+
+    if (!a->read_p())
+        throw InternalErr(__FILE__, __LINE__,
+                string("The Array '") + a->name() +
+                "'does not contain values.");
+
+    // The types of arguments that the CE Parser will build for numeric
+    // constants are limited to Uint32, Int32 and Float64. See ce_expr.y.
+    // Expanded to work for any numeric type so it can be used for more than
+    // just arguments.
+    switch (a->var()->type()) {
+    case dods_byte_c:
+        return extract_double_array_helper<dods_byte>(a);
+    case dods_uint16_c:
+        return extract_double_array_helper<dods_uint16>(a);
+    case dods_int16_c:
+        return extract_double_array_helper<dods_int16>(a);
+    case dods_uint32_c:
+        return extract_double_array_helper<dods_uint32>(a);
+    case dods_int32_c:
+        return extract_double_array_helper<dods_int32>(a);
+    case dods_float32_c:
+        return extract_double_array_helper<dods_float32>(a);
+    case dods_float64_c:
+        return extract_double_array_helper<dods_float64>(a);
+    default:
+        throw InternalErr(__FILE__, __LINE__,
+                "The argument list built by the CE parser contained an unsupported numeric type.");
+    }
+}
+
+/** Given a BaseType pointer, extract the numeric value it contains and return
+ it in a C++ double.
+
+ @param arg The BaseType pointer
+ @return A C++ double
+ @exception Error thrown if the referenced BaseType object does not contain
+ a DAP numeric value. */
+double extract_double_value(BaseType * arg)
+{
+    // Simple types are Byte, ..., Float64, String and Url.
+    if (!arg->is_simple_type() || arg->type() == dods_str_c || arg->type()
+            == dods_url_c)
+        throw Error(malformed_expr,
+                "The function requires a DAP numeric-type argument.");
+
+    if (!arg->read_p())
+        throw InternalErr(__FILE__, __LINE__,
+                "The CE Evaluator built an argument list where some constants held no values.");
+
+    // The types of arguments that the CE Parser will build for numeric
+    // constants are limited to Uint32, Int32 and Float64. See ce_expr.y.
+    // Expanded to work for any numeric type so it can be used for more than
+    // just arguments.
+    switch (arg->type()) {
+    case dods_byte_c:
+        return (double)(static_cast<Byte*>(arg)->value());
+    case dods_uint16_c:
+        return (double)(static_cast<UInt16*>(arg)->value());
+    case dods_int16_c:
+        return (double)(static_cast<Int16*>(arg)->value());
+    case dods_uint32_c:
+        return (double)(static_cast<UInt32*>(arg)->value());
+    case dods_int32_c:
+        return (double)(static_cast<Int32*>(arg)->value());
+    case dods_float32_c:
+        return (double)(static_cast<Float32*>(arg)->value());
+    case dods_float64_c:
+        return static_cast<Float64*>(arg)->value();
+    default:
+        throw InternalErr(__FILE__, __LINE__,
+                "The argument list built by the CE parser contained an unsupported numeric type.");
+    }
+}
+
 // Remove spaces from the start of a URL and from the start of any constraint
 // expression it contains. 4/7/98 jhrg
 
@@ -89,8 +309,6 @@ namespace libdap {
     This function assumes that there are no holes in both the URL and the CE.
     It will remove \e leading space, but not other spaces.
 
-    @todo Is this still needed? This function may predate the switch from
-    libwww to libcurl and the latter may not need to have spaces removed.
     @param name The URL to process
     @return Returns a new string object that contains the pruned URL. */
 string
@@ -134,21 +352,9 @@ unique_names(vector<BaseType *> l, const string &var_name,
     // sort the array of names
     sort(names.begin(), names.end());
 
-#ifdef DODS_DEBUG2
-    cout << "unique:" << endl;
-    for (int ii = 0; ii < nelem; ++ii)
-        cout << "NAMES[" << ii << "]=" << names[ii] << endl;
-#endif
-
     // sort the array of names
     sort(names.begin(), names.end());
 
-#ifdef DODS_DEBUG2
-    cout << "unique:" << endl;
-    for (int ii = 0; ii < nelem; ++ii)
-        cout << "NAMES[" << ii << "]=" << names[ii] << endl;
-#endif
-
     // look for any instance of consecutive names that are ==
     for (int j = 1; j < nelem; ++j) {
         if (names[j-1] == names[j]) {
@@ -171,9 +377,12 @@ libdap_root()
     return LIBDAP_ROOT;
 }
 
-extern "C"
-    const char *
-    libdap_version()
+/** Return the version string for this package.
+    @note This function has C linkage so that it can be found using autoconf
+    tests.
+    @return The version string. */
+extern "C" const char *
+libdap_version()
 {
     return PACKAGE_VERSION;
 }
@@ -185,269 +394,350 @@ extern "C"
     return PACKAGE_NAME;
 }
 
-// Since Server4 can get compressed responses using Tomcat, bail on this
-// software (which complicates building under Win32). It can be turned on
-// for use with Server3 in configure.ac.
+/**
+ * Use the system time() function to get the current time. Return a string,
+ * removing the trailing newline that time() includes in its response.
+ * @return A C++ string with the current system time as formatted by time()
+ */
+string
+systime()
+{
+    time_t TimBin;
 
-#if COMPRESSION_FOR_SERVER3
+    if (time(&TimBin) == (time_t) - 1)
+        return string("time() error");
+    else {
+#if 0
+        string TimStr = ctime(&TimBin);
+#endif
+        char *ctime_value = ctime(&TimBin);
+        if (ctime_value) {
+        	string TimStr = ctime_value;
+        	return TimStr.substr(0, TimStr.size() - 2); // remove the \n
+        }
+        else
+        	return "Unknown";
+    }
+}
 
-// Return true if the program deflate exists and is executable by user, group
-// and world. If this returns false the caller should assume that server
-// filter programs won't be able to find the deflate program and thus won't
-// be able to compress the return document.
-// NB: this works because this function uses the same rules as compressor()
-// (which follows) to look for deflate. 2/11/98 jhrg
+/**
+ * Downcase the source string. This function modifies its argument.
+ * @param The string to modify
+ */
+void
+downcase(string &s)
+{
+    for (unsigned int i = 0; i < s.length(); i++)
+        s[i] = tolower(s[i]);
+}
 
+/**
+ * Is the string surrounded by double quotes?
+ * @param s The source string
+ * @reurn True if the string is quoted, false otherwise.
+ */
 bool
-deflate_exists()
+is_quoted(const string &s)
 {
-    DBG(cerr << "Entering deflate_exists...");
+    return (!s.empty() && s[0] == '\"' && s[s.length()-1] == '\"');
+}
 
-    int status = false;
-    struct stat buf;
+/**
+ * Return a new string that is not quoted. This will return a new string
+ * regardless of whether the source string is actualy quoted.
+ * @param s The source string
+ * @return A new string without quotes
+ */
+string
+remove_quotes(const string &s)
+{
+    if (is_quoted(s))
+        return s.substr(1, s.length() - 2);
+    else
+        return s;
+}
 
-#ifdef WIN32
-    string deflate = (string)libdap_root() + "\\bin\\deflate";
-#else
-    string deflate = (string)libdap_root() + "/sbin/deflate";
-#endif
+/** Get the Type enumeration value which matches the given name. */
+Type get_type(const char *name)
+{
+    if (strcmp(name, "Byte") == 0)
+        return dods_byte_c;
 
-    // Check that the file exists...
-    // First look for deflate using DODS_ROOT (compile-time constant subsumed
-    // by an environment variable) and if that fails in the CWD which finds
-    // the program when it is in the same directory as the dispatch script
-    // and other server components. 2/11/98 jhrg
-    status = (stat(deflate.c_str(), &buf) == 0)
-#ifdef WIN32
-             || (stat(".\\deflate", &buf) == 0);
-#else
-             || (stat("./deflate", &buf) == 0);
-#endif
+    if (strcmp(name, "Int8") == 0)
+        return dods_int8_c;
 
-    // and that it can be executed.
-#ifdef WIN32
-    status &= (buf.st_mode & _S_IEXEC);
-#else
-    status &= buf.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH);
-#endif
-    DBG(cerr << " returning " << (status ? "true." : "false.") << endl);
-    return (status != 0);
-}
+    if (strcmp(name, "UInt8") == 0)
+        return dods_uint8_c;
 
-FILE *
-compressor(FILE *output, int &childpid)
-{
-#ifdef WIN32
-    //  There is no such thing as a "fork" under win32. This makes it so that
-    //  we have to juggle handles more aggressively. This code hasn't been
-    //  tested and shown to work as of 07/2000.
-    int pid, data[2];
-    int hStdIn, hStdOut;
-
-    if (_pipe(data, 512, O_BINARY | O_NOINHERIT) < 0) {
-        cerr << "Could not create IPC channel for compressor process"
-        << endl;
-        return NULL;
-    }
+    if (strcmp(name, "Int16") == 0)
+        return dods_int16_c;
 
+    if (strcmp(name, "UInt16") == 0)
+        return dods_uint16_c;
 
-    // This sets up for the child process, but it has to be reversed for the
-    // parent after the spawn takes place.
+    if (strcmp(name, "Int32") == 0)
+        return dods_int32_c;
 
-    // Store stdin, stdout so we have something to restore to
-    hStdIn  = _dup(_fileno(stdin));
-    hStdOut = _dup(_fileno(stdout));
+    if (strcmp(name, "UInt32") == 0)
+        return dods_uint32_c;
 
-    // Child is to read from read end of pipe
-    if (_dup2(data[0], _fileno(stdin)) != 0) {
-        cerr << "dup of child stdin failed" << endl;
-        return NULL;
-    }
-    // Child is to write its's stdout to file
-    if (_dup2(_fileno(output), _fileno(stdout)) != 0) {
-        cerr << "dup of child stdout failed" << endl;
-        return NULL;
-    }
+    if (strcmp(name, "Int64") == 0)
+        return dods_int64_c;
 
-    // Spawn child process
-    string deflate = "deflate.exe";
-    if ((pid = _spawnlp(_P_NOWAIT, deflate.c_str(), deflate.c_str(),
-                        "-c", "5", "-s", NULL)) < 0) {
-        cerr << "Could not spawn to create compressor process" << endl;
-        return NULL;
-    }
+    if (strcmp(name, "UInt64") == 0)
+        return dods_uint64_c;
 
-    // Restore stdin, stdout for parent and close duplicate copies
-    if (_dup2(hStdIn, _fileno(stdin)) != 0) {
-        cerr << "dup of stdin failed" << endl;
-        return NULL;
-    }
-    if (_dup2(hStdOut, _fileno(stdout)) != 0) {
-        cerr << "dup of stdout failed" << endl;
-        return NULL;
-    }
-    close(hStdIn);
-    close(hStdOut);
+    if (strcmp(name, "Float32") == 0)
+        return dods_float32_c;
 
-    // Tell the parent that it reads from the opposite end of the
-    // place where the child writes.
-    close(data[0]);
-    FILE *input = fdopen(data[1], "w");
-    setbuf(input, 0);
-    childpid = pid;
-    return input;
+    if (strcmp(name, "Float64") == 0)
+        return dods_float64_c;
 
-#else
-    FILE *ret_file = NULL ;
+    if (strcmp(name, "String") == 0)
+        return dods_str_c;
 
-    int pid, data[2];
+    if (strcmp(name, "URL") == 0)
+        return dods_url4_c;
 
-    if (pipe(data) < 0) {
-        cerr << "Could not create IPC channel for compressor process"
-        << endl;
-        return NULL;
-    }
+    if (strcmp(name, "Url") == 0)
+        return dods_url_c;
 
-    if ((pid = fork()) < 0) {
-        cerr << "Could not fork to create compressor process" << endl;
-        return NULL;
-    }
+    if (strcmp(name, "Array") == 0)
+        return dods_array_c;
 
-    // The parent process closes the write end of the Pipe, and creates a
-    // FILE * using fdopen(). The FILE * is used by the calling program to
-    // access the read end of the Pipe.
+    if (strcmp(name, "Structure") == 0)
+        return dods_structure_c;
 
-    if (pid > 0) {   // Parent, pid is that of the child
-        close(data[0]);
-        ret_file = fdopen(data[1], "w");
-        setbuf(ret_file, 0);
-        childpid = pid;
-    }
-    else {   // Child
-        close(data[1]);
-        dup2(data[0], 0); // Read from the pipe...
-        dup2(fileno(output), 1); // Write to the FILE *output.
-
-        DBG(cerr << "Opening compression stream." << endl);
-
-        // First try to run deflate using DODS_ROOT (the value read from the
-        // DODS_ROOT environment variable takes precedence over the value set
-        // at build time. If that fails, try the CWD.
-        string deflate = (string)libdap_root() + "/sbin/deflate";
-        (void) execl(deflate.c_str(), "deflate", "-c",  "5", "-s", NULL);
-        (void) execl("./deflate", "deflate", "-c",  "5", "-s", NULL);
-        cerr << "Warning: Could not start compressor!" << endl;
-        cerr << "defalte should be in DODS_ROOT/etc or in the CWD!"
-        << endl;
-        _exit(127);  // Only here if an error occurred.
-    }
+    if (strcmp(name, "Sequence") == 0)
+        return dods_sequence_c;
 
-    return ret_file ;
-#endif
+    if (strcmp(name, "Grid") == 0)
+        return dods_grid_c;
+
+    return dods_null_c;
 }
 
-#endif // COMPRESSION_FOR_SERVER3
+/** @brief Returns the type of the class instance as a string. */
+string
+type_name(Type t)
+{
+    switch (t) {
+    case dods_null_c:
+        return string("Null");
+    case dods_byte_c:
+        return string("Byte");
+    case dods_int16_c:
+        return string("Int16");
+    case dods_uint16_c:
+        return string("UInt16");
+    case dods_int32_c:
+        return string("Int32");
+    case dods_uint32_c:
+        return string("UInt32");
+    case dods_float32_c:
+        return string("Float32");
+    case dods_float64_c:
+        return string("Float64");
+    case dods_str_c:
+        return string("String");
+    case dods_url_c:
+        return string("Url");
+    case dods_array_c:
+        return string("Array");
+    case dods_structure_c:
+        return string("Structure");
+    case dods_sequence_c:
+        return string("Sequence");
+    case dods_grid_c:
+        return string("Grid");
+
+    case dods_int8_c:
+        return string("Int8");
+    case dods_uint8_c:
+        return string("UInt8");
+    case dods_int64_c:
+        return string("Int64");
+    case dods_uint64_c:
+        return string("UInt64");
+    case dods_url4_c:
+        return string("URL");
+    case dods_group_c:
+        return string("Group");
+    case dods_enum_c:
+        return string("Enum");
+
+    default:
+        throw InternalErr(__FILE__, __LINE__, "Unknown type.");
+    }
+}
 
-/**
- * Does the directory exist?
- *
- * @param dir The pathname to test.
- * @return True if the directory exists, false otherwise
- */
+/** @brief Returns true if the instance is a numeric, string or URL
+    type variable.
+    @return True if the instance is a scalar numeric, String or URL variable,
+    False otherwise. Arrays (even of simple types) return False.
+    @see is_vector_type() */
 bool
-dir_exists(const string &dir)
+is_simple_type(Type t)
 {
-    struct stat buf;
+    switch (t) {
 
-    return (stat(dir.c_str(), &buf) == 0) && (buf.st_mode & S_IFDIR);
-}
+    case dods_byte_c:
 
-#if 0
+    case dods_int8_c:
+    case dods_uint8_c:
 
-// UNTESTED 11/7/12
+    case dods_int16_c:
+    case dods_uint16_c:
+    case dods_int32_c:
+    case dods_uint32_c:
 
-/**
- * Is the directory writable?
- *
- * @param dir The pathname to test
- * @return True if the pathname is a directory and can be written by the
- * caller, false otherwise.
- */
-bool
-dir_writable(const string &dir)
-{
-    try {
-        string test = dir + "/test.txt";
-        ofstream ofs(dir.c_str());
-        ofs.write("test", 5);
-        ofs.close();
-        unlink(test.c_str());
+    case dods_int64_c:
+    case dods_uint64_c:
+
+    case dods_float32_c:
+    case dods_float64_c:
+    case dods_str_c:
+    case dods_url_c:
+
+    case dods_url4_c:
+    case dods_enum_c:
         return true;
-    }
-    catch (...) {
+
+    case dods_null_c:
+    case dods_array_c:
+    case dods_structure_c:
+    case dods_sequence_c:
+    case dods_grid_c:
+    case dods_group_c:
         return false;
     }
-}
-#endif
 
-// This function returns a pointer to the system time formated for an httpd
-// log file.
+    return false;
+}
 
-string
-systime()
+/** @brief Returns true if the instance is a vector (i.e., array) type
+    variable.
+    @return True if the instance is an Array, False otherwise. */
+bool
+is_vector_type(Type t)
 {
-    time_t TimBin;
+    switch (t) {
+    case dods_null_c:
+    case dods_byte_c:
 
-    if (time(&TimBin) == (time_t) - 1)
-        return string("time() error");
-    else {
-        string TimStr = ctime(&TimBin);
-        return TimStr.substr(0, TimStr.size() - 2); // remove the \n
+    case dods_int8_c:
+    case dods_uint8_c:
+
+    case dods_int16_c:
+    case dods_uint16_c:
+
+    case dods_int32_c:
+    case dods_uint32_c:
+
+    case dods_int64_c:
+    case dods_uint64_c:
+
+    case dods_float32_c:
+    case dods_float64_c:
+
+    case dods_str_c:
+    case dods_url_c:
+
+    case dods_url4_c:
+    case dods_enum_c:
+        return false;
+
+    case dods_array_c:
+        return true;
+
+    case dods_structure_c:
+    case dods_sequence_c:
+    case dods_grid_c:
+    case dods_group_c:
+        return false;
     }
-}
 
-void
-downcase(string &s)
-{
-    for (unsigned int i = 0; i < s.length(); i++)
-        s[i] = tolower(s[i]);
+    return false;
 }
 
+/** @brief Returns true if the instance is a constructor (i.e., Structure,
+    Sequence or Grid) type variable.
+    @return True if the instance is a Structure, Sequence or Grid, False
+    otherwise. */
 bool
-is_quoted(const string &s)
+is_constructor_type(Type t)
 {
-    return (!s.empty() && s[0] == '\"' && s[s.length()-1] == '\"');
+    switch (t) {
+    case dods_null_c:
+    case dods_byte_c:
+
+    case dods_int8_c:
+    case dods_uint8_c:
+
+    case dods_int16_c:
+    case dods_uint16_c:
+    case dods_int32_c:
+    case dods_uint32_c:
+
+    case dods_int64_c:
+    case dods_uint64_c:
+
+    case dods_float32_c:
+    case dods_float64_c:
+    case dods_str_c:
+    case dods_url_c:
+
+    case dods_url4_c:
+    case dods_enum_c:
+
+    case dods_array_c:
+        return false;
+
+    case dods_structure_c:
+    case dods_sequence_c:
+    case dods_grid_c:
+    case dods_group_c:
+        return true;
+    }
+
+    return false;
 }
 
-string
-remove_quotes(const string &s)
+/**
+ * Is this an integer type?
+ * @return True if the type holds an integer value, false otherwise.
+ */
+bool is_integer_type(Type t)
 {
-    if (is_quoted(s))
-        return s.substr(1, s.length() - 2);
-    else
-        return s;
+    switch (t) {
+        case dods_byte_c:
+        case dods_int8_c:
+        case dods_uint8_c:
+        case dods_int16_c:
+        case dods_uint16_c:
+        case dods_int32_c:
+        case dods_uint32_c:
+        case dods_int64_c:
+        case dods_uint64_c:
+            return true;
+        default:
+            return false;
+    }
 }
 
-#ifdef WIN32
-//  Sometimes need to buffer within an iostream under win32 when
-//  we want the output to go to a FILE *.  This is because
-//  it's not possible to associate an ofstream with a FILE *
-//  under the Standard ANSI C++ Library spec.  Unix systems
-//  don't follow the spec in this regard.
-void flush_stream(iostream ios, FILE *out)
+/**
+ * Does the directory exist?
+ *
+ * @param dir The pathname to test.
+ * @return True if the directory exists, false otherwise
+ */
+bool
+dir_exists(const string &dir)
 {
-    int nbytes;
-    char buffer[512];
-
-    ios.get(buffer, 512, NULL);
-    while ((nbytes = ios.gcount()) > 0) {
-        fwrite(buffer, 1, nbytes, out);
-        ios.get(buffer, 512, NULL);
-    }
+    struct stat buf;
 
-    return;
+    return (stat(dir.c_str(), &buf) == 0) && (buf.st_mode & S_IFDIR);
 }
-#endif
 
 // Jose Garcia
 void
@@ -506,15 +796,6 @@ double_to_string(const double &num)
     return s;
 }
 
-// Get the version number of the core software. Defining this means that
-// clients of the DAP don't have to rely on config.h for the version
-// number.
-string
-dap_version()
-{
-    return (string)"OPeNDAP DAP/" + libdap_version() + ": compiled on " + __DATE__ + ":" + __TIME__ ;
-}
-
 // Given a pathname, return the file at the end of the path. This is used
 // when reporting errors (maybe other times, too) to keep the server from
 // revealing too much about its organization when sending error responses
@@ -531,6 +812,14 @@ static const char path_sep[] =
     };
 #endif
 
+/** Get the filename part from a path. This function can be used to return a
+    string that has the directory components stripped from a path. This is
+    useful when building error message strings.
+
+    If WIN32 is defined, use '\' as the path separator, otherwise use '/' as
+    the path separator.
+
+    @return A string containing only the filename given a path. */
 string
 path_to_filename(string path)
 {
@@ -539,70 +828,47 @@ path_to_filename(string path)
     return (pos == string::npos) ? path : path.substr(++pos);
 }
 
-/** Read stuff from a file and dump it into a string. This assumes the file
-    holds character data only. Intended for testing...
-    @param fp Read from this file
-    @return Returns a string which holds the character data. */
-string
-file_to_string(FILE *fp)
-{
-    rewind(fp);
-    ostringstream oss;
-    char c;
-    while (fread(&c, 1, 1, fp))
-        oss << c;
-    return oss.str();
-}
+#define CHECK_BIT( tab, bit ) ( tab[ (bit)/8 ] & (1<<( (bit)%8 )) )
+#define BITLISTSIZE 16 /* bytes used for [chars] in compiled expr */
 
-#if 0
-// This code is not used.
-int
-wildcmp(const char *wild, const char *string)
-{
-  // Written by Jack Handy - jakkhandy at hotmail.com
+/*
+ * globchars() - build a bitlist to check for character group match
+ */
 
-  if (!wild || !string)
-      return 0;
+static void globchars(const char *s, const char *e, char *b) {
+    int neg = 0;
 
-  const char *cp = NULL, *mp = NULL;
+    memset(b, '\0', BITLISTSIZE);
 
-  while ((*string) && (*wild != '*')) {
-    if ((*wild != *string) && (*wild != '?')) {
-      return 0;
-    }
-    wild++;
-    string++;
-  }
+    if (*s == '^')
+        neg++, s++;
 
-  while (*string) {
-    if (*wild == '*') {
-      if (!*++wild) {
-        return 1;
-      }
-      mp = wild;
-      cp = string+1;
-    } else if ((*wild == *string) || (*wild == '?')) {
-      wild++;
-      string++;
-    } else {
-      wild = mp;
-      string = cp++;
+    while (s < e) {
+        int c;
+
+        if (s + 2 < e && s[1] == '-') {
+            for (c = s[0]; c <= s[2]; c++)
+                b[c / 8] |= (1 << (c % 8));
+            s += 3;
+        }
+        else {
+            c = *s++;
+            b[c / 8] |= (1 << (c % 8));
+        }
     }
-  }
 
-  while (*wild == '*') {
-    wild++;
-  }
-  return !*wild;
-}
-#endif
+    if (neg) {
+        int i;
+        for (i = 0; i < BITLISTSIZE; i++)
+            b[i] ^= 0377;
+    }
 
-#define CHECK_BIT( tab, bit ) ( tab[ (bit)/8 ] & (1<<( (bit)%8 )) )
-#define BITLISTSIZE 16 /* bytes used for [chars] in compiled expr */
+    /* Don't include \0 in either $[chars] or $[^chars] */
 
-static void globchars( const char *s, const char *e, char *b );
+    b[0] &= 0376;
+}
 
-/*
+/**
  * glob:  match a string against a simple pattern
  *
  * Understands the following patterns:
@@ -618,7 +884,6 @@ static void globchars( const char *s, const char *e, char *b );
  * @return 0 on success, -1 if the pattern is exhausted but there are
  * characters remaining in the string and 1 if the pattern does not match
  */
-
 int
 glob(const char *c, const char *s)
 {
@@ -697,56 +962,8 @@ glob(const char *c, const char *s)
             break;
         }
     }
-}
 
-/*
- * globchars() - build a bitlist to check for character group match
- */
-
-static void globchars(const char *s, const char *e, char *b) {
-    int neg = 0;
-
-    memset(b, '\0', BITLISTSIZE);
-
-    if (*s == '^')
-        neg++, s++;
-
-    while (s < e) {
-        int c;
-
-        if (s + 2 < e && s[1] == '-') {
-            for (c = s[0]; c <= s[2]; c++)
-                b[c / 8] |= (1 << (c % 8));
-            s += 3;
-        }
-        else {
-            c = *s++;
-            b[c / 8] |= (1 << (c % 8));
-        }
-    }
-
-    if (neg) {
-        int i;
-        for (i = 0; i < BITLISTSIZE; i++)
-            b[i] ^= 0377;
-    }
-
-    /* Don't include \0 in either $[chars] or $[^chars] */
-
-    b[0] &= 0376;
-}
-
-int wmatch(const char *pat, const char *s)
-{
-    if (!pat || !s)
-        return 0;
-
-  switch (*pat) {
-    case '\0': return (*s == '\0');
-    case '?': return (*s != '\0') && wmatch(pat+1, s+1);
-    case '*': return wmatch(pat+1, s) || (*s != '\0' && wmatch(pat, s+1));
-    default: return (*s == *pat) && wmatch(pat+1, s+1);
-  }
+    return 1;   // Should never get here; this quiets gcc's warning
 }
 
 /** @name Security functions */
@@ -763,14 +980,14 @@ size_ok(unsigned int sz, unsigned int nelem)
     return (sz > 0 && nelem < UINT_MAX / sz);
 }
 
-/** @brief Does the string name a potentailly valid pathname?
-    Test the given pathname to verfiy that it is a valid name. We define this
+/** @brief Does the string name a potentially valid pathname?
+    Test the given pathname to verify that it is a valid name. We define this
     as: Contains only printable characters; and Is less then 256 characters.
     If \e strict is true, test that the pathname consists of only letters,
     digits, and underscore, dash and dot characters instead of the more general
     case where a pathname can be composed of any printable characters.
 
-    @note Using this function does not guarentee that the path is valid, only
+    @note Using this function does not guarantee that the path is valid, only
     that the path \e could be valid. The intent is foil attacks where an
     exploit is encoded in a string then passed to a library function. This code
     does not address whether the pathname references a valid resource.
@@ -801,5 +1018,15 @@ pathname_ok(const string &path, bool strict)
 
 //@}
 
+/**
+ * Get the version of the DAP library.
+ * @deprecated
+ */
+string
+dap_version()
+{
+    return (string)"OPeNDAP DAP/" + libdap_version() + ": compiled on " + __DATE__ + ":" + __TIME__ ;
+}
+
 } // namespace libdap
 
diff --git a/util.h b/util.h
index 0c17adc..1233e28 100644
--- a/util.h
+++ b/util.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
@@ -37,6 +37,7 @@
 #define _util_h 1
 
 #include <cstdio>
+#include <cmath>
 #include <vector>
 
 #ifndef _basetype_h
@@ -48,21 +49,28 @@ using std::iostream;
 namespace libdap
 {
 
+class Array;
+
+/** Is \e lhs equal to \e rhs? Use epsilon to determine equality. */
+inline bool double_eq(double lhs, double rhs, double epsilon = 1.0e-5)
+{
+    return fabs(lhs - rhs) < epsilon;
+}
+
+string extract_string_argument(BaseType *arg) ;
+double extract_double_value(BaseType *arg) ;
+double *extract_double_array(Array *a) ;
+void set_array_using_double(Array *dest, double *src, int src_len) ;
+
 string prune_spaces(const string &);
-bool unique_names(vector<BaseType *> l, const string &var, const string &type,
-                  string &msg);
-FILE *text_to_temp(string text);
+bool unique_names(vector<BaseType *> l, const string &var, const string &type, string &msg);
 string systime();
 //FILE *compressor(FILE *output, int &childpid);
 //bool deflate_exists();
 const char *libdap_root();
-/** Return the version string for this package.
-    @note This function has C linkage so that it can be found using autoconf
-    tests.
-    @return The version string. */
 extern "C" const char *libdap_version();
 extern "C" const char *libdap_name();
-const char *dods_progress();
+
 #ifdef WIN32
 void flush_stream(iostream ios, FILE *out);
 #endif
@@ -71,11 +79,14 @@ void downcase(string &s);
 bool is_quoted(const string &s);
 string remove_quotes(const string &s);
 
+Type get_type(const char *name);
+string type_name(Type t);
+bool is_simple_type(Type t);
+bool is_vector_type(Type t);
+bool is_constructor_type(Type t);
+bool is_integer_type(Type t);
+
 bool dir_exists(const string &dir);
-#if 0
-// UNTESTED
-bool dir_writable(const string &dir);
-#endif
 
 // Jose Garcia
 /** @name Integer to string conversion functions
@@ -130,31 +141,33 @@ void append_double_to_string(const double &num, string &str);
 string double_to_string(const double &num);
 //@}
 
-/** Get the version of the DAP library. */
+string path_to_filename(string path);
+int glob( const char *c, const char *s );
+time_t parse_time(const char * str, bool expand);
+bool size_ok(unsigned int sz, unsigned int nelem);
+bool pathname_ok(const string &path, bool strict = true);
 string dap_version();
 
-/** Get the filename part from a path. This function can be used to return a
-    string that has the directory components stripped from a path. This is
-    useful when building error message strings.
-
-    If WIN32 is defined, use '\' as the path separator, otherwise use '/' as
-    the path separator.
-
-    @return A string containing only the filename given a path. */
-string path_to_filename(string path);
+#if COMPRESSION_FOR_SERVER3
+FILE *compressor(FILE *output, int &childpid);
+bool deflate_exists();
+#endif
 
+#if 0
+FILE *text_to_temp(string text);
+#endif
+#if 0
+int wmatch(const char *pat, const char *s);
+#endif
+#if 0
 string file_to_string(FILE *fp);
 
 int wildcmp(const char *wild, const char *string);
+#endif
+#if 0
+const char *dods_progress();
+#endif
 
-int glob( const char *c, const char *s );
-
-int wmatch(const char *pat, const char *s);
-
-time_t parse_time(const char * str, bool expand);
-
-bool size_ok(unsigned int sz, unsigned int nelem);
-bool pathname_ok(const string &path, bool strict = true);
 
 } // namespace libdap
 
diff --git a/util_mit.cc b/util_mit.cc
index 8d0b2fa..fc60f4e 100644
--- a/util_mit.cc
+++ b/util_mit.cc
@@ -18,7 +18,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112
 
@@ -29,10 +29,6 @@
 
 #include "config.h"
 
-static char rcsid[] not_used =
-    {"$Id: util_mit.cc 24370 2011-03-28 16:21:32Z jimg $"
-    };
-
 #include <cstdio>
 #include <cstring>
 #include <cstdlib>
@@ -76,7 +72,7 @@ static const char * wkdays[7] =
 
    The problem here is that toupper(x) is not defined officially unless
    isupper(x) is. These macros are CERTAINLY needed on #if defined(pyr) ||
-   define(mips) or BDSI platforms. For safefy, we make them mandatory.
+   define(mips) or BDSI platforms. For safety, we make them mandatory.
 */
 
 #ifndef TOLOWER
@@ -98,6 +94,7 @@ strncasecomp(const char *a, const char *b, int n)
         if (diff) return diff;
     }
     /*NOTREACHED*/
+    return -1; // silence gcc
 }
 
 static int
@@ -327,6 +324,8 @@ string date_time_str(time_t *calendar, bool local)
                 loctime.tm_sec);
 #else
     struct tm *loctime = localtime(calendar);
+    if (!loctime)
+    	return "";
     snprintf(buf, 40, "%s, %02d %s %04d %02d:%02d:%02d",
             wkdays[loctime->tm_wday],
             loctime->tm_mday,
@@ -351,6 +350,8 @@ string date_time_str(time_t *calendar, bool local)
                 gmt.tm_sec);
 #else
     struct tm *gmt = gmtime(calendar);
+    if (!gmt)
+    	return "";
     snprintf(buf, 40, "%s, %02d %s %04d %02d:%02d:%02d GMT",
             wkdays[gmt->tm_wday],
             gmt->tm_mday,
diff --git a/util_mit.h b/util_mit.h
index ae24c79..fd02f27 100644
--- a/util_mit.h
+++ b/util_mit.h
@@ -19,7 +19,7 @@
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //
 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
 
diff --git a/xdr-datatypes.h b/xdr-datatypes.h
index 9167595..c918cf8 100644
--- a/xdr-datatypes.h
+++ b/xdr-datatypes.h
@@ -20,10 +20,10 @@
 
 
 #define XDR_INT32 xdr_int32_t
-#define XDR_UINT32 xdr_u_int32_t
+#define XDR_UINT32 xdr_uint32_t
 
 #define XDR_INT16 xdr_int16_t
-#define XDR_UINT16 xdr_u_int16_t
+#define XDR_UINT16 xdr_uint16_t
 
 #define XDR_FLOAT64 xdr_double
 #define XDR_FLOAT32 xdr_float

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libdap.git



More information about the debian-science-commits mailing list