[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree

zrouter-src-freebsd at zrouter.org zrouter-src-freebsd at zrouter.org
Tue Dec 6 18:33:49 UTC 2011


details:   http://zrouter.org/hg/FreeBSD/head//rev/4aee9df9e1ae
changeset: 238:4aee9df9e1ae
user:      ray at terran.dlink.ua
date:      Tue Dec 06 20:26:16 2011 +0200
description:
FreeBSD HEAD @svn 228310r.

diffstat:

 head/Makefile.inc1                                                      |    35 +-
 head/ObsoleteFiles.inc                                                  |    15 +-
 head/UPDATING                                                           |     6 +-
 head/bin/sh/eval.c                                                      |    25 +-
 head/bin/test/test.c                                                    |    12 +-
 head/cddl/contrib/opensolaris/cmd/zdb/zdb.8                             |   128 +-
 head/cddl/contrib/opensolaris/cmd/zfs/zfs.8                             |  5914 ++++-----
 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c                        |   491 +-
 head/cddl/contrib/opensolaris/cmd/zpool/zpool.8                         |  3431 ++--
 head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c                    |   113 +-
 head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1             |   108 +-
 head/cddl/contrib/opensolaris/cmd/ztest/ztest.c                         |    36 +-
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h                |    57 +-
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c        |   482 +-
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_graph.c          |   653 -
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h           |     4 +-
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c         |    18 +-
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c           |   462 +
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c           |    45 +-
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c       |   605 +-
 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c           |     5 +-
 head/cddl/lib/drti/Makefile                                             |     4 +-
 head/cddl/lib/libzfs/Makefile                                           |     4 +-
 head/contrib/gperf/AUTHORS                                              |     2 +-
 head/contrib/gperf/COPYING                                              |     2 +-
 head/contrib/gperf/ChangeLog                                            |  1643 ++
 head/contrib/gperf/FREEBSD-Xlist                                        |     6 +-
 head/contrib/gperf/INSTALL                                              |     4 +-
 head/contrib/gperf/Makefile.devel                                       |    32 +-
 head/contrib/gperf/Makefile.in                                          |    12 +-
 head/contrib/gperf/NEWS                                                 |    70 +
 head/contrib/gperf/README                                               |     7 +-
 head/contrib/gperf/acconfig.h                                           |     4 -
 head/contrib/gperf/aclocal.m4                                           |     2 -
 head/contrib/gperf/configure                                            |  3034 ++++-
 head/contrib/gperf/configure.ac                                         |    55 +
 head/contrib/gperf/configure.in                                         |    46 -
 head/contrib/gperf/doc/Makefile.in                                      |    44 +-
 head/contrib/gperf/doc/configure                                        |  2801 +++-
 head/contrib/gperf/doc/configure.ac                                     |    37 +
 head/contrib/gperf/doc/configure.in                                     |    35 -
 head/contrib/gperf/doc/gperf.1                                          |   103 +-
 head/contrib/gperf/doc/gperf.texi                                       |   811 +-
 head/contrib/gperf/doc/help2man                                         |    34 +-
 head/contrib/gperf/doc/texinfo.tex                                      |  5999 ----------
 head/contrib/gperf/lib/Makefile.in                                      |    19 +-
 head/contrib/gperf/lib/configure                                        |  4998 ++++++-
 head/contrib/gperf/lib/configure.ac                                     |    45 +
 head/contrib/gperf/lib/configure.in                                     |    43 -
 head/contrib/gperf/lib/getline.cc                                       |   119 +
 head/contrib/gperf/lib/getline.h                                        |    41 +
 head/contrib/gperf/lib/hash.cc                                          |     8 +-
 head/contrib/gperf/lib/hash.h                                           |     6 +-
 head/contrib/gperf/src/Makefile.in                                      |    85 +-
 head/contrib/gperf/src/bool-array.cc                                    |    46 +-
 head/contrib/gperf/src/bool-array.h                                     |    83 +-
 head/contrib/gperf/src/bool-array.icc                                   |    97 +-
 head/contrib/gperf/src/config.h.in                                      |    27 +-
 head/contrib/gperf/src/config.h_vms                                     |    20 +
 head/contrib/gperf/src/configure                                        |  5371 +++++++-
 head/contrib/gperf/src/configure.ac                                     |    68 +
 head/contrib/gperf/src/configure.in                                     |    71 -
 head/contrib/gperf/src/gen-perf.cc                                      |   359 -
 head/contrib/gperf/src/gen-perf.h                                       |    50 -
 head/contrib/gperf/src/hash-table.cc                                    |   206 +-
 head/contrib/gperf/src/hash-table.h                                     |    69 +-
 head/contrib/gperf/src/input.cc                                         |  1005 +
 head/contrib/gperf/src/input.h                                          |    69 +
 head/contrib/gperf/src/iterator.cc                                      |    87 -
 head/contrib/gperf/src/iterator.h                                       |    51 -
 head/contrib/gperf/src/key-list.cc                                      |  2182 ---
 head/contrib/gperf/src/key-list.h                                       |    96 -
 head/contrib/gperf/src/keyword-list.cc                                  |   175 +
 head/contrib/gperf/src/keyword-list.h                                   |    85 +
 head/contrib/gperf/src/keyword-list.icc                                 |    53 +
 head/contrib/gperf/src/keyword.cc                                       |   161 +
 head/contrib/gperf/src/keyword.h                                        |   116 +
 head/contrib/gperf/src/keyword.icc                                      |    42 +
 head/contrib/gperf/src/list-node.cc                                     |   102 -
 head/contrib/gperf/src/list-node.h                                      |    46 -
 head/contrib/gperf/src/main.cc                                          |   199 +-
 head/contrib/gperf/src/new.cc                                           |    87 -
 head/contrib/gperf/src/options.cc                                       |  1124 +-
 head/contrib/gperf/src/options.h                                        |   376 +-
 head/contrib/gperf/src/options.icc                                      |   192 +-
 head/contrib/gperf/src/output.cc                                        |  2100 +++
 head/contrib/gperf/src/output.h                                         |   154 +
 head/contrib/gperf/src/positions.cc                                     |   177 +
 head/contrib/gperf/src/positions.h                                      |   175 +
 head/contrib/gperf/src/positions.icc                                    |   285 +
 head/contrib/gperf/src/read-line.cc                                     |    97 -
 head/contrib/gperf/src/read-line.h                                      |    53 -
 head/contrib/gperf/src/read-line.icc                                    |    47 -
 head/contrib/gperf/src/search.cc                                        |  1684 ++
 head/contrib/gperf/src/search.h                                         |   165 +
 head/contrib/gperf/src/trace.cc                                         |    35 -
 head/contrib/gperf/src/trace.h                                          |    40 -
 head/contrib/gperf/src/vectors.cc                                       |    25 -
 head/contrib/gperf/src/vectors.h                                        |    37 -
 head/contrib/gperf/src/version.cc                                       |    36 +-
 head/contrib/gperf/src/version.h                                        |    30 +-
 head/contrib/gperf/tests/Makefile.in                                    |   232 -
 head/contrib/gperf/tests/ada-pred.exp                                   |    54 -
 head/contrib/gperf/tests/ada-res.exp                                    |    63 -
 head/contrib/gperf/tests/ada.gperf                                      |    63 -
 head/contrib/gperf/tests/adadefs.gperf                                  |    54 -
 head/contrib/gperf/tests/c++.gperf                                      |    47 -
 head/contrib/gperf/tests/c-parse.gperf                                  |    56 -
 head/contrib/gperf/tests/c.exp                                          |    32 -
 head/contrib/gperf/tests/c.gperf                                        |    32 -
 head/contrib/gperf/tests/configure                                      |  1214 --
 head/contrib/gperf/tests/configure.in                                   |    45 -
 head/contrib/gperf/tests/gpc.gperf                                      |    48 -
 head/contrib/gperf/tests/gplus.gperf                                    |    76 -
 head/contrib/gperf/tests/irc.gperf                                      |    63 -
 head/contrib/gperf/tests/jscript.gperf                                  |    73 -
 head/contrib/gperf/tests/jstest1.gperf                                  |   142 -
 head/contrib/gperf/tests/jstest2.gperf                                  |   147 -
 head/contrib/gperf/tests/jstest3.gperf                                  |   147 -
 head/contrib/gperf/tests/makeinfo.gperf                                 |   116 -
 head/contrib/gperf/tests/modula.exp                                     |   106 -
 head/contrib/gperf/tests/modula2.gperf                                  |    40 -
 head/contrib/gperf/tests/modula3.gperf                                  |   106 -
 head/contrib/gperf/tests/pascal.exp                                     |    36 -
 head/contrib/gperf/tests/pascal.gperf                                   |    36 -
 head/contrib/gperf/tests/test-1.exp                                     |   153 -
 head/contrib/gperf/tests/test-2.exp                                     |   202 -
 head/contrib/gperf/tests/test-3.exp                                     |   186 -
 head/contrib/gperf/tests/test-4.exp                                     |   162 -
 head/contrib/gperf/tests/test-5.exp                                     |   124 -
 head/contrib/gperf/tests/test-6.exp                                     |   119 -
 head/contrib/gperf/tests/test-7.exp                                     |    32 -
 head/contrib/gperf/tests/test.c                                         |    26 -
 head/contrib/gperf/tests/validate                                       |    54 -
 head/contrib/libcxxrt/FREEBSD-upgrade                                   |     6 +
 head/contrib/libcxxrt/LICENSE                                           |    14 +
 head/contrib/libcxxrt/abi_namespace.h                                   |     5 +
 head/contrib/libcxxrt/auxhelper.cc                                      |    41 +
 head/contrib/libcxxrt/cxxabi.h                                          |   219 +
 head/contrib/libcxxrt/dwarf_eh.h                                        |   454 +
 head/contrib/libcxxrt/dynamic_cast.cc                                   |   133 +
 head/contrib/libcxxrt/exception.cc                                      |  1483 ++
 head/contrib/libcxxrt/guard.cc                                          |   134 +
 head/contrib/libcxxrt/libelftc_dem_gnu3.c                               |  3473 +++++
 head/contrib/libcxxrt/memory.cc                                         |   115 +
 head/contrib/libcxxrt/stdexcept.cc                                      |    60 +
 head/contrib/libcxxrt/stdexcept.h                                       |    61 +
 head/contrib/libcxxrt/terminate.cc                                      |    14 +
 head/contrib/libcxxrt/typeinfo                                          |    26 +
 head/contrib/libcxxrt/typeinfo.cc                                       |    83 +
 head/contrib/libcxxrt/typeinfo.h                                        |   200 +
 head/contrib/libcxxrt/unwind-arm.h                                      |   201 +
 head/contrib/libcxxrt/unwind-itanium.h                                  |   170 +
 head/contrib/libcxxrt/unwind.h                                          |    18 +
 head/etc/devd/apple.conf                                                |    12 +-
 head/etc/mtree/BSD.include.dist                                         |     6 +-
 head/etc/rc.d/kld                                                       |     4 +-
 head/gnu/lib/Makefile                                                   |     5 +-
 head/gnu/lib/libodialog/CHANGES                                         |     9 -
 head/gnu/lib/libodialog/COPYING                                         |   339 -
 head/gnu/lib/libodialog/Makefile                                        |    24 -
 head/gnu/lib/libodialog/README                                          |     8 -
 head/gnu/lib/libodialog/TESTS/Makefile                                  |    20 -
 head/gnu/lib/libodialog/TESTS/check1.c                                  |    83 -
 head/gnu/lib/libodialog/TESTS/check2.c                                  |   105 -
 head/gnu/lib/libodialog/TESTS/check3.c                                  |    92 -
 head/gnu/lib/libodialog/TESTS/dselect.c                                 |    41 -
 head/gnu/lib/libodialog/TESTS/fselect.c                                 |    44 -
 head/gnu/lib/libodialog/TESTS/ftree1.c                                  |    45 -
 head/gnu/lib/libodialog/TESTS/ftree1.test                               |    73 -
 head/gnu/lib/libodialog/TESTS/ftree2.c                                  |    47 -
 head/gnu/lib/libodialog/TESTS/ftree2.test                               |    73 -
 head/gnu/lib/libodialog/TESTS/gauge.c                                   |    41 -
 head/gnu/lib/libodialog/TESTS/input1.c                                  |    45 -
 head/gnu/lib/libodialog/TESTS/input2.c                                  |    47 -
 head/gnu/lib/libodialog/TESTS/menu1.c                                   |    96 -
 head/gnu/lib/libodialog/TESTS/menu2.c                                   |    96 -
 head/gnu/lib/libodialog/TESTS/menu3.c                                   |   107 -
 head/gnu/lib/libodialog/TESTS/msg.c                                     |    42 -
 head/gnu/lib/libodialog/TESTS/prgbox.c                                  |    41 -
 head/gnu/lib/libodialog/TESTS/radio1.c                                  |    71 -
 head/gnu/lib/libodialog/TESTS/radio2.c                                  |    89 -
 head/gnu/lib/libodialog/TESTS/radio3.c                                  |    98 -
 head/gnu/lib/libodialog/TESTS/text.c                                    |    41 -
 head/gnu/lib/libodialog/TESTS/tree.c                                    |   111 -
 head/gnu/lib/libodialog/TESTS/yesno.c                                   |    45 -
 head/gnu/lib/libodialog/TODO                                            |    36 -
 head/gnu/lib/libodialog/checklist.c                                     |   661 -
 head/gnu/lib/libodialog/colors.h                                        |   219 -
 head/gnu/lib/libodialog/dialog.3                                        |   842 -
 head/gnu/lib/libodialog/dialog.h                                        |   211 -
 head/gnu/lib/libodialog/dialog.priv.h                                   |   183 -
 head/gnu/lib/libodialog/dir.c                                           |   549 -
 head/gnu/lib/libodialog/dir.h                                           |    38 -
 head/gnu/lib/libodialog/fselect.c                                       |   402 -
 head/gnu/lib/libodialog/gauge.c                                         |    79 -
 head/gnu/lib/libodialog/help.c                                          |   194 -
 head/gnu/lib/libodialog/inputbox.c                                      |   190 -
 head/gnu/lib/libodialog/kernel.c                                        |   536 -
 head/gnu/lib/libodialog/lineedit.c                                      |   213 -
 head/gnu/lib/libodialog/menubox.c                                       |   469 -
 head/gnu/lib/libodialog/msgbox.c                                        |   346 -
 head/gnu/lib/libodialog/notify.c                                        |    53 -
 head/gnu/lib/libodialog/prgbox.c                                        |   152 -
 head/gnu/lib/libodialog/radiolist.c                                     |   628 -
 head/gnu/lib/libodialog/raw_popen.c                                     |   161 -
 head/gnu/lib/libodialog/rc.c                                            |   375 -
 head/gnu/lib/libodialog/rc.h                                            |   222 -
 head/gnu/lib/libodialog/textbox.c                                       |   699 -
 head/gnu/lib/libodialog/tree.c                                          |  1133 -
 head/gnu/lib/libodialog/ui_objects.c                                    |   829 -
 head/gnu/lib/libodialog/ui_objects.h                                    |   114 -
 head/gnu/lib/libodialog/yesno.c                                         |   169 -
 head/gnu/usr.bin/dialog/Makefile                                        |     4 +-
 head/gnu/usr.bin/gperf/Makefile                                         |    17 +-
 head/gnu/usr.bin/gperf/config.h                                         |    31 +-
 head/kerberos5/Makefile.inc                                             |     6 +-
 head/kerberos5/lib/libhdb/Makefile                                      |     8 +-
 head/kerberos5/usr.bin/kadmin/Makefile                                  |     6 +-
 head/kerberos5/usr.sbin/ktutil/Makefile                                 |     6 +-
 head/lib/Makefile                                                       |    11 +-
 head/lib/libc++/Makefile                                                |   155 +
 head/lib/libc/gen/_pthread_stubs.c                                      |    14 +-
 head/lib/libc/gen/syslog.c                                              |     8 +-
 head/lib/libc/locale/duplocale.3                                        |    22 +-
 head/lib/libc/locale/freelocale.3                                       |    14 +-
 head/lib/libc/locale/localeconv.3                                       |     9 +-
 head/lib/libc/locale/newlocale.3                                        |    35 +-
 head/lib/libc/locale/querylocale.3                                      |     8 +-
 head/lib/libc/locale/uselocale.3                                        |    17 +-
 head/lib/libc/locale/wctype.c                                           |    73 +-
 head/lib/libc/locale/xlocale.3                                          |    75 +-
 head/lib/libc/string/strcasecmp.c                                       |    31 +-
 head/lib/libc/string/strcmp.c                                           |     5 +-
 head/lib/libc/string/strcoll.c                                          |    14 +-
 head/lib/libc/string/strncmp.c                                          |     6 +-
 head/lib/libc/sys/cap_enter.2                                           |     5 +-
 head/lib/libc/sys/cap_new.2                                             |     3 +-
 head/lib/libcxxrt/Makefile                                              |    25 +
 head/lib/libedit/edit/readline/Makefile                                 |     3 +-
 head/lib/libedit/edit/readline/readline.h                               |     3 +-
 head/lib/libpam/modules/Makefile.inc                                    |    13 +-
 head/lib/libpam/modules/pam_unix/Makefile                               |     6 +-
 head/lib/libusb/libusb10.c                                              |    14 +-
 head/release/doc/en_US.ISO8859-1/hardware/article.sgml                  |    15 +-
 head/rescue/rescue/Makefile                                             |     6 +-
 head/sbin/camcontrol/Makefile                                           |     4 +-
 head/sbin/camcontrol/camcontrol.8                                       |    59 +-
 head/sbin/camcontrol/camcontrol.c                                       |    47 +-
 head/sbin/camcontrol/camcontrol.h                                       |     7 +-
 head/sbin/camcontrol/fwdownload.c                                       |   389 +
 head/sbin/camcontrol/util.c                                             |    30 +-
 head/sbin/dhclient/clparse.c                                            |     4 +-
 head/sbin/dhclient/dhclient-script                                      |     6 +-
 head/sbin/dhclient/dhclient.c                                           |     3 +-
 head/sbin/dhclient/dhcp-options.5                                       |     6 +-
 head/sbin/dhclient/dhcp.h                                               |     3 +-
 head/sbin/dhclient/options.c                                            |   168 +-
 head/sbin/dhclient/tables.c                                             |     7 +-
 head/sbin/switchctl/switchctl.c                                         |    43 +
 head/sbin/sysctl/sysctl.c                                               |     4 +-
 head/secure/lib/libcrypto/Makefile                                      |     3 +-
 head/share/man/man4/Makefile                                            |     8 +-
 head/share/man/man4/ahci.4                                              |    13 +-
 head/share/man/man4/amd.4                                               |    78 -
 head/share/man/man4/bge.4                                               |    10 +-
 head/share/man/man4/capsicum.4                                          |   120 +
 head/share/man/man4/ffclock.4                                           |   128 +
 head/share/man/man4/netmap.4                                            |     3 +-
 head/share/man/man5/src.conf.5                                          |    28 +-
 head/share/misc/committers-src.dot                                      |     4 +-
 head/share/mk/bsd.lib.mk                                                |    61 +-
 head/share/mk/bsd.libnames.mk                                           |     5 +-
 head/share/mk/bsd.own.mk                                                |    17 +-
 head/share/mk/bsd.prog.mk                                               |    21 +-
 head/share/mk/sys.mk                                                    |    84 +-
 head/sys/amd64/conf/NOTES                                               |     4 +-
 head/sys/arm/mv/common.c                                                |    10 +-
 head/sys/arm/mv/mv_machdep.c                                            |    10 +-
 head/sys/boot/i386/zfsboot/zfsboot.c                                    |     6 +-
 head/sys/boot/zfs/zfsimpl.c                                             |     5 +-
 head/sys/cam/cam_xpt.c                                                  |    14 +-
 head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c                 |    18 +-
 head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.h                 |     2 +
 head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c               |     4 +
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c               |    10 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c             |     7 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c          |   106 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c       |   338 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c      |    30 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c         |    11 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c          |     4 +
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c               |    91 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c        |     6 +
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c       |     7 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c          |    16 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h           |     7 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h   |     5 +
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h     |     4 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h           |     3 +
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h      |     5 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c              |     3 +
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c         |     3 +-
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c         |   246 +-
 head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h               |    14 +-
 head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h   |     2 +
 head/sys/compat/linprocfs/linprocfs.c                                   |     4 +-
 head/sys/conf/NOTES                                                     |     5 +-
 head/sys/conf/files                                                     |    50 +-
 head/sys/conf/files.amd64                                               |    33 +-
 head/sys/conf/files.sparc64                                             |     3 +-
 head/sys/conf/kern.mk                                                   |     9 +-
 head/sys/conf/kern.post.mk                                              |     8 +-
 head/sys/conf/kern.pre.mk                                               |    12 +-
 head/sys/conf/kmod.mk                                                   |    11 +-
 head/sys/conf/makeLINT.mk                                               |     4 +-
 head/sys/conf/newvers.sh                                                |     3 +-
 head/sys/conf/options                                                   |     5 +-
 head/sys/contrib/dev/acpica/acpica_prep.sh                              |    26 +-
 head/sys/contrib/dev/acpica/changes.txt                                 |   353 +-
 head/sys/contrib/dev/acpica/common/adisasm.c                            |     1 +
 head/sys/contrib/dev/acpica/common/adwalk.c                             |     4 +
 head/sys/contrib/dev/acpica/common/dmrestag.c                           |   193 +-
 head/sys/contrib/dev/acpica/common/dmtable.c                            |    94 +-
 head/sys/contrib/dev/acpica/common/dmtbdump.c                           |   584 +-
 head/sys/contrib/dev/acpica/common/dmtbinfo.c                           |   422 +-
 head/sys/contrib/dev/acpica/compiler/aslanalyze.c                       |    57 +-
 head/sys/contrib/dev/acpica/compiler/aslcodegen.c                       |     9 +-
 head/sys/contrib/dev/acpica/compiler/aslcompile.c                       |     2 +
 head/sys/contrib/dev/acpica/compiler/aslcompiler.h                      |    49 +-
 head/sys/contrib/dev/acpica/compiler/aslcompiler.l                      |   479 +-
 head/sys/contrib/dev/acpica/compiler/aslcompiler.y                      |  1043 +-
 head/sys/contrib/dev/acpica/compiler/asldefine.h                        |    22 +-
 head/sys/contrib/dev/acpica/compiler/aslerror.c                         |    21 +-
 head/sys/contrib/dev/acpica/compiler/aslfiles.c                         |     6 +-
 head/sys/contrib/dev/acpica/compiler/aslglobal.h                        |     1 +
 head/sys/contrib/dev/acpica/compiler/asllisting.c                       |    10 +-
 head/sys/contrib/dev/acpica/compiler/aslload.c                          |    20 +-
 head/sys/contrib/dev/acpica/compiler/asllookup.c                        |   129 +-
 head/sys/contrib/dev/acpica/compiler/aslmain.c                          |   121 +-
 head/sys/contrib/dev/acpica/compiler/aslmap.c                           |    77 +-
 head/sys/contrib/dev/acpica/compiler/aslmessages.h                      |   163 +-
 head/sys/contrib/dev/acpica/compiler/aslopcodes.c                       |   131 +-
 head/sys/contrib/dev/acpica/compiler/asloperands.c                      |     8 +-
 head/sys/contrib/dev/acpica/compiler/aslpredef.c                        |    21 +-
 head/sys/contrib/dev/acpica/compiler/aslresource.c                      |   101 +-
 head/sys/contrib/dev/acpica/compiler/aslrestype1.c                      |    20 +-
 head/sys/contrib/dev/acpica/compiler/aslrestype1i.c                     |    94 +-
 head/sys/contrib/dev/acpica/compiler/aslrestype2.c                      |     5 +-
 head/sys/contrib/dev/acpica/compiler/aslrestype2d.c                     |    42 +-
 head/sys/contrib/dev/acpica/compiler/aslrestype2e.c                     |    48 +-
 head/sys/contrib/dev/acpica/compiler/aslrestype2q.c                     |    40 +-
 head/sys/contrib/dev/acpica/compiler/aslrestype2s.c                     |  1187 +
 head/sys/contrib/dev/acpica/compiler/aslrestype2w.c                     |    34 +-
 head/sys/contrib/dev/acpica/compiler/aslstubs.c                         |    17 +
 head/sys/contrib/dev/acpica/compiler/asltransform.c                     |    17 +-
 head/sys/contrib/dev/acpica/compiler/asltree.c                          |    20 +-
 head/sys/contrib/dev/acpica/compiler/asltypes.h                         |     8 +-
 head/sys/contrib/dev/acpica/compiler/aslutils.c                         |    63 +-
 head/sys/contrib/dev/acpica/compiler/aslwalks.c                         |    73 +
 head/sys/contrib/dev/acpica/compiler/dtcompile.c                        |    28 +-
 head/sys/contrib/dev/acpica/compiler/dtcompiler.h                       |    22 +
 head/sys/contrib/dev/acpica/compiler/dtfield.c                          |    13 +
 head/sys/contrib/dev/acpica/compiler/dtsubtable.c                       |     5 +
 head/sys/contrib/dev/acpica/compiler/dttable.c                          |   447 +
 head/sys/contrib/dev/acpica/compiler/dttemplate.h                       |   116 +-
 head/sys/contrib/dev/acpica/compiler/dtutils.c                          |    11 +
 head/sys/contrib/dev/acpica/debugger/dbcmds.c                           |   499 +-
 head/sys/contrib/dev/acpica/debugger/dbdisply.c                         |    22 +-
 head/sys/contrib/dev/acpica/debugger/dbfileio.c                         |     5 +-
 head/sys/contrib/dev/acpica/debugger/dbinput.c                          |     9 +-
 head/sys/contrib/dev/acpica/debugger/dbutils.c                          |     2 +-
 head/sys/contrib/dev/acpica/disassembler/dmbuffer.c                     |     8 +-
 head/sys/contrib/dev/acpica/disassembler/dmopcode.c                     |    73 +-
 head/sys/contrib/dev/acpica/disassembler/dmresrc.c                      |    13 +-
 head/sys/contrib/dev/acpica/disassembler/dmresrcl.c                     |     1 -
 head/sys/contrib/dev/acpica/disassembler/dmresrcl2.c                    |   700 +
 head/sys/contrib/dev/acpica/disassembler/dmresrcs.c                     |    49 +-
 head/sys/contrib/dev/acpica/disassembler/dmutils.c                      |    50 +-
 head/sys/contrib/dev/acpica/disassembler/dmwalk.c                       |     3 +-
 head/sys/contrib/dev/acpica/dispatcher/dsargs.c                         |     2 +-
 head/sys/contrib/dev/acpica/dispatcher/dsfield.c                        |    86 +-
 head/sys/contrib/dev/acpica/events/evevent.c                            |    14 +
 head/sys/contrib/dev/acpica/events/evglock.c                            |     7 +
 head/sys/contrib/dev/acpica/events/evregion.c                           |    30 +-
 head/sys/contrib/dev/acpica/executer/exconfig.c                         |     2 +-
 head/sys/contrib/dev/acpica/executer/excreate.c                         |    28 +-
 head/sys/contrib/dev/acpica/executer/exdump.c                           |     6 +-
 head/sys/contrib/dev/acpica/executer/exfield.c                          |    26 +-
 head/sys/contrib/dev/acpica/executer/exfldio.c                          |    28 +-
 head/sys/contrib/dev/acpica/executer/exprep.c                           |    27 +
 head/sys/contrib/dev/acpica/executer/exutils.c                          |    30 +
 head/sys/contrib/dev/acpica/hardware/hwvalid.c                          |     2 +
 head/sys/contrib/dev/acpica/include/acapps.h                            |     9 +
 head/sys/contrib/dev/acpica/include/acconfig.h                          |     5 +-
 head/sys/contrib/dev/acpica/include/acdebug.h                           |     4 +
 head/sys/contrib/dev/acpica/include/acdisasm.h                          |   198 +-
 head/sys/contrib/dev/acpica/include/acevents.h                          |     3 +-
 head/sys/contrib/dev/acpica/include/acglobal.h                          |    20 +-
 head/sys/contrib/dev/acpica/include/acinterp.h                          |     4 +
 head/sys/contrib/dev/acpica/include/aclocal.h                           |    29 +-
 head/sys/contrib/dev/acpica/include/acnames.h                           |     1 +
 head/sys/contrib/dev/acpica/include/acobject.h                          |     4 +
 head/sys/contrib/dev/acpica/include/acopcode.h                          |     4 +
 head/sys/contrib/dev/acpica/include/acpixf.h                            |    30 +-
 head/sys/contrib/dev/acpica/include/acpredef.h                          |    38 +-
 head/sys/contrib/dev/acpica/include/acresrc.h                           |   115 +-
 head/sys/contrib/dev/acpica/include/acrestyp.h                          |   226 +-
 head/sys/contrib/dev/acpica/include/actbl.h                             |    21 +-
 head/sys/contrib/dev/acpica/include/actbl1.h                            |    85 +-
 head/sys/contrib/dev/acpica/include/actbl3.h                            |   650 +
 head/sys/contrib/dev/acpica/include/actypes.h                           |    15 +-
 head/sys/contrib/dev/acpica/include/acutils.h                           |    17 +
 head/sys/contrib/dev/acpica/include/amlcode.h                           |    29 +-
 head/sys/contrib/dev/acpica/include/amlresrc.h                          |   160 +
 head/sys/contrib/dev/acpica/include/platform/acenv.h                    |    24 +-
 head/sys/contrib/dev/acpica/namespace/nspredef.c                        |    43 +-
 head/sys/contrib/dev/acpica/namespace/nsrepair.c                        |     1 +
 head/sys/contrib/dev/acpica/namespace/nsrepair2.c                       |    20 +-
 head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c       |  1214 ++
 head/sys/contrib/dev/acpica/osunixxf.c                                  |  1208 --
 head/sys/contrib/dev/acpica/parser/psargs.c                             |   145 +-
 head/sys/contrib/dev/acpica/parser/psopcode.c                           |    11 +-
 head/sys/contrib/dev/acpica/parser/pstree.c                             |     7 +-
 head/sys/contrib/dev/acpica/resources/rscalc.c                          |    67 +-
 head/sys/contrib/dev/acpica/resources/rscreate.c                        |    73 +
 head/sys/contrib/dev/acpica/resources/rsdump.c                          |   156 +-
 head/sys/contrib/dev/acpica/resources/rsinfo.c                          |    59 +-
 head/sys/contrib/dev/acpica/resources/rsirq.c                           |    32 +
 head/sys/contrib/dev/acpica/resources/rslist.c                          |    75 +-
 head/sys/contrib/dev/acpica/resources/rsmisc.c                          |   266 +-
 head/sys/contrib/dev/acpica/resources/rsserial.c                        |   425 +
 head/sys/contrib/dev/acpica/resources/rsutils.c                         |    59 +
 head/sys/contrib/dev/acpica/resources/rsxface.c                         |    56 +-
 head/sys/contrib/dev/acpica/tables/tbfadt.c                             |    28 +-
 head/sys/contrib/dev/acpica/tables/tbutils.c                            |     8 +
 head/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h                   |   197 -
 head/sys/contrib/dev/acpica/utilities/utdecode.c                        |     4 +-
 head/sys/contrib/dev/acpica/utilities/utmutex.c                         |     9 +-
 head/sys/contrib/dev/acpica/utilities/utresrc.c                         |   293 +-
 head/sys/contrib/dev/acpica/utilities/utxfmutex.c                       |   213 +
 head/sys/contrib/ipfilter/netinet/ip_compat.h                           |     6 +-
 head/sys/contrib/ipfilter/netinet/ip_proxy.c                            |     4 +-
 head/sys/contrib/octeon-sdk/cvmx-helper-board.c                         |    25 +-
 head/sys/contrib/pf/net/pf.c                                            |     6 +-
 head/sys/dev/acpica/acpi_battery.c                                      |    10 +-
 head/sys/dev/ahci/ahci.c                                                |     8 +-
 head/sys/dev/amd/amd.c                                                  |  2539 ----
 head/sys/dev/amd/amd.h                                                  |   585 -
 head/sys/dev/arcmsr/arcmsr.c                                            |    19 +-
 head/sys/dev/ata/chipsets/ata-ati.c                                     |    26 +-
 head/sys/dev/ata/chipsets/ata-nvidia.c                                  |     6 +-
 head/sys/dev/dc/dcphy.c                                                 |     4 +-
 head/sys/dev/dc/pnphy.c                                                 |     4 +-
 head/sys/dev/e1000/if_em.c                                              |   131 +-
 head/sys/dev/e1000/if_igb.c                                             |    98 +-
 head/sys/dev/e1000/if_lem.c                                             |    81 +-
 head/sys/dev/ed/if_ed.c                                                 |    21 +-
 head/sys/dev/et/if_et.c                                                 |   104 +-
 head/sys/dev/et/if_etreg.h                                              |    37 +-
 head/sys/dev/fdt/fdt_common.c                                           |     8 +-
 head/sys/dev/fdt/fdt_powerpc.c                                          |     4 +-
 head/sys/dev/fdt/fdtbus.c                                               |     4 +-
 head/sys/dev/gpio/gpioiic.c                                             |    40 +-
 head/sys/dev/hptiop/hptiop.c                                            |     6 +-
 head/sys/dev/hptmv/entry.c                                              |    15 +-
 head/sys/dev/hptrr/hptrr_osm_bsd.c                                      |    12 +-
 head/sys/dev/hwpmc/hwpmc_core.c                                         |    10 +-
 head/sys/dev/iicbus/iicbus.c                                            |     8 +-
 head/sys/dev/iicbus/iicbus.h                                            |     4 +-
 head/sys/dev/iicbus/iiconf.c                                            |    10 +-
 head/sys/dev/ixgbe/ixgbe.c                                              |   150 +-
 head/sys/dev/mii/acphy.c                                                |     4 +-
 head/sys/dev/mii/amphy.c                                                |     4 +-
 head/sys/dev/mii/atphy.c                                                |     5 +-
 head/sys/dev/mii/axphy.c                                                |     4 +-
 head/sys/dev/mii/bmtphy.c                                               |     5 +-
 head/sys/dev/mii/brgphy.c                                               |     8 +-
 head/sys/dev/mii/ciphy.c                                                |     4 +-
 head/sys/dev/mii/e1000phy.c                                             |     4 +-
 head/sys/dev/mii/gentbi.c                                               |     4 +-
 head/sys/dev/mii/icsphy.c                                               |     4 +-
 head/sys/dev/mii/ip1000phy.c                                            |     4 +-
 head/sys/dev/mii/jmphy.c                                                |     4 +-
 head/sys/dev/mii/lxtphy.c                                               |     4 +-
 head/sys/dev/mii/mii.c                                                  |     8 +-
 head/sys/dev/mii/miidevs                                                |    41 +-
 head/sys/dev/mii/mlphy.c                                                |     4 +-
 head/sys/dev/mii/nsgphy.c                                               |     4 +-
 head/sys/dev/mii/nsphy.c                                                |     4 +-
 head/sys/dev/mii/nsphyter.c                                             |     4 +-
 head/sys/dev/mii/pnaphy.c                                               |     4 +-
 head/sys/dev/mii/qsphy.c                                                |     4 +-
 head/sys/dev/mii/rgephy.c                                               |     4 +-
 head/sys/dev/mii/rlphy.c                                                |     4 +-
 head/sys/dev/mii/rlswitch.c                                             |     4 +-
 head/sys/dev/mii/smcphy.c                                               |     8 +-
 head/sys/dev/mii/tdkphy.c                                               |     4 +-
 head/sys/dev/mii/tlphy.c                                                |     4 +-
 head/sys/dev/mii/truephy.c                                              |     4 +-
 head/sys/dev/mii/ukphy.c                                                |     4 +-
 head/sys/dev/mii/xmphy.c                                                |     4 +-
 head/sys/dev/netmap/if_em_netmap.h                                      |   169 +-
 head/sys/dev/netmap/if_igb_netmap.h                                     |   139 +-
 head/sys/dev/netmap/if_lem_netmap.h                                     |   421 +-
 head/sys/dev/netmap/if_re_netmap.h                                      |   145 +-
 head/sys/dev/netmap/ixgbe_netmap.h                                      |   342 +-
 head/sys/dev/netmap/netmap.c                                            |   290 +-
 head/sys/dev/netmap/netmap_kern.h                                       |    20 +-
 head/sys/dev/ofw/ofw_fdt.c                                              |     6 +-
 head/sys/dev/ofw/openfirm.c                                             |     4 +-
 head/sys/dev/pci/pcireg.h                                               |     3 +-
 head/sys/dev/re/if_re.c                                                 |   163 +-
 head/sys/dev/sfxge/common/efsys.h                                       |     5 +-
 head/sys/dev/sfxge/common/efx.h                                         |     2 +
 head/sys/dev/sfxge/common/efx_bootcfg.c                                 |     3 +
 head/sys/dev/sfxge/common/efx_ev.c                                      |     3 +
 head/sys/dev/sfxge/common/efx_filter.c                                  |     3 +
 head/sys/dev/sfxge/common/efx_impl.h                                    |     2 +
 head/sys/dev/sfxge/common/efx_intr.c                                    |     3 +
 head/sys/dev/sfxge/common/efx_mac.c                                     |     3 +
 head/sys/dev/sfxge/common/efx_mcdi.c                                    |     3 +
 head/sys/dev/sfxge/common/efx_mcdi.h                                    |     2 +
 head/sys/dev/sfxge/common/efx_mon.c                                     |     3 +
 head/sys/dev/sfxge/common/efx_nic.c                                     |     3 +
 head/sys/dev/sfxge/common/efx_nvram.c                                   |     3 +
 head/sys/dev/sfxge/common/efx_phy.c                                     |     3 +
 head/sys/dev/sfxge/common/efx_port.c                                    |     3 +
 head/sys/dev/sfxge/common/efx_regs.h                                    |     2 +
 head/sys/dev/sfxge/common/efx_regs_ef10.h                               |     2 +
 head/sys/dev/sfxge/common/efx_regs_mcdi.h                               |     5 +-
 head/sys/dev/sfxge/common/efx_regs_pci.h                                |     2 +
 head/sys/dev/sfxge/common/efx_rx.c                                      |     3 +
 head/sys/dev/sfxge/common/efx_sram.c                                    |     3 +
 head/sys/dev/sfxge/common/efx_tx.c                                      |     3 +
 head/sys/dev/sfxge/common/efx_types.h                                   |     2 +
 head/sys/dev/sfxge/common/efx_vpd.c                                     |     3 +
 head/sys/dev/sfxge/common/efx_wol.c                                     |     3 +
 head/sys/dev/sfxge/common/siena_flash.h                                 |     3 +-
 head/sys/dev/sfxge/common/siena_impl.h                                  |     2 +
 head/sys/dev/sfxge/common/siena_mac.c                                   |     4 +
 head/sys/dev/sfxge/common/siena_mon.c                                   |     4 +
 head/sys/dev/sfxge/common/siena_nic.c                                   |     4 +
 head/sys/dev/sfxge/common/siena_nvram.c                                 |     3 +
 head/sys/dev/sfxge/common/siena_phy.c                                   |     4 +
 head/sys/dev/sfxge/common/siena_sram.c                                  |     4 +
 head/sys/dev/sfxge/common/siena_vpd.c                                   |     3 +
 head/sys/dev/uart/uart_bus_fdt.c                                        |     6 +-
 head/sys/dev/usb/net/ruephy.c                                           |     4 +-
 head/sys/dev/usb/quirk/usb_quirk.c                                      |     3 +-
 head/sys/dev/usb/template/usb_template.c                                |     4 +-
 head/sys/dev/usb/template/usb_template_kbd.c                            |     8 +-
 head/sys/dev/usb/template/usb_template_modem.c                          |     8 +-
 head/sys/dev/usb/template/usb_template_mouse.c                          |     8 +-
 head/sys/dev/usb/usb_msctest.c                                          |     4 +-
 head/sys/dev/usb/usb_transfer.h                                         |   116 +-
 head/sys/dev/usb/usbdevs                                                |     6 +-
 head/sys/dev/usb/wlan/if_urtw.c                                         |     6 +-
 head/sys/dev/usb/wlan/if_zyd.c                                          |     6 +-
 head/sys/dev/virtio/balloon/virtio_balloon.c                            |     3 +-
 head/sys/dev/virtio/balloon/virtio_balloon.h                            |    27 +-
 head/sys/dev/virtio/block/virtio_blk.c                                  |    31 +-
 head/sys/dev/virtio/block/virtio_blk.h                                  |    37 +-
 head/sys/dev/virtio/network/if_vtnet.c                                  |    77 +-
 head/sys/dev/virtio/network/if_vtnetvar.h                               |     3 +-
 head/sys/dev/virtio/network/virtio_net.h                                |    27 +-
 head/sys/dev/virtio/pci/virtio_pci.h                                    |    27 +-
 head/sys/dev/virtio/virtio.h                                            |    27 +-
 head/sys/dev/virtio/virtio_ring.h                                       |    34 +-
 head/sys/dev/vr/if_vr.c                                                 |    79 +-
 head/sys/dev/vr/if_vrreg.h                                              |    13 +-
 head/sys/dev/xl/xlphy.c                                                 |     4 +-
 head/sys/fs/fifofs/fifo_vnops.c                                         |     4 +-
 head/sys/fs/nfs/nfsclstate.h                                            |    13 +-
 head/sys/fs/nfsclient/nfs_clbio.c                                       |     4 +-
 head/sys/fs/nfsclient/nfs_clstate.c                                     |   147 +-
 head/sys/fs/nfsserver/nfs_nfsdport.c                                    |   123 +-
 head/sys/fs/nfsserver/nfs_nfsdsubs.c                                    |    12 +-
 head/sys/fs/ntfs/ntfs_subr.c                                            |    88 +-
 head/sys/fs/ntfs/ntfs_subr.h                                            |     6 +-
 head/sys/fs/ntfs/ntfs_vnops.c                                           |    11 +-
 head/sys/fs/nwfs/nwfs_io.c                                              |     4 +-
 head/sys/fs/smbfs/smbfs_io.c                                            |     4 +-
 head/sys/geom/geom_vfs.c                                                |     6 +-
 head/sys/geom/part/g_part_apm.c                                         |    81 +-
 head/sys/i386/conf/PAE                                                  |     3 +-
 head/sys/kern/kern_cpuset.c                                             |     3 +-
 head/sys/kern/kern_ffclock.c                                            |   106 +-
 head/sys/kern/kern_proc.c                                               |   113 +-
 head/sys/kern/kern_resource.c                                           |     7 +-
 head/sys/kern/kern_switch.c                                             |     4 +-
 head/sys/kern/kern_synch.c                                              |     5 +-
 head/sys/kern/kern_tc.c                                                 |   138 +-
 head/sys/kern/kern_thr.c                                                |     8 +-
 head/sys/kern/kern_umtx.c                                               |   140 +-
 head/sys/kern/subr_blist.c                                              |    12 +-
 head/sys/kern/subr_bus.c                                                |    37 +-
 head/sys/kern/sys_pipe.c                                                |    45 +-
 head/sys/kern/uipc_shm.c                                                |     4 +-
 head/sys/kern/vfs_bio.c                                                 |     6 +-
 head/sys/kern/vfs_syscalls.c                                            |    17 +-
 head/sys/mips/atheros/ar71xx_chip.c                                     |    58 +-
 head/sys/mips/atheros/ar71xx_cpudef.h                                   |     2 +-
 head/sys/mips/atheros/ar71xx_machdep.c                                  |    18 +-
 head/sys/mips/atheros/ar724x_chip.c                                     |    65 +-
 head/sys/mips/atheros/ar91xx_chip.c                                     |    58 +-
 head/sys/mips/atheros/if_arge.c                                         |    14 +-
 head/sys/mips/cavium/files.octeon1                                      |     8 +-
 head/sys/mips/cavium/octe/ethernet-rgmii.c                              |     9 +
 head/sys/mips/cavium/octe/octe.c                                        |    13 +-
 head/sys/mips/cavium/octeon_machdep.c                                   |     6 +-
 head/sys/mips/conf/AR91XX_BASE                                          |    27 +-
 head/sys/mips/conf/AR91XX_BASE.hints                                    |     3 +-
 head/sys/mips/conf/OCTEON1                                              |    44 +-
 head/sys/mips/conf/OCTEON1.hints                                        |    17 +-
 head/sys/mips/conf/PB92                                                 |    12 +-
 head/sys/mips/conf/TP-WN1043ND                                          |    19 +-
 head/sys/mips/conf/TP-WN1043ND.hints                                    |    60 +-
 head/sys/mips/conf/XLPN32                                               |     8 +-
 head/sys/mips/mips/bus_space_generic.c                                  |    25 +-
 head/sys/mips/mips/db_trace.c                                           |     9 +-
 head/sys/mips/nlm/hal/cpucontrol.h                                      |     4 +-
 head/sys/mips/nlm/xlp_machdep.c                                         |     4 +-
 head/sys/modules/Makefile                                               |     4 +-
 head/sys/modules/acpi/acpi/Makefile                                     |     7 +-
 head/sys/modules/amd/Makefile                                           |    10 -
 head/sys/modules/cam/Makefile                                           |    11 +-
 head/sys/net/bpf.c                                                      |   156 +-
 head/sys/net/bpf.h                                                      |    25 +-
 head/sys/net/if_clone.c                                                 |   108 +-
 head/sys/net/if_clone.h                                                 |    21 +-
 head/sys/net/if_vlan.c                                                  |   166 +-
 head/sys/net/netmap.h                                                   |    11 +-
 head/sys/netinet/in.c                                                   |    12 +-
 head/sys/netinet/sctp_header.h                                          |     5 +-
 head/sys/netinet/sctp_output.c                                          |    12 +-
 head/sys/netinet/sctp_pcb.c                                             |     9 +-
 head/sys/netinet/sctp_uio.h                                             |     6 +-
 head/sys/netinet/tcp_reass.c                                            |    41 +-
 head/sys/netipsec/xform_ah.c                                            |    16 +-
 head/sys/netipsec/xform_esp.c                                           |    42 +-
 head/sys/nfsclient/nfs_bio.c                                            |     4 +-
 head/sys/nfsserver/nfs_serv.c                                           |   131 +-
 head/sys/pc98/include/md_var.h                                          |     8 +-
 head/sys/pc98/pc98/pc98_machdep.h                                       |     5 +-
 head/sys/pci/if_rlreg.h                                                 |    38 +-
 head/sys/powerpc/booke/platform_bare.c                                  |     4 +-
 head/sys/powerpc/powermac/platform_powermac.c                           |     6 +-
 head/sys/powerpc/powermac/pmu.c                                         |    16 +-
 head/sys/powerpc/powermac/pmuvar.h                                      |     3 +-
 head/sys/sparc64/conf/GENERIC                                           |     4 +-
 head/sys/sparc64/include/atomic.h                                       |     7 +-
 head/sys/sparc64/include/md_var.h                                       |     9 +-
 head/sys/sparc64/pci/schizo.c                                           |     4 +-
 head/sys/sparc64/sparc64/ata_machdep.c                                  |    17 +-
 head/sys/sparc64/sparc64/cam_machdep.c                                  |    74 +
 head/sys/sparc64/sparc64/ofw_machdep.c                                  |     4 +-
 head/sys/sparc64/sparc64/vm_machdep.c                                   |     4 +-
 head/sys/sys/resource.h                                                 |     4 +-
 head/sys/sys/sysctl.h                                                   |     4 +-
 head/sys/sys/timeffc.h                                                  |   157 +-
 head/sys/sys/umtx.h                                                     |     3 +-
 head/sys/vm/vm_page.c                                                   |    49 +-
 head/sys/vm/vm_page.h                                                   |    23 +-
 head/sys/vm/vm_reserv.c                                                 |   329 +-
 head/sys/vm/vm_reserv.h                                                 |    10 +-
 head/sys/vm/vnode_pager.c                                               |     6 +-
 head/sys/x86/acpica/acpi_apm.c                                          |    90 +-
 head/sys/xen/evtchn/evtchn_dev.c                                        |    19 +-
 head/tools/build/options/WITHOUT_GPIO                                   |     2 +-
 head/tools/build/options/WITHOUT_PROFILE                                |     2 +-
 head/tools/build/options/WITH_CTF                                       |     4 +
 head/tools/build/options/WITH_LIBCPLUSPLUS                              |     2 +
 head/tools/build/options/WITH_OFED                                      |     2 +-
 head/tools/regression/bin/sh/builtins/case11.0                          |     6 +
 head/tools/regression/bin/sh/builtins/case12.0                          |     6 +
 head/tools/regression/bin/test/regress.sh                               |    44 +-
 head/tools/regression/pipe/pipe-fstatbug.c                              |     4 +-
 head/tools/regression/pipe/pipe-ino.c                                   |    66 +
 head/tools/regression/pipe/pipe-reverse.c                               |     5 +-
 head/tools/regression/pipe/pipe-wraparound.c                            |     5 +-
 head/tools/regression/sbin/Makefile                                     |     4 +-
 head/tools/regression/sbin/dhclient/Makefile                            |    16 +
 head/tools/regression/sbin/dhclient/fake.c                              |    60 +
 head/tools/regression/sbin/dhclient/option-domain-search.c              |   328 +
 head/tools/regression/usr.bin/make/execution/ellipsis/Makefile          |    21 +
 head/tools/regression/usr.bin/make/execution/ellipsis/expected.status.1 |     1 +
 head/tools/regression/usr.bin/make/execution/ellipsis/expected.stdout.1 |    12 +
 head/tools/regression/usr.bin/make/execution/ellipsis/test.t            |    15 +
 head/tools/regression/usr.bin/make/execution/empty/Makefile             |    13 +
 head/tools/regression/usr.bin/make/execution/empty/expected.status.1    |     1 +
 head/tools/regression/usr.bin/make/execution/empty/test.t               |    15 +
 head/tools/regression/usr.bin/make/execution/plus/Makefile              |     7 +
 head/tools/regression/usr.bin/make/execution/plus/expected.status.1     |     1 +
 head/tools/regression/usr.bin/make/execution/plus/expected.stdout.1     |     1 +
 head/tools/regression/usr.bin/make/execution/plus/test.t                |    15 +
 head/tools/tinder.sh                                                    |    61 +
 head/tools/tools/ath/Makefile                                           |     2 +-
 head/tools/tools/ath/Makefile.inc                                       |     2 +-
 head/tools/tools/ath/arcode/Makefile                                    |     2 +-
 head/tools/tools/ath/arcode/arcode.c                                    |     2 +-
 head/tools/tools/ath/ath_ee_9287_print/9287.c                           |     2 +-
 head/tools/tools/ath/ath_ee_9287_print/9287.h                           |     2 +-
 head/tools/tools/ath/ath_ee_9287_print/Makefile                         |     2 +-
 head/tools/tools/ath/ath_ee_9287_print/eeprom.c                         |     2 +-
 head/tools/tools/ath/ath_ee_9287_print/eeprom.h                         |     2 +-
 head/tools/tools/ath/ath_ee_9287_print/main.c                           |     2 +-
 head/tools/tools/ath/ath_ee_v14_print/Makefile                          |     2 +-
 head/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c                |     2 +-
 head/tools/tools/ath/ath_ee_v4k_print/Makefile                          |     2 +-
 head/tools/tools/ath/ath_ee_v4k_print/eeprom.c                          |     2 +-
 head/tools/tools/ath/ath_ee_v4k_print/eeprom.h                          |     2 +-
 head/tools/tools/ath/ath_ee_v4k_print/main.c                            |     2 +-
 head/tools/tools/ath/ath_ee_v4k_print/v4k.c                             |     2 +-
 head/tools/tools/ath/ath_ee_v4k_print/v4k.h                             |     2 +-
 head/tools/tools/ath/ath_prom_read/Makefile                             |     2 +-
 head/tools/tools/ath/ath_prom_read/ath_prom_read.c                      |     2 +-
 head/tools/tools/ath/athctrl.sh                                         |     2 +-
 head/tools/tools/ath/athdebug/Makefile                                  |     2 +-
 head/tools/tools/ath/athdebug/athdebug.c                                |     2 +-
 head/tools/tools/ath/athdecode/Makefile                                 |     2 +-
 head/tools/tools/ath/athdecode/main.c                                   |     2 +-
 head/tools/tools/ath/athkey/Makefile                                    |     2 +-
 head/tools/tools/ath/athkey/athkey.c                                    |     2 +-
 head/tools/tools/ath/athpoke/Makefile                                   |     2 +-
 head/tools/tools/ath/athpoke/athpoke.c                                  |     2 +-
 head/tools/tools/ath/athpow/Makefile                                    |     2 +-
 head/tools/tools/ath/athpow/athpow.c                                    |     2 +-
 head/tools/tools/ath/athprom/Makefile                                   |     2 +-
 head/tools/tools/ath/athprom/athprom.c                                  |     2 +-
 head/tools/tools/ath/athprom/eeprom-14                                  |     2 +-
 head/tools/tools/ath/athprom/eeprom-3                                   |     2 +-
 head/tools/tools/ath/athprom/eeprom-4                                   |     2 +-
 head/tools/tools/ath/athprom/eeprom-5                                   |     2 +-
 head/tools/tools/ath/athradar/Makefile                                  |     2 +-
 head/tools/tools/ath/athradar/athradar.c                                |     2 +-
 head/tools/tools/ath/athrd/Makefile                                     |     2 +-
 head/tools/tools/ath/athrd/athrd.1                                      |     2 +-
 head/tools/tools/ath/athrd/athrd.c                                      |     2 +-
 head/tools/tools/ath/athrd/run.sh                                       |     2 +-
 head/tools/tools/ath/athregs/Makefile                                   |     2 +-
 head/tools/tools/ath/athregs/dumpregs.c                                 |     2 +-
 head/tools/tools/ath/athstats/Makefile                                  |     2 +-
 head/tools/tools/ath/athstats/athstats.h                                |     2 +-
 head/tools/tools/ath/athstats/main.c                                    |     2 +-
 head/tools/tools/ath/athstats/statfoo.c                                 |     2 +-
 head/tools/tools/ath/athstats/statfoo.h                                 |     2 +-
 head/tools/tools/ath/common/ah_osdep.h                                  |     2 +-
 head/tools/tools/ath/common/diag.h                                      |     2 +-
 head/tools/tools/ath/common/dumpregs.h                                  |     2 +-
 head/tools/tools/ath/common/dumpregs_5210.c                             |     2 +-
 head/tools/tools/ath/common/dumpregs_5211.c                             |     2 +-
 head/tools/tools/ath/common/dumpregs_5212.c                             |     2 +-
 head/tools/tools/ath/common/dumpregs_5416.c                             |     2 +-
 head/tools/tools/netmap/pkt-gen.c                                       |    19 +-
 head/usr.bin/grep/Makefile                                              |    17 +-
 head/usr.bin/grep/util.c                                                |    18 +-
 head/usr.bin/m4/Makefile                                                |    18 +-
 head/usr.bin/m4/eval.c                                                  |   401 +-
 head/usr.bin/m4/expr.c                                                  |   661 +-
 head/usr.bin/m4/extern.h                                                |   108 +-
 head/usr.bin/m4/gnum4.c                                                 |   241 +-
 head/usr.bin/m4/lib/ohash.h                                             |    75 +
 head/usr.bin/m4/lib/ohash_create_entry.c                                |    40 +
 head/usr.bin/m4/lib/ohash_delete.c                                      |    33 +
 head/usr.bin/m4/lib/ohash_do.c                                          |   113 +
 head/usr.bin/m4/lib/ohash_entries.c                                     |    28 +
 head/usr.bin/m4/lib/ohash_enum.c                                        |    38 +
 head/usr.bin/m4/lib/ohash_init.3                                        |   231 +
 head/usr.bin/m4/lib/ohash_init.c                                        |    43 +
 head/usr.bin/m4/lib/ohash_int.h                                         |    25 +
 head/usr.bin/m4/lib/ohash_interval.3                                    |    92 +
 head/usr.bin/m4/lib/ohash_interval.c                                    |    38 +
 head/usr.bin/m4/lib/ohash_lookup_interval.c                             |    70 +
 head/usr.bin/m4/lib/ohash_lookup_memory.c                               |    66 +
 head/usr.bin/m4/lib/ohash_qlookup.c                                     |    29 +
 head/usr.bin/m4/lib/ohash_qlookupi.c                                    |    31 +
 head/usr.bin/m4/look.c                                                  |   271 +-
 head/usr.bin/m4/m4.1                                                    |   504 +-
 head/usr.bin/m4/main.c                                                  |   413 +-
 head/usr.bin/m4/mdef.h                                                  |   102 +-
 head/usr.bin/m4/misc.c                                                  |   164 +-
 head/usr.bin/m4/parser.y                                                |    83 +
 head/usr.bin/m4/pathnames.h                                             |     9 +-
 head/usr.bin/m4/stdd.h                                                  |     6 +-
 head/usr.bin/m4/tokenizer.l                                             |   111 +
 head/usr.bin/m4/trace.c                                                 |   120 +-
 head/usr.bin/make/Makefile                                              |     6 +-
 head/usr.bin/make/job.c                                                 |   113 +-
 head/usr.bin/procstat/Makefile                                          |     3 +-
 head/usr.bin/procstat/procstat.1                                        |     8 +-
 head/usr.bin/procstat/procstat.c                                        |    20 +-
 head/usr.bin/procstat/procstat.h                                        |     3 +-
 head/usr.bin/procstat/procstat_auxv.c                                   |    98 +-
 head/usr.bin/procstat/procstat_rlimit.c                                 |    78 +
 head/usr.bin/truss/setup.c                                              |    18 +-
 head/usr.sbin/acpi/Makefile.inc                                         |    29 +-
 head/usr.sbin/acpi/acpidb/Makefile                                      |    10 +-
 head/usr.sbin/acpi/acpidb/acpidb.c                                      |     5 +-
 head/usr.sbin/acpi/iasl/Makefile                                        |    21 +-
 head/usr.sbin/bsdinstall/distextract/distextract.c                      |     3 +-
 head/usr.sbin/bsdinstall/distfetch/distfetch.c                          |     3 +-
 head/usr.sbin/bsdinstall/partedit/gpart_ops.c                           |     4 +-
 head/usr.sbin/bsdinstall/scripts/auto                                   |    25 +-
 head/usr.sbin/bsdinstall/scripts/services                               |    16 +-
 head/usr.sbin/config/mkmakefile.c                                       |     4 +-
 head/usr.sbin/cron/crontab/crontab.5                                    |     4 +-
 head/usr.sbin/makefs/Makefile                                           |     1 +
 head/usr.sbin/mergemaster/mergemaster.sh                                |     6 +-
 head/usr.sbin/mfiutil/mfi_config.c                                      |    10 +-
 head/usr.sbin/mfiutil/mfi_evt.c                                         |     4 +-
 head/usr.sbin/sade/Makefile                                             |    12 +-
 head/usr.sbin/sade/config.c                                             |   333 -
 head/usr.sbin/sade/devices.c                                            |    17 +-
 head/usr.sbin/sade/disks.c                                              |   187 +-
 head/usr.sbin/sade/dispatch.c                                           |   161 -
 head/usr.sbin/sade/dmenu.c                                              |   250 +-
 head/usr.sbin/sade/install.c                                            |   158 +-
 head/usr.sbin/sade/label.c                                              |   291 +-
 head/usr.sbin/sade/main.c                                               |    15 +-
 head/usr.sbin/sade/menus.c                                              |    47 +-
 head/usr.sbin/sade/misc.c                                               |   211 +-
 head/usr.sbin/sade/msg.c                                                |    49 +-
 head/usr.sbin/sade/sade.h                                               |    64 +-
 head/usr.sbin/sade/system.c                                             |    37 +-
 head/usr.sbin/tzsetup/Makefile                                          |     8 +-
 head/usr.sbin/tzsetup/tzsetup.c                                         |   206 +-
 827 files changed, 60048 insertions(+), 48460 deletions(-)

diffs (134648 lines):

diff -r 167f7ed19c6d -r 4aee9df9e1ae head/Makefile.inc1
--- a/head/Makefile.inc1	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/Makefile.inc1	Tue Dec 06 20:26:16 2011 +0200
@@ -1,5 +1,5 @@
 #
-# $FreeBSD: head/Makefile.inc1 227841 2011-11-22 21:18:14Z des $
+# $FreeBSD: head/Makefile.inc1 228158 2011-11-30 18:11:49Z fjoe $
 #
 # Make command line options:
 #	-DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
@@ -60,8 +60,6 @@
 .endif
 .if ${MK_CDDL} != "no"
 SUBDIR+=cddl
-.else
-NO_CTF=1
 .endif
 SUBDIR+=gnu include
 .if ${MK_KERBEROS} != "no"
@@ -241,7 +239,7 @@
 		BOOTSTRAPPING=${OSRELDATE} \
 		SSP_CFLAGS= \
 		-DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
-		-DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
+		-DNO_PIC -DNO_PROFILE -DNO_SHARED \
 		-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF
 
 # build-tools stage
@@ -441,7 +439,7 @@
 	@echo "--------------------------------------------------------------"
 	${_+_}cd ${.CURDIR}; \
 	    ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
-	    -DWITHOUT_MAN -DWITHOUT_PROFILE libraries
+	    -DWITHOUT_MAN -DNO_PROFILE libraries
 _depend:
 	@echo
 	@echo "--------------------------------------------------------------"
@@ -1235,6 +1233,9 @@
 _startup_libs+=	gnu/lib/libgcc
 _startup_libs+=	lib/libcompiler_rt
 _startup_libs+=	lib/libc
+.if ${MK_LIBCPLUSPLUS} != "no"
+_startup_libs+=	lib/libcxxrt
+.endif
 
 gnu/lib/libgcc__L: lib/libc__L
 
@@ -1247,7 +1248,7 @@
 		${_lib_libgssapi} ${_lib_libipx} \
 		lib/libkiconv lib/libkvm lib/liblzma lib/libmd \
 		lib/ncurses/ncurses lib/ncurses/ncursesw \
-		lib/libopie ${_lib_libthr} \
+		lib/libopie lib/libpam ${_lib_libthr} \
 		lib/libradius lib/libsbuf lib/libtacplus \
 		${_cddl_lib_libumem} \
 		lib/libutil ${_lib_libypclnt} lib/libz lib/msun \
@@ -1335,12 +1336,12 @@
 		cd ${.CURDIR}/${_lib}; \
 		${MAKE} DIRPRFX=${_lib}/ obj; \
 		${MAKE} DIRPRFX=${_lib}/ depend; \
-		${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all; \
-		${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install
+		${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all; \
+		${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install
 .endif
 .endfor
 
-.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs}
+.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
 ${_lib}__L: .PHONY
 .if exists(${.CURDIR}/${_lib})
 	${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
@@ -1352,6 +1353,17 @@
 .endif
 .endfor
 
+# libpam is special: we need to build static PAM modules before
+# static PAM library, and dynamic PAM library before dynamic PAM
+# modules.
+lib/libpam__L: .PHONY
+	${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
+		cd ${.CURDIR}/lib/libpam; \
+		${MAKE} DIRPRFX=lib/libpam/ obj; \
+		${MAKE} DIRPRFX=lib/libpam/ depend; \
+		${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all; \
+		${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
+
 _prereq_libs: ${_prereq_libs:S/$/__PL/}
 _startup_libs: ${_startup_libs:S/$/__L/}
 _prebuild_libs: ${_prebuild_libs:S/$/__L/}
@@ -1558,7 +1570,7 @@
 .endif
 
 NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
-	-DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE \
+	-DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE \
 	-DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS \
 	TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \
 	CPUTYPE=${XDEV_CPUTYPE}
@@ -1642,4 +1654,7 @@
 			ln -sf ../../${XDTP}/usr/bin/$$i \
 			    ../../../../usr/bin/${XDDIR}${OSREL}-$$i; \
 		done
+.else
+xdev xdev-buil xdev-install:
+	@echo "*** Error: Both XDEV and XDEV_ARCH must be defined for \"${.TARGET}\" target"
 .endif
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/ObsoleteFiles.inc
--- a/head/ObsoleteFiles.inc	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/ObsoleteFiles.inc	Tue Dec 06 20:26:16 2011 +0200
@@ -1,5 +1,5 @@
 #
-# $FreeBSD: head/ObsoleteFiles.inc 227214 2011-11-06 14:00:18Z antoine $
+# $FreeBSD: head/ObsoleteFiles.inc 227982 2011-11-25 19:29:21Z marius $
 #
 # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
 # directories (OLD_DIRS) which should get removed at an update. Recently
@@ -38,6 +38,19 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20111125: amd(4) removed
+OLD_FILES+=usr/share/man/man4/amd.4.gz
+# 20111125: libodialog removed
+OLD_FILES+=usr/lib/libodialog.a
+OLD_FILES+=usr/lib/libodialog.so
+OLD_LIBS+=usr/lib/libodialog.so.7
+OLD_FILES+=usr/lib/libodialog_p.a
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
+OLD_FILES+=usr/lib32/libodialog.a
+OLD_FILES+=usr/lib32/libodialog.so
+OLD_LIBS+=usr/lib32/libodialog.so.7
+OLD_FILES+=usr/lib32/libodialog_p.a
+.endif
 # 20110930: sysinstall removed
 OLD_FILES+=usr/sbin/sysinstall
 OLD_FILES+=usr/share/man/man8/sysinstall.8.gz
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/UPDATING
--- a/head/UPDATING	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/UPDATING	Tue Dec 06 20:26:16 2011 +0200
@@ -22,6 +22,10 @@
 	machines to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20111122:
+	The acpi_wmi(4) status device /dev/wmistat has been renamed to
+	/dev/wmistat0.
+
 20111108:
 	The option VFS_ALLOW_NONMPSAFE option has been added in order to
 	explicitely support non-MPSAFE filesystems.
@@ -1519,4 +1523,4 @@
 Contact Warner Losh if you have any questions about your use of
 this document.
 
-$FreeBSD: head/UPDATING 227333 2011-11-08 10:18:07Z attilio $
+$FreeBSD: head/UPDATING 228163 2011-11-30 20:08:30Z jh $
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/bin/sh/eval.c
--- a/head/bin/sh/eval.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/bin/sh/eval.c	Tue Dec 06 20:26:16 2011 +0200
@@ -36,7 +36,7 @@
 #endif
 #endif /* not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/eval.c 223282 2011-06-18 23:58:59Z jilles $");
+__FBSDID("$FreeBSD: head/bin/sh/eval.c 228015 2011-11-27 00:09:59Z jilles $");
 
 #include <paths.h>
 #include <signal.h>
@@ -89,7 +89,7 @@
 
 static void evalloop(union node *, int);
 static void evalfor(union node *, int);
-static void evalcase(union node *, int);
+static union node *evalcase(union node *, int);
 static void evalsubshell(union node *, int);
 static void evalredir(union node *, int);
 static void expredir(union node *);
@@ -256,7 +256,7 @@
 			evalfor(n, flags & ~EV_EXIT);
 			break;
 		case NCASE:
-			evalcase(n, flags);
+			next = evalcase(n, flags);
 			break;
 		case NDEFUN:
 			defun(n->narg.text, n->narg.next);
@@ -343,8 +343,6 @@
 	for (argp = n->nfor.args ; argp ; argp = argp->narg.next) {
 		oexitstatus = exitstatus;
 		expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
-		if (evalskip)
-			goto out;
 	}
 	*arglist.lastp = NULL;
 
@@ -364,13 +362,12 @@
 		}
 	}
 	loopnest--;
-out:
 	popstackmark(&smark);
 }
 
 
 
-static void
+static union node *
 evalcase(union node *n, int flags)
 {
 	union node *cp;
@@ -383,26 +380,24 @@
 	oexitstatus = exitstatus;
 	exitstatus = 0;
 	expandarg(n->ncase.expr, &arglist, EXP_TILDE);
-	for (cp = n->ncase.cases ; cp && evalskip == 0 ; cp = cp->nclist.next) {
+	for (cp = n->ncase.cases ; cp ; cp = cp->nclist.next) {
 		for (patp = cp->nclist.pattern ; patp ; patp = patp->narg.next) {
 			if (casematch(patp, arglist.list->text)) {
+				popstackmark(&smark);
 				while (cp->nclist.next &&
 				    cp->type == NCLISTFALLTHRU) {
-					if (evalskip != 0)
-						break;
 					evaltree(cp->nclist.body,
 					    flags & ~EV_EXIT);
+					if (evalskip != 0)
+						return (NULL);
 					cp = cp->nclist.next;
 				}
-				if (evalskip == 0) {
-					evaltree(cp->nclist.body, flags);
-				}
-				goto out;
+				return (cp->nclist.body);
 			}
 		}
 	}
-out:
 	popstackmark(&smark);
+	return (NULL);
 }
 
 
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/bin/test/test.c
--- a/head/bin/test/test.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/bin/test/test.c	Tue Dec 06 20:26:16 2011 +0200
@@ -15,7 +15,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/test/test.c 226961 2011-10-31 08:59:17Z ed $");
+__FBSDID("$FreeBSD: head/bin/test/test.c 227984 2011-11-25 23:45:29Z jilles $");
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -119,7 +119,7 @@
 };
 
 static struct t_op {
-	const char *op_text;
+	char op_text[4];
 	short op_num, op_type;
 } const ops [] = {
 	{"-r",	FILRD,	UNOP},
@@ -162,7 +162,7 @@
 	{"-o",	BOR,	BBINOP},
 	{"(",	LPAREN,	PAREN},
 	{")",	RPAREN,	PAREN},
-	{0,	0,	0}
+	{"",	0,	0}
 };
 
 static struct t_op const *t_wp_op;
@@ -427,7 +427,7 @@
 		t_wp_op = NULL;
 		return EOI;
 	}
-	while (op->op_text) {
+	while (*op->op_text) {
 		if (strcmp(s, op->op_text) == 0) {
 			if (((op->op_type == UNOP || op->op_type == BUNOP)
 						&& isunopoperand()) ||
@@ -456,7 +456,7 @@
 	if (nargc == 2)
 		return parenlevel == 1 && strcmp(s, ")") == 0;
 	t = *(t_wp + 2);
-	while (op->op_text) {
+	while (*op->op_text) {
 		if (strcmp(s, op->op_text) == 0)
 			return op->op_type == BINOP &&
 			    (parenlevel == 0 || t[0] != ')' || t[1] != '\0');
@@ -478,7 +478,7 @@
 		return parenlevel == 1 && strcmp(s, ")") == 0;
 	if (nargc != 3)
 		return 0;
-	while (op->op_text) {
+	while (*op->op_text) {
 		if (strcmp(s, op->op_text) == 0)
 			return op->op_type == BINOP;
 		op++;
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/cmd/zdb/zdb.8
--- a/head/cddl/contrib/opensolaris/cmd/zdb/zdb.8	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/cmd/zdb/zdb.8	Tue Dec 06 20:26:16 2011 +0200
@@ -1,65 +1,79 @@
 '\" te
+.\" Copyright (c) 2011, Martin Matuska <mm at FreeBSD.org>.
+.\" All Rights Reserved.
+.\"
+.\" The contents of this file are subject to the terms of the
+.\" Common Development and Distribution License (the "License").
+.\" You may not use this file except in compliance with the License.
+.\"
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+.\" or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions
+.\" and limitations under the License.
+.\"
+.\" When distributing Covered Code, include this CDDL HEADER in each
+.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+.\" If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying
+.\" information: Portions Copyright [yyyy] [name of copyright owner]
+.\"
 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
-.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.\" Portions Copyright 2011 Martin Matuska <mm at FreeBSD.org>
-.TH ZDB 8 "Oct 31, 2005"
-.SH NAME
-zdb \- ZFS debugger
-.SH SYNOPSIS
-.LP
-.nf
-\fBzdb\fR \fIpool\fR
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBzdb\fR command is used by support engineers to diagnose failures and
-gather statistics. Since the \fBZFS\fR file system is always consistent on disk
-and is self-repairing, \fBzdb\fR should only be run under the direction by a
-support engineer.
-.sp
-.LP
-If no arguments are specified, \fBzdb\fR, performs basic consistency checks on
-the pool and associated datasets, and report any problems detected.
-.sp
-.LP
+.\"
+.\" $FreeBSD: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 228019 2011-11-27 11:44:20Z mm $
+.\"
+.Dd November 26, 2011
+.Dt ZDB 8
+.Os
+.Sh NAME
+.Nm zdb
+.Nd ZFS debugger
+.Sh SYNOPSIS
+.Nm
+.Ar pool
+.Sh DESCRIPTION
+The
+.Nm
+command is used by support engineers to diagnose failures and
+gather statistics. Since the
+.Tn ZFS
+file system is always consistent on disk and is self-repairing,
+.Nm
+should only be run under the direction by a support engineer.
+.Pp
+If no arguments are specified,
+.Nm
+performs basic consistency checks on the pool and associated datasets, and
+report any problems detected.
+.Nm
 Any options supported by this command are internal to Sun and subject to change
 at any time.
-.SH EXIT STATUS
-.sp
-.LP
+.Sh EXIT STATUS
 The following exit values are returned:
-.sp
-.ne 2
-.na
-\fB\fB0\fR\fR
-.ad
-.RS 5n
+.Bl -tag -offset 2n -width 2n
+.It 0
 The pool is consistent.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB1\fR\fR
-.ad
-.RS 5n
+.It 1
 An error was detected.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB2\fR\fR
-.ad
-.RS 5n
+.It 2
 Invalid command line options were specified.
-.RE
-
-.SH SEE ALSO
-.sp
-.LP
-zfs(8), zpool(8)
+.El
+.Sh SEE ALSO
+.Xr zfs 8 ,
+.Xr zpool 8
+.Sh AUTHORS
+This manual page is a
+.Xr mdoc 7
+reimplementation of the
+.Tn OpenSolaris
+manual page
+.Em zdb(1M) ,
+modified and customized for
+.Fx
+and licensed under the
+.Tn Common Development and Distribution License
+.Pq Tn CDDL .
+.Pp
+The
+.Xr mdoc 7
+implementation of this manual page was initially written by
+.An Martin Matuska Aq mm at FreeBSD.org .
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
--- a/head/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Tue Dec 06 20:26:16 2011 +0200
@@ -1,561 +1,543 @@
 '\" te
-.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
-.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
-.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
-.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
-.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.\" Copyright (c) 2011, Martin Matuska <mm at FreeBSD.org>.
+.\" All Rights Reserved.
+.\"
+.\" The contents of this file are subject to the terms of the
+.\" Common Development and Distribution License (the "License").
+.\" You may not use this file except in compliance with the License.
+.\"
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+.\" or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions
+.\" and limitations under the License.
+.\"
+.\" When distributing Covered Code, include this CDDL HEADER in each
+.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+.\" If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying
+.\" information: Portions Copyright [yyyy] [name of copyright owner]
+.\"
+.\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
 .\" Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
-.\" Copyright 2011 by Delphix.  All rights reserved.
-.\" Portions Copyright 2011 Pawel Jakub Dawidek <pjd at FreeBSD.org>
-.\" Portions Copyright 2011 Martin Matuska <mm at FreeBSD.org>
-.TH ZFS 8 "September 24, 2009" FreeBSD
-.SH NAME
-zfs \- configures ZFS file systems
-.SH SYNOPSIS
-.LP
-.nf
-\fBzfs\fR [\fB-?\fR]
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBcreate\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBcreate\fR [\fB-ps\fR] [\fB-b\fR \fIblocksize\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fB-V\fR \fIsize\fR \fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBdestroy\fR [\fB-rRf\fR] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBdestroy\fR [\fB-rRd\fR] \fIsnapshot\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBsnapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR]...
-      \fIfilesystem at snapname\fR|\fIvolume at snapname\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBrollback\fR [\fB-rRf\fR] \fIsnapshot\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBclone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBpromote\fR \fIclone-filesystem\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBrename\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
-     \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBrename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBrename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBrename\fR \fB-u\fR [\fB-p\fR] \fIfilesystem\fR \fIfilesystem\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]]
-     [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ...
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]]
-     "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBinherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume|snapshot\fR ...
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBupgrade\fR [\fB-v\fR]
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBupgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIfilesystem\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBuserspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ...
-     [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBgroupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ...
-     [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBmount\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBmount\fR [\fB-vO\fR] [\fB-o \fIoptions\fR\fR] \fB-a\fR | \fIfilesystem\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBshare\fR \fB-a\fR | \fIfilesystem\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunshare\fR \fB-a\fR \fIfilesystem\fR|\fImountpoint\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBsend\fR [\fB-vR\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fB-d\fR \fIfilesystem\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBallow\fR \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBallow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|\fI at setname\fR[,...]
-     \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBallow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBallow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBallow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[,... ]]
-     \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[ ... ]] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBhold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBholds\fR [\fB-r\fR] \fIsnapshot\fR...
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBrelease\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBjail\fR \fIjailid\fR \fIfilesystem\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunjail\fR \fIjailid\fR \fIfilesystem\fR
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBzfs\fR command configures \fBZFS\fR datasets within a \fBZFS\fR storage
-pool, as described in \fBzpool\fR(8). A dataset is identified by a unique path
-within the \fBZFS\fR namespace. For example:
-.sp
-.in +2
-.nf
-pool/{filesystem,volume,snapshot}
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-where the maximum length of a dataset name is \fBMAXNAMELEN\fR (256 bytes).
-.sp
-.LP
+.\" Copyright (c) 2011 by Delphix. All rights reserved.
+.\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd at FreeBSD.org>
+.\"
+.\" $FreeBSD: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 228206 2011-12-02 19:56:46Z mm $
+.\"
+.Dd November 26, 2011
+.Dt ZFS 8
+.Os
+.Sh NAME
+.Nm zfs
+.Nd configures ZFS file systems
+.Sh SYNOPSIS
+.Nm
+.Op Fl \&?
+.Nm
+.Cm create
+.Op Fl p
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ... filesystem
+.Nm
+.Cm create
+.Op Fl ps
+.Op Fl b Ar blocksize
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Fl V
+.Ar size volume
+.Nm
+.Cm destroy
+.Op Fl fnpRrv
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm destroy
+.Op Fl dnpRrv
+.Sm off
+.Ar snapshot
+.Ns Op % Ns Ar snapname
+.Ns Op , Ns Ar ...
+.Sm on
+.Nm
+.Cm snapshot
+.Op Fl r
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ... filesystem at snapname Ns | Ns Ar volume at snapname
+.Nm
+.Cm rollback
+.Op Fl rRf
+.Ar snapshot
+.Nm
+.Cm clone
+.Op Fl p
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ... snapshot filesystem Ns | Ns Ar volume
+.Nm
+.Cm promote
+.Ar clone-filesystem
+.Nm
+.Cm rename
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Nm
+.Cm rename
+.Fl p
+.Ar filesystem Ns | Ns Ar volume
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm rename
+.Fl r
+.Ar snapshot snapshot
+.Nm
+.Cm rename
+.Fl u
+.Op Fl p
+.Ar filesystem filesystem
+.Nm
+.Cm list
+.Op Fl r Ns | Ns Fl d Ar depth
+.Op Fl H
+.Op Fl o Ar property Ns Op , Ns Ar ...
+.Op Fl t Ar type Ns Op , Ns Ar ...
+.Op Fl s Ar property
+.Ar ...
+.Op Fl S Ar property
+.Ar ...
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Nm
+.Cm set
+.Ar property Ns = Ns Ar value
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Nm
+.Cm get
+.Op Fl r Ns | Ns Fl d Ar depth
+.Op Fl Hp
+.Op Fl o Ar all | field Ns Op , Ns Ar ...
+.Op Fl s Ar source Ns Op , Ns Ar ...
+.Ar all | property Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Nm
+.Cm inherit
+.Op Fl rS
+.Ar property
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Nm
+.Cm upgrade
+.Op Fl v
+.Nm
+.Cm upgrade
+.Op Fl r
+.Op Fl V Ar version
+.Fl a | Ar filesystem
+.Nm
+.Cm userspace
+.Op Fl niHp
+.Op Fl o Ar field Ns Op , Ns Ar ...
+.Op Fl sS Ar field
+.Ar ...
+.Op Fl t Ar type Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar snapshot
+.Nm
+.Cm groupspace
+.Op Fl niHp
+.Op Fl o Ar field Ns Op , Ns Ar ...
+.Op Fl sS Ar field
+.Ar ...
+.Op Fl t Ar type Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar snapshot
+.Nm
+.Cm mount
+.Nm
+.Cm mount
+.Op Fl vO
+.Op Fl o Ar property Ns Op , Ns Ar ...
+.Fl a | Ar filesystem
+.Nm
+.Cm unmount
+.Op Fl f
+.Fl a | Ar filesystem Ns | Ns Ar mountpoint
+.Nm
+.Cm share
+.Fl a | Ar filesystem
+.Nm
+.Cm unshare
+.Fl a | Ar filesystem Ns | Ns Ar mountpoint
+.Nm
+.Cm send
+.Op Fl DnPpRrv
+.Op Fl i Ar snapshot | Fl I Ar snapshot
+.Ar snapshot
+.Nm
+.Cm receive
+.Op Fl vnFu
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Nm
+.Cm receive
+.Op Fl vnFu
+.Op Fl d | e
+.Ar filesystem
+.Nm
+.Cm allow
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm allow
+.Op Fl ldug
+.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm allow
+.Op Fl ld
+.Fl e
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm allow
+.Fl c
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm allow
+.Fl s
+.Ar @setname
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm unallow
+.Op Fl rldug
+.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
+.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm unallow
+.Op Fl rld
+.Fl e
+.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm unallow
+.Op Fl r
+.Fl c
+.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm unallow
+.Op Fl r
+.Fl s
+.Ar @setname
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Nm
+.Cm hold
+.Op Fl r
+.Ar tag snapshot ...
+.Nm
+.Cm holds
+.Op Fl r
+.Ar snapshot ...
+.Nm
+.Cm release
+.Op Fl r
+.Ar tag snapshot ...
+.Nm
+.Cm diff
+.Op Fl FHt
+.Ar snapshot
+.Op Ar snapshot Ns | Ns Ar filesystem
+.Nm
+.Cm jail
+.Ar jailid filesystem
+.Nm
+.Cm unjail
+.Ar jailid filesystem
+.Sh DESCRIPTION
+The
+.Nm
+command configures
+.Tn ZFS
+datasets within a
+.Tn ZFS
+storage pool, as described in
+.Xr zpool 8 .
+A dataset is identified by a unique path within the
+.Tn ZFS
+namespace. For example:
+.Bd -ragged -offset 4n
+.No pool/ Ns Brq filesystem,volume,snapshot
+.Ed
+.Pp
+where the maximum length of a dataset name is
+.Dv MAXNAMELEN
+(256 bytes).
+.Pp
 A dataset can be one of the following:
-.sp
-.ne 2
-.na
-\fB\fIfile system\fR\fR
-.ad
-.sp .6
-.RS 4n
-A \fBZFS\fR dataset of type \fBfilesystem\fR can be mounted within the standard
-system namespace and behaves like other file systems. While \fBZFS\fR file
-systems are designed to be \fBPOSIX\fR compliant, known issues exist that
-prevent compliance in some cases. Applications that depend on standards
-conformance might fail due to nonstandard behavior when checking file system
-free space.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -hang -width 12n
+.It Sy file system
+A
+.Tn ZFS
+dataset of type
+.Em filesystem
+can be mounted within the standard system namespace and behaves like other file
+systems. While
+.Tn ZFS
+file systems are designed to be
+.Tn POSIX
+compliant, known issues exist that prevent compliance in some cases.
+Applications that depend on standards conformance might fail due to nonstandard
+behavior when checking file system free space.
+.It Sy volume
 A logical volume exported as a raw or block device. This type of dataset should
 only be used under special circumstances. File systems are typically used in
 most environments.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy snapshot
 A read-only version of a file system or volume at a given point in time. It is
-specified as \fIfilesystem at name\fR or \fIvolume at name\fR.
-.RE
-
-.SS "ZFS File System Hierarchy"
-.sp
-.LP
-A \fBZFS\fR storage pool is a logical collection of devices that provide space
-for datasets. A storage pool is also the root of the \fBZFS\fR file system
-hierarchy.
-.sp
-.LP
+specified as
+.Em filesystem at name
+or
+.Em volume at name .
+.El
+.Ss ZFS File System Hierarchy
+A
+.Tn ZFS
+storage pool is a logical collection of devices that provide space for
+datasets. A storage pool is also the root of the
+.Tn ZFS
+file system hierarchy.
+.Pp
 The root of the pool can be accessed as a file system, such as mounting and
 unmounting, taking snapshots, and setting properties. The physical storage
-characteristics, however, are managed by the \fBzpool\fR(8) command.
-.sp
-.LP
-See \fBzpool\fR(8) for more information on creating and administering pools.
-.SS "Snapshots"
-.sp
-.LP
+characteristics, however, are managed by the
+.Xr zpool 8
+command.
+.Pp
+See
+.Xr zpool 8
+for more information on creating and administering pools.
+.Ss Snapshots
 A snapshot is a read-only copy of a file system or volume. Snapshots can be
 created extremely quickly, and initially consume no additional space within the
 pool. As data within the active dataset changes, the snapshot consumes more
 data than would otherwise be shared with the active dataset.
-.sp
-.LP
+.Pp
 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or
 rolled back, but cannot be accessed independently.
-.sp
-.LP
-File system snapshots can be accessed under the \fB\&.zfs/snapshot\fR directory
-in the root of the file system. Snapshots are automatically mounted on demand
-and may be unmounted at regular intervals. The visibility of the \fB\&.zfs\fR
-directory can be controlled by the \fBsnapdir\fR property.
-.SS "Clones"
-.sp
-.LP
+.Pp
+File system snapshots can be accessed under the
+.Pa \&.zfs/snapshot
+directory in the root of the file system. Snapshots are automatically mounted
+on demand and may be unmounted at regular intervals. The visibility of the
+.Pa \&.zfs
+directory can be controlled by the
+.Sy snapdir
+property.
+.Ss Clones
 A clone is a writable volume or file system whose initial contents are the same
 as another dataset. As with snapshots, creating a clone is nearly
 instantaneous, and initially consumes no additional space.
-.sp
-.LP
+.Pp
 Clones can only be created from a snapshot. When a snapshot is cloned, it
 creates an implicit dependency between the parent and child. Even though the
 clone is created somewhere else in the dataset hierarchy, the original snapshot
-cannot be destroyed as long as a clone exists. The \fBorigin\fR property
-exposes this dependency, and the \fBdestroy\fR command lists any such
-dependencies, if they exist.
-.sp
-.LP
+cannot be destroyed as long as a clone exists. The
+.Sy origin
+property exposes this dependency, and the
+.Cm destroy
+command lists any such dependencies, if they exist.
+.Pp
 The clone parent-child dependency relationship can be reversed by using the
-\fBpromote\fR subcommand. This causes the "origin" file system to become a
-clone of the specified file system, which makes it possible to destroy the file
-system that the clone was created from.
-.SS "Mount Points"
-.sp
-.LP
-Creating a \fBZFS\fR file system is a simple operation, so the number of file
-systems per system is likely to be numerous. To cope with this, \fBZFS\fR
+.Cm promote
+subcommand. This causes the "origin" file system to become a clone of the
+specified file system, which makes it possible to destroy the file system that
+the clone was created from.
+.Ss Mount Points
+Creating a
+.Tn ZFS
+file system is a simple operation, so the number of file systems per system is
+likely to be numerous. To cope with this,
+.Tn ZFS
 automatically manages mounting and unmounting file systems without the need to
-edit the \fB/etc/fstab\fR file. All automatically managed file systems are
-mounted by \fBZFS\fR at boot time.
-.sp
-.LP
-By default, file systems are mounted under \fB/\fIpath\fR\fR, where \fIpath\fR
-is the name of the file system in the \fBZFS\fR namespace. Directories are
-created and destroyed as needed.
-.sp
-.LP
-A file system can also have a mount point set in the \fBmountpoint\fR property.
-This directory is created as needed, and \fBZFS\fR automatically mounts the
-file system when the \fBzfs mount -a\fR command is invoked (without editing
-\fB/etc/fstab\fR). The \fBmountpoint\fR property can be inherited, so if
-\fBpool/home\fR has a mount point of \fB/export/stuff\fR, then
-\fBpool/home/user\fR automatically inherits a mount point of
-\fB/export/stuff/user\fR.
-.sp
-.LP
-A file system \fBmountpoint\fR property of \fBnone\fR prevents the file system
-from being mounted.
-.sp
-.LP
-If needed, \fBZFS\fR file systems can also be managed with traditional tools
-(\fBmount\fR, \fBumount\fR, \fB/etc/fstab\fR). If a file system's mount point
-is set to \fBlegacy\fR, \fBZFS\fR makes no attempt to manage the file system,
-and the administrator is responsible for mounting and unmounting the file
-system.
-.SS "Jails"
-.sp
-.LP
-A \fBZFS\fR dataset can be attached to a jail by using the \fBzfs\fR
-\fBjail\fR subcommand. You cannot attach a dataset to one jail and the
-children of the same dataset to another jails. To allow managment of the
-dataset from within a jail, the "\fBjailed\fR" property has to be set.
-The \fBquota\fR property cannot be changed from within a jail.
-.sp
-.LP
-A \fBZFS\fR dataset can be detached from a jail using the \fBzfs\fR
-\fBunjail\fR subcommand.
-.sp
-.LP
-After a dataset is attached to a jail and the \fBjailed\fR property is set,
-a jailed file system cannot be mounted outside the jail, since the jail
-administrator might have set the mount point to an unacceptable value.
-.SS "Native Properties"
-.sp
-.LP
+edit the
+.Pa /etc/fstab
+file. All automatically managed file systems are mounted by
+.Tn ZFS
+at boot time.
+.Pp
+By default, file systems are mounted under
+.Pa /path ,
+where
+.Ar path
+is the name of the file system in the
+.Tn ZFS
+namespace. Directories are created and destroyed as needed.
+.Pp
+A file system can also have a mount point set in the
+.Sy mountpoint
+property. This directory is created as needed, and
+.Tn ZFS
+automatically mounts the file system when the
+.Qq Nm Cm mount Fl a
+command is invoked (without editing
+.Pa /etc/fstab Ns ).
+The
+.Sy mountpoint
+property can be inherited, so if
+.Em pool/home
+has a mount point of
+.Pa /home ,
+then
+.Em pool/home/user
+automatically inherits a mount point of
+.Pa /home/user .
+.Pp
+A file system
+.Sy mountpoint
+property of
+.Cm none
+prevents the file system from being mounted.
+.Pp
+If needed,
+.Tn ZFS
+file systems can also be managed with traditional tools
+.Pq Xr mount 8 , Xr umount 8 , Xr fstab 5 .
+If a file system's mount point is set to
+.Cm legacy ,
+.Tn ZFS
+makes no attempt to manage the file system, and the administrator is
+responsible for mounting and unmounting the file system.
+.Ss Jails
+.No A Tn ZFS
+dataset can be attached to a jail by using the
+.Qq Nm Cm jail
+subcommand. You cannot attach a dataset to one jail and the children of the
+same dataset to another jails. To allow managment of the dataset from within
+a jail, the
+.Sy jailed
+property has to be set. The
+.Sy quota
+property cannot be changed from within a jail.
+.Pp
+.No A Tn ZFS
+dataset can be detached from a jail using the
+.Qq Nm Cm unjail
+subcommand.
+.Pp
+After a dataset is attached to a jail and the jailed property is set, a jailed
+file system cannot be mounted outside the jail, since the jail administrator
+might have set the mount point to an unacceptable value.
+.Ss Deduplication
+Deduplication is the process for removing redundant data at the block-level,
+reducing the total amount of data stored. If a file system has the
+.Cm dedup
+property enabled, duplicate data blocks are removed synchronously. The result
+is that only unique data is stored and common components are shared among
+files.
+.Ss Native Properties
 Properties are divided into two types, native properties and user-defined (or
 "user") properties. Native properties either export internal statistics or
-control \fBZFS\fR behavior. In addition, native properties are either editable
-or read-only. User properties have no effect on \fBZFS\fR behavior, but you can
-use them to annotate datasets in a way that is meaningful in your environment.
-For more information about user properties, see the "User Properties" section,
-below.
-.sp
-.LP
+control
+.Tn ZFS
+behavior. In addition, native properties are either editable or read-only. User
+properties have no effect on
+.Tn ZFS
+behavior, but you can use them to annotate datasets in a way that is meaningful
+in your environment. For more information about user properties, see the
+.Qq Sx User Properties
+section, below.
+.Pp
 Every dataset has a set of properties that export statistics about the dataset
 as well as control various behaviors. Properties are inherited from the parent
 unless overridden by the child. Some properties apply only to certain types of
 datasets (file systems, volumes, or snapshots).
-.sp
-.LP
+.Pp
 The values of numeric properties can be specified using human-readable suffixes
-(for example, \fBk\fR, \fBKB\fR, \fBM\fR, \fBGb\fR, and so forth, up to \fBZ\fR
+(for example,
+.Sy k , KB , M , Gb ,
+and so forth, up to
+.Sy Z
 for zettabyte). The following are all valid (and equal) specifications:
-.sp
-.in +2
-.nf
+.Bd -ragged -offset 4n
 1536M, 1.5g, 1.50GB
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Ed
+.Pp
 The values of non-numeric properties are case sensitive and must be lowercase,
-except for \fBmountpoint\fR, \fBsharenfs\fR, and \fBsharesmb\fR.
-.sp
-.LP
+except for
+.Sy mountpoint , sharenfs , No and Sy sharesmb .
+.Pp
 The following native properties consist of read-only statistics about the
 dataset. These properties can be neither set, nor inherited. Native properties
 apply to all dataset types unless otherwise noted.
-.sp
-.ne 2
-.na
-\fB\fBavailable\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width 2n
+.It Sy available
 The amount of space available to the dataset and all its children, assuming
 that there is no other activity in the pool. Because space is shared within a
 pool, availability can be limited by any number of factors, including physical
 pool size, quotas, reservations, or other datasets within the pool.
-.sp
+.Pp
 This property can also be referred to by its shortened column name,
-\fBavail\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBcompressratio\fR\fR
-.ad
-.sp .6
-.RS 4n
-For non-snapshots, the compression ratio achieved for the \fBused\fR
-space of this dataset, expressed as a multiplier.  The \fBused\fR
+.Sy avail .
+.It Sy compressratio
+For non-snapshots, the compression ratio achieved for the
+.Sy used
+space of this dataset, expressed as a multiplier.  The
+.Sy used
 property includes descendant datasets, and, for clones, does not include
 the space shared with the origin snapshot.  For snapshots, the
-\fBcompressratio\fR is the same as the \fBrefcompressratio\fR property.
-Compression can be turned on by running: \fBzfs set compression=on
-\fIdataset\fR\fR. The default value is \fBoff\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBcreation\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Sy compressratio
+is the same as the
+.Sy refcompressratio
+property. Compression can be turned on by running:
+.Qq Nm Cm set compression=on Ar dataset
+The default value is
+.Cm off .
+.It Sy creation
 The time this dataset was created.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBdefer_destroy\fR\fR
-.ad
-.sp .6
-.RS 4n
-This property is \fBon\fR if the snapshot has been marked for deferred destroy
-by using the \fBzfs destroy\fR \fB-d\fR command. Otherwise, the property is
-\fBoff\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBmounted\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy clones
+For snapshots, this property is a comma-separated list of filesystems or
+volumes which are clones of this snapshot.  The clones'
+.Sy origin
+property is this snapshot.  If the
+.Sy clones
+property is not empty, then this snapshot can not be destroyed (even with the
+.Fl r
+or
+.Fl f
+options).
+.It Sy defer_destroy
+This property is
+.Cm on
+if the snapshot has been marked for deferred destroy by using the
+.Qq Nm Cm destroy -d
+command. Otherwise, the property is
+.Cm off .
+.It Sy mounted
 For file systems, indicates whether the file system is currently mounted. This
-property can be either \fByes\fR or \fBno\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBorigin\fR\fR
-.ad
-.sp .6
-.RS 4n
+property can be either
+.Cm yes
+or
+.Cm no .
+.It Sy origin
 For cloned file systems or volumes, the snapshot from which the clone was
-created. The origin cannot be destroyed (even with the \fB-r\fR or \fB-f\fR
-options) so long as a clone exists.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBreferenced\fR\fR
-.ad
-.sp .6
-.RS 4n
+created. See also the
+.Sy clones
+property.
+.It Sy referenced
 The amount of data that is accessible by this dataset, which may or may not be
 shared with other datasets in the pool. When a snapshot or clone is created, it
 initially references the same amount of space as the file system or snapshot it
 was created from, since its contents are identical.
-.sp
+.Pp
 This property can also be referred to by its shortened column name,
-\fBrefer\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBrefcompressratio\fR\fR
-.ad
-.sp .6
-.RS 4n
-The compression ratio achieved for the \fBreferenced\fR space of this
-dataset, expressed as a multiplier.  See also the \fBcompressratio\fR
+.Sy refer .
+.It Sy refcompressratio
+The compression ratio achieved for the
+.Sy referenced
+space of this dataset, expressed as a multiplier.  See also the
+.Sy compressratio
 property.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBtype\fR\fR
-.ad
-.sp .6
-.RS 4n
-The type of dataset: \fBfilesystem\fR, \fBvolume\fR, or \fBsnapshot\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBused\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy type
+The type of dataset:
+.Sy filesystem , volume , No or Sy snapshot .
+.It Sy used
 The amount of space consumed by this dataset and all its descendents. This is
 the value that is checked against this dataset's quota and reservation. The
 space used does not include this dataset's reservation, but does take into
@@ -563,673 +545,629 @@
 dataset consumes from its parent, as well as the amount of space that are freed
 if this dataset is recursively destroyed, is the greater of its space used and
 its reservation.
-.sp
-When snapshots (see the "Snapshots" section) are created, their space is
+.Pp
+When snapshots (see the
+.Qq Sx Snapshots
+section) are created, their space is
 initially shared between the snapshot and the file system, and possibly with
 previous snapshots. As the file system changes, space that was previously
 shared becomes unique to the snapshot, and counted in the snapshot's space
 used. Additionally, deleting snapshots can increase the amount of space unique
 to (and used by) other snapshots.
-.sp
+.Pp
 The amount of space used, available, or referenced does not take into account
 pending changes. Pending changes are generally accounted for within a few
-seconds. Committing a change to a disk using \fBfsync\fR(2) or \fBO_SYNC\fR
+seconds. Committing a change to a disk using
+.Xr fsync 2
+or
+.Sy O_SYNC
 does not necessarily guarantee that the space usage information is updated
 immediately.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBusedby*\fR\fR
-.ad
-.sp .6
-.RS 4n
-The \fBusedby*\fR properties decompose the \fBused\fR properties into the
-various reasons that space is used. Specifically, \fBused\fR =
-\fBusedbychildren\fR + \fBusedbydataset\fR + \fBusedbyrefreservation\fR +,
-\fBusedbysnapshots\fR. These properties are only available for datasets created
-on \fBzpool\fR "version 13" pools.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBusedbychildren\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy usedby*
+The
+.Sy usedby*
+properties decompose the
+.Sy used
+properties into the various reasons that space is used. Specifically,
+.Sy used No =
+.Sy usedbysnapshots + usedbydataset + usedbychildren + usedbyrefreservation .
+These properties are only available for datasets created
+with
+.Tn ZFS
+pool version 13 pools and higher.
+.It Sy usedbysnapshots
+The amount of space consumed by snapshots of this dataset. In particular, it is
+the amount of space that would be freed if all of this dataset's snapshots were
+destroyed. Note that this is not simply the sum of the snapshots'
+.Sy used
+properties because space can be shared by multiple snapshots.
+.It Sy usedbydataset
+The amount of space used by this dataset itself, which would be freed if the
+dataset were destroyed (after first removing any
+.Sy refreservation
+and destroying any necessary snapshots or descendents).
+.It Sy usedbychildren
 The amount of space used by children of this dataset, which would be freed if
 all the dataset's children were destroyed.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBusedbydataset\fR\fR
-.ad
-.sp .6
-.RS 4n
-The amount of space used by this dataset itself, which would be freed if the
-dataset were destroyed (after first removing any \fBrefreservation\fR and
-destroying any necessary snapshots or descendents).
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBusedbyrefreservation\fR\fR
-.ad
-.sp .6
-.RS 4n
-The amount of space used by a \fBrefreservation\fR set on this dataset, which
-would be freed if the \fBrefreservation\fR was removed.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBusedbysnapshots\fR\fR
-.ad
-.sp .6
-.RS 4n
-The amount of space consumed by snapshots of this dataset. In particular, it is
-the amount of space that would be freed if all of this dataset's snapshots were
-destroyed. Note that this is not simply the sum of the snapshots' \fBused\fR
-properties because space can be shared by multiple snapshots.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\[email protected]\fR\fIuser\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy usedbyrefreservation
+The amount of space used by a
+.Sy refreservation
+set on this dataset, which would be freed if the
+.Sy refreservation
+was removed.
+.It Sy [email protected] Ns Ar user
 The amount of space consumed by the specified user in this dataset. Space is
-charged to the owner of each file, as displayed by \fBls\fR \fB-l\fR. The
-amount of space charged is displayed by \fBdu\fR and \fBls\fR \fB-s\fR. See the
-\fBzfs userspace\fR subcommand for more information.
-.sp
+charged to the owner of each file, as displayed by
+.Qq Nm ls Fl l .
+The amount of space charged is displayed by
+.Qq Nm du
+and
+.Qq Nm ls Fl s .
+See the
+.Qq Nm Cm userspace
+subcommand for more information.
+.Pp
 Unprivileged users can access only their own space usage. The root user, or a
-user who has been granted the \fBuserused\fR privilege with \fBzfs allow\fR,
+user who has been granted the
+.Sy userused
+privilege with
+.Qq Nm Cm allow ,
 can access everyone's usage.
-.sp
-The \[email protected]\fR... properties are not displayed by \fBzfs get all\fR. The
-user's name must be appended after the \[email protected]\fR symbol, using one of the
-following forms:
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIPOSIX name\fR (for example, \fBjoe\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIPOSIX numeric ID\fR (for example, \fB789\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fISID name\fR (for example, \fBjoe.smith at mydomain\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
-.RE
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBuserrefs\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Pp
+The 
+.Sy [email protected] Ns ...
+properties are not displayed by
+.Qq Nm Cm get all .
+The user's name must be appended after the
+.Sy @
+symbol, using one of the following forms:
+.Bl -bullet -offset 2n
+.It
+POSIX name (for example,
+.Em joe Ns )
+.It
+POSIX numeric ID (for example,
+.Em 1001 Ns )
+.El
+.It Sy userrefs
 This property is set to the number of user holds on this snapshot. User holds
-are set by using the \fBzfs hold\fR command.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\[email protected]\fR\fIgroup\fR\fR
-.ad
-.sp .6
-.RS 4n
+are set by using the
+.Qq Nm Cm hold
+command.
+.It Sy [email protected] Ns Ar group
 The amount of space consumed by the specified group in this dataset. Space is
-charged to the group of each file, as displayed by \fBls\fR \fB-l\fR. See the
-\fBuseru[email protected]\fR\fIuser\fR property for more information.
-.sp
+charged to the group of each file, as displayed by
+.Nm ls Fl l .
+See the
+.Sy [email protected] Ns Ar user
+property for more information.
+.Pp
 Unprivileged users can only access their own groups' space usage. The root
-user, or a user who has been granted the \fBgroupused\fR privilege with \fBzfs
-allow\fR, can access all groups' usage.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBvolblocksize\fR=\fIblocksize\fR\fR
-.ad
-.sp .6
-.RS 4n
-For volumes, specifies the block size of the volume. The \fBblocksize\fR cannot
-be changed once the volume has been written, so it should be set at volume
-creation time. The default \fBblocksize\fR for volumes is 8 Kbytes. Any power
-of 2 from 512 bytes to 128 Kbytes is valid.
-.sp
+user, or a user who has been granted the
+.Sy groupused
+privilege with
+.Qq Nm Cm allow ,
+can access all groups' usage.
+.It Sy volblocksize Ns = Ns Ar blocksize
+For volumes, specifies the block size of the volume. The
+.Ar blocksize
+cannot be changed once the volume has been written, so it should be set at
+volume creation time. The default
+.Ar blocksize
+for volumes is 8 Kbytes. Any
+power of 2 from 512 bytes to 128 Kbytes is valid.
+.Pp
 This property can also be referred to by its shortened column name,
-\fBvolblock\fR.
-.RE
-
-.sp
-.LP
+.Sy volblock .
+.It Sy written
+The amount of
+.Sy referenced
+space written to this dataset since the previous snapshot.
+.It Sy [email protected] Ns Ar snapshot
+The amount of
+.Sy referenced
+space written to this dataset since the specified snapshot.  This is the space
+that is referenced by this dataset but was not referenced by the specified
+snapshot.
+.Pp
+The
+.Ar snapshot
+may be specified as a short snapshot name (just the part after the
+.Sy @ Ns ),
+in which case it will be interpreted as a snapshot in the same filesystem as
+this dataset. The
+.Ar snapshot
+may be a full snapshot name
+.Pq Em filesystem at snapshot ,
+which for clones may be a snapshot in the origin's filesystem (or the origin of
+the origin's filesystem, etc).
+.El
+.Pp
 The following native properties can be used to change the behavior of a
-\fBZFS\fR dataset.
-.sp
-.ne 2
-.na
-\fB\fBaclinherit\fR=\fBdiscard\fR | \fBnoallow\fR | \fBrestricted\fR |
-\fBpassthrough\fR | \fBpassthrough-x\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls how \fBACL\fR entries are inherited when files and directories are
-created. A file system with an \fBaclinherit\fR property of \fBdiscard\fR does
-not inherit any \fBACL\fR entries. A file system with an \fBaclinherit\fR
-property value of \fBnoallow\fR only inherits inheritable \fBACL\fR entries
-that specify "deny" permissions. The property value \fBrestricted\fR (the
-default) removes the \fBwrite_acl\fR and \fBwrite_owner\fR permissions when the
-\fBACL\fR entry is inherited. A file system with an \fBaclinherit\fR property
-value of \fBpassthrough\fR inherits all inheritable \fBACL\fR entries without
-any modifications made to the \fBACL\fR entries when they are inherited. A file
-system with an \fBaclinherit\fR property value of \fBpassthrough-x\fR has the
-same meaning as \fBpassthrough\fR, except that the \[email protected]\fR, \[email protected]\fR,
-and \[email protected]\fR \fBACE\fRs inherit the execute permission only if the file
-creation mode also requests the execute bit.
-.sp
-When the property value is set to \fBpassthrough\fR, files are created with a
-mode determined by the inheritable \fBACE\fRs. If no inheritable \fBACE\fRs
+.Tn ZFS
+dataset.
+.Bl -tag -width 2n
+.It Xo
+.Sy aclinherit Ns = Ns Cm discard |
+.Cm noallow |
+.Cm restricted |
+.Cm passthrough |
+.Cm passthrough-x
+.Xc
+Controls how
+.Tn ACL
+entries are inherited when files and directories are created. A file system
+with an
+.Sy aclinherit
+property of
+.Cm discard
+does not inherit any
+.Tn ACL
+entries. A file system with an
+.Sy aclinherit
+property value of
+.Cm noallow
+only inherits inheritable
+.Tn ACL
+entries that specify "deny" permissions. The property value
+.Cm restricted
+(the default) removes the
+.Em write_acl
+and
+.Em write_owner
+permissions when the
+.Tn ACL
+entry is inherited. A file system with an
+.Sy aclinherit
+property value of
+.Cm passthrough
+inherits all inheritable
+.Tn ACL
+entries without any modifications made to the
+.Tn ACL
+entries when they are inherited. A file system with an
+.Sy aclinherit
+property value of
+.Cm passthrough-x
+has the same meaning as
+.Cm passthrough ,
+except that the
+.Em [email protected] , [email protected] , No and Em [email protected] Tn ACE Ns s
+inherit the execute permission only if the file creation mode also requests the
+execute bit.
+.Pp
+When the property value is set to
+.Cm passthrough ,
+files are created with a mode determined by the inheritable
+.Tn ACE Ns s.
+If no inheritable
+.Tn ACE Ns s
 exist that affect the mode, then the mode is set in accordance to the requested
 mode from the application.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBaclmode\fR=\fBdiscard\fR | \fBgroupmask\fR | \fBpassthrough\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls how an \fBACL\fR is modified during \fBchmod\fR(2). A file system with
-an \fBaclmode\fR property of \fBdiscard\fR (the default) deletes all \fBACL\fR
-entries that do not represent the mode of the file. An \fBaclmode\fR property
-of \fBgroupmask\fR reduces permissions granted in all \fBALLOW\fR entries found
-in the \fBACL\fR such that they are no greater than the group permissions
-specified by \fBchmod\fR.  A file system with an \fBaclmode\fR property of
-\fBpassthrough\fR indicates that no changes are made to the \fBACL\fR other
-than creating or updating the necessary \fBACL\fR entries to
-represent the new mode of the file or directory.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBatime\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy aclmode Ns = Ns Cm discard | groupmask | passthrough
+Controls how an
+.Tn ACL
+is modified during
+.Xr chmod 2 .
+A file system with an
+.Sy aclmode
+property of
+.Cm discard
+(the default) deletes all
+.Tn ACL
+entries that do not represent the mode of the file. An
+.Sy aclmode
+property of
+.Cm groupmask
+reduces permissions granted in all
+.Em ALLOW
+entries found in the
+.Tn ACL
+such that they are no greater than the group permissions specified by
+.Xr chmod 2 .
+A file system with an
+.Sy aclmode
+property of
+.Cm passthrough
+indicates that no changes are made to the
+.Tn ACL
+other than creating or updating the necessary
+.Tn ACL
+entries to represent the new mode of the file or directory.
+.It Sy atime Ns = Ns Cm on | off
 Controls whether the access time for files is updated when they are read.
 Turning this property off avoids producing write traffic when reading files and
 can result in significant performance gains, though it might confuse mailers
-and other similar utilities. The default value is \fBon\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBcanmount\fR=\fBon\fR | \fBoff\fR | \fBnoauto\fR\fR
-.ad
-.sp .6
-.RS 4n
-If this property is set to \fBoff\fR, the file system cannot be mounted, and is
-ignored by \fBzfs mount -a\fR. Setting this property to \fBoff\fR is similar to
-setting the \fBmountpoint\fR property to \fBnone\fR, except that the dataset
-still has a normal \fBmountpoint\fR property, which can be inherited. Setting
-this property to \fBoff\fR allows datasets to be used solely as a mechanism to
-inherit properties. One example of setting \fBcanmount=\fR\fBoff\fR is to have
-two datasets with the same \fBmountpoint\fR, so that the children of both
-datasets appear in the same directory, but might have different inherited
-characteristics.
-.sp
-When the \fBnoauto\fR option is set, a dataset can only be mounted and
-unmounted explicitly. The dataset is not mounted automatically when the dataset
-is created or imported, nor is it mounted by the \fBzfs mount -a\fR command or
-unmounted by the \fBzfs unmount -a\fR command.
-.sp
+and other similar utilities. The default value is
+.Cm on .
+.It Sy canmount Ns = Ns Cm on | off | noauto
+If this property is set to
+.Cm off ,
+the file system cannot be mounted, and is ignored by
+.Qq Nm Cm mount Fl a .
+Setting this property to
+.Cm off
+is similar to setting the
+.Sy mountpoint
+property to
+.Cm none ,
+except that the dataset still has a normal
+.Sy mountpoint
+property, which can be inherited. Setting this property to
+.Cm off
+allows datasets to be used solely as a mechanism to inherit properties. One
+example of setting
+.Sy canmount Ns = Ns Cm off
+is to have two datasets with the same
+.Sy mountpoint ,
+so that the children of both datasets appear in the same directory, but might
+have different inherited characteristics.
+.Pp
+When the
+.Cm noauto
+value is set, a dataset can only be mounted and unmounted explicitly. The
+dataset is not mounted automatically when the dataset is created or imported,
+nor is it mounted by the
+.Qq Nm Cm mount Fl a
+command or unmounted by the
+.Qq Nm Cm umount Fl a
+command.
+.Pp
 This property is not inherited.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBchecksum\fR=\fBon\fR | \fBoff\fR | \fBfletcher2,\fR| \fBfletcher4\fR |
-\fBsha256\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4
 Controls the checksum used to verify data integrity. The default value is
-\fBon\fR, which automatically selects an appropriate algorithm (currently,
-\fBfletcher4\fR, but this may change in future releases). The value \fBoff\fR
-disables integrity checking on user data. Disabling checksums is \fBNOT\fR a
-recommended practice.
-.sp
+.Cm on ,
+which automatically selects an appropriate algorithm (currently,
+.Cm fletcher4 ,
+but this may change in future releases). The value
+.Cm off
+disables integrity checking on user data. Disabling checksums is
+.Em NOT
+a recommended practice.
+.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle
+Controls the compression algorithm used for this dataset. The
+.CM lzjb
+compression algorithm is optimized for performance while providing decent data
+compression. Setting compression to
+.Cm on
+uses the
+.Cm lzjb
+compression algorithm. The
+.Cm gzip
+compression algorithm uses the same compression as the
+.Xr gzip 1
+command. You can specify the
+.Cm gzip
+level by using the value
+.Cm gzip- Ns Ar N
+where
+.Ar N
+is an integer from 1 (fastest) to 9 (best compression ratio). Currently,
+.Cm gzip
+is equivalent to
+.Cm gzip-6
+(which is also the default for
+.Xr gzip 1 Ns ).
+The
+.Cm zle
+compression algorithm compresses runs of zeros.
+.Pp
+This property can also be referred to by its shortened column name
+.Cm compress .
 Changing this property affects only newly-written data.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBcompression\fR=\fBon\fR | \fBoff\fR | \fBlzjb\fR | \fBgzip\fR |
-\fBgzip-\fR\fIN\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls the compression algorithm used for this dataset. The \fBlzjb\fR
-compression algorithm is optimized for performance while providing decent data
-compression. Setting compression to \fBon\fR uses the \fBlzjb\fR compression
-algorithm. The \fBgzip\fR compression algorithm uses the same compression as
-the \fBgzip\fR(1) command. You can specify the \fBgzip\fR level by using the
-value \fBgzip-\fR\fIN\fR where \fIN\fR is an integer from 1 (fastest) to 9
-(best compression ratio). Currently, \fBgzip\fR is equivalent to \fBgzip-6\fR
-(which is also the default for \fBgzip\fR(1)).
-.sp
-This property can also be referred to by its shortened column name
-\fBcompress\fR. Changing this property affects only newly-written data.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBcopies\fR=\fB1\fR | \fB2\fR | \fB3\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy copies Ns = Ns Cm 1 | 2 | 3
 Controls the number of copies of data stored for this dataset. These copies are
 in addition to any redundancy provided by the pool, for example, mirroring or
 RAID-Z. The copies are stored on different disks, if possible. The space used
 by multiple copies is charged to the associated file and dataset, changing the
-\fBused\fR property and counting against quotas and reservations.
-.sp
+.Sy used
+property and counting against quotas and reservations.
+.Pp
 Changing this property only affects newly-written data. Therefore, set this
-property at file system creation time by using the \fB-o\fR
-\fBcopies=\fR\fIN\fR option.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBdevices\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether device nodes can be opened on this file system. The default
-value is \fBon\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBexec\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
+property at file system creation time by using the
+.Fl o Cm copies= Ns Ar N
+option.
+.It Sy dedup Ns = Ns Cm on | off | verify | sha256 Ns Op Cm ,verify
+Configures deduplication for a dataset. The default value is
+.Cm off .
+The default deduplication checksum is
+.Cm sha256
+(this may change in the future).
+When
+.Sy dedup
+is enabled, the checksum defined here overrides the
+.Sy checksum
+property. Setting the value to
+.Cm verify
+has the same effect as the setting
+.Cm sha256,verify .
+.Pp
+If set to
+.Cm verify ,
+.Tn ZFS
+will do a byte-to-byte comparsion in case of two blocks having the same
+signature to make sure the block contents are identical.
+.It Sy devices Ns = Ns Cm on | off
+The
+.Sy devices
+property is currently not supported on
+.Fx .
+.It Sy exec Ns = Ns Cm on | off
 Controls whether processes can be executed from within this file system. The
-default value is \fBon\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBjailed\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether the dataset is managed from within a jail. See the "Jails"
-section for more information. The default value is \fBoff\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBmountpoint\fR=\fIpath\fR | \fBnone\fR | \fBlegacy\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls the mount point used for this file system. See the "Mount Points"
+default value is
+.Cm on .
+.It Sy mlslabel Ns = Ns Ar label | Cm none
+The
+.Sy mlslabel
+property is currently not supported on
+.Fx .
+.It Sy mountpoint Ns = Ns Ar path | Cm none | legacy
+Controls the mount point used for this file system. See the
+.Qq Sx Mount Points
 section for more information on how this property is used.
-.sp
-When the \fBmountpoint\fR property is changed for a file system, the file
-system and any children that inherit the mount point are unmounted. If the new
-value is \fBlegacy\fR, then they remain unmounted. Otherwise, they are
-automatically remounted in the new location if the property was previously
-\fBlegacy\fR or \fBnone\fR, or if they were mounted before the property was
-changed. In addition, any shared file systems are unshared and shared in the
-new location.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBnbmand\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether the file system should be mounted with \fBnbmand\fR (Non
-Blocking mandatory locks). This is used for \fBCIFS\fR clients. Changes to this
-property only take effect when the file system is umounted and remounted. See
-\fBmount\fR(8) for more information on \fBnbmand\fR mounts.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBprimarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Pp
+When the
+.Sy mountpoint
+property is changed for a file system, the file system and any children that
+inherit the mount point are unmounted. If the new value is
+.Cm legacy ,
+then they remain unmounted. Otherwise, they are automatically remounted in the
+new location if the property was previously
+.Cm legacy
+or
+.Cm none ,
+or if they were mounted before the property was changed. In addition, any
+shared file systems are unshared and shared in the new location.
+.It Sy nbmand Ns = Ns Cm on | off
+The
+.Sy nbmand
+property is currently not supported on
+.Fx .
+.It Sy primarycache Ns = Ns Cm all | none | metadata
 Controls what is cached in the primary cache (ARC). If this property is set to
-\fBall\fR, then both user data and metadata is cached. If this property is set
-to \fBnone\fR, then neither user data nor metadata is cached. If this property
-is set to \fBmetadata\fR, then only metadata is cached. The default value is
-\fBall\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBquota\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Cm all ,
+then both user data and metadata is cached. If this property is set to
+.Cm none ,
+then neither user data nor metadata is cached. If this property is set to
+.Cm metadata ,
+then only metadata is cached. The default value is
+.Cm all .
+.It Sy quota Ns = Ns Ar size | Cm none
 Limits the amount of space a dataset and its descendents can consume. This
 property enforces a hard limit on the amount of space used. This includes all
 space consumed by descendents, including file systems and snapshots. Setting a
 quota on a descendent of a dataset that already has a quota does not override
 the ancestor's quota, but rather imposes an additional limit.
-.sp
-Quotas cannot be set on volumes, as the \fBvolsize\fR property acts as an
-implicit quota.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\[email protected]\fR\fIuser\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
-Limits the amount of space consumed by the specified user. User space
-consumption is identified by the \[email protected]\fR\fIuser\fR property.
+.Pp
+Quotas cannot be set on volumes, as the
+.Sy volsize
+property acts as an implicit quota.
+.It Sy [email protected] Ns Ar user Ns = Ns Ar size | Cm none
+Limits the amount of space consumed by the specified user.
+Similar to the
+.Sy refquota
+property, the
+.Sy userquota
+space calculation does not include space that is used by descendent datasets,
+such as snapshots and clones. User space consumption is identified by the
+.Sy [email protected] Ns Ar user
+property.
 .sp
 Enforcement of user quotas may be delayed by several seconds. This delay means
 that a user might exceed their quota before the system notices that they are
-over quota and begins to refuse additional writes with the \fBEDQUOT\fR error
-message . See the \fBzfs userspace\fR subcommand for more information.
+over quota and begins to refuse additional writes with the
+.Em EDQUOT
+error message. See the
+.Cm userspace
+subcommand for more information.
 .sp
 Unprivileged users can only access their own groups' space usage. The root
-user, or a user who has been granted the \fBuserquota\fR privilege with \fBzfs
-allow\fR, can get and set everyone's quota.
+user, or a user who has been granted the
+.Sy userquota
+privilege with
+.Qq Nm Cm allow ,
+can get and set everyone's quota.
 .sp
 This property is not available on volumes, on file systems before version 4, or
-on pools before version 15. The \[email protected]\fR... properties are not
-displayed by \fBzfs get all\fR. The user's name must be appended after the
-\[email protected]\fR symbol, using one of the following forms:
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIPOSIX name\fR (for example, \fBjoe\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIPOSIX numeric ID\fR (for example, \fB789\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fISID name\fR (for example, \fBjoe.smith at mydomain\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
-.RE
-.RE
-
-.sp
-.ne 2
-.na
-\fB\[email protected]\fR\fIgroup\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
+on pools before version 15. The
+.Sy [email protected] Ns ...
+properties are not displayed by
+.Qq Nm Cm get all .
+The user's name must be appended after the
+.Sy @
+symbol, using one of the following forms:
+.Bl -bullet -offset 2n
+.It
+POSIX name (for example,
+.Em joe Ns )
+.It
+POSIX numeric ID (for example,
+.Em 1001 Ns )
+.El
+.It Sy [email protected] Ns Ar group Ns = Ns Ar size | Cm none
 Limits the amount of space consumed by the specified group. Group space
-consumption is identified by the \[email protected]\fR\fIuser\fR property.
+consumption is identified by the
+.Sy [email protected] Ns Ar user
+property.
 .sp
 Unprivileged users can access only their own groups' space usage. The root
-user, or a user who has been granted the \fBgroupquota\fR privilege with \fBzfs
-allow\fR, can get and set all groups' quotas.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBreadonly\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether this dataset can be modified. The default value is \fBoff\fR.
-.sp
-This property can also be referred to by its shortened column name,
-\fBrdonly\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBrecordsize\fR=\fIsize\fR\fR
-.ad
-.sp .6
-.RS 4n
+user, or a user who has been granted the
+.Sy groupquota
+privilege with
+.Qq Nm Cm allow ,
+can get and set all groups' quotas.
+.It Sy readonly Ns = Ns Cm on | off
+Controls whether this dataset can be modified. The default value is
+.Cm off .
+.It Sy recordsize Ns = Ns Ar size
 Specifies a suggested block size for files in the file system. This property is
 designed solely for use with database workloads that access files in fixed-size
-records. \fBZFS\fR automatically tunes block sizes according to internal
-algorithms optimized for typical access patterns.
-.sp
+records.
+.Tn ZFS
+automatically tunes block sizes according to internal algorithms optimized for
+typical access patterns.
+.Pp
 For databases that create very large files but access them in small random
-chunks, these algorithms may be suboptimal. Specifying a \fBrecordsize\fR
+chunks, these algorithms may be suboptimal. Specifying a
+.Sy recordsize
 greater than or equal to the record size of the database can result in
 significant performance gains. Use of this property for general purpose file
 systems is strongly discouraged, and may adversely affect performance.
-.sp
+.Pp
 The size specified must be a power of two greater than or equal to 512 and less
 than or equal to 128 Kbytes.
-.sp
-Changing the file system's \fBrecordsize\fR affects only files created
-afterward; existing files are unaffected.
+.Pp
+Changing the file system's
+.Sy recordsize
+affects only files created afterward; existing files are unaffected.
 .sp
 This property can also be referred to by its shortened column name,
-\fBrecsize\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBrefquota\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Sy recsize .
+.It Sy refquota Ns = Ns Ar size | Cm none
 Limits the amount of space a dataset can consume. This property enforces a hard
 limit on the amount of space used. This hard limit does not include space used
 by descendents, including file systems and snapshots.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBrefreservation\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy refreservation Ns = Ns Ar size | Cm none
 The minimum amount of space guaranteed to a dataset, not including its
 descendents. When the amount of space used is below this value, the dataset is
 treated as if it were taking up the amount of space specified by
-\fBrefreservation\fR. The \fBrefreservation\fR reservation is accounted for in
-the parent datasets' space used, and counts against the parent datasets' quotas
-and reservations.
+.Sy refreservation .
+The
+.Sy refreservation
+reservation is accounted for in the parent datasets' space used, and counts
+against the parent datasets' quotas and reservations.
 .sp
-If \fBrefreservation\fR is set, a snapshot is only allowed if there is enough
-free pool space outside of this reservation to accommodate the current number
-of "referenced" bytes in the dataset.
+If
+.Sy refreservation
+is set, a snapshot is only allowed if there is enough free pool space outside
+of this reservation to accommodate the current number of "referenced" bytes in
+the dataset.
 .sp
 This property can also be referred to by its shortened column name,
-\fBrefreserv\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBreservation\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Sy refreserv .
+.It Sy reservation Ns = Ns Ar size | Cm none
 The minimum amount of space guaranteed to a dataset and its descendents. When
 the amount of space used is below this value, the dataset is treated as if it
 were taking up the amount of space specified by its reservation. Reservations
 are accounted for in the parent datasets' space used, and count against the
 parent datasets' quotas and reservations.
-.sp
+.Pp
 This property can also be referred to by its shortened column name,
-\fBreserv\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBsecondarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Sy reserv .
+.It Sy secondarycache Ns = Ns Cm all | none | metadata
 Controls what is cached in the secondary cache (L2ARC). If this property is set
-to \fBall\fR, then both user data and metadata is cached. If this property is
-set to \fBnone\fR, then neither user data nor metadata is cached. If this
-property is set to \fBmetadata\fR, then only metadata is cached. The default
-value is \fBall\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBsetuid\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether the set-\fBUID\fR bit is respected for the file system. The
-default value is \fBon\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBsharesmb\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
-.ad
-.sp .6
-.RS 4n
-The \fB\fBsharesmb\fR property has currently no effect on FreeBSD.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBsharenfs\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether the file system is shared via \fBNFS\fR, and what options are
-used. A file system with a \fBsharenfs\fR property of \fBoff\fR is managed
-the traditional way via \fBexports\fR(5). Otherwise, the file system is
-automatically shared and unshared with the \fBzfs share\fR and
-\fBzfs unshare\fR commands. If the property is set to \fBon\fR, no NFS export
-options are used. Otherwise, NFS export options are equivalent to the contents
-of this property.
-.sp
-When the \fBsharenfs\fR property is changed for a dataset, the \fBmountd\fR(8)
-daemon is reloaded.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBlogbias\fR = \fBlatency\fR | \fBthroughput\fR\fR
-.ad
-.sp .6
-.RS 4n
-Provide a hint to ZFS about handling of synchronous requests in this dataset.
-If \fBlogbias\fR is set to \fBlatency\fR (the default), ZFS will use pool log
-devices (if configured) to handle the requests at low latency. If \fBlogbias\fR
-is set to \fBthroughput\fR, ZFS will not use configured pool log devices. ZFS
+to
+.Cm all ,
+then both user data and metadata is cached. If this property is set to
+.Cm none ,
+then neither user data nor metadata is cached. If this property is set to
+.Cm metadata ,
+then only metadata is cached. The default value is
+.Cm all .
+.It Sy setuid Ns = Ns Cm on | off
+Controls whether the
+.No set- Ns Tn UID
+bit is respected for the file system. The default value is
+.Cm on .
+.It Sy sharesmb Ns = Ns Cm on | off | Ar opts
+The
+.Sy sharesmb
+property has currently no effect o
+.Fx .
+.It Sy sharenfs Ns = Ns Cm on | off | Ar opts
+Controls whether the file system is shared via
+.Tn NFS ,
+and what options are used. A file system with a
+.Sy sharenfs
+property of
+.Cm off
+is managed the traditional way via
+.Xr exports 5 .
+Otherwise, the file system is automatically shared and unshared with the
+.Qq Nm Cm share
+and
+.Qq Nm Cm unshare
+commands. If the property is set to
+.Cm on
+no
+.Tn NFS
+export options are used. Otherwise,
+.Tn NFS
+export options are equivalent to the contents of this property. The export
+options may be comma-separated. See
+.Xr exports 5
+for a list of valid options.
+.Pp
+When the
+.Sy sharenfs
+property is changed for a dataset, the
+.Xr mountd 8
+dameon is reloaded.
+.It Sy logbias Ns = Ns Cm latency | throughput
+Provide a hint to
+.Tn ZFS
+about handling of synchronous requests in this dataset.
+If
+.Sy logbias
+is set to
+.Cm latency
+(the default),
+.Tn ZFS
+will use pool log devices (if configured) to handle the requests at low
+latency. If
+.Sy logbias
+is set to
+.Cm throughput ,
+.Tn ZFS
+will not use configured pool log devices.
+.Tn ZFS
 will instead optimize synchronous operations for global pool throughput and
 efficient use of resources.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBsnapdir\fR=\fBhidden\fR | \fBvisible\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether the \fB\&.zfs\fR directory is hidden or visible in the root of
-the file system as discussed in the "Snapshots" section. The default value is
-\fBhidden\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBversion\fR=\fB1\fR | \fB2\fR | \fBcurrent\fR\fR
-.ad
-.sp .6
-.RS 4n
-The on-disk version of this file system, which is independent of the pool
-version. This property can only be set to later supported versions. See the
-\fBzfs upgrade\fR command.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBvolsize\fR=\fIsize\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy snapdir Ns = Ns Cm hidden | visible
+Controls whether the 
+.Pa \&.zfs
+directory is hidden or visible in the root of the file system as discussed in
+the
+.Qq Sx Snapshots
+section. The default value is
+.Cm hidden .
+.It Sy sync Ns = Ns Cm standard | always | disabled
+Controls the behavior of synchronous requests (e.g.
+.Xr fsync 2 ,
+O_DSYNC). This property accepts the following values:
+.Bl -tag -offset 4n -width 8n
+.It Sy standard
+This is the POSIX specified behavior of ensuring all synchronous requests are
+written to stable storage and all devices are flushed to ensure data is not
+cached by device controllers (this is the default).
+.It Sy always
+All file system transactions are written and flushed before their system calls
+return. This has a large performance penalty.
+.It Sy disabled
+Disables synchronous requests. File system transactions are only committed to
+stable storage periodically. This option will give the highest performance.
+However, it is very dangerous as
+.Tn ZFS
+would be ignoring the synchronous transaction demands of applications such as
+databases or
+.Tn NFS .
+Administrators should only use this option when the risks are understood.
+.El
+.It Sy volsize Ns = Ns Ar size
 For volumes, specifies the logical size of the volume. By default, creating a
 volume establishes a reservation of equal size. For storage pools with a
-version number of 9 or higher, a \fBrefreservation\fR is set instead. Any
-changes to \fBvolsize\fR are reflected in an equivalent change to the
-reservation (or \fBrefreservation\fR). The \fBvolsize\fR can only be set to a
-multiple of \fBvolblocksize\fR, and cannot be zero.
-.sp
+version number of 9 or higher, a
+.Sy refreservation
+is set instead. Any changes to
+.Sy volsize
+are reflected in an equivalent change to the reservation (or
+.Sy refreservation Ns ).
+The
+.Sy volsize
+can only be set to a multiple of
+.Cm volblocksize ,
+and cannot be zero.
+.Pp
 The reservation is kept equal to the volume's logical size to prevent
 unexpected behavior for consumers. Without the reservation, the volume could
 run out of space, resulting in undefined behavior or data corruption, depending
@@ -1238,1880 +1176,1645 @@
 should be used when adjusting the volume size.
 .sp
 Though not recommended, a "sparse volume" (also known as "thin provisioning")
-can be created by specifying the \fB-s\fR option to the \fBzfs create -V\fR
+can be created by specifying the
+.Fl s
+option to the
+.Qq Nm Cm create Fl V
 command, or by changing the reservation after the volume has been created. A
 "sparse volume" is a volume where the reservation is less then the volume size.
-Consequently, writes to a sparse volume can fail with \fBENOSPC\fR when the
-pool is low on space. For a sparse volume, changes to \fBvolsize\fR are not
-reflected in the reservation.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBvscan\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether regular files should be scanned for viruses when a file is
-opened and closed. In addition to enabling this property, the virus scan
-service must also be enabled for virus scanning to occur. The default value is
-\fBoff\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBxattr\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether extended attributes are enabled for this file system. The
-default value is \fBon\fR.
-.RE
-
-.sp
-.LP
+Consequently, writes to a sparse volume can fail with
+.Sy ENOSPC
+when the pool is low on space. For a sparse volume, changes to
+.Sy volsize
+are not reflected in the reservation.
+.It Sy vscan Ns = Ns Cm off | on
+The
+.Sy vscan
+property is currently not supported on
+.Fx . 
+.It Sy xattr Ns = Ns Cm off | on
+The
+.Sy xattr
+property is currently not supported on
+.Fx .
+.It Sy jailed Ns = Ns Cm off | on
+Controls whether the dataset is managed from a jail. See the
+.Qq Sx Jails
+section for more information. The default value is
+.Cm off .
+.El
+.Pp
 The following three properties cannot be changed after the file system is
 created, and therefore, should be set when the file system is created. If the
-properties are not set with the \fBzfs create\fR or \fBzpool create\fR
+properties are not set with the
+.Qq Nm Cm create
+or
+.Nm zpool Cm create
 commands, these properties are inherited from the parent dataset. If the parent
 dataset lacks these properties due to having been created prior to these
 features being supported, the new file system will have the default values for
 these properties.
-.sp
-.ne 2
-.na
-\fB\fBcasesensitivity\fR=\fBsensitive\fR | \fBinsensitive\fR | \fBmixed\fR\fR
-.ad
-.sp .6
-.RS 4n
-The \fB\fBcasesensitivity\fR property is currently not supported on FreeBSD.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBnormalization\fR = \fBnone\fR | \fBformC\fR | \fBformD\fR | \fBformKC\fR
-| \fBformKD\fR\fR
-.ad
-.sp .6
-.RS 4n
-Indicates whether the file system should perform a \fBunicode\fR normalization
-of file names whenever two file names are compared, and which normalization
-algorithm should be used. File names are always stored unmodified, names are
-normalized as part of any comparison process. If this property is set to a
-legal value other than \fBnone\fR, and the \fButf8only\fR property was left
-unspecified, the \fButf8only\fR property is automatically set to \fBon\fR. The
-default value of the \fBnormalization\fR property is \fBnone\fR. This property
-cannot be changed after the file system is created.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fButf8only\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width 4n
+.It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed
+The
+.Sy casesensitivity
+property is currently not supported on
+.Fx .
+.It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD
+Indicates whether the file system should perform a
+.Sy unicode
+normalization of file names whenever two file names are compared, and which
+normalization algorithm should be used. File names are always stored
+unmodified, names are normalized as part of any comparison process. If this
+property is set to a legal value other than
+.Cm none ,
+and the
+.Sy utf8only
+property was left unspecified, the
+.Sy utf8only
+property is automatically set to
+.Cm on .
+The default value of the
+.Sy normalization
+property is
+.Cm none .
+This property cannot be changed after the file system is created.
+.It Sy utf8only Ns = Ns Cm on | off
 Indicates whether the file system should reject file names that include
-characters that are not present in the \fBUTF-8\fR character code set. If this
-property is explicitly set to \fBoff\fR, the normalization property must either
-not be explicitly set or be set to \fBnone\fR. The default value for the
-\fButf8only\fR property is \fBoff\fR. This property cannot be changed after the
-file system is created.
-.RE
-
-.sp
-.LP
-The \fBcasesensitivity\fR, \fBnormalization\fR, and \fButf8only\fR properties
-are also new permissions that can be assigned to non-privileged users by using
-the \fBZFS\fR delegated administration feature.
-.SS "Temporary Mount Point Properties"
-.sp
-.LP
-When a file system is mounted, either through \fBmount\fR(8) for legacy mounts
-or the \fBzfs mount\fR command for normal file systems, its mount options are
-set according to its properties. The correlation between properties and mount
-options is as follows:
-.sp
-.in +2
-.nf
-    PROPERTY                MOUNT OPTION
-     devices                 devices/nodevices
-     exec                    exec/noexec
-     readonly                ro/rw
-     setuid                  setuid/nosetuid
-     xattr                   xattr/noxattr
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-In addition, these options can be set on a per-mount basis using the \fB-o\fR
+characters that are not present in the
+.Sy UTF-8
+character code set. If this property is explicitly set to
+.Cm off ,
+the normalization property must either not be explicitly set or be set to
+.Cm none .
+The default value for the
+.Sy utf8only
+property is
+.Cm off .
+This property cannot be changed after the file system is created.
+.El
+.Pp
+The
+.Sy casesensitivity , normalization , No and Sy utf8only
+properties are also new permissions that can be assigned to non-privileged
+users by using the
+.Tn ZFS
+delegated administration feature.
+.Ss Temporary Mount Point Properties
+When a file system is mounted, either through
+.Xr mount 8
+for legacy mounts or the
+.Qq Nm Cm mount
+command for normal file systems, its mount options are set according to its
+properties. The correlation between properties and mount options is as follows:
+.Bl -column -offset 4n "PROPERTY" "MOUNT OPTION"
+.It PROPERTY	MOUNT OPTION
+.It atime	atime/noatime
+.It exec	exec/noexec
+.It readonly	ro/rw
+.It setuid	suid/nosuid
+.El
+.Pp
+In addition, these options can be set on a per-mount basis using the
+.Fl o
 option, without affecting the property that is stored on disk. The values
-specified on the command line override the values stored in the dataset. The
-\fB-nosuid\fR option is an alias for \fBnodevices,nosetuid\fR. These properties
-are reported as "temporary" by the \fBzfs get\fR command. If the properties are
-changed while the dataset is mounted, the new setting overrides any temporary
-settings.
-.SS "User Properties"
-.sp
-.LP
-In addition to the standard native properties, \fBZFS\fR supports arbitrary
-user properties. User properties have no effect on \fBZFS\fR behavior, but
-applications or administrators can use them to annotate datasets (file systems,
-volumes, and snapshots).
-.sp
-.LP
-User property names must contain a colon (\fB:\fR) character to distinguish
-them from native properties. They may contain lowercase letters, numbers, and
-the following punctuation characters: colon (\fB:\fR), dash (\fB-\fR), period
-(\fB\&.\fR), and underscore (\fB_\fR). The expected convention is that the
-property name is divided into two portions such as
-\fImodule\fR\fB:\fR\fIproperty\fR, but this namespace is not enforced by
-\fBZFS\fR. User property names can be at most 256 characters, and cannot begin
-with a dash (\fB-\fR).
-.sp
-.LP
+specified on the command line override the values stored in the dataset. These 
+properties are reported as "temporary" by the
+.Qq Nm Cm get
+command. If the properties are changed while the dataset is mounted, the new
+setting overrides any temporary settings.
+.Ss User Properties
+In addition to the standard native properties,
+.Tn ZFS
+supports arbitrary user properties. User properties have no effect on
+.Tn ZFS
+behavior, but applications or administrators can use them to annotate datasets
+(file systems, volumes, and snapshots).
+.Pp
+User property names must contain a colon
+.Pq Sy \&:
+character to distinguish them from native properties. They may contain
+lowercase letters, numbers, and the following punctuation characters: colon
+.Pq Sy \&: ,
+dash
+.Pq Sy \&- ,
+period
+.Pq Sy \&.
+and underscore
+.Pq Sy \&_ .
+The expected convention is that the property name is divided into two portions
+such as
+.Em module Ns Sy \&: Ns Em property ,
+but this namespace is not enforced by
+.Tn ZFS .
+User property names can be at most 256 characters, and cannot begin with a dash
+.Pq Sy \&- .
+.Pp
 When making programmatic use of user properties, it is strongly suggested to
-use a reversed \fBDNS\fR domain name for the \fImodule\fR component of property
-names to reduce the chance that two independently-developed packages use the
-same property name for different purposes. Property names beginning with
-\fBcom.sun\fR. are reserved for use by Sun Microsystems.
-.sp
-.LP
+use a reversed
+.Tn DNS
+domain name for the
+.Ar module
+component of property names to reduce the chance that two
+independently-developed packages use the same property name for different
+purposes. Property names beginning with 
+.Em com.sun
+are reserved for use by Sun Microsystems.
+.Pp
 The values of user properties are arbitrary strings, are always inherited, and
-are never validated. All of the commands that operate on properties (\fBzfs
-list\fR, \fBzfs get\fR, \fBzfs set\fR, and so forth) can be used to manipulate
-both native properties and user properties. Use the \fBzfs inherit\fR command
-to clear a user property . If the property is not defined in any parent
+are never validated. All of the commands that operate on properties
+.Po
+.Qq Nm Cm list ,
+.Qq Nm Cm get ,
+.Qq Nm Cm set
+and so forth
+.Pc
+can be used to manipulate both native properties and user properties. Use the
+.Qq Nm Cm inherit
+command to clear a user property. If the property is not defined in any parent
 dataset, it is removed entirely. Property values are limited to 1024
 characters.
-.SH SUBCOMMANDS
-.sp
-.LP
+.Sh SUBCOMMANDS
 All subcommands that modify state are logged persistently to the pool in their
 original form.
-.sp
-.ne 2
-.na
-\fB\fBzfs ?\fR\fR
-.ad
-.br
-.na
-\fB\fBzfs rename\fR \fB-u\fR [\fB-p\fR] \fIfilesystem\fR \fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width 2n
+.It Xo
+.Nm
+.Op Fl \&?
+.Xc
+.Pp
 Displays a help message.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
-\fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
-Creates a new \fBZFS\fR file system. The file system is automatically mounted
-according to the \fBmountpoint\fR property inherited from the parent.
-.sp
-.ne 2
-.na
-\fB\fB-p\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Xo
+.Nm
+.Cm create
+.Op Fl p
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ... filesystem
+.Xc
+.Pp
+Creates a new
+.Tn ZFS
+file system. The file system is automatically mounted according to the
+.Sy mountpoint
+property inherited from the parent.
+.Bl -tag -width indent
+.It Fl p
 Creates all the non-existing parent datasets. Datasets created in this manner
-are automatically mounted according to the \fBmountpoint\fR property inherited
-from their parent. Any property specified on the command line using the
-\fB-o\fR option is ignored. If the target filesystem already exists, the
-operation completes successfully.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sets the specified property as if the command \fBzfs set\fR
-\fIproperty\fR=\fIvalue\fR was invoked at the same time the dataset was
-created. Any editable \fBZFS\fR property can also be set at creation time.
-Multiple \fB-o\fR options can be specified. An error results if the same
-property is specified in multiple \fB-o\fR options.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-u\fR\fR
-.ad
-.sp .6
-.RS 4n
-Do not remount file systems during rename. If a file system's \fBmountpoint\fR property is set to \fBlegacy\fR or \fBnone\fR, file system is not unmounted even if this option is not given.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs create\fR [\fB-ps\fR] [\fB-b\fR \fIblocksize\fR] [\fB-o\fR
-\fIproperty\fR=\fIvalue\fR] ... \fB-V\fR \fIsize\fR \fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
+are automatically mounted according to the
+.Sy mountpoint
+property inherited from their parent. Any property specified on the command
+line using the
+.Fl o
+option is ignored. If the target filesystem already exists, the operation
+completes successfully.
+.It Fl o Ar property Ns = Ns Ar value
+Sets the specified property as if the command
+.Qq Nm Cm set Ar property Ns = Ns Ar value
+was invoked at the same time the dataset was created. Any editable
+.Tn ZFS
+property can also be set at creation time. Multiple
+.Fl o
+options can be specified. An error results if the same property is specified in
+multiple
+.Fl o
+options.
+.El
+.It Xo
+.Nm
+.Cm create
+.Op Fl ps
+.Op Fl b Ar blocksize
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Fl V
+.Ar size volume
+.Xc
+.Pp
 Creates a volume of the given size. The volume is exported as a block device in
-\fB/dev/zvol/{dsk,rdsk}/\fR\fIpath\fR, where \fIpath\fR is the name of the
-volume in the \fBZFS\fR namespace. The size represents the logical size as
-exported by the device. By default, a reservation of equal size is created.
-.sp
-\fIsize\fR is automatically rounded up to the nearest 128 Kbytes to ensure that
-the volume has an integral number of blocks regardless of \fIblocksize\fR.
-.sp
-.ne 2
-.na
-\fB\fB-p\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Pa /dev/zvol/path ,
+where
+.Ar path
+is the name of the volume in the
+.Tn ZFS
+namespace. The size represents the logical size as exported by the device. By
+default, a reservation of equal size is created.
+.Pp
+.Ar size
+is automatically rounded up to the nearest 128 Kbytes to ensure that
+the volume has an integral number of blocks regardless of
+.Ar blocksize .
+.Bl -tag -width indent
+.It Fl p
 Creates all the non-existing parent datasets. Datasets created in this manner
-are automatically mounted according to the \fBmountpoint\fR property inherited
-from their parent. Any property specified on the command line using the
-\fB-o\fR option is ignored. If the target filesystem already exists, the
-operation completes successfully.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-s\fR\fR
-.ad
-.sp .6
-.RS 4n
-Creates a sparse volume with no reservation. See \fBvolsize\fR in the Native
-Properties section for more information about sparse volumes.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sets the specified property as if the \fBzfs set\fR \fIproperty\fR=\fIvalue\fR
+are automatically mounted according to the
+.Sy mountpoint
+property inherited from their parent. Any property specified on the command
+line using the
+.Fl o
+option is ignored. If the target filesystem already exists, the operation
+completes successfully.
+.It Fl s
+Creates a sparse volume with no reservation. See
+.Sy volsize
+in the
+.Qq Sx Native Properties
+section for more information about sparse volumes.
+.It Fl b Ar blocksize
+Equivalent to
+.Fl o Cm volblocksize Ns = Ns Ar blocksize .
+If this option is specified in conjunction with
+.Fl o Cm volblocksize ,
+the resulting behavior is undefined.
+.It Fl o Ar property Ns = Ns Ar value
+Sets the specified property as if the
+.Qq Nm Cm set Ar property Ns = Ns Ar value
 command was invoked at the same time the dataset was created. Any editable
-\fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options
-can be specified. An error results if the same property is specified in
-multiple \fB-o\fR options.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-b\fR \fIblocksize\fR\fR
-.ad
-.sp .6
-.RS 4n
-Equivalent to \fB-o\fR \fBvolblocksize\fR=\fIblocksize\fR. If this option is
-specified in conjunction with \fB-o\fR \fBvolblocksize\fR, the resulting
-behavior is undefined.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs destroy\fR [\fB-rRf\fR] \fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Tn ZFS
+property can also be set at creation time. Multiple
+.Fl o
+options can be specified. An error results if the same property is specified in
+multiple
+.Fl o
+options.
+.El
+.It Xo
+.Nm
+.Cm destroy
+.Op Fl fnpRrv
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.Pp
 Destroys the given dataset. By default, the command unshares any file systems
 that are currently shared, unmounts any file systems that are currently
 mounted, and refuses to destroy a dataset that has active dependents (children
 or clones).
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width indent
+.It Fl r
 Recursively destroy all children.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-R\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl R
 Recursively destroy all dependents, including cloned file systems outside the
 target hierarchy.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.sp .6
-.RS 4n
-Force an unmount of any file systems using the \fBunmount -f\fR command. This
-option has no effect on non-file systems or unmounted file systems.
-.RE
-
-Extreme care should be taken when applying either the \fB-r\fR or the \fB-R\fR
+.It Fl f
+Force an unmount of any file systems using the
+.Qq Nm Cm unmount Fl f
+command. This option has no effect on non-file systems or unmounted file
+systems.
+.It Fl n
+Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
+conjunction with the
+.Fl v
+or
+.Fl p
+flags to determine what data would be deleted.
+.It Fl p
+Print machine-parsable verbose information about the deleted data.
+.It Fl v
+Print verbose information about the deleted data.
+.El
+.Pp
+Extreme care should be taken when applying either the
+.Fl r
+or the
+.Fl R
 options, as they can destroy large portions of a pool and cause unexpected
 behavior for mounted file systems in use.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs destroy\fR [\fB-rRd\fR] \fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
-The given snapshot is destroyed immediately if and only if the \fBzfs
-destroy\fR command without the \fB-d\fR option would have destroyed it. Such
-immediate destruction would occur, for example, if the snapshot had no clones
-and the user-initiated reference count were zero.
-.sp
-If the snapshot does not qualify for immediate destruction, it is marked for
+.It Xo
+.Nm
+.Cm destroy
+.Op Fl dnpRrv
+.Sm off
+.Ar snapshot
+.Ns Op % Ns Ar snapname
+.Ns Op , Ns Ar ...
+.Sm on
+.Xc
+.Pp
+The given snapshots are destroyed immediately if and only if the
+.Qq Nm Cm destroy
+command without the
+.Fl d
+option would have destroyed it. Such immediate destruction would occur, for
+example, if the snapshot had no clones and the user-initiated reference count
+were zero.
+.Pp
+If a snapshot does not qualify for immediate destruction, it is marked for
 deferred deletion. In this state, it exists as a usable, visible snapshot until
 both of the preconditions listed above are met, at which point it is destroyed.
-.sp
-.ne 2
-.na
-\fB\fB-d\fR\fR
-.ad
-.sp .6
-.RS 4n
-Defer snapshot deletion.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Pp
+An inclusive range of snapshots may be specified by separating the
+first and last snapshots with a percent sign
+.Pq Sy % .
+The first and/or last snapshots may be left blank, in which case the
+filesystem's oldest or newest snapshot will be implied.
+.Pp
+Multiple snapshots
+(or ranges of snapshots) of the same filesystem or volume may be specified
+in a comma-separated list of snapshots.
+Only the snapshot's short name (the
+part after the
+.Sy @ )
+should be specified when using a range or comma-separated list to identify
+multiple snapshots.
+.Bl -tag -width indent
+.It Fl r
 Destroy (or mark for deferred deletion) all snapshots with this name in
 descendent file systems.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-R\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl R
 Recursively destroy all dependents.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs snapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
-\fIfilesystem at snapname\fR|\fIvolume at snapname\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl n
+Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
+conjunction with the
+.Fl v
+or
+.Fl p
+flags to determine what data would be deleted.
+.It Fl p
+Print machine-parsable verbose information about the deleted data.
+.It Fl v
+Print verbose information about the deleted data.
+.It Fl d
+Defer snapshot deletion.
+.El
+.Pp
+Extreme care should be taken when applying either the
+.Fl r
+or the
+.Fl R
+options, as they can destroy large portions of a pool and cause unexpected
+behavior for mounted file systems in use.
+.It Xo
+.Nm
+.Cm snapshot
+.Op Fl r
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Ar filesystem at snapname Ns | Ns volume at snapname
+.Xc
+.Pp
 Creates a snapshot with the given name. All previous modifications by
 successful system calls to the file system are part of the snapshot. See the
-"Snapshots" section for details.
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Qq Sx Snapshots
+section for details.
+.Bl -tag -width indent
+.It Fl r
 Recursively create snapshots of all descendent datasets. Snapshots are taken
 atomically, so that all recursive snapshots correspond to the same moment in
 time.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sets the specified property; see \fBzfs create\fR for details.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl o Ar property Ns = Ns Ar value
+Sets the specified property; see
+.Qq Nm Cm create
+for details.
+.El
+.It Xo
+.Nm
+.Cm rollback
+.Op Fl rRf
+.Ar snapshot
+.Xc
+.Pp
 Roll back the given dataset to a previous snapshot. When a dataset is rolled
 back, all data that has changed since the snapshot is discarded, and the
 dataset reverts to the state at the time of the snapshot. By default, the
 command refuses to roll back to a snapshot other than the most recent one. In
 order to do so, all intermediate snapshots must be destroyed by specifying the
-\fB-r\fR option.
-.sp
-The \fB-rR\fR options do not recursively destroy the child snapshots of a
-recursive snapshot. Only the top-level recursive snapshot is destroyed by
-either of these options. To completely roll back a recursive snapshot, you must
-rollback the individual child snapshots.
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Fl r
+option.
+.Bl -tag -width indent
+.It Fl r
 Recursively destroy any snapshots more recent than the one specified.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-R\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl R
 Recursively destroy any more recent snapshots, as well as any clones of those
 snapshots.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.sp .6
-.RS 4n
-Used with the \fB-R\fR option to force an unmount of any clone file systems
-that are to be destroyed.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
-\fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
-Creates a clone of the given snapshot. See the "Clones" section for details.
-The target dataset can be located anywhere in the \fBZFS\fR hierarchy, and is
-created as the same type as the original.
-.sp
-.ne 2
-.na
-\fB\fB-p\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl f
+Used with the
+.Fl R
+option to force an unmount of any clone file systems that are to be destroyed.
+.El
+.It Xo
+.Nm
+.Cm clone
+.Op Fl p
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ... snapshot filesystem Ns | Ns Ar volume
+.Xc
+.Pp
+Creates a clone of the given snapshot. See the
+.Qq Sx Clones
+section for details. The target dataset can be located anywhere in the
+.Tn ZFS
+hierarchy, and is created as the same type as the original.
+.Bl -tag -width indent
+.It Fl p
 Creates all the non-existing parent datasets. Datasets created in this manner
-are automatically mounted according to the \fBmountpoint\fR property inherited
-from their parent. If the target filesystem or volume already exists, the
-operation completes successfully.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sets the specified property; see \fBzfs create\fR for details.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
+are automatically mounted according to the
+.Sy mountpoint
+property inherited from their parent. If the target filesystem or volume
+already exists, the operation completes successfully.
+.It Fl o Ar property Ns = Ns Ar value
+Sets the specified property; see
+.Qq Nm Cm create
+for details.
+.El
+.It Xo
+.Nm
+.Cm promote
+.Ar clone-filesystem
+.Xc
+.Pp
 Promotes a clone file system to no longer be dependent on its "origin"
 snapshot. This makes it possible to destroy the file system that the clone was
 created from. The clone parent-child dependency relationship is reversed, so
 that the origin file system becomes a clone of the specified file system.
-.sp
+.Pp
 The snapshot that was cloned, and any snapshots previous to this snapshot, are
 now owned by the promoted clone. The space they use moves from the origin file
 system to the promoted clone, so enough space must be available to accommodate
 these snapshots. No new space is consumed by this operation, but the space
 accounting is adjusted. The promoted clone must not have any conflicting
-snapshot names of its own. The \fBrename\fR subcommand can be used to rename
-any conflicting snapshots.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs rename\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
-.ad
-.br
-.na
-\fB\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
-.ad
-.br
-.na
-\fB\fBzfs rename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR
-\fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
+snapshot names of its own. The
+.Cm rename
+subcommand can be used to rename any conflicting snapshots.
+.It Xo
+.Nm
+.Cm rename
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Xc
+.It Xo
+.Nm
+.Cm rename
+.Fl p
+.Ar filesystem Ns | Ns Ar volume
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.It Xo
+.Nm
+.Cm rename
+.Fl u
+.Op Fl p
+.Ar filesystem filesystem
+.Xc
+.Pp
 Renames the given dataset. The new target can be located anywhere in the
-\fBZFS\fR hierarchy, with the exception of snapshots. Snapshots can only be
-renamed within the parent file system or volume. When renaming a snapshot, the
-parent file system of the snapshot does not need to be specified as part of the
-second argument. Renamed file systems can inherit new mount points, in which
-case they are unmounted and remounted at the new mount point.
-.sp
-.ne 2
-.na
-\fB\fB-p\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Tn ZFS
+hierarchy, with the exception of snapshots. Snapshots can only be renamed
+within the parent file system or volume. When renaming a snapshot, the parent
+file system of the snapshot does not need to be specified as part of the second
+argument. Renamed file systems can inherit new mount points, in which case they
+are unmounted and remounted at the new mount point.
+.Bl -tag -width indent
+.It Fl p
 Creates all the nonexistent parent datasets. Datasets created in this manner
-are automatically mounted according to the \fBmountpoint\fR property inherited
-from their parent.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
+are automatically mounted according to the
+.Sy mountpoint
+property inherited from their parent.
+.It Fl u
+Do not remount file systems during rename. If a file system's
+.Sy mountpoint
+property is set to
+.Cm legacy
+or
+.Cm none ,
+file system is not unmounted even if this option is not given.
+.El
+.It Xo
+.Nm
+.Cm rename
+.Fl r
+.Ar snapshot snapshot
+.Xc
+.Pp
 Recursively rename the snapshots of all descendent datasets. Snapshots are the
 only dataset that can be renamed recursively.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-H\fR] [\fB-o\fR
-\fIproperty\fR[,\fI\&...\fR]] [ \fB-t\fR \fItype\fR[,\fI\&...\fR]] [ \fB-s\fR
-\fIproperty\fR ] ... [ \fB-S\fR \fIproperty\fR ] ...
-[\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ...\fR
-.ad
-.sp .6
-.RS 4n
+.It Xo
+.Nm
+.Cm list
+.Op Fl r Ns | Ns Fl d Ar depth
+.Op Fl H
+.Op Fl o Ar property Ns Op , Ns Ar ...
+.Op Fl t Ar type Ns Op , Ns Ar ...
+.Op Fl s Ar property
+.Ar ...
+.Op Fl S Ar property
+.Ar ...
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Xc
+.Pp
 Lists the property information for the given datasets in tabular form. If
 specified, you can list property information by the absolute pathname or the
 relative pathname. By default, all file systems and volumes are displayed.
-Snapshots are displayed if the \fBlistsnaps\fR property is \fBon\fR (the
-default is \fBoff\fR) . The following fields are displayed,
-\fBname,used,available,referenced,mountpoint\fR.
-.sp
-.ne 2
-.na
-\fB\fB-H\fR\fR
-.ad
-.sp .6
-.RS 4n
+Snapshots are displayed if the
+.Sy listsnaps
+property is
+.Cm on
+(the default is
+.Cm off Ns ).
+The following fields are displayed,
+.Sy name , used , available , referenced , mountpoint .
+.Bl -tag -width indent
+.It Fl r
+Recursively display any children of the dataset on the command line.
+.It Fl d Ar depth
+Recursively display any children of the dataset, limiting the recursion to
+.Ar depth .
+A depth of
+.Sy 1
+will display only the dataset and its direct children.
+.It Fl H
 Used for scripting mode. Do not print headers and separate fields by a single
 tab instead of arbitrary white space.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
-Recursively display any children of the dataset on the command line.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-d\fR \fIdepth\fR\fR
-.ad
-.sp .6
-.RS 4n
-Recursively display any children of the dataset, limiting the recursion to
-\fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct
-children.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIproperty\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl o Ar property Ns Op , Ns Ar ...
 A comma-separated list of properties to display. The property must be:
-.RS +4
-.TP
-.ie t \(bu
-.el o
-One of the properties described in the "Native Properties" section
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.Bl -bullet -offset 2n
+.It
+One of the properties described in the
+.Qq Sx Native Properties
+section
+.It
 A user property
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-The value \fBname\fR to display the dataset name
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-The value \fBspace\fR to display space usage properties on file systems and
-volumes. This is a shortcut for specifying \fB-o
-name,avail,used,usedsnap,usedds,usedrefreserv,usedchild\fR \fB-t
-filesystem,volume\fR syntax.
-.RE
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-s\fR \fIproperty\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It
+The value
+.Cm name
+to display the dataset name
+.It
+The value
+.Cm space
+to display space usage properties on file systems and volumes. This is a
+shortcut for specifying
+.Fl o
+.Sy name,avail,used,usedsnap,usedds,usedrefreserv,usedchild
+.Fl t
+.Sy filesystem,volume
+syntax.
+.El
+.It Fl t Ar type Ns Op , Ns Ar ...
+A comma-separated list of types to display, where
+.Ar type
+is one of
+.Sy filesystem , snapshot , volume , No or Sy all .
+For example, specifying
+.Fl o Cm snapshot
+displays only snapshots.
+.It Fl s Ar property
 A property for sorting the output by column in ascending order based on the
 value of the property. The property must be one of the properties described in
-the "Properties" section, or the special value \fBname\fR to sort by the
-dataset name. Multiple properties can be specified at one time using multiple
-\fB-s\fR property options. Multiple \fB-s\fR options are evaluated from left to
-right in decreasing order of importance.
-.sp
+the
+.Qq Sx Properties
+section, or the special value
+.Cm name
+to sort by the dataset name. Multiple properties can be specified at one time
+using multiple
+.Fl s
+property options. Multiple
+.Fl s
+options are evaluated from left to right in decreasing order of importance.
+.Pp
 The following is a list of sorting criteria:
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.Bl -bullet -offset 2n
+.It
 Numeric types sort in numeric order.
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.It
 String types sort in alphabetical order.
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.It
 Types inappropriate for a row sort that row to the literal bottom, regardless
 of the specified ordering.
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-If no sorting options are specified the existing behavior of \fBzfs list\fR is
-preserved.
-.RE
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-S\fR \fIproperty\fR\fR
-.ad
-.sp .6
-.RS 4n
-Same as the \fB-s\fR option, but sorts by property in descending order.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-t\fR \fItype\fR\fR
-.ad
-.sp .6
-.RS 4n
-A comma-separated list of types to display, where \fItype\fR is one of
-\fBfilesystem\fR, \fBsnapshot\fR , \fBvolume\fR, or \fBall\fR. For example,
-specifying \fB-t snapshot\fR displays only snapshots.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR
-\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
-.ad
-.sp .6
-.RS 4n
+.It
+If no sorting options are specified the existing behavior of
+.Qq Nm Cm list
+is preserved.
+.El
+.It Fl S Ar property
+Same as the
+.Fl s
+option, but sorts by property in descending order.
+.El
+.It Xo
+.Nm
+.Cm set
+.Ar property Ns = Ns Ar value
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Xc
+.Pp
 Sets the property to the given value for each dataset. Only some properties can
 be edited. See the "Properties" section for more information on what properties
 can be set and acceptable values. Numeric values can be specified as exact
-values, or in a human-readable form with a suffix of \fBB\fR, \fBK\fR, \fBM\fR,
-\fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, \fBZ\fR (for bytes, kilobytes, megabytes,
-gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User
-properties can be set on snapshots. For more information, see the "User
-Properties" section.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs get\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hp\fR] [\fB-o\fR
-\fIfield\fR[,...] [\fB-s\fR \fIsource\fR[,...] "\fIall\fR" |
-\fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
-.ad
-.sp .6
-.RS 4n
+values, or in a human-readable form with a suffix of
+.Sy B , K , M , G , T , P , E , Z
+(for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or
+zettabytes, respectively). User properties can be set on snapshots. For more
+information, see the
+.Qq Sx User Properties
+section.
+.It Xo
+.Nm
+.Cm get
+.Op Fl r Ns | Ns Fl d Ar depth
+.Op Fl Hp
+.Op Fl o Ar all | field Ns Op , Ns Ar ...
+.Op Fl s Ar source Ns Op , Ns Ar ...
+.Ar all | property Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Xc
+.Pp
 Displays properties for the given datasets. If no datasets are specified, then
 the command displays properties for all datasets on the system. For each
 property, the following columns are displayed:
-.sp
-.in +2
-.nf
-    name      Dataset name
-     property  Property name
-     value     Property value
-     source    Property source. Can either be local, default,
-               temporary, inherited, or none (-).
-.fi
-.in -2
-.sp
-
-All columns are displayed by default, though this can be controlled by using
-the \fB-o\fR option. This command takes a comma-separated list of properties as
-described in the "Native Properties" and "User Properties" sections.
-.sp
-The special value \fBall\fR can be used to display all properties that apply to
-the given dataset's type (filesystem, volume, or snapshot).
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Pp
+.Bl -hang -width "property" -offset indent -compact
+.It name
+Dataset name
+.It property
+Property name
+.It value
+Property value
+.It source
+Property source. Can either be local, default, temporary, inherited, or none
+(\&-).
+.El
+.Pp
+All columns except the
+.Sy RECEIVED
+column are displayed by default. The columns to display can be specified
+by using the
+.Fl o
+option. This command takes a comma-separated list of properties as described in
+the
+.Qq Sx Native Properties
+and
+.Qq Sx User Properties
+sections.
+.Pp
+The special value
+.Cm all
+can be used to display all properties that apply to the given dataset's type
+(filesystem, volume, or snapshot).
+.Bl -tag -width indent
+.It Fl r
 Recursively display properties for any children.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-d\fR \fIdepth\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl d Ar depth
 Recursively display any children of the dataset, limiting the recursion to
-\fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct
-children.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-H\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Ar depth .
+A depth of
+.Sy 1
+will display only the dataset and its direct children.
+.It Fl H
 Display output in a form more easily parsed by scripts. Any headers are
 omitted, and fields are explicitly separated by a single tab instead of an
 arbitrary amount of space.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIfield\fR\fR
-.ad
-.sp .6
-.RS 4n
-A comma-separated list of columns to display. \fBname,property,value,source\fR
-is the default value.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-s\fR \fIsource\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl p
+Display numbers in parseable (exact) values.
+.It Fl o Cm all | Ar field Ns Op , Ns Ar ...
+A comma-separated list of columns to display. Supported values are
+.Sy name,property,value,received,source .
+Default values are
+.Sy name,property,value,source .
+The keyword
+.Cm all
+specifies all columns.
+.It Fl s Ar source Ns Op , Ns Ar ...
 A comma-separated list of sources to display. Those properties coming from a
 source other than those in this list are ignored. Each source must be one of
-the following: \fBlocal,default,inherited,temporary,none\fR. The default value
-is all sources.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-p\fR\fR
-.ad
-.sp .6
-.RS 4n
-Display numbers in parseable (exact) values.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs inherit\fR [\fB-r\fR] \fIproperty\fR
-\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
-.ad
-.sp .6
-.RS 4n
+the following:
+.Sy local,default,inherited,temporary,received,none .
+The default value is all sources.
+.El
+.It Xo
+.Nm
+.Cm inherit
+.Op Fl rS
+.Ar property
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Xc
+.Pp
 Clears the specified property, causing it to be inherited from an ancestor. If
 no ancestor has the property set, then the default value is used. See the
-"Properties" section for a listing of default values, and details on which
-properties can be inherited.
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Qq Sx Properties
+section for a listing of default values, and details on which properties can be
+inherited.
+.Bl -tag -width indent
+.It Fl r
 Recursively inherit the given property for all children.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs upgrade\fR [\fB-v\fR]\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl S
+For properties with a received value, revert to this value. This flag has no
+effect on properties that do not have a received value.
+.El
+.It Xo
+.Nm
+.Cm upgrade
+.Op Fl v
+.Xc
+.Pp
 Displays a list of file systems that are not the most recent version.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR |
-\fIfilesystem\fR]\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width indent
+.It Fl v
+Displays
+.Tn ZFS
+filesystem versions supported by the current software. The current
+.Tn ZFS
+filesystem version and all previous supported versions are displayed, along
+with an explanation of the features provided with each version.
+.El
+.It Xo
+.Nm
+.Cm upgrade
+.Op Fl r
+.Op Fl V Ar version
+.Fl a | Ar filesystem
+.Xc
+.Pp
 Upgrades file systems to a new on-disk version. Once this is done, the file
 systems will no longer be accessible on systems running older versions of the
-software. \fBzfs send\fR streams generated from new snapshots of these file
-systems cannot be accessed on systems running older versions of the software.
-.sp
+software.
+.Qq Nm Cm send
+streams generated from new snapshots of these file systems cannot be accessed
+on systems running older versions of the software.
+.Pp
 In general, the file system version is independent of the pool version. See
-\fBzpool\fR(8) for information on the \fBzpool upgrade\fR command.
-.sp
+.Xr zpool 8
+for information on the
+.Nm zpool Cm upgrade
+command.
+.Pp
 In some cases, the file system version and the pool version are interrelated
 and the pool version must be upgraded before the file system version can be
 upgraded.
-.sp
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width indent
+.It Fl r
+Upgrade the specified file system and all descendent file systems.
+.It Fl V Ar version
+Upgrade to the specified
+.Ar version .
+If the
+.Fl V
+flag is not specified, this command upgrades to the most recent version. This
+option can only be used to increase the version number, and only up to the most
+recent version supported by this software.
+.It Fl a
 Upgrade all file systems on all imported pools.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Ar filesystem
 Upgrade the specified file system.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
-Upgrade the specified file system and all descendent file systems
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-V\fR \fIversion\fR\fR
-.ad
-.sp .6
-.RS 4n
-Upgrade to the specified \fIversion\fR. If the \fB-V\fR flag is not specified,
-this command upgrades to the most recent version. This option can only be used
-to increase the version number, and only up to the most recent version
-supported by this software.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs userspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR
-\fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR |
-\fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm userspace
+.Op Fl niHp
+.Op Fl o Ar field Ns Op , Ns Ar ...
+.Op Fl sS Ar field
+.Ar ...
+.Op Fl t Ar type Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar snapshot
+.Xc
+.Pp
 Displays space consumed by, and quotas on, each user in the specified
-filesystem or snapshot. This corresponds to the \[email protected]\fR\fIuser\fR and
-\[email protected]\fR\fIuser\fR properties.
-.sp
-.ne 2
-.na
-\fB\fB-n\fR\fR
-.ad
-.sp .6
-.RS 4n
+filesystem or snapshot. This corresponds to the
+.Sy [email protected] Ns Ar user
+and
+.Sy [email protected] Ns Ar user
+properties.
+.Bl -tag -width indent
+.It Fl n
 Print numeric ID instead of user/group name.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-H\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl H
 Do not print headers, use tab-delimited output.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-p\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl p
 Use exact (parseable) numeric output.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIfield\fR[,...]\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl o Ar field Ns Op , Ns Ar ...
 Display only the specified fields from the following set,
-\fBtype,name,used,quota\fR.The default is to display all fields.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-s\fR \fIfield\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified
-multiple times to sort first by one field, then by another. The default is
-\fB-s type\fR \fB-s name\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-S\fR \fIfield\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sort by this field in reverse order. See \fB-s\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-t\fR \fItype\fR[,...]\fR
-.ad
-.sp .6
-.RS 4n
+.Sy type,name,used,quota .
+The default is to display all fields.
+.It Fl s Ar field
+Sort output by this field. The
+.Fl s
+and
+.Fl S
+flags may be specified multiple times to sort first by one field, then by
+another. The default is
+.Fl s Cm type Fl s Cm name .
+.It Fl S Ar field
+Sort by this field in reverse order. See
+.Fl s .
+.It Fl t Ar type Ns Op , Ns Ar ...
 Print only the specified types from the following set,
-\fBall,posixuser,smbuser,posixgroup,smbgroup\fR.
-.sp
-The default is \fB-t posixuser,smbuser\fR
-.sp
+.Sy all,posixuser,smbuser,posixgroup,smbgroup .
+.Pp
+The default is
+.Fl t Cm posixuser,smbuser .
+.Pp
 The default can be changed to include group types.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-i\fR\fR
-.ad
-.sp .6
-.RS 4n
-Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
-Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR \fB-l\fR) perform
-this translation, so the \fB-i\fR option allows the output from \fBzfs
-userspace\fR to be compared directly with those utilities. However, \fB-i\fR
-may lead to confusion if some files were created by an SMB user before a
-SMB-to-POSIX name mapping was established. In such a case, some files are owned
-by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option
-will report that the POSIX entity has the total usage and quota for both.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs groupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR
-\fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR |
-\fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl i
+Translate SID to POSIX ID. This flag has currently no effect on
+.Fx .
+.El
+.It Xo
+.Nm
+.Cm groupspace
+.Op Fl niHp
+.Op Fl o Ar field Ns Op , Ns Ar ...
+.Op Fl sS Ar field
+.Ar ...
+.Op Fl t Ar type Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar snapshot
+.Xc
+.Pp
 Displays space consumed by, and quotas on, each group in the specified
-filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR,
-except that the default types to display are \fB-t posixgroup,smbgroup\fR.
-.sp
-.in +2
-.nf
--
-.fi
-.in -2
-.sp
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs mount\fR\fR
-.ad
-.sp .6
-.RS 4n
-Displays all \fBZFS\fR file systems currently mounted.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR |
-\fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
-Mounts \fBZFS\fR file systems. Invoked automatically as part of the boot
-process.
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIoptions\fR\fR
-.ad
-.sp .6
-.RS 4n
+filesystem or snapshot. This subcommand is identical to
+.Qq Nm Cm userspace ,
+except that the default types to display are
+.Fl t Sy posixgroup,smbgroup .
+.It Xo
+.Nm
+.Cm mount
+.Xc
+.Pp
+Displays all
+.Tn ZFS
+file systems currently mounted.
+.Bl -tag -width indent
+.It Fl f
+.El
+.It Xo
+.Nm
+.Cm mount
+.Op Fl vO
+.Op Fl o Ar property Ns Op , Ns Ar ...
+.Fl a | Ar filesystem
+.Xc
+.Pp
+Mounts
+.Tn ZFS
+file systems.
+.Bl -tag -width indent
+.It Fl v
+Report mount progress.
+.It Fl O
+Perform an overlay mount. Overlay mounts are not supported on
+.Fx .
+.It Fl o Ar property Ns Op , Ns Ar ...
 An optional, comma-separated list of mount options to use temporarily for the
-duration of the mount. See the "Temporary Mount Point Properties" section for
-details.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-O\fR\fR
-.ad
-.sp .6
-.RS 4n
-Perform an overlay mount. See \fBmount\fR(8) for more information.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-v\fR\fR
-.ad
-.sp .6
-.RS 4n
-Report mount progress.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.sp .6
-.RS 4n
-Mount all available \fBZFS\fR file systems. Invoked automatically as part of
-the boot process.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
+duration of the mount. See the
+.Qq Sx Temporary Mount Point Properties
+section for details.
+.It Fl a
+Mount all available
+.Tn ZFS
+file systems.
+This command may be executed on
+.Fx
+system startup by
+.Pa /etc/rc.d/zfs .
+For more information, see variable
+.Va zfs_enable
+in
+.Xr rc.conf 5 .
+.It Ar filesystem
 Mount the specified filesystem.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
-.ad
-.sp .6
-.RS 4n
-Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as
-part of the shutdown process.
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm unmount
+.Op Fl f
+.Fl a | Ar filesystem Ns | Ns Ar mountpoint
+.Xc
+.Pp
+Unmounts currently mounted
+.Tn ZFS
+file systems.
+.Bl -tag -width indent
+.It Fl f
 Forcefully unmount the file system, even if it is currently in use.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.sp .6
-.RS 4n
-Unmount all available \fBZFS\fR file systems. Invoked automatically as part of
-the boot process.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIfilesystem\fR|\fImountpoint\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl a
+Unmount all available
+.Tn ZFS
+file systems.
+.It Ar filesystem | mountpoint
 Unmount the specified filesystem. The command can also be given a path to a
-\fBZFS\fR file system mount point on the system.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs share\fR \fB-a\fR | \fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
-Shares available \fBZFS\fR file systems.
-.sp
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.sp .6
-.RS 4n
-Share all available \fBZFS\fR file systems. Invoked automatically as part of
-the boot process.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
-Share the specified filesystem according to the \fBsharenfs\fR and
-\fBsharesmb\fR properties. File systems are shared when the \fBsharenfs\fR or
-\fBsharesmb\fR property is set.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs unshare\fR \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
-.ad
-.sp .6
-.RS 4n
-Unshares currently shared \fBZFS\fR file systems. This is invoked automatically
-as part of the shutdown process.
-.sp
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.sp .6
-.RS 4n
-Unshare all available \fBZFS\fR file systems. Invoked automatically as part of
-the boot process.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIfilesystem\fR|\fImountpoint\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Tn ZFS
+file system mount point on the system.
+.El
+.It Xo
+.Nm
+.Cm share
+.Fl a | Ar filesystem
+.Xc
+.Pp
+Shares
+.Tn ZFS
+file systems that have the
+.Sy sharenfs
+property set.
+.Bl -tag -width indent
+.It Fl a
+Share all
+.Tn ZFS
+file systems that have the
+.Sy sharenfs
+property set.
+This command may be executed on
+.Fx
+system startup by
+.Pa /etc/rc.d/zfs .
+For more information, see variable
+.Va zfs_enable
+in
+.Xr rc.conf 5 .
+.It Ar filesystem
+Share the specified filesystem according to the
+.Tn sharenfs
+property. File systems are shared when the
+.Tn sharenfs
+property is set.
+.El
+.It Xo
+.Nm
+.Cm unshare
+.Fl a | Ar filesystem Ns | Ns Ar mountpoint
+.Xc
+.Pp
+Unshares
+.Tn ZFS
+file systems that have the
+.Tn sharenfs
+property set.
+.Bl -tag -width indent
+.It Fl a
+Unshares
+.Tn ZFS
+file systems that have the
+.Sy sharenfs
+property set.
+This command may be executed on
+.Fx
+system shutdown by
+.Pa /etc/rc.d/zfs .
+For more information, see variable
+.Va zfs_enable
+in
+.Xr rc.conf 5 .
+.It Ar filesystem | mountpoint
 Unshare the specified filesystem. The command can also be given a path to a
-\fBZFS\fR file system shared on the system.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs send\fR [\fB-vR\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR]
-\fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
-Creates a stream representation of the second \fIsnapshot\fR, which is written
-to standard output. The output can be redirected to a file or to a different
-system (for example, using \fBssh\fR(1). By default, a full stream is
-generated.
-.sp
-.ne 2
-.na
-\fB\fB-i\fR \fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
-Generate an incremental stream from the first \fIsnapshot\fR to the second
-\fIsnapshot\fR. The incremental source (the first \fIsnapshot\fR) can be
-specified as the last component of the snapshot name (for example, the part
-after the \[email protected]\fR), and it is assumed to be from the same file system as the
-second \fIsnapshot\fR.
-.sp
+.Tn ZFS
+file system shared on the system.
+.El
+.It Xo
+.Nm
+.Cm send
+.Op Fl DnPpRrv
+.Op Fl i Ar snapshot | Fl I Ar snapshot
+.Ar snapshot
+.Xc
+.Pp
+Creates a stream representation of the last
+.Ar snapshot
+argument (not part of
+.Fl i
+or
+.Fl I Ns )
+which is written to standard output. The output can be redirected to
+a file or to a different system (for example, using
+.Xr ssh 1 Ns ).
+By default, a full stream is generated.
+.Bl -tag -width indent
+.It Fl i Ar snapshot
+Generate an incremental stream from the
+.Fl i Ar snapshot
+to the last
+.Ar snapshot .
+The incremental source (the
+.Fl i Ar snapshot Ns )
+can be specified as the last component of the snapshot name (for example, the
+part after the
+.Sy @ Ns ),
+and it is assumed to be from the same file system as the last
+.Ar snapshot .
+.Pp
 If the destination is a clone, the source may be the origin snapshot, which
-must be fully specified (for example, \fBpool/fs at origin\fR, not just
-\fB at origin\fR).
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-I\fR \fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
-Generate a stream package that sends all intermediary snapshots from the first
-snapshot to the second snapshot. For example, \fB-I @a fs at d\fR is similar to
-\fB-i @a fs at b; -i @b fs at c; -i @c fs at d\fR. The incremental source snapshot may
-be specified as with the \fB-i\fR option.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-R\fR\fR
-.ad
-.sp .6
-.RS 4n
+must be fully specified (for example, 
+.Cm pool/fs at origin ,
+not just
+.Cm @origin Ns ).
+.It Fl I Ar snapshot
+Generate a stream package that sends all intermediary snapshots from the
+.Fl I Ar snapshot to the last
+.Ar snapshot . For example,
+.Ic -I @a fs at d
+is similar to
+.Ic -i @a fs at b; -i @b fs at c; -i @c fs at d .
+The incremental source snapshot may be specified as with the
+.Fl i
+option.
+.It Fl R
 Generate a replication stream package, which will replicate the specified
 filesystem, and all descendent file systems, up to the named snapshot. When
 received, all properties, snapshots, descendent file systems, and clones are
 preserved.
-.sp
-If the \fB-i\fR or \fB-I\fR flags are used in conjunction with the \fB-R\fR
+.Pp
+If the
+.Fl i
+or
+.Fl I
+flags are used in conjunction with the
+.Fl R
 flag, an incremental replication stream is generated. The current values of
 properties, and current snapshot and file system names are set when the stream
-is received. If the \fB-F\fR flag is specified when this stream is received,
-snapshots and file systems that do not exist on the sending side are destroyed.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-v\fR\fR
-.ad
-.sp .6
-.RS 4n
+is received. If the
+.Fl F
+flag is specified when this stream is received, snapshots and file systems that
+ do not exist on the sending side are destroyed.
+.It Fl D
+Generate a deduplicated stream. Blocks which would have been sent multiple
+times in the send stream will only be sent once.  The receiving system must
+also support this feature to recieve a deduplicated stream.  This flag can
+be used regardless of the dataset's
+.Sy dedup
+property, but performance will be much better if the filesystem uses a
+dedup-capable checksum (eg.
+.Sy sha256 Ns ).
+.It Fl r
+Recursively send all descendant snapshots.  This is similar to the
+.Fl R
+flag, but information about deleted and renamed datasets is not included, and
+property information is only included if the
+.Fl p
+flag is specified.
+.It Fl p
+Include the dataset's properties in the stream. This flag is implicit when
+.Fl R
+is specified. The receiving system must also support this feature.
+.It Fl n
+Do a dry-run ("No-op") send.  Do not generate any actual send data.  This is
+useful in conjunction with the
+.Fl v
+or
+.Fl P
+flags to determine what data will be sent.
+.It Fl P
+Print machine-parsable verbose information about the stream package generated.
+.It Fl v
 Print verbose information about the stream package generated.
-.RE
-
+.El
+.Pp
 The format of the stream is committed. You will be able to receive your streams
-on future versions of \fBZFS\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs receive\fR [\fB-vnFu\fR]
-\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
-.ad
-.br
-.na
-\fB\fBzfs receive\fR [\fB-vnFu\fR] \fB-d\fR \fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
+on future versions of
+.Tn ZFS .
+.It Xo
+.Nm
+.Cm receive
+.Op Fl vnFu
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
+.Xc
+.It Xo
+.Nm
+.Cm receive
+.Op Fl vnFu
+.Op Fl d | e
+.Ar filesystem
+.Xc
+.Pp
 Creates a snapshot whose contents are as specified in the stream provided on
 standard input. If a full stream is received, then a new file system is created
-as well. Streams are created using the \fBzfs send\fR subcommand, which by
-default creates a full stream. \fBzfs recv\fR can be used as an alias for
-\fBzfs receive\fR.
-.sp
+as well. Streams are created using the
+.Qq Nm Cm send
+subcommand, which by default creates a full stream.
+.Qq Nm Cm recv
+can be used as an alias for
+.Qq Nm Cm receive .
+.Pp
 If an incremental stream is received, then the destination file system must
 already exist, and its most recent snapshot must match the incremental stream's
-source. For \fBzvols\fR, the destination device link is destroyed and
-recreated, which means the \fBzvol\fR cannot be accessed during the
-\fBreceive\fR operation.
-.sp
+source. For
+.Sy zvol Ns s,
+the destination device link is destroyed and recreated, which means the
+.Sy zvol
+cannot be accessed during the
+.Sy receive
+operation.
+.Pp
 When a snapshot replication package stream that is generated by using the
-\fBzfs send\fR \fB-R\fR command is  received, any snapshots that do not exist
-on the sending location are destroyed by using the \fBzfs destroy\fR \fB-d\fR
+.Qq Nm Cm send Fl R
+command is received, any snapshots that do not exist on the sending location
+are destroyed by using the
+.Qq Nm Cm destroy Fl d
 command.
-.sp
+.Pp
 The name of the snapshot (and file system, if a full stream is received) that
-this subcommand creates depends on the argument type and the \fB-d\fR option.
-.sp
-If the argument is a snapshot name, the specified \fIsnapshot\fR is created. If
-the argument is a file system or volume name, a snapshot with the same name as
-the sent snapshot is created within the specified \fIfilesystem\fR or
-\fIvolume\fR. If the \fB-d\fR option is specified, the snapshot name is
-determined by appending the sent snapshot's name to the specified
-\fIfilesystem\fR. If the \fB-d\fR option is specified, any required file
-systems within the specified one are created.
-.sp
-.ne 2
-.na
-\fB\fB-d\fR\fR
-.ad
-.sp .6
-.RS 4n
-Use the name of the sent snapshot to determine the name of the new snapshot as
-described in the paragraph above.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-u\fR\fR
-.ad
-.sp .6
-.RS 4n
+this subcommand creates depends on the argument type and the
+.Fl d
+or
+.Fl e
+option.
+.Pp
+If the argument is a snapshot name, the specified
+.Ar snapshot
+is created. If the argument is a file system or volume name, a snapshot with
+the same name as the sent snapshot is created within the specified
+.Ar filesystem
+or
+.Ar volume .
+If the
+.Fl d
+or
+.Fl e
+option is specified, the snapshot name is determined by appending the sent
+snapshot's name to the specified
+.Ar filesystem .
+If the
+.Fl d
+option is specified, all but the pool name of the sent snapshot path is
+appended (for example,
+.Sy b/c at 1
+appended from sent snapshot
+.Sy a/b/c at 1 Ns ),
+and if the
+.Fl e
+option is specified, only the tail of the sent snapshot path is appended (for
+example,
+.Sy c at 1
+appended from sent snapshot
+.Sy a/b/c at 1 Ns ).
+In the case of
+.Fl d ,
+any file systems needed to replicate the path of the sent snapshot are created
+within the specified file system.
+.Bl -tag -width indent
+.It Fl d
+Use the full sent snapshot path without the first element (without pool name)
+to determine the name of the new snapshot as described in the paragraph above.
+.It Fl e
+Use only the last element of the sent snapshot path to determine the name of
+the new snapshot as described in the paragraph above.
+.It Fl u
 File system that is associated with the received stream is not mounted.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-v\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl v
 Print verbose information about the stream and the time required to perform the
 receive operation.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-n\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl n
 Do not actually receive the stream. This can be useful in conjunction with the
-\fB-v\fR option to verify the name the receive operation would use.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-F\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl v
+option to verify the name the receive operation would use.
+.It Fl F
 Force a rollback of the file system to the most recent snapshot before
 performing the receive operation. If receiving an incremental replication
-stream (for example, one generated by \fBzfs send -R -[iI]\fR), destroy
-snapshots and file systems that do not exist on the sending side.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
+stream (for example, one generated by
+.Qq Nm Cm send Fl R Fi iI Ns ) ,
+destroy snapshots and file systems that do not exist on the sending side.
+.El
+.It Xo
+.Nm
+.Cm allow
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.Pp
 Displays permissions that have been delegated on the specified filesystem or
-volume. See the other forms of \fBzfs allow\fR for more information.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]
-\fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
-.ad
-.br
-.na
-\fB\fBzfs allow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...]
-\fIfilesystem\fR | \fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
-Delegates \fBZFS\fR administration permission for the file systems to
-non-privileged users.
-.sp
-.ne 2
-.na
-\fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
-.ad
-.sp .6
-.RS 4n
+volume. See the other forms of
+.Qq Nm Cm allow
+for more information.
+.It Xo
+.Nm
+.Cm allow
+.Op Fl ldug
+.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.It Xo
+.Nm
+.Cm allow
+.Op Fl ld
+.Fl e
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.Pp
+Delegates
+.Tn ZFS
+administration permission for the file systems to non-privileged users.
+.Bl -tag -width indent
+.It Xo
+.Op Fl ug
+.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
+.Xc
 Specifies to whom the permissions are delegated. Multiple entities can be
-specified as a comma-separated list. If neither of the \fB-ug\fR options are
-specified, then the argument is interpreted preferentially as the keyword
-"everyone", then as a user name, and lastly as a group name. To specify a user
-or group named "everyone", use the \fB-u\fR or \fB-g\fR options. To specify a
-group with the same name as a user, use the \fB-g\fR options.
-.RE
-
-.sp
-.ne 2
-.na
-\fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
-.ad
-.sp .6
-.RS 4n
+specified as a comma-separated list. If neither of the
+.Fl ug
+options are specified, then the argument is interpreted preferentially as the
+keyword "everyone", then as a user name, and lastly as a group name. To specify
+a user or group named "everyone", use the
+.Fl u
+or
+.Fl g
+options. To specify a group with the same name as a user, use the
+.Fl g
+option.
+.It Xo
+.Op Fl e
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Xc
 Specifies that the permissions be delegated to "everyone." Multiple permissions
 may be specified as a comma-separated list. Permission names are the same as
-\fBZFS\fR subcommand and property names. See the property list below. Property
-set names, which begin with an at sign (\[email protected]\fR) , may be specified. See the
-\fB-s\fR form below for details.
-.RE
-
-.sp
-.ne 2
-.na
-\fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
-Specifies where the permissions are delegated. If neither of the \fB-ld\fR
+.Tn ZFS
+subcommand and property names. See the property list below. Property set names,
+which begin with an at sign
+.Pq Sy @ ,
+may be specified. See the
+.Fl s
+form below for details.
+.It Xo
+.Op Fl ld
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+Specifies where the permissions are delegated. If neither of the
+.Fl ld
 options are specified, or both are, then the permissions are allowed for the
-file system or volume, and all of its descendents. If only the \fB-l\fR option
-is used, then is allowed "locally" only for the specified file system. If only
-the \fB-d\fR option is used, then is allowed only for the descendent file
-systems.
-.RE
-
-.RE
-
-.sp
-.LP
-Permissions are generally the ability to use a \fBZFS\fR subcommand or change a
-\fBZFS\fR property. The following permissions are available:
-.sp
-.in +2
-.nf
-NAME             TYPE           NOTES
-allow            subcommand     Must also have the permission that is being
-                                allowed
-clone            subcommand     Must also have the 'create' ability and 'mount'
-                                ability in the origin file system
-create           subcommand     Must also have the 'mount' ability
-destroy          subcommand     Must also have the 'mount' ability
-mount            subcommand     Allows mount/umount of ZFS datasets
-promote          subcommand     Must also have the 'mount'
-                                and 'promote' ability in the origin file system
-receive          subcommand     Must also have the 'mount' and 'create' ability
-rename           subcommand     Must also have the 'mount' and 'create'
-                                ability in the new parent
-rollback         subcommand     Must also have the 'mount' ability
-send             subcommand
-share            subcommand     Allows sharing file systems over NFS or SMB
-                                protocols
-snapshot         subcommand     Must also have the 'mount' ability
-groupquota       other          Allows accessing any groupquota at ... property
-groupused        other          Allows reading any groupused at ... property
-userprop         other          Allows changing any user property
-userquota        other          Allows accessing any userquota at ... property
-userused         other          Allows reading any userused at ... property
-
-aclinherit       property
-aclmode          property
-atime            property
-canmount         property
-casesensitivity  property
-checksum         property
-compression      property
-copies           property
-devices          property
-exec             property
-jailed           property
-mountpoint       property
-nbmand           property
-normalization    property
-primarycache     property
-quota            property
-readonly         property
-recordsize       property
-refquota         property
-refreservation   property
-reservation      property
-secondarycache   property
-setuid           property
-sharenfs         property
-sharesmb         property
-snapdir          property
-utf8only         property
-version          property
-volblocksize     property
-volsize          property
-vscan            property
-xattr            property
-.fi
-.in -2
-.sp
-
-.sp
-.ne 2
-.na
-\fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...]
-\fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
+file system or volume, and all of its descendents. If only the
+.Fl l
+option is used, then is allowed "locally" only for the specified file system.
+If only the
+.Fl d
+option is used, then is allowed only for the descendent file systems.
+.El
+.Pp
+Permissions are generally the ability to use a
+.Tn ZFS
+subcommand or change a
+.Tn ZFS
+property. The following permissions are available:
+.Bl -column -offset 4n "secondarycache" "subcommand"
+.It NAME Ta TYPE Ta NOTES
+.It Xo allow Ta subcommand Ta Must
+also have the permission that is being allowed
+.Xc
+.It Xo clone Ta subcommand Ta Must
+also have the 'create' ability and 'mount' ability in the origin file system
+.Xc
+.It create Ta subcommand Ta Must also have the 'mount' ability
+.It destroy Ta subcommand Ta Must also have the 'mount' ability
+.It hold Ta subcommand Ta Allows adding a user hold to a snapshot
+.It mount Ta subcommand Ta Allows mount/umount of Tn ZFS No datasets
+.It Xo promote Ta subcommand Ta Must
+also have the 'mount' and 'promote' ability in the origin file system
+.Xc
+.It receive Ta subcommand Ta Must also have the 'mount' and 'create' ability
+.It Xo release Ta subcommand Ta Allows
+releasing a user hold which might destroy the snapshot
+.Xc
+.It Xo rename Ta subcommand Ta Must
+also have the 'mount' and 'create' ability in the new parent
+.Xc
+.It rollback Ta subcommand Ta Must also have the 'mount' ability
+.It send Ta subcommand
+.It share Ta subcommand Ta Allows Xo
+sharing file systems over the
+.Tn NFS
+protocol
+.Xc
+.It snapshot Ta subcommand Ta Must also have the 'mount' ability
+.It groupquota Ta other Ta Allows accessing any groupquota at ... property
+.It groupused Ta other Ta Allows reading any groupused at ... property
+.It userprop Ta other Ta Allows changing any user property
+.It userquota Ta other Ta Allows accessing any userquota at ... property
+.It userused Ta other Ta Allows reading any userused at ... property
+.It  Ta 
+.It aclinherit Ta property
+.It aclmode Ta property
+.It atime Ta property
+.It canmount Ta property
+.It casesensitivity Ta property
+.It checksum Ta property
+.It compression Ta property
+.It copies Ta property
+.It dedup Ta property
+.It devices Ta property
+.It exec Ta property
+.It logbias Ta property
+.It jailed Ta property
+.It mlslabel Ta property
+.It mountpoint Ta property
+.It nbmand Ta property
+.It normalization Ta property
+.It primarycache Ta property
+.It quota Ta property
+.It readonly Ta property
+.It recordsize Ta property
+.It refquota Ta property
+.It refreservation Ta property
+.It reservation Ta property
+.It secondarycache Ta property
+.It setuid Ta property
+.It sharenfs Ta property
+.It sharesmb Ta property
+.It snapdir Ta property
+.It sync Ta property
+.It utf8only Ta property
+.It version Ta property
+.It volblocksize Ta property
+.It volsize Ta property
+.It vscan Ta property
+.It xattr Ta property
+.El
+.It Xo
+.Nm
+.Cm allow
+.Fl c
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.Pp
 Sets "create time" permissions. These permissions are granted (locally) to the
 creator of any newly-created descendent file system.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...]
-\fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Xo
+.Nm
+.Cm allow
+.Fl s
+.Ar @setname
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.Pp
 Defines or adds permissions to a permission set. The set can be used by other
-\fBzfs allow\fR commands for the specified file system and its descendents.
-Sets are evaluated dynamically, so changes to a set are immediately reflected.
-Permission sets follow the same naming restrictions as ZFS file systems, but
-the name must begin with an "at sign" (\[email protected]\fR), and can be no more than 64
-characters long.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs unallow\fR [\fB-rldug\fR]
-"\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]
-[\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.br
-.na
-\fB\fBzfs unallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR [,...]]
-\fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.br
-.na
-\fB\fBzfs unallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
-.ad
-.br
-.na
-\fB\fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
-Removes permissions that were granted with the \fBzfs allow\fR command. No
-permissions are explicitly denied, so other permissions granted are still in
-effect. For example, if the permission is granted by an ancestor. If no
-permissions are specified, then all permissions for the specified \fIuser\fR,
-\fIgroup\fR, or \fIeveryone\fR are removed. Specifying "everyone" (or using the
-\fB-e\fR option) only removes the permissions that were granted to "everyone",
-not all permissions for every user and group. See the \fBzfs allow\fR command
-for a description of the \fB-ldugec\fR options.
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Qq Nm Cm allow
+commands for the specified file system and its descendents. Sets are evaluated
+dynamically, so changes to a set are immediately reflected. Permission sets
+follow the same naming restrictions as ZFS file systems, but the name must
+begin with an "at sign"
+.Pq Sy @ ,
+and can be no more than 64 characters long.
+.It Xo
+.Nm
+.Cm unallow
+.Op Fl rldug
+.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
+.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.It Xo
+.Nm
+.Cm unallow
+.Op Fl rld
+.Fl e
+.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.It Xo
+.Nm
+.Cm unallow
+.Op Fl r
+.Fl c
+.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.Pp
+Removes permissions that were granted with the
+.Qq Nm Cm allow
+command. No permissions are explicitly denied, so other permissions granted are
+still in effect. For example, if the permission is granted by an ancestor. If
+no permissions are specified, then all permissions for the specified
+.Ar user , group , No or Ar everyone
+are removed. Specifying "everyone" (or using the
+.Fl e
+option) only removes the permissions that were granted to "everyone",
+not all permissions for every user and group. See the
+.Qq Nm Cm allow
+command for a description of the
+.Fl ldugec
+options.
+.Bl -tag -width indent
+.It Fl r
 Recursively remove the permissions from this file system and all descendents.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR
-[\fIperm\fR|@\fIsetname\fR[,...]]\fR
-.ad
-.br
-.na
-\fB\fIfilesystem\fR|\fIvolume\fR\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm unallow
+.Op Fl r
+.Fl s
+.Ar @setname
+.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
+.Ar filesystem Ns | Ns Ar volume
+.Xc
+.Pp
 Removes permissions from a permission set. If no permissions are specified,
 then all permissions are removed, thus removing the set entirely.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
-.ad
-.sp .6
-.RS 4n
-Adds a single reference, named with the \fItag\fR argument, to the specified
-snapshot or snapshots. Each snapshot has its own tag namespace, and tags must
-be unique within that space.
-.sp
+.It Xo
+.Nm
+.Cm hold
+.Op Fl r
+.Ar tag snapshot ...
+.Xc
+.Pp
+Adds a single reference, named with the
+.Ar tag
+argument, to the specified snapshot or snapshots. Each snapshot has its own tag
+namespace, and tags must be unique within that space.
+.Pp
 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
-\fBzfs destroy\fR command return \fBEBUSY\fR.
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Qq Nm Cm destroy
+command returns
+.Em EBUSY .
+.Bl -tag -width indent
+.It Fl r
 Specifies that a hold with the given tag is applied recursively to the
 snapshots of all descendent file systems.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm holds
+.Op Fl r
+.Ar snapshot ...
+.Xc
+.Pp
 Lists all existing user references for the given snapshot or snapshots.
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width indent
+.It Fl r
 Lists the holds that are set on the named descendent snapshots, in addition to
 listing the holds on the named snapshot.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
-.ad
-.sp .6
-.RS 4n
-Removes a single reference, named with the \fItag\fR argument, from the
-specified snapshot or snapshots. The tag must already exist for each snapshot.
-.sp
-If a hold exists on a snapshot, attempts to destroy that snapshot by using the
-\fBzfs destroy\fR command return \fBEBUSY\fR.
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm release
+.Op Fl r
+.Ar tag snapshot ...
+.Xc
+.Pp
+Removes a single reference, named with the
+.Ar tag
+argument, from the specified snapshot or snapshots. The tag must already exist
+for each snapshot.
+.Bl -tag -width indent
+.It Fl r
 Recursively releases a hold with the given tag on the snapshots of all
 descendent file systems.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzfs jail\fR \fIjailid\fR \fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
-Attaches the given file system to the given jail. From now on this file system
-tree can be managed from within a jail if the "\fBjailed\fR" property has been
-set. To use this functionality, sysctl \fBsecurity.jail.enforce_statfs\fR
-should be set to 0 and sysctl \fBsecurity.jail.mount_allowed\fR should be set
-to 1.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBzfs unjail\fR \fIjailid\fR \fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
-Detaches the given file system from the given jail.
-.RE
-
-.RE
-
-.SH EXAMPLES
-.LP
-\fBExample 1 \fRCreating a ZFS File System Hierarchy
-.sp
-.LP
-The following commands create a file system named \fBpool/home\fR and a file
-system named \fBpool/home/bob\fR. The mount point \fB/export/home\fR is set for
-the parent file system, and is automatically inherited by the child file
-system.
-
-.sp
-.in +2
-.nf
-# \fBzfs create pool/home\fR
-# \fBzfs set mountpoint=/export/home pool/home\fR
-# \fBzfs create pool/home/bob\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 2 \fRCreating a ZFS Snapshot
-.sp
-.LP
-The following command creates a snapshot named \fByesterday\fR. This snapshot
-is mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of the
-\fBpool/home/bob\fR file system.
-
-.sp
-.in +2
-.nf
-# \fBzfs snapshot pool/home/bob at yesterday\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 3 \fRCreating and Destroying Multiple Snapshots
-.sp
-.LP
-The following command creates snapshots named \fByesterday\fR of
-\fBpool/home\fR and all of its descendent file systems. Each snapshot is
-mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of its
-file system. The second command destroys the newly created snapshots.
-
-.sp
-.in +2
-.nf
-# \fBzfs snapshot -r pool/home at yesterday\fR
-# \fBzfs destroy -r pool/home at yesterday\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 4 \fRDisabling and Enabling File System Compression
-.sp
-.LP
-The following command disables the \fBcompression\fR property for all file
-systems under \fBpool/home\fR. The next command explicitly enables
-\fBcompression\fR for \fBpool/home/anne\fR.
-
-.sp
-.in +2
-.nf
-# \fBzfs set compression=off pool/home\fR
-# \fBzfs set compression=on pool/home/anne\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 5 \fRListing ZFS Datasets
-.sp
-.LP
+.El
+.It Xo
+.Nm
+.Cm diff
+.Op Fl FHt
+.Ar snapshot
+.Op Ar snapshot Ns | Ns Ar filesystem
+.Xc
+.Pp
+Describes differences between a snapshot and a successor dataset. The
+successor dataset can be a later snapshot or the current filesystem.
+.Pp
+The changed files are displayed including the change type. The change type
+is displayed ussing a single character. If a file or directory was renamed,
+the old and the new names are displayed.
+.Pp
+The following change types can be displayed:
+.Pp
+.Bl -column -offset indent "CHARACTER" "CHANGE TYPE"
+.It CHARACTER Ta CHANGE TYPE
+.It \&+ Ta file was added
+.It \&- Ta file was removed
+.It \&M Ta file was modified
+.It \&R Ta file was renamed
+.El
+.Bl -tag -width indent
+.It Fl F
+Display a single letter for the file type in second to last column.
+.Pp
+The following file types can be displayed:
+.Pp
+.Bl -column -offset indent "CHARACTER" "FILE TYPE"
+.It CHARACTER Ta FILE TYPE
+.It \&F Ta file
+.It \&/ Ta directory
+.It \&B Ta block device
+.It \&@ Ta symbolic link
+.It \&= Ta socket
+.It \&> Ta door (not supported on Fx Ns )
+.It \&| Ta FIFO (not supported on Fx Ns )
+.It \&P Ta event portal (not supported on Fx Ns )
+.El
+.It Fl H
+Machine-parseable output, fields separated a tab character.
+.It Fl t
+Display a change timestamp in the first column.
+.El
+.It Xo
+.Nm
+.Cm jail
+.Ar jailid filesystem
+.Xc
+.Pp
+Attaches the specified
+.Ar filesystem
+to the jail identified by JID
+.Ar jailid .
+From now on this file system tree can be managed from within a jail if the
+.Sy jailed
+property has been set. To use this functionality, the jail needs the
+.Va enforce_statfs
+parameter set to
+.Sy 0
+and the
+.Va allow.mount
+parameter set to
+.Sy 1 .
+.Pp
+See
+.Xr jail 8
+for more information on managing jails and configuring the parameters above.
+.It Xo
+.Nm
+.Cm unjail
+.Ar jailid filesystem
+.Xc
+.Pp
+Detaches the specified
+.Ar filesystem
+from the jail identified by JID
+.Ar jailid .
+.El
+.Sh EXAMPLES
+.Bl -tag -width 0n
+.It Sy Example 1 No Creating a Tn ZFS No File System Hierarchy
+.Pp
+The following commands create a file system named
+.Em pool/home
+and a file system named
+.Em pool/home/bob .
+The mount point
+.Pa /home
+is set for the parent file system, and is automatically inherited by the child
+file system.
+.Bd -literal -offset 2n
+.Li # Ic zfs create pool/home
+.Li # Ic zfs set mountpoint=/home pool/home
+.Li # Ic zfs create pool/home/bob
+.Ed
+.It Sy Example 2 No Creating a Tn ZFS No Snapshot
+.Pp
+The following command creates a snapshot named
+.Sy yesterday .
+This snapshot is mounted on demand in the
+.Pa \&.zfs/snapshot
+directory at the root of the
+.Em pool/home/bob
+file system.
+.Bd -literal -offset 2n
+.Li # Ic zfs snapshot pool/home/bob at yesterday
+.Ed
+.It Sy Example 3 No Creating and Destroying Multiple Snapshots
+.Pp
+The following command creates snapshots named
+.Em yesterday
+of
+.Em pool/home
+and all of its descendent file systems. Each snapshot is mounted on demand in
+the
+.Pa \&.zfs/snapshot
+directory at the root of its file system. The second command destroys the newly
+created snapshots.
+.Bd -literal -offset 2n
+.Li # Ic zfs snapshot -r pool/home at yesterday
+.Li # Ic zfs destroy -r pool/home at yesterday
+.Ed
+.It Sy Example 4 No Disabling and Enabling File System Compression
+.Pp
+The following command disables the
+.Sy compression
+property for all file systems under
+.Em pool/home .
+The next command explicitly enables
+.Sy compression
+for
+.Em pool/home/anne .
+.Bd -literal -offset 2n
+.Li # Ic zfs set compression=off pool/home
+.Li # Ic zfs set compression=on pool/home/anne
+.Ed
+.It Sy Example 5 No Listing Tn ZFS No Datasets
+.Pp
 The following command lists all active file systems and volumes in the system.
-Snapshots are displayed if the \fBlistsnaps\fR property is \fBon\fR. The
-default is \fBoff\fR. See \fBzpool\fR(8) for more information on pool
-properties.
-
-.sp
-.in +2
-.nf
-# \fBzfs list\fR
+Snapshots are displayed if the
+.Sy listsnaps
+property is
+.Cm on .
+The default is 
+.Cm off .
+See
+.Xr zpool 8
+for more information on pool properties.
+.Bd -literal -offset 2n
+.Li # Ic zfs list
    NAME                      USED  AVAIL  REFER  MOUNTPOINT
    pool                      450K   457G    18K  /pool
-   pool/home                 315K   457G    21K  /export/home
-   pool/home/anne             18K   457G    18K  /export/home/anne
-   pool/home/bob             276K   457G   276K  /export/home/bob
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 6 \fRSetting a Quota on a ZFS File System
-.sp
-.LP
-The following command sets a quota of 50 Gbytes for \fBpool/home/bob\fR.
-
-.sp
-.in +2
-.nf
-# \fBzfs set quota=50G pool/home/bob\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 7 \fRListing ZFS Properties
-.sp
-.LP
-The following command lists all properties for \fBpool/home/bob\fR.
-
-.sp
-.in +2
-.nf
-# \fBzfs get all pool/home/bob\fR
+   pool/home                 315K   457G    21K  /home
+   pool/home/anne             18K   457G    18K  /home/anne
+   pool/home/bob             276K   457G   276K  /home/bob
+.Ed
+.It Sy Example 6 No Setting a Quota on a Tn ZFS No File System
+.Pp
+The following command sets a quota of 50 Gbytes for
+.Em pool/home/bob .
+.Bd -literal -offset 2n
+.Li # Ic zfs set quota=50G pool/home/bob
+.Ed
+.It Sy Example 7 No Listing Tn ZFS No Properties
+.Pp
+The following command lists all properties for
+.Em pool/home/bob .
+.Bd -literal -offset 2n
+.Li # Ic zfs get all pool/home/bob
 NAME           PROPERTY              VALUE                  SOURCE
 pool/home/bob  type                  filesystem             -
 pool/home/bob  creation              Tue Jul 21 15:53 2009  -
@@ -3123,7 +2826,7 @@
 pool/home/bob  quota                 20G                    local
 pool/home/bob  reservation           none                   default
 pool/home/bob  recordsize            128K                   default
-pool/home/bob  mountpoint            /pool/home/bob         default
+pool/home/bob  mountpoint            /home/bob              default
 pool/home/bob  sharenfs              off                    default
 pool/home/bob  checksum              on                     default
 pool/home/bob  compression           on                     local
@@ -3139,7 +2842,7 @@
 pool/home/bob  canmount              on                     default
 pool/home/bob  xattr                 on                     default
 pool/home/bob  copies                1                      default
-pool/home/bob  version               4                      -
+pool/home/bob  version               5                      -
 pool/home/bob  utf8only              off                    -
 pool/home/bob  normalization         none                   -
 pool/home/bob  casesensitivity       sensitive              -
@@ -3154,284 +2857,238 @@
 pool/home/bob  usedbydataset         21K                    -
 pool/home/bob  usedbychildren        0                      -
 pool/home/bob  usedbyrefreservation  0                      -
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+pool/home/bob  logbias               latency                default
+pool/home/bob  dedup                 off                    default
+pool/home/bob  mlslabel                                     -
+pool/home/bob  sync                  standard               default
+pool/home/bob  refcompressratio      1.00x                  -
+.Ed
+.Pp
 The following command gets a single property value.
-
-.sp
-.in +2
-.nf
-# \fBzfs get -H -o value compression pool/home/bob\fR
+.Bd -literal -offset 2n
+.Li # Ic zfs get -H -o value compression pool/home/bob
 on
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Ed
+.Pp
 The following command lists all properties with local settings for
-\fBpool/home/bob\fR.
-
-.sp
-.in +2
-.nf
-# \fBzfs get -r -s local -o name,property,value all pool/home/bob\fR
+.Em pool/home/bob .
+.Bd -literal -offset 2n
+.Li # Ic zfs get -s local -o name,property,value all pool/home/bob
 NAME           PROPERTY              VALUE
 pool/home/bob  quota                 20G
 pool/home/bob  compression           on
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 8 \fRRolling Back a ZFS File System
-.sp
-.LP
-The following command reverts the contents of \fBpool/home/anne\fR to the
-snapshot named \fByesterday\fR, deleting all intermediate snapshots.
-
-.sp
-.in +2
-.nf
-# \fBzfs rollback -r pool/home/anne at yesterday\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 9 \fRCreating a ZFS Clone
-.sp
-.LP
+.Ed
+.It Sy Example 8 No Rolling Back a Tn ZFS No File System
+.Pp
+The following command reverts the contents of
+.Em pool/home/anne
+to the snapshot named
+.Em yesterday ,
+deleting all intermediate snapshots.
+.Bd -literal -offset 2n
+.Li # Ic zfs rollback -r pool/home/anne at yesterday
+.Ed
+.It Sy Example 9 No Creating a Tn ZFS No Clone
+.Pp
 The following command creates a writable file system whose initial contents are
-the same as \fBpool/home/bob at yesterday\fR.
-
-.sp
-.in +2
-.nf
-# \fBzfs clone pool/home/bob at yesterday pool/clone\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 10 \fRPromoting a ZFS Clone
-.sp
-.LP
+the same as
+.Em pool/home/bob at yesterday .
+.Bd -literal -offset 2n
+.Li # Ic zfs clone pool/home/bob at yesterday pool/clone
+.Ed
+.It Sy Example 10 No Promoting a Tn ZFS No Clone
+.Pp
 The following commands illustrate how to test out changes to a file system, and
 then replace the original file system with the changed one, using clones, clone
 promotion, and renaming:
-
-.sp
-.in +2
-.nf
-# \fBzfs create pool/project/production\fR
-  populate /pool/project/production with data
-# \fBzfs snapshot pool/project/production at today\fR
-# \fBzfs clone pool/project/production at today pool/project/beta\fR
-make changes to /pool/project/beta and test them
-# \fBzfs promote pool/project/beta\fR
-# \fBzfs rename pool/project/production pool/project/legacy\fR
-# \fBzfs rename pool/project/beta pool/project/production\fR
-once the legacy version is no longer needed, it can be destroyed
-# \fBzfs destroy pool/project/legacy\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 11 \fRInheriting ZFS Properties
-.sp
-.LP
-The following command causes \fBpool/home/bob\fR and \fBpool/home/anne\fR to
-inherit the \fBchecksum\fR property from their parent.
-
-.sp
-.in +2
-.nf
-# \fBzfs inherit checksum pool/home/bob pool/home/anne\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 12 \fRRemotely Replicating ZFS Data
-.sp
-.LP
+.Bd -literal -offset 2n
+.Li # Ic zfs create pool/project/production
+.Ed
+.Pp
+Populate
+.Pa /pool/project/production
+with data and continue with the following commands:
+.Bd -literal -offset 2n
+.Li # Ic zfs snapshot pool/project/production at today
+.Li # Ic zfs clone pool/project/production at today pool/project/beta
+.Ed
+.Pp
+Now make changes to
+.Pa /pool/project/beta
+and continue with the following commands:
+.Bd -literal -offset 2n
+.Li # Ic zfs promote pool/project/beta
+.Li # Ic zfs rename pool/project/production pool/project/legacy
+.Li # Ic zfs rename pool/project/beta pool/project/production
+.Ed
+.Pp
+Once the legacy version is no longer needed, it can be destroyed.
+.Bd -literal -offset 2n
+.Li # Ic zfs destroy pool/project/legacy
+.Ed
+.It Sy Example 11 No Inheriting Tn ZFS No Properties
+.Pp
+The following command causes
+.Em pool/home/bob
+and
+.Em pool/home/anne
+to inherit the
+.Sy checksum
+property from their parent.
+.Bd -literal -offset 2n
+.Li # Ic zfs inherit checksum pool/home/bob pool/home/anne
+.Ed
+.It Sy Example 12 No Remotely Replicating Tn ZFS No Data
+.Pp
 The following commands send a full stream and then an incremental stream to a
-remote machine, restoring them into \fBpoolB/received/fs at a\fRand
-\fBpoolB/received/fs at b\fR, respectively. \fBpoolB\fR must contain the file
-system \fBpoolB/received\fR, and must not initially contain
-\fBpoolB/received/fs\fR.
-
-.sp
-.in +2
-.nf
-# \fBzfs send pool/fs at a | \e\fR
-   \fBssh host zfs receive poolB/received/fs at a\fR
-# \fBzfs send -i a pool/fs at b | ssh host \e\fR
-   \fBzfs receive poolB/received/fs\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 13 \fRUsing the \fBzfs receive\fR \fB-d\fR Option
-.sp
-.LP
-The following command sends a full stream of \fBpoolA/fsA/fsB at snap\fR to a
-remote machine, receiving it into \fBpoolB/received/fsA/fsB at snap\fR. The
-\fBfsA/fsB at snap\fR portion of the received snapshot's name is determined from
-the name of the sent snapshot. \fBpoolB\fR must contain the file system
-\fBpoolB/received\fR. If \fBpoolB/received/fsA\fR does not exist, it is created
-as an empty file system.
-
-.sp
-.in +2
-.nf
-# \fBzfs send poolA/fsA/fsB at snap | \e
-   ssh host zfs receive -d poolB/received\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 14 \fRSetting User Properties
-.sp
-.LP
-The following example sets the user-defined \fBcom.example:department\fR
+remote machine, restoring them into
+.Sy poolB/received/fs at a
+and
+.Sy poolB/received/fs at b ,
+respectively.
+.Sy poolB
+must contain the file system
+.Sy poolB/received ,
+and must not initially contain
+.Sy poolB/received/fs .
+.Bd -literal -offset 2n
+.Li # Ic zfs send pool/fs at a | ssh host zfs receive poolB/received/fs at a
+.Li # Ic zfs send -i a pool/fs at b | ssh host zfs receive poolB/received/fs
+.Ed
+.It Xo
+.Sy Example 13
+Using the
+.Qq zfs receive -d
+Option
+.Xc
+.Pp
+The following command sends a full stream of
+.Sy poolA/fsA/fsB at snap
+to a remote machine, receiving it into
+.Sy poolB/received/fsA/fsB at snap .
+The
+.Sy fsA/fsB at snap
+portion of the received snapshot's name is determined from the name of the sent
+snapshot.
+.Sy poolB
+must contain the file system
+.Sy poolB/received .
+If
+.Sy poolB/received/fsA
+does not exist, it is created as an empty file system.
+.Bd -literal -offset 2n
+.Li # Ic zfs send poolA/fsA/fsB at snap | ssh host zfs receive -d poolB/received
+.Ed
+.It Sy Example 14 No Setting User Properties
+.Pp
+The following example sets the user-defined
+.Sy com.example:department
 property for a dataset.
-
-.sp
-.in +2
-.nf
-# \fBzfs set com.example:department=12345 tank/accounting\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 16 \fRPerforming a Rolling Snapshot
-.sp
-.LP
+.Bd -literal -offset 2n
+.Li # Ic zfs set com.example:department=12345 tank/accounting
+.Ed
+.It Sy Example 15 No Performing a Rolling Snapshot
+.Pp
 The following example shows how to maintain a history of snapshots with a
 consistent naming scheme. To keep a week's worth of snapshots, the user
 destroys the oldest snapshot, renames the remaining snapshots, and then creates
 a new snapshot, as follows:
-
-.sp
-.in +2
-.nf
-# \fBzfs destroy -r pool/users at 7daysago\fR
-# \fBzfs rename -r pool/users at 6daysago @7daysago\fR
-# \fBzfs rename -r pool/users at 5daysago @6daysago\fR
-# \fBzfs rename -r pool/users at yesterday @5daysago\fR
-# \fBzfs rename -r pool/users at yesterday @4daysago\fR
-# \fBzfs rename -r pool/users at yesterday @3daysago\fR
-# \fBzfs rename -r pool/users at yesterday @2daysago\fR
-# \fBzfs rename -r pool/users at today @yesterday\fR
-# \fBzfs snapshot -r pool/users at today\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 17 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
-.sp
-.LP
-The following commands show how to set \fBsharenfs\fR property options to
-enable \fBrw\fR access for a set of \fBIP\fR addresses and to enable root
-access for system \fBneo\fR on the \fBtank/home\fR file system.
-
-.sp
-.in +2
-.nf
-# \fB# zfs set sharenfs='[email protected]/16,root=neo' tank/home\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-If you are using \fBDNS\fR for host name resolution, specify the fully
-qualified hostname.
-
-.LP
-\fBExample 18 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
-.sp
-.LP
-The following example shows how to set permissions so that user \fBcindys\fR
-can create, destroy, mount, and take snapshots on \fBtank/cindys\fR. The
-permissions on \fBtank/cindys\fR are also displayed.
-
-.sp
-.in +2
-.nf
-# \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR
-# \fBzfs allow tank/cindys\fR
+.Bd -literal -offset 2n
+.Li # Ic zfs destroy -r pool/users at 7daysago
+.Li # Ic zfs rename -r pool/users at 6daysago @7daysago
+.Li # Ic zfs rename -r pool/users at 5daysago @6daysago
+.Li # Ic zfs rename -r pool/users at yesterday @5daysago
+.Li # Ic zfs rename -r pool/users at yesterday @4daysago
+.Li # Ic zfs rename -r pool/users at yesterday @3daysago
+.Li # Ic zfs rename -r pool/users at yesterday @2daysago
+.Li # Ic zfs rename -r pool/users at today @yesterday
+.Li # Ic zfs snapshot -r pool/users at today
+.Ed
+.It Xo
+.Sy Example 16
+Setting
+.Qq sharenfs
+Property Options on a ZFS File System
+.Xc
+.Pp
+The following command shows how to set
+.Sy sharenfs
+property options to enable root access for a specific network on the
+.Em tank/home
+file system. The contents of the
+.Sy sharenfs
+property are valid
+.Xr exports 5
+options.
+.Bd -literal -offset 2n
+.Li # Ic zfs set sharenfs="maproot=root,network 192.168.0.0/24" tank/home
+.Ed
+.Pp
+Another way to write this command with the same result is:
+.Bd -literal -offset 2n
+.Li # Ic set zfs sharenfs="-maproot=root -network 192.168.0.0/24" tank/home
+.Ed
+.It Xo
+.Sy Example 17
+Delegating
+.Tn ZFS
+Administration Permissions on a
+.Tn ZFS
+Dataset
+.Xc
+.Pp
+The following example shows how to set permissions so that user
+.Em cindys
+can create, destroy, mount, and take snapshots on
+.Em tank/cindys .
+The permissions on
+.Em tank/cindys
+are also displayed.
+.Bd -literal -offset 2n
+.Li # Ic zfs allow cindys create,destroy,mount,snapshot tank/cindys
+.Li # Ic zfs allow tank/cindys
 -------------------------------------------------------------
 Local+Descendent permissions on (tank/cindys)
           user cindys create,destroy,mount,snapshot
 -------------------------------------------------------------
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-Because the \fBtank/cindys\fR mount point permission is set to 755 by default,
-user \fBcindys\fR will be unable to mount file systems under \fBtank/cindys\fR.
-Set an \fBACL\fR similar to the following syntax to provide mount point access:
-.sp
-.in +2
-.nf
-# \fBchmod A+user:cindys:add_subdirectory:allow /tank/cindys\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 19 \fRDelegating Create Time Permissions on a ZFS Dataset
-.sp
-.LP
-The following example shows how to grant anyone in the group \fBstaff\fR to
-create file systems in \fBtank/users\fR. This syntax also allows staff members
-to destroy their own file systems, but not destroy anyone else's file system.
-The permissions on \fBtank/users\fR are also displayed.
-
-.sp
-.in +2
-.nf
-# \fB# zfs allow staff create,mount tank/users\fR
-# \fBzfs allow -c destroy tank/users\fR
-# \fBzfs allow tank/users\fR
+.Ed
+.It Sy Example 18 No Delegating Create Time Permissions on a Tn ZFS No Dataset
+.Pp
+The following example shows how to grant anyone in the group
+.Em staff
+to create file systems in
+.Em tank/users .
+This syntax also allows staff members to destroy their own file systems, but
+not destroy anyone else's file system. The permissions on
+.Em tank/users
+are also displayed.
+.Bd -literal -offset 2n
+.Li # Ic zfs allow staff create,mount tank/users
+.Li # Ic zfs allow -c destroy tank/users
+.Li # Ic zfs allow tank/users
 -------------------------------------------------------------
 Create time permissions on (tank/users)
           create,destroy
 Local+Descendent permissions on (tank/users)
           group staff create,mount
 -------------------------------------------------------------
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 20 \fRDefining and Granting a Permission Set on a ZFS Dataset
-.sp
-.LP
+.Ed
+.It Xo
+.Sy Example 19
+Defining and Granting a Permission Set on a
+.Tn ZFS
+Dataset
+.Xc
+.Pp
 The following example shows how to define and grant a permission set on the
-\fBtank/users\fR file system. The permissions on \fBtank/users\fR are also
-displayed.
-
-.sp
-.in +2
-.nf
-# \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR
-# \fBzfs allow staff @pset tank/users\fR
-# \fBzfs allow tank/users\fR
+.Em tank/users
+file system. The permissions on
+.Em tank/users
+are also displayed.
+.Bd -literal -offset 2n
+.Li # Ic zfs allow -s @pset create,destroy,snapshot,mount tank/users
+.Li # Ic zfs allow staff @pset tank/users
+.Li # Ic zfs allow tank/users
 -------------------------------------------------------------
 Permission sets on (tank/users)
         @pset create,destroy,mount,snapshot
@@ -3440,48 +3097,40 @@
 Local+Descendent permissions on (tank/users)
         group staff @pset,create,mount
 -------------------------------------------------------------
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 21 \fRDelegating Property Permissions on a ZFS Dataset
-.sp
-.LP
+.Ed
+.It Sy Example 20 No Delegating Property Permissions on a Tn ZFS No Dataset
+.Pp
 The following example shows to grant the ability to set quotas and reservations
-on the \fBusers/home\fR file system. The permissions on \fBusers/home\fR are
-also displayed.
-
-.sp
-.in +2
-.nf
-# \fBzfs allow cindys quota,reservation users/home\fR
-# \fBzfs allow users/home\fR
+on the
+.Sy users/home
+file system. The permissions on
+.Sy users/home
+are also displayed.
+.Bd -literal -offset 2n
+.Li # Ic zfs allow cindys quota,reservation users/home
+.Li # Ic zfs allow cindys
 -------------------------------------------------------------
 Local+Descendent permissions on (users/home)
         user cindys quota,reservation
 -------------------------------------------------------------
-cindys% \fBzfs set quota=10G users/home/marks\fR
-cindys% \fBzfs get quota users/home/marks\fR
+.Li # Ic su - cindys
+.Li cindys% Ic zfs set quota=10G users/home/marks
+.Li cindys% Ic zfs get quota users/home/marks
 NAME              PROPERTY  VALUE             SOURCE
 users/home/marks  quota     10G               local
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 22 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
-.sp
-.LP
+.Ed
+.It Sy Example 21 No Removing ZFS Delegated Permissions on a Tn ZFS No Dataset
+.Pp
 The following example shows how to remove the snapshot permission from the
-\fBstaff\fR group on the \fBtank/users\fR file system. The permissions on
-\fBtank/users\fR are also displayed.
-
-.sp
-.in +2
-.nf
-# \fBzfs unallow staff snapshot tank/users\fR
-# \fBzfs allow tank/users\fR
+.Em staff
+group on the
+.Em tank/users
+file system. The permissions on
+.Em tank/users
+are also displayed.
+.Bd -literal -offset 2n
+.Li # Ic zfs unallow staff snapshot tank/users
+.Li # Ic zfs allow tank/users
 -------------------------------------------------------------
 Permission sets on (tank/users)
         @pset create,destroy,mount,snapshot
@@ -3490,45 +3139,42 @@
 Local+Descendent permissions on (tank/users)
         group staff @pset,create,mount
 -------------------------------------------------------------
-.fi
-.in -2
-.sp
-
-.SH EXIT STATUS
-.sp
-.LP
+.Ed
+.El
+.Sh EXIT STATUS
 The following exit values are returned:
-.sp
-.ne 2
-.na
-\fB\fB0\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -offset 2n -width 2n
+.It 0
 Successful completion.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB1\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It 1
 An error occurred.
-
-.RE
-.sp
-.ne 2
-.na
-\fB\fB2\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It 2
 Invalid command line options were specified.
-.RE
-
-.SH SEE ALSO
-.sp
-.LP
-chmod(2), fsync(2), exports(5), fstab(5), jail(8), mount(8), zpool(8)
+.El
+.Sh SEE ALSO
+.Xr chmod 2 ,
+.Xr fsync 2 ,
+.Xr exports 5 ,
+.Xr fstab 5 ,
+.Xr rc.conf 5 ,
+.Xr jail 8 ,
+.Xr mount 8 ,
+.Xr umount 8 ,
+.Xr zpool 8
+.Sh AUTHORS
+This manual page is a
+.Xr mdoc 7
+reimplementation of the
+.Tn OpenSolaris
+manual page
+.Em zfs(1M) ,
+modified and customized for
+.Fx
+and licensed under the
+Common Development and Distribution License
+.Pq Tn CDDL .
+.Pp
+The
+.Xr mdoc 7
+implementation of this manual page was initially written by
+.An Martin Matuska Aq mm at FreeBSD.org .
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
--- a/head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c	Tue Dec 06 20:26:16 2011 +0200
@@ -22,8 +22,9 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
  * Copyright (c) 2011 Pawel Jakub Dawidek <pawel at dawidek.net>.
- * All rights reserved.
+ * Copyright (c) 2011 Martin Matuska <mm at FreeBSD.org>. All rights reserved.
  */
 
 #include <assert.h>
@@ -145,7 +146,7 @@
 	HELP_HOLD,
 	HELP_HOLDS,
 	HELP_RELEASE,
-	HELP_DIFF
+	HELP_DIFF,
 } zfs_help_t;
 
 typedef struct zfs_command {
@@ -220,8 +221,9 @@
 		    "\tcreate [-ps] [-b blocksize] [-o property=value] ... "
 		    "-V <size> <volume>\n"));
 	case HELP_DESTROY:
-		return (gettext("\tdestroy [-rRf] <filesystem|volume>\n"
-		    "\tdestroy [-rRd] <snapshot>\n"));
+		return (gettext("\tdestroy [-fnpRrv] <filesystem|volume>\n"
+		    "\tdestroy [-dnpRrv] "
+		    "<snapshot>[%<snapname>][,...]\n"));
 	case HELP_GET:
 		return (gettext("\tget [-rHp] [-d max] "
 		    "[-o \"all\" | field[,...]] [-s source[,...]]\n"
@@ -260,7 +262,8 @@
 	case HELP_ROLLBACK:
 		return (gettext("\trollback [-rRf] <snapshot>\n"));
 	case HELP_SEND:
-		return (gettext("\tsend [-RDp] [-[iI] snapshot] <snapshot>\n"));
+		return (gettext("\tsend [-DnPpRrv] "
+		    "[-i snapshot | -I snapshot] <snapshot>\n"));
 	case HELP_SET:
 		return (gettext("\tset <property=value> "
 		    "<filesystem|volume|snapshot> ...\n"));
@@ -296,11 +299,11 @@
 		    "\tunallow [-r] -s @setname [<perm|@setname>[,...]] "
 		    "<filesystem|volume>\n"));
 	case HELP_USERSPACE:
-		return (gettext("\tuserspace [-hniHp] [-o field[,...]] "
+		return (gettext("\tuserspace [-niHp] [-o field[,...]] "
 		    "[-sS field] ... [-t type[,...]]\n"
 		    "\t    <filesystem|snapshot>\n"));
 	case HELP_GROUPSPACE:
-		return (gettext("\tgroupspace [-hniHpU] [-o field[,...]] "
+		return (gettext("\tgroupspace [-niHp] [-o field[,...]] "
 		    "[-sS field] ... [-t type[,...]]\n"
 		    "\t    <filesystem|snapshot>\n"));
 	case HELP_HOLD:
@@ -439,6 +442,8 @@
 		(void) fprintf(fp, "YES       NO   <size> | none\n");
 		(void) fprintf(fp, "\t%-15s ", "groupquota at ...");
 		(void) fprintf(fp, "YES       NO   <size> | none\n");
+		(void) fprintf(fp, "\t%-15s ", "[email protected]<snap>");
+		(void) fprintf(fp, " NO       NO   <size>\n");
 
 		(void) fprintf(fp, gettext("\nSizes are specified in bytes "
 		    "with standard units such as K, M, G, etc.\n"));
@@ -884,15 +889,23 @@
  */
 typedef struct destroy_cbdata {
 	boolean_t	cb_first;
-	int		cb_force;
-	int		cb_recurse;
-	int		cb_error;
-	int		cb_needforce;
-	int		cb_doclones;
-	boolean_t	cb_closezhp;
+	boolean_t	cb_force;
+	boolean_t	cb_recurse;
+	boolean_t	cb_error;
+	boolean_t	cb_doclones;
 	zfs_handle_t	*cb_target;
-	char		*cb_snapname;
 	boolean_t	cb_defer_destroy;
+	boolean_t	cb_verbose;
+	boolean_t	cb_parsable;
+	boolean_t	cb_dryrun;
+	nvlist_t	*cb_nvl;
+
+	/* first snap in contiguous run */
+	zfs_handle_t	*cb_firstsnap;
+	/* previous snap in contiguous run */
+	zfs_handle_t	*cb_prevsnap;
+	int64_t		cb_snapused;
+	char		*cb_snapspec;
 } destroy_cbdata_t;
 
 /*
@@ -922,7 +935,7 @@
 			(void) fprintf(stderr, gettext("use '-r' to destroy "
 			    "the following datasets:\n"));
 			cbp->cb_first = B_FALSE;
-			cbp->cb_error = 1;
+			cbp->cb_error = B_TRUE;
 		}
 
 		(void) fprintf(stderr, "%s\n", zfs_get_name(zhp));
@@ -943,7 +956,8 @@
 			(void) fprintf(stderr, gettext("use '-R' to destroy "
 			    "the following datasets:\n"));
 			cbp->cb_first = B_FALSE;
-			cbp->cb_error = 1;
+			cbp->cb_error = B_TRUE;
+			cbp->cb_dryrun = B_TRUE;
 		}
 
 		(void) fprintf(stderr, "%s\n", zfs_get_name(zhp));
@@ -957,7 +971,20 @@
 static int
 destroy_callback(zfs_handle_t *zhp, void *data)
 {
-	destroy_cbdata_t *cbp = data;
+	destroy_cbdata_t *cb = data;
+	const char *name = zfs_get_name(zhp);
+
+	if (cb->cb_verbose) {
+		if (cb->cb_parsable) {
+			(void) printf("destroy\t%s\n", name);
+		} else if (cb->cb_dryrun) {
+			(void) printf(gettext("would destroy %s\n"),
+			    name);
+		} else {
+			(void) printf(gettext("will destroy %s\n"),
+			    name);
+		}
+	}
 
 	/*
 	 * Ignore pools (which we've already flagged as an error before getting
@@ -969,13 +996,12 @@
 		return (0);
 	}
 
-	/*
-	 * Bail out on the first error.
-	 */
-	if (zfs_unmount(zhp, NULL, cbp->cb_force ? MS_FORCE : 0) != 0 ||
-	    zfs_destroy(zhp, cbp->cb_defer_destroy) != 0) {
-		zfs_close(zhp);
-		return (-1);
+	if (!cb->cb_dryrun) {
+		if (zfs_unmount(zhp, NULL, cb->cb_force ? MS_FORCE : 0) != 0 ||
+		    zfs_destroy(zhp, cb->cb_defer_destroy) != 0) {
+			zfs_close(zhp);
+			return (-1);
+		}
 	}
 
 	zfs_close(zhp);
@@ -983,39 +1009,142 @@
 }
 
 static int
-destroy_snap_clones(zfs_handle_t *zhp, void *arg)
+destroy_print_cb(zfs_handle_t *zhp, void *arg)
 {
-	destroy_cbdata_t *cbp = arg;
-	char thissnap[MAXPATHLEN];
-	zfs_handle_t *szhp;
-	boolean_t closezhp = cbp->cb_closezhp;
-	int rv;
-
-	(void) snprintf(thissnap, sizeof (thissnap),
-	    "%[email protected]%s", zfs_get_name(zhp), cbp->cb_snapname);
-
-	libzfs_print_on_error(g_zfs, B_FALSE);
-	szhp = zfs_open(g_zfs, thissnap, ZFS_TYPE_SNAPSHOT);
-	libzfs_print_on_error(g_zfs, B_TRUE);
-	if (szhp) {
-		/*
-		 * Destroy any clones of this snapshot
-		 */
-		if (zfs_iter_dependents(szhp, B_FALSE, destroy_callback,
-		    cbp) != 0) {
-			zfs_close(szhp);
-			if (closezhp)
-				zfs_close(zhp);
-			return (-1);
+	destroy_cbdata_t *cb = arg;
+	const char *name = zfs_get_name(zhp);
+	int err = 0;
+
+	if (nvlist_exists(cb->cb_nvl, name)) {
+		if (cb->cb_firstsnap == NULL)
+			cb->cb_firstsnap = zfs_handle_dup(zhp);
+		if (cb->cb_prevsnap != NULL)
+			zfs_close(cb->cb_prevsnap);
+		/* this snap continues the current range */
+		cb->cb_prevsnap = zfs_handle_dup(zhp);
+		if (cb->cb_verbose) {
+			if (cb->cb_parsable) {
+				(void) printf("destroy\t%s\n", name);
+			} else if (cb->cb_dryrun) {
+				(void) printf(gettext("would destroy %s\n"),
+				    name);
+			} else {
+				(void) printf(gettext("will destroy %s\n"),
+				    name);
+			}
 		}
-		zfs_close(szhp);
-	}
-
-	cbp->cb_closezhp = B_TRUE;
-	rv = zfs_iter_filesystems(zhp, destroy_snap_clones, arg);
-	if (closezhp)
-		zfs_close(zhp);
-	return (rv);
+	} else if (cb->cb_firstsnap != NULL) {
+		/* end of this range */
+		uint64_t used = 0;
+		err = zfs_get_snapused_int(cb->cb_firstsnap,
+		    cb->cb_prevsnap, &used);
+		cb->cb_snapused += used;
+		zfs_close(cb->cb_firstsnap);
+		cb->cb_firstsnap = NULL;
+		zfs_close(cb->cb_prevsnap);
+		cb->cb_prevsnap = NULL;
+	}
+	zfs_close(zhp);
+	return (err);
+}
+
+static int
+destroy_print_snapshots(zfs_handle_t *fs_zhp, destroy_cbdata_t *cb)
+{
+	int err;
+	assert(cb->cb_firstsnap == NULL);
+	assert(cb->cb_prevsnap == NULL);
+	err = zfs_iter_snapshots_sorted(fs_zhp, destroy_print_cb, cb);
+	if (cb->cb_firstsnap != NULL) {
+		uint64_t used = 0;
+		if (err == 0) {
+			err = zfs_get_snapused_int(cb->cb_firstsnap,
+			    cb->cb_prevsnap, &used);
+		}
+		cb->cb_snapused += used;
+		zfs_close(cb->cb_firstsnap);
+		cb->cb_firstsnap = NULL;
+		zfs_close(cb->cb_prevsnap);
+		cb->cb_prevsnap = NULL;
+	}
+	return (err);
+}
+
+static int
+snapshot_to_nvl_cb(zfs_handle_t *zhp, void *arg)
+{
+	destroy_cbdata_t *cb = arg;
+	int err = 0;
+
+	/* Check for clones. */
+	if (!cb->cb_doclones) {
+		cb->cb_target = zhp;
+		cb->cb_first = B_TRUE;
+		err = zfs_iter_dependents(zhp, B_TRUE,
+		    destroy_check_dependent, cb);
+	}
+
+	if (err == 0) {
+		if (nvlist_add_boolean(cb->cb_nvl, zfs_get_name(zhp)))
+			nomem();
+	}
+	zfs_close(zhp);
+	return (err);
+}
+
+static int
+gather_snapshots(zfs_handle_t *zhp, void *arg)
+{
+	destroy_cbdata_t *cb = arg;
+	int err = 0;
+
+	err = zfs_iter_snapspec(zhp, cb->cb_snapspec, snapshot_to_nvl_cb, cb);
+	if (err == ENOENT)
+		err = 0;
+	if (err != 0)
+		goto out;
+
+	if (cb->cb_verbose) {
+		err = destroy_print_snapshots(zhp, cb);
+		if (err != 0)
+			goto out;
+	}
+
+	if (cb->cb_recurse)
+		err = zfs_iter_filesystems(zhp, gather_snapshots, cb);
+
+out:
+	zfs_close(zhp);
+	return (err);
+}
+
+static int
+destroy_clones(destroy_cbdata_t *cb)
+{
+	nvpair_t *pair;
+	for (pair = nvlist_next_nvpair(cb->cb_nvl, NULL);
+	    pair != NULL;
+	    pair = nvlist_next_nvpair(cb->cb_nvl, pair)) {
+		zfs_handle_t *zhp = zfs_open(g_zfs, nvpair_name(pair),
+		    ZFS_TYPE_SNAPSHOT);
+		if (zhp != NULL) {
+			boolean_t defer = cb->cb_defer_destroy;
+			int err;
+
+			/*
+			 * We can't defer destroy non-snapshots, so set it to
+			 * false while destroying the clones.
+			 */
+			cb->cb_defer_destroy = B_FALSE;
+			err = zfs_iter_dependents(zhp, B_FALSE,
+			    destroy_callback, cb);
+			cb->cb_defer_destroy = defer;
+			zfs_close(zhp);
+			if (err != 0)
+				return (err);
+		}
+	}
+	return (0);
 }
 
 static int
@@ -1024,25 +1153,35 @@
 	destroy_cbdata_t cb = { 0 };
 	int c;
 	zfs_handle_t *zhp;
-	char *cp;
+	char *at;
 	zfs_type_t type = ZFS_TYPE_DATASET;
 
 	/* check options */
-	while ((c = getopt(argc, argv, "dfrR")) != -1) {
+	while ((c = getopt(argc, argv, "vpndfrR")) != -1) {
 		switch (c) {
+		case 'v':
+			cb.cb_verbose = B_TRUE;
+			break;
+		case 'p':
+			cb.cb_verbose = B_TRUE;
+			cb.cb_parsable = B_TRUE;
+			break;
+		case 'n':
+			cb.cb_dryrun = B_TRUE;
+			break;
 		case 'd':
 			cb.cb_defer_destroy = B_TRUE;
 			type = ZFS_TYPE_SNAPSHOT;
 			break;
 		case 'f':
-			cb.cb_force = 1;
+			cb.cb_force = B_TRUE;
 			break;
 		case 'r':
-			cb.cb_recurse = 1;
+			cb.cb_recurse = B_TRUE;
 			break;
 		case 'R':
-			cb.cb_recurse = 1;
-			cb.cb_doclones = 1;
+			cb.cb_recurse = B_TRUE;
+			cb.cb_doclones = B_TRUE;
 			break;
 		case '?':
 		default:
@@ -1057,7 +1196,7 @@
 
 	/* check number of arguments */
 	if (argc == 0) {
-		(void) fprintf(stderr, gettext("missing path argument\n"));
+		(void) fprintf(stderr, gettext("missing dataset argument\n"));
 		usage(B_FALSE);
 	}
 	if (argc > 1) {
@@ -1065,91 +1204,117 @@
 		usage(B_FALSE);
 	}
 
-	/*
-	 * If we are doing recursive destroy of a snapshot, then the
-	 * named snapshot may not exist.  Go straight to libzfs.
-	 */
-	if (cb.cb_recurse && (cp = strchr(argv[0], '@'))) {
-		int ret;
-
-		*cp = '\0';
-		if ((zhp = zfs_open(g_zfs, argv[0], ZFS_TYPE_DATASET)) == NULL)
+	at = strchr(argv[0], '@');
+	if (at != NULL) {
+		int err;
+
+		/* Build the list of snaps to destroy in cb_nvl. */
+		if (nvlist_alloc(&cb.cb_nvl, NV_UNIQUE_NAME, 0) != 0)
+			nomem();
+
+		*at = '\0';
+		zhp = zfs_open(g_zfs, argv[0],
+		    ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME);
+		if (zhp == NULL)
 			return (1);
-		*cp = '@';
-		cp++;
-
-		if (cb.cb_doclones) {
-			boolean_t defer = cb.cb_defer_destroy;
-
-			/*
-			 * Temporarily ignore the defer_destroy setting since
-			 * it's not supported for clones.
-			 */
-			cb.cb_defer_destroy = B_FALSE;
-			cb.cb_snapname = cp;
-			if (destroy_snap_clones(zhp, &cb) != 0) {
-				zfs_close(zhp);
-				return (1);
+
+		cb.cb_snapspec = at + 1;
+		if (gather_snapshots(zfs_handle_dup(zhp), &cb) != 0 ||
+		    cb.cb_error) {
+			zfs_close(zhp);
+			nvlist_free(cb.cb_nvl);
+			return (1);
+		}
+
+		if (nvlist_empty(cb.cb_nvl)) {
+			(void) fprintf(stderr, gettext("could not find any "
+			    "snapshots to destroy; check snapshot names.\n"));
+			zfs_close(zhp);
+			nvlist_free(cb.cb_nvl);
+			return (1);
+		}
+
+		if (cb.cb_verbose) {
+			char buf[16];
+			zfs_nicenum(cb.cb_snapused, buf, sizeof (buf));
+			if (cb.cb_parsable) {
+				(void) printf("reclaim\t%llu\n",
+				    cb.cb_snapused);
+			} else if (cb.cb_dryrun) {
+				(void) printf(gettext("would reclaim %s\n"),
+				    buf);
+			} else {
+				(void) printf(gettext("will reclaim %s\n"),
+				    buf);
 			}
-			cb.cb_defer_destroy = defer;
 		}
 
-		ret = zfs_destroy_snaps(zhp, cp, cb.cb_defer_destroy);
+		if (!cb.cb_dryrun) {
+			if (cb.cb_doclones)
+				err = destroy_clones(&cb);
+			if (err == 0) {
+				err = zfs_destroy_snaps_nvl(zhp, cb.cb_nvl,
+				    cb.cb_defer_destroy);
+			}
+		}
+
 		zfs_close(zhp);
-		if (ret) {
-			(void) fprintf(stderr,
-			    gettext("no snapshots destroyed\n"));
+		nvlist_free(cb.cb_nvl);
+		if (err != 0)
+			return (1);
+	} else {
+		/* Open the given dataset */
+		if ((zhp = zfs_open(g_zfs, argv[0], type)) == NULL)
+			return (1);
+
+		cb.cb_target = zhp;
+
+		/*
+		 * Perform an explicit check for pools before going any further.
+		 */
+		if (!cb.cb_recurse && strchr(zfs_get_name(zhp), '/') == NULL &&
+		    zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) {
+			(void) fprintf(stderr, gettext("cannot destroy '%s': "
+			    "operation does not apply to pools\n"),
+			    zfs_get_name(zhp));
+			(void) fprintf(stderr, gettext("use 'zfs destroy -r "
+			    "%s' to destroy all datasets in the pool\n"),
+			    zfs_get_name(zhp));
+			(void) fprintf(stderr, gettext("use 'zpool destroy %s' "
+			    "to destroy the pool itself\n"), zfs_get_name(zhp));
+			zfs_close(zhp);
+			return (1);
 		}
-		return (ret != 0);
-	}
-
-	/* Open the given dataset */
-	if ((zhp = zfs_open(g_zfs, argv[0], type)) == NULL)
-		return (1);
-
-	cb.cb_target = zhp;
-
-	/*
-	 * Perform an explicit check for pools before going any further.
-	 */
-	if (!cb.cb_recurse && strchr(zfs_get_name(zhp), '/') == NULL &&
-	    zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) {
-		(void) fprintf(stderr, gettext("cannot destroy '%s': "
-		    "operation does not apply to pools\n"),
-		    zfs_get_name(zhp));
-		(void) fprintf(stderr, gettext("use 'zfs destroy -r "
-		    "%s' to destroy all datasets in the pool\n"),
-		    zfs_get_name(zhp));
-		(void) fprintf(stderr, gettext("use 'zpool destroy %s' "
-		    "to destroy the pool itself\n"), zfs_get_name(zhp));
-		zfs_close(zhp);
-		return (1);
-	}
-
-	/*
-	 * Check for any dependents and/or clones.
-	 */
-	cb.cb_first = B_TRUE;
-	if (!cb.cb_doclones && !cb.cb_defer_destroy &&
-	    zfs_iter_dependents(zhp, B_TRUE, destroy_check_dependent,
-	    &cb) != 0) {
-		zfs_close(zhp);
-		return (1);
-	}
-
-	if (cb.cb_error || (!cb.cb_defer_destroy &&
-	    (zfs_iter_dependents(zhp, B_FALSE, destroy_callback, &cb) != 0))) {
-		zfs_close(zhp);
-		return (1);
-	}
-
-	/*
-	 * Do the real thing.  The callback will close the handle regardless of
-	 * whether it succeeds or not.
-	 */
-
-	if (destroy_callback(zhp, &cb) != 0)
-		return (1);
+
+		/*
+		 * Check for any dependents and/or clones.
+		 */
+		cb.cb_first = B_TRUE;
+		if (!cb.cb_doclones &&
+		    zfs_iter_dependents(zhp, B_TRUE, destroy_check_dependent,
+		    &cb) != 0) {
+			zfs_close(zhp);
+			return (1);
+		}
+
+		if (cb.cb_error) {
+			zfs_close(zhp);
+			return (1);
+		}
+
+		if (zfs_iter_dependents(zhp, B_FALSE, destroy_callback,
+		    &cb) != 0) {
+			zfs_close(zhp);
+			return (1);
+		}
+
+		/*
+		 * Do the real thing.  The callback will close the
+		 * handle regardless of whether it succeeds or not.
+		 */
+		if (destroy_callback(zhp, &cb) != 0)
+			return (1);
+	}
 
 	return (0);
 }
@@ -1251,6 +1416,17 @@
 
 			zprop_print_one_property(zfs_get_name(zhp), cbp,
 			    pl->pl_user_prop, buf, sourcetype, source, NULL);
+		} else if (zfs_prop_written(pl->pl_user_prop)) {
+			sourcetype = ZPROP_SRC_LOCAL;
+
+			if (zfs_prop_get_written(zhp, pl->pl_user_prop,
+			    buf, sizeof (buf), cbp->cb_literal) != 0) {
+				sourcetype = ZPROP_SRC_NONE;
+				(void) strlcpy(buf, "-", sizeof (buf));
+			}
+
+			zprop_print_one_property(zfs_get_name(zhp), cbp,
+			    pl->pl_user_prop, buf, sourcetype, source, NULL);
 		} else {
 			if (nvlist_lookup_nvlist(user_props,
 			    pl->pl_user_prop, &propval) != 0) {
@@ -1795,8 +1971,8 @@
 		    "---------------\n");
 		(void) printf(gettext(" 1   Initial ZFS filesystem version\n"));
 		(void) printf(gettext(" 2   Enhanced directory entries\n"));
-		(void) printf(gettext(" 3   Case insensitive and File system "
-		    "unique identifier (FUID)\n"));
+		(void) printf(gettext(" 3   Case insensitive and filesystem "
+		    "user identifier (FUID)\n"));
 		(void) printf(gettext(" 4   userquota, groupquota "
 		    "properties\n"));
 		(void) printf(gettext(" 5   System attributes\n"));
@@ -2676,6 +2852,13 @@
 			else
 				propstr = property;
 			right_justify = B_TRUE;
+		} else if (zfs_prop_written(pl->pl_user_prop)) {
+			if (zfs_prop_get_written(zhp, pl->pl_user_prop,
+			    property, sizeof (property), B_FALSE) != 0)
+				propstr = "-";
+			else
+				propstr = property;
+			right_justify = B_TRUE;
 		} else {
 			if (nvlist_lookup_nvlist(userprops,
 			    pl->pl_user_prop, &propval) != 0)
@@ -3302,9 +3485,6 @@
 }
 
 /*
- * zfs send [-vDp] -R [-i|-I <@snap>] <fs at snap>
- * zfs send [-vDp] [-i|-I <@snap>] <fs at snap>
- *
  * Send a backup stream to stdout.
  */
 static int
@@ -3316,11 +3496,11 @@
 	zfs_handle_t *zhp;
 	sendflags_t flags = { 0 };
 	int c, err;
-	nvlist_t *dbgnv;
+	nvlist_t *dbgnv = NULL;
 	boolean_t extraverbose = B_FALSE;
 
 	/* check options */
-	while ((c = getopt(argc, argv, ":i:I:RDpv")) != -1) {
+	while ((c = getopt(argc, argv, ":i:I:RDpvnP")) != -1) {
 		switch (c) {
 		case 'i':
 			if (fromname)
@@ -3339,6 +3519,10 @@
 		case 'p':
 			flags.props = B_TRUE;
 			break;
+		case 'P':
+			flags.parsable = B_TRUE;
+			flags.verbose = B_TRUE;
+			break;
 		case 'v':
 			if (flags.verbose)
 				extraverbose = B_TRUE;
@@ -3347,6 +3531,9 @@
 		case 'D':
 			flags.dedup = B_TRUE;
 			break;
+		case 'n':
+			flags.dryrun = B_TRUE;
+			break;
 		case ':':
 			(void) fprintf(stderr, gettext("missing argument for "
 			    "'%c' option\n"), optopt);
@@ -3372,7 +3559,7 @@
 		usage(B_FALSE);
 	}
 
-	if (isatty(STDOUT_FILENO)) {
+	if (!flags.dryrun && isatty(STDOUT_FILENO)) {
 		(void) fprintf(stderr,
 		    gettext("Error: Stream can not be written to a terminal.\n"
 		    "You must redirect standard output.\n"));
@@ -3426,10 +3613,10 @@
 	if (flags.replicate && fromname == NULL)
 		flags.doall = B_TRUE;
 
-	err = zfs_send(zhp, fromname, toname, flags, STDOUT_FILENO, NULL, 0,
+	err = zfs_send(zhp, fromname, toname, &flags, STDOUT_FILENO, NULL, 0,
 	    extraverbose ? &dbgnv : NULL);
 
-	if (extraverbose) {
+	if (extraverbose && dbgnv != NULL) {
 		/*
 		 * dump_nvlist prints to stdout, but that's been
 		 * redirected to a file.  Make it print to stderr
@@ -3510,7 +3697,7 @@
 		return (1);
 	}
 
-	err = zfs_receive(g_zfs, argv[0], flags, STDIN_FILENO, NULL);
+	err = zfs_receive(g_zfs, argv[0], &flags, STDIN_FILENO, NULL);
 
 	return (err != 0);
 }
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/cmd/zpool/zpool.8
--- a/head/cddl/contrib/opensolaris/cmd/zpool/zpool.8	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/cmd/zpool/zpool.8	Tue Dec 06 20:26:16 2011 +0200
@@ -1,492 +1,492 @@
 '\" te
-.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
-.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
-.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.\" Portions Copyright 2011 Justin T. Gibbs <gibbs at FreeBSD.org>
-.\" Portions Copyright 2011 Martin Matuska <mm at FreeBSD.org>
-.TH ZPOOL 8 "September 21, 2009" FreeBSD
-.SH NAME
-zpool \- configures ZFS storage pools
-.SH SYNOPSIS
-.LP
-.nf
-\fBzpool\fR [\fB-?\fR]
-.fi
-
-.LP
-.nf
-\fBzpool add\fR [\fB-fn\fR] \fIpool\fR \fIvdev\fR ...
-.fi
-
-.LP
-.nf
-\fBzpool attach\fR [\fB-f\fR] \fIpool\fR \fIdevice\fR \fInew_device\fR
-.fi
-
-.LP
-.nf
-\fBzpool clear\fR \fIpool\fR [\fIdevice\fR]
-.fi
-
-.LP
-.nf
-\fBzpool create\fR [\fB-fn\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-O\fR \fIfile-system-property=value\fR]
-     ... [\fB-m\fR \fImountpoint\fR] [\fB-R\fR \fIroot\fR] \fIpool\fR \fIvdev\fR ...
-.fi
-
-.LP
-.nf
-\fBzpool destroy\fR [\fB-f\fR] \fIpool\fR
-.fi
-
-.LP
-.nf
-\fBzpool detach\fR \fIpool\fR \fIdevice\fR
-.fi
-
-.LP
-.nf
-\fBzpool export\fR [\fB-f\fR] \fIpool\fR ...
-.fi
-
-.LP
-.nf
-\fBzpool get\fR "\fIall\fR" | \fIproperty\fR[,...] \fIpool\fR ...
-.fi
-
-.LP
-.nf
-\fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ...
-.fi
-
-.LP
-.nf
-\fBzpool import\fR [\fB-d\fR \fIdir\fR] [\fB-D\fR]
-.fi
-
-.LP
-.nf
-\fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
-     [\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fB-a\fR
-.fi
-
-.LP
-.nf
-\fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
-     [\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fIpool\fR |\fIid\fR [\fInewpool\fR]
-.fi
-
-.LP
-.nf
-\fBzpool iostat\fR [\fB-T\fR u | d ] [\fB-v\fR] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]
-.fi
-
-.LP
-.nf
-\fBzpool labelclear\fR [\fB-f\fR] \fIdevice\fR
-.fi
-
-.LP
-.nf
-\fBzpool list\fR [\fB-H\fR] [\fB-o\fR \fIproperty\fR[,...]] [\fIpool\fR] ...
-.fi
-
-.LP
-.nf
-\fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...
-.fi
-
-.LP
-.nf
-\fBzpool online\fR \fIpool\fR \fIdevice\fR ...
-.fi
-
-.LP
-.nf
-\fBzpool remove\fR \fIpool\fR \fIdevice\fR ...
-.fi
-
-.LP
-.nf
-\fBzpool replace\fR [\fB-f\fR] \fIpool\fR \fIdevice\fR [\fInew_device\fR]
-.fi
-
-.LP
-.nf
-\fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...
-.fi
-
-.LP
-.nf
-\fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR
-.fi
-
-.LP
-.nf
-\fBzpool status\fR [\fB-xv\fR] [\fIpool\fR] ...
-.fi
-
-.LP
-.nf
-\fBzpool upgrade\fR
-.fi
-
-.LP
-.nf
-\fBzpool upgrade\fR \fB-v\fR
-.fi
-
-.LP
-.nf
-\fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBzpool\fR command configures \fBZFS\fR storage pools. A storage pool is a
-collection of devices that provides physical storage and data replication for
-\fBZFS\fR datasets.
-.sp
-.LP
-All datasets within a storage pool share the same space. See \fBzfs\fR(8) for
-information on managing datasets.
-.SS "Virtual Devices (\fBvdev\fRs)"
-.sp
-.LP
-A "virtual device" describes a single device or a collection of devices
-organized according to certain performance and fault characteristics. The
-following virtual devices are supported:
-.sp
-.ne 2
-.na
-\fB\fBdisk\fR\fR
-.ad
-.RS 10n
-A block device, typically located under \fB/dev\fR. \fBZFS\fR can use
-individual slices, partitions or \fBgeom(4)\fR objects, though the recommended
-mode of operation is to use whole disks. A disk can be specified by a full
-path, or it can be a shorthand name (the relative portion of the path under
-"/dev"). For example, "da0" is equivalent to "/dev/da0".
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBfile\fR\fR
-.ad
-.RS 10n
+.\" Copyright (c) 2011, Martin Matuska <mm at FreeBSD.org>.
+.\" All Rights Reserved.
+.\"
+.\" The contents of this file are subject to the terms of the
+.\" Common Development and Distribution License (the "License").
+.\" You may not use this file except in compliance with the License.
+.\"
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+.\" or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions
+.\" and limitations under the License.
+.\"
+.\" When distributing Covered Code, include this CDDL HEADER in each
+.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+.\" If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying
+.\" information: Portions Copyright [yyyy] [name of copyright owner]
+.\"
+.\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 2011, Nexenta Systems, Inc. All Rights Reserved.
+.\" Copyright (c) 2011, Justin T. Gibbs <gibbs at FreeBSD.org>
+.\"
+.\" $FreeBSD: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 228206 2011-12-02 19:56:46Z mm $
+.\"
+.Dd November 28, 2011
+.Dt ZPOOL 8
+.Os
+.Sh NAME
+.Nm zpool
+.Nd configures ZFS storage pools
+.Sh SYNOPSIS
+.Nm
+.Op Fl \&?
+.Nm
+.Cm add
+.Op Fl fn
+.Ar pool vdev ...
+.Nm
+.Cm attach
+.Op Fl f
+.Ar pool device new_device
+.Nm
+.Cm clear
+.Op Fl F Op Fl n
+.Ar pool
+.Op Ar device
+.Nm
+.Cm create
+.Op Fl fn
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Op Fl O Ar file-system-property Ns = Ns Ar value
+.Ar ...
+.Op Fl m Ar mountpoint
+.Op Fl R Ar root
+.Ar pool vdev ...
+.Nm
+.Cm destroy
+.Op Fl f
+.Ar pool
+.Nm
+.Cm detach
+.Ar pool device
+.Nm
+.Cm export
+.Op Fl f
+.Ar pool ...
+.Nm
+.Cm get
+.Ar all | property Ns Op , Ns Ar ...
+.Ar pool ...
+.Nm
+.Cm history
+.Op Fl il
+.Op Ar pool
+.Ar ...
+.Nm
+.Cm import
+.Op Fl d Ar dir | Fl c Ar cachefile
+.Op Fl D
+.Nm
+.Cm import
+.Op Fl o Ar mntopts
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Op Fl d Ar dir | Fl c Ar cachefile
+.Op Fl D
+.Op Fl f
+.Op Fl m
+.Op Fl N
+.Op Fl R Ar root
+.Op Fl F Op Fl n
+.Fl a
+.Nm
+.Cm import
+.Op Fl o Ar mntopts
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Op Fl d Ar dir | Fl c Ar cachefile
+.Op Fl D
+.Op Fl f
+.Op Fl m
+.Op Fl N
+.Op Fl R Ar root
+.Op Fl F Op Fl n
+.Ar pool | id
+.Op Ar newpool
+.Nm
+.Cm iostat
+.Op Fl T Cm d Ns | Ns Cm u
+.Op Fl v
+.Op Ar pool
+.Ar ...
+.Nm
+.Cm labelclear
+.Op Fl f
+.Ar device
+.Nm
+.Cm list
+.Op Fl H
+.Op Fl o Ar property Ns Op , Ns Ar ...
+.Op Fl T Cm d Ns | Ns Cm u
+.Op Ar pool
+.Ar ...
+.Op Ar inverval Op Ar count
+.Nm
+.Cm offline
+.Op Fl t
+.Ar pool device ...
+.Nm
+.Cm online
+.Op Fl e
+.Ar pool device ...
+.Nm
+.Cm reguid
+.Ar pool
+.Nm
+.Cm remove
+.Ar pool device ...
+.Nm
+.Cm replace
+.Op Fl f
+.Ar pool device
+.Op Ar new_device
+.Nm
+.Cm scrub
+.Op Fl s
+.Ar pool ...
+.Nm
+.Cm set
+.Ar property Ns = Ns Ar value pool
+.Nm
+.Cm split
+.Op Fl n
+.Op Fl R Ar altroot
+.Op Fl o Ar mntopts
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar pool newpool
+.Op Ar device ...
+.Nm
+.Cm status
+.Op Fl vx
+.Op Fl T Cm d Ns | Ns Cm u
+.Op Ar pool
+.Ar ...
+.Op Ar interval Op Ar count
+.Nm
+.Cm upgrade
+.Op Fl v
+.Nm
+.Cm upgrade
+.Op Fl V Ar version
+.Fl a | Ar pool ...
+.Sh DESCRIPTION
+The
+.Nm
+command configures
+.Tn ZFS
+storage pools. A storage pool is a collection of devices that provides physical
+storage and data replication for
+.Tn ZFS
+datasets.
+.Pp
+All datasets within a storage pool share the same space. See
+.Xr zfs 8
+for information on managing datasets.
+.Ss Virtual Devices (vdevs)
+A
+.Qq virtual device
+.Pq No vdev
+describes a single device or a collection of devices organized according to 
+certain performance and fault characteristics. The following virtual devices
+are supported:
+.Bl -tag
+.It Sy disk
+A block device, typically located under
+.Pa /dev .
+.Tn ZFS
+can use individual slices or partitions, though the recommended mode of
+operation is to use whole disks. A disk can be specified by a full path to the
+device or the
+.Xr geom 4
+provider name. When given a whole disk,
+.Tn ZFS
+automatically labels the disk, if necessary.
+.It Sy file
 A regular file. The use of files as a backing store is strongly discouraged. It
 is designed primarily for experimental purposes, as the fault tolerance of a
-file is only as good as the file system of which it is a part. A file must be
+file is only as good the file system of which it is a part. A file must be
 specified by a full path.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBmirror\fR\fR
-.ad
-.RS 10n
+.It Sy mirror
 A mirror of two or more devices. Data is replicated in an identical fashion
-across all components of a mirror. A mirror with \fIN\fR disks of size \fIX\fR
-can hold \fIX\fR bytes and can withstand (\fIN-1\fR) devices failing before
-data integrity is compromised.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBraidz\fR\fR
-.ad
-.br
-.na
-\fB\fBraidz1\fR\fR
-.ad
-.br
-.na
-\fB\fBraidz2\fR\fR
-.ad
-.br
-.na
-\fB\fBraidz3\fR\fR
-.ad
-.RS 10n
-A variation on \fBRAID-5\fR that allows for better distribution of parity and
-eliminates the "\fBRAID-5\fR write hole" (in which data and parity become
-inconsistent after a power loss). Data and parity is striped across all disks
-within a \fBraidz\fR group.
-.sp
-A \fBraidz\fR group can have single-, double- , or triple parity, meaning that
-the \fBraidz\fR group can sustain one, two, or three failures, respectively,
-without losing any data. The \fBraidz1\fR \fBvdev\fR type specifies a
-single-parity \fBraidz\fR group; the \fBraidz2\fR \fBvdev\fR type specifies a
-double-parity \fBraidz\fR group; and the \fBraidz3\fR \fBvdev\fR type specifies
-a triple-parity \fBraidz\fR group. The \fBraidz\fR \fBvdev\fR type is an alias
-for \fBraidz1\fR.
-.sp
-A \fBraidz\fR group with \fIN\fR disks of size \fIX\fR with \fIP\fR parity
-disks can hold approximately (\fIN-P\fR)*\fIX\fR bytes and can withstand
-\fIP\fR device(s) failing before data integrity is compromised. The minimum
-number of devices in a \fBraidz\fR group is one more than the number of parity
-disks. The recommended number is between 3 and 9 to help increase performance.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBspare\fR\fR
-.ad
-.RS 10n
-A special pseudo-\fBvdev\fR which keeps track of available hot spares for a
-pool. For more information, see the "Hot Spares" section.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBlog\fR\fR
-.ad
-.RS 10n
+across all components of a mirror. A mirror with
+.Em N
+disks of size
+.Em X
+can hold
+.Em X
+bytes and can withstand
+.Pq Em N-1
+devices failing before data integrity is compromised.
+.It Sy raidz
+(or
+.Sy raidz1 raidz2 raidz3 ) .
+A variation on
+.Sy RAID-5
+that allows for better distribution of parity and eliminates the
+.Qq Sy RAID-5
+write hole (in which data and parity become inconsistent after a power loss).
+Data and parity is striped across all disks within a
+.No raidz
+group.
+.Pp
+A
+.No raidz
+group can have single-, double- , or triple parity, meaning that the
+.No raidz
+group can sustain one, two, or three failures, respectively, without
+losing any data. The 
+.Sy raidz1 No vdev
+type specifies a single-parity
+.No raidz
+group; the
+.Sy raidz2 No vdev
+type specifies a double-parity
+.No raidz
+group; and the
+.Sy raidz3 No vdev
+type specifies a triple-parity
+.No raidz
+group. The
+.Sy raidz No vdev
+type is an alias for
+.Sy raidz1 .
+.Pp
+A
+.No raidz
+group with
+.Em N
+disks of size
+.Em X
+with
+.Em P
+parity disks can hold approximately
+.Sm off
+.Pq Em N-P
+*X
+.Sm on
+bytes and can withstand
+.Em P
+device(s) failing before data integrity is compromised. The minimum number of
+devices in a
+.No raidz
+group is one more than the number of parity disks. The
+recommended number is between 3 and 9 to help increase performance.
+.It Sy spare
+A special
+.No pseudo- Ns No vdev
+which keeps track of available hot spares for a pool.
+For more information, see the
+.Qq Sx Hot Spares
+section.
+.It Sy log
 A separate-intent log device. If more than one log device is specified, then
 writes are load-balanced between devices. Log devices can be mirrored. However,
-\fBraidz\fR \fBvdev\fR types are not supported for the intent log. For more
-information, see the "Intent Log" section.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBcache\fR\fR
-.ad
-.RS 10n
-A device used to cache storage pool data. A cache device cannot be cannot be
-configured as a mirror or \fBraidz\fR group. For more information, see the
-"Cache Devices" section.
-.RE
-
-.sp
-.LP
-Virtual devices cannot be nested, so a mirror or \fBraidz\fR virtual device can
-only contain files or disks. Mirrors of mirrors (or other combinations) are not
+.No raidz
+.No vdev
+types are not supported for the intent log. For more information,
+see the 
+.Qq Sx Intent Log
+section.
+.It Sy cache
+A device used to cache storage pool data. A cache device cannot be configured
+as a mirror or
+.No raidz
+group. For more information, see the
+.Qq Sx Cache Devices
+section.
+.El
+.Pp
+Virtual devices cannot be nested, so a mirror or
+.No raidz
+virtual device can only
+contain files or disks. Mirrors of mirrors (or other combinations) are not
 allowed.
-.sp
-.LP
+.Pp
 A pool can have any number of virtual devices at the top of the configuration
-(known as "root vdevs"). Data is dynamically distributed across all top-level
-devices to balance data among devices. As new virtual devices are added,
-\fBZFS\fR automatically places data on the newly available devices.
-.sp
-.LP
+(known as
+.Qq root
+.No vdev Ns s).
+Data is dynamically distributed across all top-level devices to balance data 
+among devices. As new virtual devices are added,
+.Tn ZFS
+automatically places data on the newly available devices.
+.Pp
 Virtual devices are specified one at a time on the command line, separated by
-whitespace. The keywords "mirror" and "raidz" are used to distinguish where a
-group ends and another begins. For example, the following creates two root
-vdevs, each a mirror of two disks:
-.sp
-.in +2
-.nf
-# \fBzpool create mypool mirror da0 da1 mirror da2 da3\fR
-.fi
-.in -2
-.sp
-
-.SS "Device Failure and Recovery"
-.sp
-.LP
-\fBZFS\fR supports a rich set of mechanisms for handling device failure and
-data corruption. All metadata and data is checksummed, and \fBZFS\fR
+whitespace. The keywords 
+.Qq mirror
+and
+.Qq raidz
+are used to distinguish where a group ends and another begins. For example, the
+following creates two root
+.No vdev Ns s,
+each a mirror of two disks:
+.Bd -literal -offset 2n
+.Li # Ic zpool create mypool mirror da0 da1 mirror da2 da3
+.Ed
+.Ss Device Failure and Recovery
+.Tn ZFS
+supports a rich set of mechanisms for handling device failure and data
+corruption. All metadata and data is checksummed, and
+.Tn ZFS
 automatically repairs bad data from a good copy when corruption is detected.
-.sp
-.LP
+.Pp
 In order to take advantage of these features, a pool must make use of some form
-of redundancy, using either mirrored or \fBraidz\fR groups. While \fBZFS\fR
-supports running in a non-redundant configuration, where each root vdev is
-simply a disk or file, this is strongly discouraged. A single case of bit
+of redundancy, using either mirrored or
+.No raidz
+groups. While
+.Tn ZFS
+supports running in a non-redundant configuration, where each root
+.No vdev
+is simply a disk or file, this is strongly discouraged. A single case of bit
 corruption can render some or all of your data unavailable.
-.sp
-.LP
+.Pp
 A pool's health status is described by one of three states: online, degraded,
 or faulted. An online pool has all devices operating normally. A degraded pool
 is one in which one or more devices have failed, but the data is still
 available due to a redundant configuration. A faulted pool has corrupted
 metadata, or one or more faulted devices, and insufficient replicas to continue
 functioning.
-.sp
-.LP
-The health of the top-level vdev, such as mirror or \fBraidz\fR device, is
-potentially impacted by the state of its associated vdevs, or component
-devices. A top-level vdev or component device is in one of the following
-states:
-.sp
-.ne 2
-.na
-\fB\fBDEGRADED\fR\fR
-.ad
-.RS 12n
-One or more top-level vdevs is in the degraded state because one or more
+.Pp
+The health of the top-level
+.No vdev ,
+such as mirror or
+.No raidz
+device, is
+potentially impacted by the state of its associated
+.No vdev Ns s,
+or component devices. A top-level
+.No vdev
+or component device is in one of the following states:
+.Bl -tag -width "DEGRADED"
+.It Sy DEGRADED
+One or more top-level
+.No vdev Ns s
+is in the degraded state because one or more
 component devices are offline. Sufficient replicas exist to continue
 functioning.
-.sp
+.Pp
 One or more component devices is in the degraded or faulted state, but
 sufficient replicas exist to continue functioning. The underlying conditions
 are as follows:
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.Bl -bullet -offset 2n
+.It
 The number of checksum errors exceeds acceptable levels and the device is
-degraded as an indication that something may be wrong. \fBZFS\fR continues to
-use the device as necessary.
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-The number of I/O errors exceeds acceptable levels. The device could not be
+degraded as an indication that something may be wrong.
+.Tn ZFS
+continues to use the device as necessary.
+.It
+The number of
+.Tn I/O
+errors exceeds acceptable levels. The device could not be
 marked as faulted because there are insufficient replicas to continue
 functioning.
-.RE
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBFAULTED\fR\fR
-.ad
-.RS 12n
-One or more top-level vdevs is in the faulted state because one or more
+.El
+.It Sy FAULTED
+One or more top-level
+.No vdev Ns s
+is in the faulted state because one or more
 component devices are offline. Insufficient replicas exist to continue
 functioning.
-.sp
+.Pp
 One or more component devices is in the faulted state, and insufficient
 replicas exist to continue functioning. The underlying conditions are as
 follows:
-.RS +4
-.TP
-.ie t \(bu
-.el o
+.Bl -bullet -offset 2n
+.It
 The device could be opened, but the contents did not match expected values.
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-The number of I/O errors exceeds acceptable levels and the device is faulted to
+.It
+The number of
+.Tn I/O
+errors exceeds acceptable levels and the device is faulted to
 prevent further use of the device.
-.RE
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBOFFLINE\fR\fR
-.ad
-.RS 12n
-The device was explicitly taken offline by the "\fBzpool offline\fR" command.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBONLINE\fR\fR
-.ad
-.RS 12n
+.El
+.It Sy OFFLINE
+The device was explicitly taken offline by the
+.Qq Nm Cm offline
+command.
+.It Sy ONLINE
 The device is online and functioning.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBREMOVED\fR\fR
-.ad
-.RS 12n
+.It Sy REMOVED
 The device was physically removed while the system was running. Device removal
 detection is hardware-dependent and may not be supported on all platforms.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBUNAVAIL\fR\fR
-.ad
-.RS 12n
+.It Sy UNAVAIL
 The device could not be opened. If a pool is imported when a device was
 unavailable, then the device will be identified by a unique identifier instead
 of its path since the path was never correct in the first place.
-.RE
-
-.sp
-.LP
-If a device is removed and later re-attached to the system, \fBZFS\fR attempts
-to put the device online automatically. Device attach detection is
+.El
+.Pp
+If a device is removed and later reattached to the system,
+.Tn ZFS
+attempts to put the device online automatically. Device attach detection is
 hardware-dependent and might not be supported on all platforms.
-.SS "Hot Spares"
-.sp
-.LP
-\fBZFS\fR allows devices to be associated with pools as "hot spares". These
-devices are not actively used in the pool, but when an active device fails, it
-is automatically replaced by a hot spare. To create a pool with hot spares,
-specify a "spare" \fBvdev\fR with any number of devices. For example,
-.sp
-.in +2
-.nf
-# zpool create pool mirror da0 da1 spare da2 da3
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-Spares can be shared across multiple pools, and can be added with the "\fBzpool
-add\fR" command and removed with the "\fBzpool remove\fR" command. Once a spare
-replacement is initiated, a new "spare" \fBvdev\fR is created within the
-configuration that will remain there until the original device is replaced. At
-this point, the hot spare becomes available again if another device fails.
-.sp
-.LP
+.Ss Hot Spares
+.Tn ZFS
+allows devices to be associated with pools as
+.Qq hot spares .
+These devices are not actively used in the pool, but when an active device
+fails, it is automatically replaced by a hot spare. To create a pool with hot
+spares, specify a 
+.Qq spare
+.No vdev
+with any number of devices. For example,
+.Bd -literal -offset 2n
+.Li # Ic zpool create pool mirror da0 da1 spare da2 da3
+.Ed
+.Pp
+Spares can be shared across multiple pools, and can be added with the
+.Qq Nm Cm add
+command and removed with the
+.Qq Nm Cm remove
+command. Once a spare replacement is initiated, a new "spare"
+.No vdev
+is created
+within the configuration that will remain there until the original device is
+replaced. At this point, the hot spare becomes available again if another
+device fails.
+.Pp
 If a pool has a shared spare that is currently being used, the pool can not be
 exported since other pools may use this shared spare, which may lead to
 potential data corruption.
-.sp
-.LP
+.Pp
 An in-progress spare replacement can be cancelled by detaching the hot spare.
 If the original faulted device is detached, then the hot spare assumes its
 place in the configuration, and is removed from the spare list of all active
 pools.
-.sp
-.LP
+.Pp
 Spares cannot replace log devices.
-.SS "Intent Log"
-.sp
-.LP
-The \fBZFS\fR Intent Log (\fBZIL\fR) satisfies \fBPOSIX\fR requirements for
-synchronous transactions. For instance, databases often require their
-transactions to be on stable storage devices when returning from a system call.
-\fBNFS\fR and other applications can also use \fBfsync\fR() to ensure data
-stability. By default, the intent log is allocated from blocks within the main
-pool. However, it might be possible to get better performance using separate
-intent log devices such as \fBNVRAM\fR or a dedicated disk. For example:
-.sp
-.in +2
-.nf
-\fB# zpool create pool da0 da1 log da3\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Ss Intent Log
+The 
+.Tn ZFS
+Intent Log
+.Pq Tn ZIL
+satisfies
+.Tn POSIX
+requirements for synchronous transactions. For instance, databases often
+require their transactions to be on stable storage devices when returning from
+a system call.
+.Tn NFS
+and other applications can also use
+.Xr fsync 2
+to ensure data stability. By default, the intent log is allocated from blocks
+within the main pool. However, it might be possible to get better performance
+using separate intent log devices such as
+.Tn NVRAM
+or a dedicated disk. For example:
+.Bd -literal -offset 2n
+.Li # Ic zpool create pool da0 da1 log da2
+.Ed
+.Pp
 Multiple log devices can also be specified, and they can be mirrored. See the
-EXAMPLES section for an example of mirroring multiple log devices.
-.sp
-.LP
-Log devices can be added, replaced, attached, detached, and imported and
-exported as part of the larger pool. Mirrored log devices can be removed by
-specifying the top-level mirror for the log.
-.SS "Cache Devices"
-.sp
-.LP
+.Sx EXAMPLES
+section for an example of mirroring multiple log devices.
+.Pp
+Log devices can be added, replaced, attached, detached, imported and exported
+as part of the larger pool. Mirrored log devices can be removed by specifying
+the top-level mirror for the log.
+.Ss Cache devices
 Devices can be added to a storage pool as "cache devices." These devices
 provide an additional layer of caching between main memory and disk. For
 read-heavy workloads, where the working set size is much larger than what can
@@ -494,172 +494,150 @@
 set to be served from low latency media. Using cache devices provides the
 greatest performance improvement for random read-workloads of mostly static
 content.
-.sp
-.LP
-To create a pool with cache devices, specify a "cache" \fBvdev\fR with any
-number of devices. For example:
-.sp
-.in +2
-.nf
-\fB# zpool create pool da0 da1 cache da2 da3\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-Cache devices cannot be mirrored or part of a \fBraidz\fR configuration. If a
-read error is encountered on a cache device, that read \fBI/O\fR is reissued to
-the original storage pool device, which might be part of a mirrored or
-\fBraidz\fR configuration.
-.sp
-.LP
+.Pp
+To create a pool with cache devices, specify a "cache"
+.No vdev
+with any number of devices. For example:
+.Bd -literal -offset 2n
+.Li # Ic zpool create pool da0 da1 cache da2 da3
+.Ed
+.Pp
+Cache devices cannot be mirrored or part of a
+.No raidz
+configuration. If a read
+error is encountered on a cache device, that read
+.Tn I/O
+is reissued to the original storage pool device, which might be part of a
+mirrored or
+.No raidz
+configuration.
+.Pp
 The content of the cache devices is considered volatile, as is the case with
 other system caches.
-.SS "Properties"
-.sp
-.LP
+.Ss Properties
 Each pool has several properties associated with it. Some properties are
 read-only statistics while others are configurable and change the behavior of
 the pool. The following are read-only properties:
-.sp
-.ne 2
-.na
-\fB\fBavailable\fR\fR
-.ad
-.RS 20n
-Amount of storage available within the pool. This property can also be referred
-to by its shortened column name, "avail".
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBcapacity\fR\fR
-.ad
-.RS 20n
+.Bl -tag -width "dedupratio"
+.It Sy alloc
+Amount of storage space within the pool that has been physically allocated.
+.It Sy capacity
 Percentage of pool space used. This property can also be referred to by its
 shortened column name, "cap".
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBhealth\fR\fR
-.ad
-.RS 20n
-The current health of the pool. Health can be "\fBONLINE\fR", "\fBDEGRADED\fR",
-"\fBFAULTED\fR", " \fBOFFLINE\fR", "\fBREMOVED\fR", or "\fBUNAVAIL\fR".
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBguid\fR\fR
-.ad
-.RS 20n
+.It Sy comment
+A text string consisting of printable ASCII characters that will be stored
+such that it is available even if the pool becomes faulted.  An administrator
+can provide additional information about a pool using this property.
+.It Sy dedupratio
+The deduplication ratio specified for a pool, expressed as a multiplier.
+For example, a
+.S dedupratio
+value of 1.76 indicates that 1.76 units of data were stored but only 1 unit of disk space was actually consumed. See
+.Xr zfs 8
+for a description of the deduplication feature.
+.It Sy free
+Number of blocks within the pool that are not allocated.
+.It Sy guid
 A unique identifier for the pool.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBsize\fR\fR
-.ad
-.RS 20n
+.It Sy health
+The current health of the pool. Health can be
+.Qq Sy ONLINE ,
+.Qq Sy DEGRADED ,
+.Qq Sy FAULTED ,
+.Qq Sy OFFLINE ,
+.Qq Sy REMOVED ,
+or
+.Qq Sy UNAVAIL .
+.It Sy size
 Total size of the storage pool.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBused\fR\fR
-.ad
-.RS 20n
+.It Sy used
 Amount of storage space used within the pool.
-.RE
-
-.sp
-.LP
+.El
+.Pp
 These space usage properties report actual physical space available to the
 storage pool. The physical space can be different from the total amount of
 space that any contained datasets can actually use. The amount of space used in
-a \fBraidz\fR configuration depends on the characteristics of the data being
-written. In addition, \fBZFS\fR reserves some space for internal accounting
-that the \fBzfs\fR(8) command takes into account, but the \fBzpool\fR command
-does not. For non-full pools of a reasonable size, these effects should be
-invisible. For small pools, or pools that are close to being completely full,
-these discrepancies may become more noticeable.
-.sp
-.LP
+a
+.No raidz
+configuration depends on the characteristics of the data being written.
+In addition,
+.Tn ZFS
+reserves some space for internal accounting that the
+.Xr zfs 8
+command takes into account, but the
+.Xr zpool 8
+command does not. For non-full pools of a reasonable size, these effects should
+be invisible. For small pools, or pools that are close to being completely
+full, these discrepancies may become more noticeable.
+.Pp
 The following property can be set at creation time and import time:
-.sp
-.ne 2
-.na
-\fB\fBaltroot\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width 2n
+.It Sy altroot
 Alternate root directory. If set, this directory is prepended to any mount
 points within the pool. This can be used when examining an unknown pool where
 the mount points cannot be trusted, or in an alternate boot environment, where
-the typical paths are not valid. \fBaltroot\fR is not a persistent property. It
-is valid only while the system is up. Setting \fBaltroot\fR defaults to using
-\fBcachefile\fR=none, though this may be overridden using an explicit setting.
-.RE
-
-.sp
-.LP
+the typical paths are not valid.
+.Sy altroot
+is not a persistent property. It is valid only while the system is up.
+Setting
+.Sy altroot 
+defaults to using
+.Cm cachefile=none ,
+though this may be overridden using an explicit setting.
+.El
+.Pp
+The following property can only be set at import time:
+.Bl -tag -width 2n
+.It Sy readonly Ns = Ns Cm on No | Cm off
+If set to
+.Cm on ,
+pool will be imported in read-only mode with the following restrictions:
+.Bl -bullet -offset 2n
+.It
+Synchronous data in the intent log will not be accessible
+.It
+Properties of the pool can not be changed
+.It
+Datasets of this pool can only be mounted read-only
+.It
+To write to a read-only pool, a export and import of the pool is required.
+.El
+.El
+.Pp
 The following properties can be set at creation time and import time, and later
-changed with the \fBzpool set\fR command:
-.sp
-.ne 2
-.na
-\fB\fBautoexpand\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
+changed with the
+.Ic zpool set
+command:
+.Bl -tag -width 2n
+.It Sy autoexpand Ns = Ns Cm on No | Cm off
 Controls automatic pool expansion when the underlying LUN is grown. If set to
-\fBon\fR, the pool will be resized according to the size of the expanded
-device. If the device is part of a mirror or \fBraidz\fR then all devices
-within that mirror/\fBraidz\fR group must be expanded before the new space is
-made available to the pool. The default behavior is \fBoff\fR. This property
-can also be referred to by its shortened column name, \fBexpand\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBautoreplace\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls automatic device replacement. If set to "\fBoff\fR", device
-replacement must be initiated by the administrator by using the "\fBzpool
-replace\fR" command. If set to "\fBon\fR", any new device, found in the same
+.Qq Cm on ,
+the pool will be resized according to the size of the expanded
+device. If the device is part of a mirror or
+.No raidz
+then all devices within that
+.No mirror/ Ns No raidz
+group must be expanded before the new space is made available to
+the pool. The default behavior is
+.Qq off .
+This property can also be referred to by its shortened column name,
+.Sy expand .
+.It Sy autoreplace Ns = Ns Cm on No | Cm off
+Controls automatic device replacement. If set to
+.Qq Cm off ,
+device replacement must be initiated by the administrator by using the 
+.Qq Nm Cm replace
+command. If set to 
+.Qq Cm on ,
+any new device, found in the same
 physical location as a device that previously belonged to the pool, is
-automatically formatted and replaced. The default behavior is "\fBoff\fR". This
-property can also be referred to by its shortened column name, "replace".
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBbootfs\fR=\fIpool\fR/\fIdataset\fR\fR
-.ad
-.sp .6
-.RS 4n
+automatically formatted and replaced. The default behavior is
+.Qq Cm off .
+This property can also be referred to by its shortened column name, "replace".
+.It Sy bootfs Ns = Ns Ar pool Ns / Ns Ar dataset
 Identifies the default bootable dataset for the root pool. This property is
 expected to be set mainly by the installation and upgrade programs.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBcachefile\fR=\fIpath\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Sy cachefile Ns = Ns Ar path No | Cm none
 Controls the location of where the pool configuration is cached. Discovering
 all pools on system startup requires a cached copy of the configuration data
 that is stored on the root file system. All pools in this cache are
@@ -667,1137 +645,1083 @@
 install and clustering, need to cache this information in a different location
 so that pools are not automatically imported. Setting this property caches the
 pool configuration in a different location that can later be imported with
-"\fBzpool import -c\fR". Setting it to the special value "\fBnone\fR" creates a
-temporary pool that is never cached, and the special value \fB\&''\fR (empty
-string) uses the default location.
-.sp
-Multiple pools can share the same cache file. Because the kernel destroys and
-recreates this file when pools are added and removed, care should be taken when
-attempting to access this file. When the last pool using a \fBcachefile\fR is
-exported or destroyed, the file is removed.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBdelegation\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Qq Nm Cm import Fl c .
+Setting it to the special value
+.Qq Cm none
+creates a temporary pool that is never cached, and the special value 
+.Cm ''
+(empty string) uses the default location.
+.It Sy dedupditto Ns = Ns Ar number
+Threshold for the number of block ditto copies. If the reference count for a
+deduplicated block increases above this number, a new ditto copy of this block
+is automatically stored. Deafult setting is
+.Cm 0 .
+.It Sy delegation Ns = Ns Cm on No | Cm off
 Controls whether a non-privileged user is granted access based on the dataset
-permissions defined on the dataset. See \fBzfs\fR(8) for more information on
-\fBZFS\fR delegated administration.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBfailmode\fR=\fBwait\fR | \fBcontinue\fR | \fBpanic\fR\fR
-.ad
-.sp .6
-.RS 4n
+permissions defined on the dataset. See
+.Xr zfs 8
+for more information on
+.Tn ZFS
+delegated administration.
+.It Sy failmode Ns = Ns Cm wait No | Cm continue No | Cm panic
 Controls the system behavior in the event of catastrophic pool failure. This
 condition is typically a result of a loss of connectivity to the underlying
 storage device(s) or a failure of all devices within the pool. The behavior of
 such an event is determined as follows:
-.sp
-.ne 2
-.na
-\fB\fBwait\fR\fR
-.ad
-.RS 12n
-Blocks all \fBI/O\fR access until the device connectivity is recovered and the
-errors are cleared. This is the default behavior.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBcontinue\fR\fR
-.ad
-.RS 12n
-Returns \fBEIO\fR to any new write \fBI/O\fR requests but allows reads to any
-of the remaining healthy devices. Any write requests that have yet to be
-committed to disk would be blocked.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBpanic\fR\fR
-.ad
-.RS 12n
+.Bl -tag -width indent
+.It Sy wait
+Blocks all
+.Tn I/O
+access until the device connectivity is recovered and the errors are cleared.
+This is the default behavior.
+.It Sy continue
+Returns
+.Em EIO
+to any new write
+.Tn I/O
+requests but allows reads to any of the remaining healthy devices. Any write
+requests that have yet to be committed to disk would be blocked.
+.It Sy panic
 Prints out a message to the console and generates a system crash dump.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBlistsnaps\fR=on | off\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Sy listsnaps Ns = Ns Cm on No | Cm off
 Controls whether information about snapshots associated with this pool is
-output when "\fBzfs list\fR" is run without the \fB-t\fR option. The default
-value is "off".
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBversion\fR=\fIversion\fR\fR
-.ad
-.sp .6
-.RS 4n
+output when
+.Qq Nm zfs Cm list
+is run without the
+.Fl t
+option. The default value is
+.Cm off .
+.It Sy version Ns = Ns Ar version
 The current on-disk version of the pool. This can be increased, but never
-decreased. The preferred method of updating pools is with the "\fBzpool
-upgrade\fR" command, though this property can be used when a specific version
-is needed for backwards compatibility. This property can be any number between
-1 and the current version reported by "\fBzpool upgrade -v\fR".
-.RE
-
-.SS "Subcommands"
-.sp
-.LP
+decreased. The preferred method of updating pools is with the
+.Qq Nm Cm upgrade
+command, though this property can be used when a specific version is needed
+for backwards compatibility. This property can be any number between 1 and the
+current version reported by
+.Qo Ic zpool upgrade -v Qc .
+.El
+.Sh SUBCOMMANDS
 All subcommands that modify state are logged persistently to the pool in their
 original form.
-.sp
-.LP
-The \fBzpool\fR command provides subcommands to create and destroy storage
-pools, add capacity to storage pools, and provide information about the storage
-pools. The following subcommands are supported:
-.sp
-.ne 2
-.na
-\fB\fBzpool\fR \fB-?\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Pp
+The
+.Nm
+command provides subcommands to create and destroy storage pools, add capacity
+to storage pools, and provide information about the storage pools. The following
+subcommands are supported:
+.Bl -tag -width 2n
+.It Xo
+.Nm
+.Op Fl \&?
+.Xc
+.Pp
 Displays a help message.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool add\fR [\fB-fn\fR] \fIpool\fR \fIvdev\fR ...\fR
-.ad
-.sp .6
-.RS 4n
-Adds the specified virtual devices to the given pool. The \fIvdev\fR
-specification is described in the "Virtual Devices" section. The behavior of
-the \fB-f\fR option, and the device checks performed are described in the
-"zpool create" subcommand.
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.RS 6n
-Forces use of \fBvdev\fRs, even if they appear in use or specify a conflicting
-replication level. Not all devices can be overridden in this manner.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-n\fR\fR
-.ad
-.RS 6n
+.It Xo
+.Nm
+.Cm add
+.Op Fl fn
+.Ar pool vdev ...
+.Xc
+.Pp
+Adds the specified virtual devices to the given pool. The
+.No vdev
+specification is described in the
+.Qq Sx Virtual Devices
+section. The behavior of the
+.Fl f
+option, and the device checks performed are described in the
+.Qq Nm Cm create
+subcommand.
+.Bl -tag -width indent
+.It Fl f
+Forces use of
+.Ar vdev ,
+even if they appear in use or specify a conflicting replication level.
+Not all devices can be overridden in this manner.
+.It Fl n
 Displays the configuration that would be used without actually adding the
-\fBvdev\fRs. The actual pool creation can still fail due to insufficient
-privileges or device sharing.
-.RE
-
+.Ar vdev Ns s.
+The actual pool creation can still fail due to insufficient privileges or device
+sharing.
+.Pp
 Do not add a disk that is currently configured as a quorum device to a zpool.
 After a disk is in the pool, that disk can then be configured as a quorum
 device.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool attach\fR [\fB-f\fR] \fIpool\fR \fIdevice\fR \fInew_device\fR\fR
-.ad
-.sp .6
-.RS 4n
-Attaches \fInew_device\fR to an existing \fBzpool\fR device. The existing
-device cannot be part of a \fBraidz\fR configuration. If \fIdevice\fR is not
-currently part of a mirrored configuration, \fIdevice\fR automatically
-transforms into a two-way mirror of \fIdevice\fR and \fInew_device\fR. If
-\fIdevice\fR is part of a two-way mirror, attaching \fInew_device\fR creates a
-three-way mirror, and so on. In either case, \fInew_device\fR begins to
-resilver immediately.
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.RS 6n
-Forces use of \fInew_device\fR, even if its appears to be in use. Not all
-devices can be overridden in this manner.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool clear\fR \fIpool\fR [\fIdevice\fR] ...\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm attach
+.Op Fl f
+.Ar pool device new_device
+.Xc
+.Pp
+Attaches
+.Ar new_device
+to an existing
+.Sy zpool
+device. The existing device cannot be part of a
+.No raidz
+configuration. If
+.Ar device
+is not currently part of a mirrored configuration,
+.Ar device
+automatically transforms into a two-way mirror of
+.Ar device No and Ar new_device .
+If
+.Ar device
+is part of a two-way mirror, attaching
+.Ar new_device
+creates a three-way mirror, and so on. In either case,
+.Ar new_device
+begins to resilver immediately.
+.Bl -tag -width indent
+.It Fl f
+Forces use of
+.Ar new_device ,
+even if its appears to be in use. Not all devices can be overridden in this
+manner.
+.El
+.It Xo
+.Nm
+.Cm clear
+.Op Fl F Op Fl n
+.Ar pool
+.Op Ar device
+.Xc
+.Pp
 Clears device errors in a pool. If no arguments are specified, all device
 errors within the pool are cleared. If one or more devices is specified, only
 those errors associated with the specified device or devices are cleared.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool create\fR [\fB-fn\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-O\fR
-\fIfile-system-property=value\fR] ... [\fB-m\fR \fImountpoint\fR] [\fB-R\fR
-\fIroot\fR] \fIpool\fR \fIvdev\fR ...\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width indent
+.It Fl F
+Initiates recovery mode for an unopenable pool. Attempts to discard the last
+few transactions in the pool to return it to an openable state. Not all damaged
+pools can be recovered by using this option. If successful, the data from the
+discarded transactions is irretrievably lost.
+.It Fl n
+Used in combination with the
+.Fl F
+flag. Check whether discarding transactions would make the pool openable, but
+do not actually discard any transactions.
+.El
+.It Xo
+.Nm
+.Cm create
+.Op Fl fn
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Op Fl O Ar file-system-property Ns = Ns Ar value
+.Ar ...
+.Op Fl m Ar mountpoint
+.Op Fl R Ar root
+.Ar pool vdev ...
+.Xc
+.Pp
 Creates a new storage pool containing the virtual devices specified on the
 command line. The pool name must begin with a letter, and can only contain
 alphanumeric characters as well as underscore ("_"), dash ("-"), and period
 ("."). The pool names "mirror", "raidz", "spare" and "log" are reserved, as are
-names beginning with the pattern "c[0-9]". The \fBvdev\fR specification is
-described in the "Virtual Devices" section.
-.sp
+names beginning with the pattern "c[0-9]". The
+.No vdev
+specification is described in the
+.Qq Sx Virtual Devices
+section.
+.Pp
 The command verifies that each device specified is accessible and not currently
 in use by another subsystem. There are some uses, such as being currently
 mounted, or specified as the dedicated dump device, that prevents a device from
-ever being used by \fBZFS\fR. Other uses, such as having a preexisting
-\fBUFS\fR file system, can be overridden with the \fB-f\fR option.
-.sp
+ever being used by
+.Tn ZFS
+Other uses, such as having a preexisting
+.Sy UFS
+file system, can be overridden with the
+.Fl f
+option.
+.Pp
 The command also checks that the replication strategy for the pool is
 consistent. An attempt to combine redundant and non-redundant storage in a
-single pool, or to mix disks and files, results in an error unless \fB-f\fR is
-specified. The use of differently sized devices within a single \fBraidz\fR or
-mirror group is also flagged as an error unless \fB-f\fR is specified.
-.sp
-Unless the \fB-R\fR option is specified, the default mount point is
-"/\fIpool\fR". The mount point must not exist or must be empty, or else the
-root dataset cannot be mounted. This can be overridden with the \fB-m\fR
+single pool, or to mix disks and files, results in an error unless
+.Fl f
+is specified. The use of differently sized devices within a single
+.No raidz
+or mirror group is also flagged as an error unless
+.Fl f
+is specified.
+.Pp
+Unless the
+.Fl R
+option is specified, the default mount point is
+.Qq Pa /pool .
+The mount point must not exist or must be empty, or else the
+root dataset cannot be mounted. This can be overridden with the
+.Fl m
 option.
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.sp .6
-.RS 4n
-Forces use of \fBvdev\fRs, even if they appear in use or specify a conflicting
-replication level. Not all devices can be overridden in this manner.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-n\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width indent
+.It Fl f
+Forces use of 
+.Ar vdev Ns s,
+even if they appear in use or specify a conflicting replication level.
+Not all devices can be overridden in this manner.
+.It Fl n
 Displays the configuration that would be used without actually creating the
 pool. The actual pool creation can still fail due to insufficient privileges or
 device sharing.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIproperty=value\fR [\fB-o\fR \fIproperty=value\fR] ...\fR
-.ad
-.sp .6
-.RS 4n
-Sets the given pool properties. See the "Properties" section for a list of
-valid properties that can be set.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-O\fR \fIfile-system-property=value\fR\fR
-.ad
-.br
-.na
-\fB[\fB-O\fR \fIfile-system-property=value\fR] ...\fR
-.ad
-.sp .6
-.RS 4n
+.It Xo
+.Fl o Ar property Ns = Ns Ar value
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Xc
+Sets the given pool properties. See the
+.Qq Sx Properties
+section for a list of valid properties that can be set.
+.It Xo
+.Fl O
+.Ar file-system-property Ns = Ns Ar value
+.Op Fl O Ar file-system-property Ns = Ns Ar value
+.Ar ...
+.Xc
 Sets the given file system properties in the root file system of the pool. See
-the "Properties" section of \fBzfs\fR(8) for a list of valid properties that
+.Xr zfs 8 Properties
+for a list of valid properties that
 can be set.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-R\fR \fIroot\fR\fR
-.ad
-.sp .6
-.RS 4n
-Equivalent to "-o cachefile=none,altroot=\fIroot\fR"
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-m\fR \fImountpoint\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl R Ar root
+Equivalent to
+.Qq Fl o Cm cachefile=none,altroot= Ns Pa root
+.It Fl m Ar mountpoint
 Sets the mount point for the root dataset. The default mount point is
-"/\fIpool\fR" or "\fBaltroot\fR/\fIpool\fR" if \fBaltroot\fR is specified. The
-mount point must be an absolute path, "\fBlegacy\fR", or "\fBnone\fR". For more
-information on dataset mount points, see \fBzfs\fR(8).
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool destroy\fR [\fB-f\fR] \fIpool\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Qq Pa /pool
+or
+.Qq Cm altroot Ns Pa /pool
+if
+.Sy altroot
+is specified. The mount point must be an absolute path, 
+.Qq Cm legacy ,
+or
+.Qq Cm none .
+For more information on dataset mount points, see
+.Xr zfs 8 .
+.El
+.It Xo
+.Nm
+.Cm destroy
+.Op Fl f
+.Ar pool
+.Xc
+.Pp
 Destroys the given pool, freeing up any devices for other use. This command
 tries to unmount any active datasets before destroying the pool.
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.RS 6n
+.Bl -tag -width indent
+.It Fl f
 Forces any active datasets contained within the pool to be unmounted.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool detach\fR \fIpool\fR \fIdevice\fR\fR
-.ad
-.sp .6
-.RS 4n
-Detaches \fIdevice\fR from a mirror. The operation is refused if there are no
-other valid replicas of the data.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool export\fR [\fB-f\fR] \fIpool\fR ...\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm detach
+.Ar pool device
+.Xc
+.Pp
+Detaches
+.Ar device
+from a mirror. The operation is refused if there are no other valid replicas
+of the data.
+.It Xo
+.Nm
+.Cm export
+.Op Fl f
+.Ar pool ...
+.Xc
+.Pp
 Exports the given pools from the system. All devices are marked as exported,
 but are still considered in use by other subsystems. The devices can be moved
 between systems (even those of different endianness) and imported as long as a
 sufficient number of devices are present.
-.sp
+.Pp
 Before exporting the pool, all datasets within the pool are unmounted. A pool
 can not be exported if it has a shared spare that is currently being used.
-.sp
-For pools to be portable, you must give the \fBzpool\fR command whole disks,
-not just slices, so that \fBZFS\fR can label the disks with portable \fBEFI\fR
+.Pp
+For pools to be portable, you must give the
+.Nm
+command whole disks, not just slices, so that
+.Tn ZFS
+can label the disks with portable
+.Sy EFI
 labels. Otherwise, disk drivers on platforms of different endianness will not
 recognize the disks.
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.RS 6n
-Forcefully unmount all datasets, using the "\fBunmount -f\fR" command.
-.sp
+.Bl -tag -width indent
+.It Fl f
+Forcefully unmount all datasets, using the
+.Qq Nm unmount Fl f
+command.
+.Pp
 This command will forcefully export the pool even if it has a shared spare that
 is currently being used. This may lead to potential data corruption.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool get\fR "\fIall\fR" | \fIproperty\fR[,...] \fIpool\fR ...\fR
-.ad
-.sp .6
-.RS 4n
-Retrieves the given list of properties (or all properties if "\fBall\fR" is
-used) for the specified storage pool(s). These properties are displayed with
+.El
+.It Xo
+.Nm
+.Cm get
+.Ar all | property Ns Op , Ns Ar ...
+.Ar pool ...
+.Xc
+.Pp
+Retrieves the given list of properties (or all properties if
+.Qq Cm all
+is used) for the specified storage pool(s). These properties are displayed with
 the following fields:
-.sp
-.in +2
-.nf
-       name          Name of storage pool
-        property      Property name
-        value         Property value
-        source        Property source, either 'default' or 'local'.
-.fi
-.in -2
-.sp
-
-See the "Properties" section for more information on the available pool
-properties.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ...\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -column -offset indent "property"
+.It name Ta Name of storage pool
+.It property Ta Property name
+.It value Ta Property value
+.It source Ta Property source, either 'default' or 'local'.
+.El
+.Pp
+See the
+.Qq Sx Properties
+section for more information on the available pool properties.
+.It Xo
+.Nm
+.Cm history
+.Op Fl il
+.Op Ar pool
+.Ar ...
+.Xc
+.Pp
 Displays the command history of the specified pools or all pools if no pool is
 specified.
-.sp
-.ne 2
-.na
-\fB\fB-i\fR\fR
-.ad
-.RS 6n
-Displays internally logged \fBZFS\fR events in addition to user initiated
-events.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-l\fR\fR
-.ad
-.RS 6n
+.Bl -tag -width indent
+.It Fl i
+Displays internally logged
+.Tn ZFS
+events in addition to user initiated events.
+.It Fl l
 Displays log records in long format, which in addition to standard format
-includes, the user name, the hostname, and the jail in which the operation was
+includes, the user name, the hostname, and the zone in which the operation was
 performed.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool import\fR [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
-[\fB-D\fR]\fR
-.ad
-.sp .6
-.RS 4n
-Lists pools available to import. If the \fB-d\fR option is not specified, this
-command searches for devices in "/dev/dsk". The \fB-d\fR option can be
-specified multiple times, and all directories are searched. If the device
-appears to be part of an exported pool, this command displays a summary of the
-pool with the name of the pool, a numeric identifier, as well as the \fIvdev\fR
-layout and current health of the device for each device or file. Destroyed
-pools, pools that were previously destroyed with the "\fBzpool destroy\fR"
-command, are not listed unless the \fB-D\fR option is specified.
-.sp
+.El
+.It Xo
+.Nm
+.Cm import
+.Op Fl d Ar dir | Fl c Ar cachefile
+.Op Fl D
+.Xc
+.Pp
+Lists pools available to import. If the
+.Fl d
+option is not specified, this command searches for devices in
+.Qq Pa /dev .
+The
+.Fl d
+option can be specified multiple times, and all directories are searched. If
+the device appears to be part of an exported pool, this command displays a
+summary of the pool with the name of the pool, a numeric identifier, as well as
+the
+.No vdev
+layout and current health of the device for each device or file.
+Destroyed pools, pools that were previously destroyed with the
+.Qq Nm Cm destroy
+command, are not listed unless the
+.Fl D
+option is specified.
+.Pp
 The numeric identifier is unique, and can be used instead of the pool name when
 multiple exported pools of the same name are available.
-.sp
-.ne 2
-.na
-\fB\fB-c\fR \fIcachefile\fR\fR
-.ad
-.RS 16n
-Reads configuration from the given \fBcachefile\fR that was created with the
-"\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of
-searching for devices.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-d\fR \fIdir\fR\fR
-.ad
-.RS 16n
-Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be
-specified multiple times.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-D\fR\fR
-.ad
-.RS 16n
+.Bl -tag -width indent
+.It Fl c Ar cachefile
+Reads configuration from the given
+.Ar cachefile
+that was created with the
+.Qq Sy cachefile
+pool property. This
+.Ar cachefile
+is used instead of searching for devices.
+.It Fl d Ar dir
+Searches for devices or files in
+.Ar dir .
+The
+.Fl d
+option can be specified multiple times.
+.It Fl D
 Lists destroyed pools only.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool import\fR [\fB-o\fR \fImntopts\fR] [ \fB-o\fR
-\fIproperty\fR=\fIvalue\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
-[\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fB-a\fR\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm import
+.Op Fl o Ar mntopts
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Op Fl d Ar dir | Fl c Ar cachefile
+.Op Fl D
+.Op Fl f
+.Op Fl m
+.Op Fl N
+.Op Fl R Ar root
+.Op Fl F Op Fl n
+.Fl a
+.Xc
+.Pp
 Imports all pools found in the search directories. Identical to the previous
 command, except that all pools with a sufficient number of devices available
 are imported. Destroyed pools, pools that were previously destroyed with the
-"\fBzpool destroy\fR" command, will not be imported unless the \fB-D\fR option
-is specified.
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fImntopts\fR\fR
-.ad
-.RS 21n
+.Qq Nm Cm destroy
+command, will not be imported unless the
+.Fl D
+option is specified.
+.Bl -tag -width indent
+.It Fl o Ar mntopts
 Comma-separated list of mount options to use when mounting datasets within the
-pool. See \fBzfs\fR(8) for a description of dataset properties and mount
-options.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIproperty=value\fR\fR
-.ad
-.RS 21n
-Sets the specified property on the imported pool. See the "Properties" section
-for more information on the available pool properties.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-c\fR \fIcachefile\fR\fR
-.ad
-.RS 21n
-Reads configuration from the given \fBcachefile\fR that was created with the
-"\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of
-searching for devices.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-d\fR \fIdir\fR\fR
-.ad
-.RS 21n
-Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be
-specified multiple times. This option is incompatible with the \fB-c\fR option.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-D\fR\fR
-.ad
-.RS 21n
-Imports destroyed pools only. The \fB-f\fR option is also required.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.RS 21n
+pool. See
+.Xr zfs 8
+for a description of dataset properties and mount options.
+.It Fl o Ar property Ns = Ns Ar value
+Sets the specified property on the imported pool. See the
+.Qq Sx Properties
+section for more information on the available pool properties.
+.It Fl c Ar cachefile
+Reads configuration from the given
+.Ar cachefile
+that was created with the
+.Qq Sy cachefile
+pool property. This
+.Ar cachefile
+is used instead of searching for devices.
+.It Fl d Ar dir
+Searches for devices or files in
+.Ar dir .
+The
+.Fl d
+option can be specified multiple times. This option is incompatible with the
+.Fl c
+option.
+.It Fl D
+Imports destroyed pools only. The
+.Fl f
+option is also required.
+.It Fl f
 Forces import, even if the pool appears to be potentially active.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.RS 21n
+.It Fl m
+Enables import with missing log devices.
+.It Fl N
+Do not mount any filesystems from the imported pool.
+.It Fl R Ar root
+Sets the
+.Qq Sy cachefile
+property to
+.Qq Cm none
+and the
+.Qq Sy altroot
+property to
+.Qq Ar root
+.It Fl F
+Recovery mode for a non-importable pool. Attempt to return the pool to an
+importable state by discarding the last few transactions. Not all damaged pools
+can be recovered by using this option. If successful, the data from the
+discarded transactions is irretrievably lost. This option is ignored if the
+pool is importable or already imported.
+.It Fl n
+Used with the
+.Fl F
+recovery option. Determines whether a non-importable pool can be made
+importable again, but does not actually perform the pool recovery. For more
+details about pool recovery mode, see the
+.Fl F
+option, above.
+.It Fl a
 Searches for and imports all pools found.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-R\fR \fIroot\fR\fR
-.ad
-.RS 21n
-Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR"
-property to "\fIroot\fR".
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool import\fR [\fB-o\fR \fImntopts\fR] [ \fB-o\fR
-\fIproperty\fR=\fIvalue\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
-[\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fIpool\fR | \fIid\fR
-[\fInewpool\fR]\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm import
+.Op Fl o Ar mntopts
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar ...
+.Op Fl d Ar dir | Fl c Ar cachefile
+.Op Fl D
+.Op Fl f
+.Op Fl m
+.Op Fl N
+.Op Fl R Ar root
+.Op Fl F Op Fl n
+.Ar pool | id
+.Op Ar newpool
+.Xc
+.Pp
 Imports a specific pool. A pool can be identified by its name or the numeric
-identifier. If \fInewpool\fR is specified, the pool is imported using the name
-\fInewpool\fR. Otherwise, it is imported with the same name as its exported
-name.
-.sp
-If a device is removed from a system without running "\fBzpool export\fR"
+identifier. If
+.Ar newpool
+is specified, the pool is imported using the name
+.Ar newpool .
+Otherwise, it is imported with the same name as its exported name.
+.Pp
+If a device is removed from a system without running
+.Qq Nm Cm export
 first, the device appears as potentially active. It cannot be determined if
 this was a failed export, or whether the device is really in use from another
-host. To import a pool in this state, the \fB-f\fR option is required.
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fImntopts\fR\fR
-.ad
-.sp .6
-.RS 4n
+host. To import a pool in this state, the
+.Fl f
+option is required.
+.Bl -tag -width indent
+.It Fl o Ar mntopts
 Comma-separated list of mount options to use when mounting datasets within the
-pool. See \fBzfs\fR(8) for a description of dataset properties and mount
-options.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIproperty=value\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sets the specified property on the imported pool. See the "Properties" section
-for more information on the available pool properties.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-c\fR \fIcachefile\fR\fR
-.ad
-.sp .6
-.RS 4n
-Reads configuration from the given \fBcachefile\fR that was created with the
-"\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of
-searching for devices.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-d\fR \fIdir\fR\fR
-.ad
-.sp .6
-.RS 4n
-Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be
-specified multiple times. This option is incompatible with the \fB-c\fR option.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-D\fR\fR
-.ad
-.sp .6
-.RS 4n
-Imports destroyed pool. The \fB-f\fR option is also required.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.sp .6
-.RS 4n
+pool. See
+.Xr zfs 8
+for a description of dataset properties and mount options.
+.It Fl o Ar property Ns = Ns Ar value
+Sets the specified property on the imported pool. See the
+.Qq Sx Properties
+section for more information on the available pool properties.
+.It Fl c Ar cachefile
+Reads configuration from the given
+.Ar cachefile
+that was created with the
+.Qq Sy cachefile
+pool property. This
+.Ar cachefile
+is used instead of searching for devices.
+.It Fl d Ar dir
+Searches for devices or files in
+.Ar dir .
+The
+.Fl d
+option can be specified multiple times. This option is incompatible with the
+.Fl c
+option.
+.It Fl D
+Imports destroyed pools only. The
+.Fl f
+option is also required.
+.It Fl f
 Forces import, even if the pool appears to be potentially active.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-R\fR \fIroot\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR"
-property to "\fIroot\fR".
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool iostat\fR [\fB-T\fR \fBu\fR | \fBd\fR] [\fB-v\fR] [\fIpool\fR] ...
-[\fIinterval\fR[\fIcount\fR]]\fR
-.ad
-.sp .6
-.RS 4n
-Displays \fBI/O\fR statistics for the given pools. When given an interval, the
-statistics are printed every \fIinterval\fR seconds until \fBCtrl-C\fR is
-pressed. If no \fIpools\fR are specified, statistics for every pool in the
-system is shown. If \fIcount\fR is specified, the command exits after
-\fIcount\fR reports are printed.
-.sp
-.ne 2
-.na
-\fB\fB-T\fR \fBu\fR | \fBd\fR\fR
-.ad
-.RS 12n
-Display a time stamp.
-.sp
-Specify \fBu\fR for a printed representation of the internal representation of
-time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
-\fBdate\fR(1).
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-v\fR\fR
-.ad
-.RS 12n
-Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within
-the pool, in addition to the pool-wide statistics.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool labelclear\fR [\fB-f\fR] \fIdevice\fR
-.ad
-.sp .6
-.RS 4n
-Removes ZFS label information from the specified device. The device must not
-be part of an active pool configuration.
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-f\fR\fR
-.ad
-.RS 12n
-.rt  
+.It Fl m
+Enables import with missing log devices.
+.It Fl N
+Do not mount any filesystems from the imported pool.
+.It Fl R Ar root
+Equivalent to
+.Qq Fl o Cm cachefile=none,altroot= Ns Pa root
+.It Fl F
+Recovery mode for a non-importable pool. Attempt to return the pool to an
+importable state by discarding the last few transactions. Not all damaged pools
+can be recovered by using this option. If successful, the data from the
+discarded transactions is irretrievably lost. This option is ignored if the
+pool is importable or already imported.
+.It Fl n
+Used with the
+.Fl F
+recovery option. Determines whether a non-importable pool can be made
+importable again, but does not actually perform the pool recovery. For more
+details about pool recovery mode, see the
+.Fl F
+option, above.
+.El
+.It Xo
+.Nm
+.Cm iostat
+.Op Fl T Cm d Ns | Ns Cm u
+.Op Fl v
+.Op Ar pool
+.Ar ...
+.Op Ar interval Op Ar count
+.Xc
+.Pp
+Displays
+.Tn I/O
+statistics for the given pools. When given an interval, the statistics are
+printed every
+.Ar interval
+seconds until
+.Sy Ctrl-C
+is pressed. If no
+.Ar pools
+are specified, statistics for every pool in the system is shown. If 
+.Ar count
+is specified, the command exits after
+.Ar count
+reports are printed.
+.Bl -tag -width indent
+.It Fl T Cm d Ns | Ns Cm u
+Print a timestamp.
+.Pp
+Use modifier
+.Cm d
+for standard date format. See
+.Xr date 1 .
+Use modifier
+.Cm u
+for unixtime
+.Pq equals Qq Ic date +%s .
+.It Fl v
+Verbose statistics. Reports usage statistics for individual
+.No vdev Ns s
+within the pool, in addition to the pool-wide statistics.
+.El
+.It Xo
+.Nm
+.Cm labelclear
+.Op Fl f
+.Ar device
+.Xc
+.Pp
+Removes
+.Tn ZFS
+label information from the specified
+.Ar device .
+The
+.Ar device
+must not be part of an active pool configuration.
+.Bl -tag -width indent
+.It Fl v
 Treat exported or foreign devices as inactive.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBzpool list\fR [\fB-H\fR] [\fB-o\fR \fIprops\fR[,...]] [\fIpool\fR] ...\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm list
+.Op Fl H
+.Op Fl o Ar property Ns Op , Ns Ar ...
+.Op Fl T Cm d Ns | Ns Cm u
+.Op Ar pool
+.Ar ...
+.Op Ar inverval Op Ar count
+.Xc
+.Pp
 Lists the given pools along with a health status and space usage. When given no
 arguments, all pools in the system are listed.
-.sp
-.ne 2
-.na
-\fB\fB-H\fR\fR
-.ad
-.RS 12n
+.Pp
+When given an interval, the output is printed every
+.Ar interval
+seconds until
+.Sy Ctrl-C
+is pressed. If 
+.Ar count
+is specified, the command exits after
+.Ar count
+reports are printed.
+.Bl -tag -width indent
+.It Fl H
 Scripted mode. Do not display headers, and separate fields by a single tab
 instead of arbitrary space.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-o\fR \fIprops\fR\fR
-.ad
-.RS 12n
-Comma-separated list of properties to display. See the "Properties" section for
-a list of valid properties. The default list is "name, size, used, available,
-capacity, health, altroot"
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...\fR
-.ad
-.sp .6
-.RS 4n
-Takes the specified physical device offline. While the \fIdevice\fR is offline,
-no attempt is made to read or write to the device.
-.sp
-This command is not applicable to spares or cache devices.
-.sp
-.ne 2
-.na
-\fB\fB-t\fR\fR
-.ad
-.RS 6n
+.It Fl o Ar property Ns Op , Ns Ar ...
+Comma-separated list of properties to display. See the
+.Qq Sx Properties
+section for a list of valid properties. The default list is
+.Sy name ,
+.Sy size ,
+.Sy used ,
+.Sy available ,
+.Sy capacity  ,
+.Sy health ,
+.Sy altroot .
+.It Fl T Cm d Ns | Ns Cm u
+Print a timestamp.
+.Pp
+Use modifier
+.Cm d
+for standard date format. See
+.Xr date 1 .
+Use modifier
+.Cm u
+for unixtime
+.Pq equals Qq Ic date +%s .
+.El
+.It Xo
+.Nm
+.Cm offline
+.Op Fl t
+.Ar pool device ...
+.Xc
+.Pp
+Takes the specified physical device offline. While the
+.Ar device
+is offline, no attempt is made to read or write to the device.
+.Bl -tag -width indent
+.It Fl t
 Temporary. Upon reboot, the specified physical device reverts to its previous
 state.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool online\fR [\fB-e\fR] \fIpool\fR \fIdevice\fR...\fR
-.ad
-.sp .6
-.RS 4n
+.El
+.It Xo
+.Nm
+.Cm online
+.Op Fl e
+.Ar pool device ...
+.Xc
+.Pp
 Brings the specified physical device online.
-.sp
+.Pp
 This command is not applicable to spares or cache devices.
-.sp
-.ne 2
-.na
-\fB\fB-e\fR\fR
-.ad
-.RS 6n
+.Bl -tag -width indent
+.It Fl e
 Expand the device to use all available space. If the device is part of a mirror
-or \fBraidz\fR then all devices must be expanded before the new space will
-become available to the pool.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool remove\fR \fIpool\fR \fIdevice\fR ...\fR
-.ad
-.sp .6
-.RS 4n
+or
+.No raidz
+then all devices must be expanded before the new space will become
+available to the pool.
+.El
+.It Xo
+.Nm
+.Cm reguid
+.Ar pool
+.Xc
+.Pp
+Generates a new unique identifier for the pool.  You must ensure that all
+devices in this pool are online and healthy before performing this action.
+.It Xo
+.Nm
+.Cm remove
+.Ar pool device ...
+.Xc
+.Pp
 Removes the specified device from the pool. This command currently only
 supports removing hot spares, cache, and log devices. A mirrored log device can
 be removed by specifying the top-level mirror for the log. Non-log devices that
-are part of a mirrored configuration can be removed using the \fBzpool
-detach\fR command. Non-redundant and \fBraidz\fR devices cannot be removed from
-a pool.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool replace\fR [\fB-f\fR] \fIpool\fR \fIold_device\fR
-[\fInew_device\fR]\fR
-.ad
-.sp .6
-.RS 4n
-Replaces \fIold_device\fR with \fInew_device\fR. This is equivalent to
-attaching \fInew_device\fR, waiting for it to resilver, and then detaching
-\fIold_device\fR.
-.sp
-The size of \fInew_device\fR must be greater than or equal to the minimum size
-of all the devices in a mirror or \fBraidz\fR configuration.
-.sp
-\fInew_device\fR is required if the pool is not redundant. If \fInew_device\fR
-is not specified, it defaults to \fIold_device\fR. This form of replacement is
-useful after an existing disk has failed and has been physically replaced. In
-this case, the new disk may have the same \fB/dev/dsk\fR path as the old
-device, even though it is actually a different disk. \fBZFS\fR recognizes this.
-.sp
-.ne 2
-.na
-\fB\fB-f\fR\fR
-.ad
-.RS 6n
-Forces use of \fInew_device\fR, even if its appears to be in use. Not all
-devices can be overridden in this manner.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...\fR
-.ad
-.sp .6
-.RS 4n
+are part of a mirrored configuration can be removed using the
+.Qq Nm Cm detach
+command. Non-redundant and
+.No raidz
+devices cannot be removed from a pool.
+.It Xo
+.Nm
+.Cm replace
+.Op Fl f
+.Ar pool device
+.Op Ar new_device
+.Xc
+.Pp
+Replaces
+.Ar old_device
+with
+.Ar new_device .
+This is equivalent to attaching
+.Ar new_device ,
+waiting for it to resilver, and then detaching
+.Ar old_device .
+.Pp
+The size of 
+.Ar new_device
+must be greater than or equal to the minimum size
+of all the devices in a mirror or
+.No raidz
+configuration.
+.Pp
+.Ar new_device
+is required if the pool is not redundant. If
+.Ar new_device
+is not specified, it defaults to
+.Ar old_device . 
+This form of replacement is useful after an existing disk has failed and has
+been physically replaced. In this case, the new disk may have the same
+.Pa /dev
+path as the old device, even though it is actually a different disk.
+.Tn ZFS
+recognizes this.
+.Bl -tag -width indent
+.It Fl f
+Forces use of
+.Ar new_device ,
+even if its appears to be in use. Not all devices can be overridden in this
+manner.
+.El
+.It Xo
+.Nm
+.Cm scrub
+.Op Fl s
+.Ar pool ...
+.Xc
+.Pp
 Begins a scrub. The scrub examines all data in the specified pools to verify
-that it checksums correctly. For replicated (mirror or \fBraidz\fR) devices,
-\fBZFS\fR automatically repairs any damage discovered during the scrub. The
-"\fBzpool status\fR" command reports the progress of the scrub and summarizes
-the results of the scrub upon completion.
-.sp
+that it checksums correctly. For replicated (mirror or
+.No raidz )
+devices,
+.Tn ZFS
+automatically repairs any damage discovered during the scrub. The
+.Qq Nm Cm status
+command reports the progress of the scrub and summarizes the results of the
+scrub upon completion.
+.Pp
 Scrubbing and resilvering are very similar operations. The difference is that
-resilvering only examines data that \fBZFS\fR knows to be out of date (for
-example, when attaching a new device to a mirror or replacing an existing
-device), whereas scrubbing examines all data to discover silent errors due to
-hardware faults or disk failure.
-.sp
-Because scrubbing and resilvering are \fBI/O\fR-intensive operations, \fBZFS\fR
-only allows one at a time. If a scrub is already in progress, the "\fBzpool
-scrub\fR" command terminates it and starts a new scrub. If a resilver is in
-progress, \fBZFS\fR does not allow a scrub to be started until the resilver
-completes.
-.sp
-.ne 2
-.na
-\fB\fB-s\fR\fR
-.ad
-.RS 6n
+resilvering only examines data that
+.Tn ZFS
+knows to be out of date (for example, when attaching a new device to a mirror
+or replacing an existing device), whereas scrubbing examines all data to
+discover silent errors due to hardware faults or disk failure.
+.Pp
+Because scrubbing and resilvering are
+.Tn I/O Ns -intensive
+operations,
+.Tn ZFS
+only allows one at a time. If a scrub is already in progress, the
+.Qq Nm Cm scrub
+command returns an error. To start a new scrub, you have to stop the old scrub
+with the
+.Qq Nm Cm scrub Fl s
+command first. If a resilver is in progress,
+.Tn ZFS
+does not allow a scrub to be started until the resilver completes.
+.Bl -tag -width indent
+.It Fl s
 Stop scrubbing.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sets the given property on the specified pool. See the "Properties" section for
-more information on what properties can be set and acceptable values.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool status\fR [\fB-xv\fR] [\fIpool\fR] ...\fR
-.ad
-.sp .6
-.RS 4n
-Displays the detailed health status for the given pools. If no \fIpool\fR is
-specified, then the status of each pool in the system is displayed. For more
-information on pool and device health, see the "Device Failure and Recovery"
+.El
+.It Xo
+.Nm
+.Cm set
+.Ar property Ns = Ns Ar value pool
+.Xc
+.Pp
+Sets the given property on the specified pool. See the
+.Qq Sx Properties
+section for more information on what properties can be set and acceptable
+values.
+.It Xo
+.Nm
+.Cm split
+.Op Fl n
+.Op Fl R Ar altroot
+.Op Fl o Ar mntopts
+.Op Fl o Ar property Ns = Ns Ar value
+.Ar pool newpool
+.Op Ar device ...
+.Xc
+.Pp
+Splits off one disk from each mirrored top-level
+.No vdev
+in a pool and creates a new pool from the split-off disks. The original pool
+must be made up of one or more mirrors and must not be in the process of
+resilvering. The
+.Cm split
+subcommand chooses the last device in each mirror
+.No vdev
+unless overridden by a device specification on the command line.
+.Pp
+When using a
+.Ar device
+argument, 
+.Cm split
+includes the specified device(s) in a new pool and, should any devices remain 
+unspecified, assigns the last device in each mirror
+.No vdev
+to that pool, as it does normally. If you are uncertain about the outcome of a 
+.Cm split
+command, use the
+.Fl n
+("dry-run") option to ensure your command will have the effect you intend.
+.Bl -tag -width indent
+.It Fl R Ar altroot
+Automatically import the newly created pool after splitting, using the
+specified
+.Ar altroot
+parameter for the new pool's alternate root. See the
+.Sy altroot
+description in the
+.Qq Sx Properties
+section, above.
+.It Fl n
+Displays the configuration that would be created without actually splitting the
+pool. The actual pool split could still fail due to insufficient privileges or
+device status.
+.It Fl o Ar mntopts
+Comma-separated list of mount options to use when mounting datasets within the
+pool. See
+.Xr zfs 8
+for a description of dataset properties and mount options. Valid only in
+conjunction with the
+.Fl R
+option.
+.It Fl o Ar property Ns = Ns Ar value
+Sets the specified property on the new pool. See the
+.Qq Sx Properties
+section, above, for more information on the available pool properties.
+.El
+.It Xo
+.Nm
+.Cm status
+.Op Fl vx
+.Op Fl T Cm d Ns | Ns Cm u
+.Op Ar pool
+.Ar ...
+.Op Ar interval Op Ar count
+.Xc
+.Pp
+Displays the detailed health status for the given pools. If no
+.Ar pool
+is specified, then the status of each pool in the system is displayed. For more
+information on pool and device health, see the
+.Qq Sx Device Failure and Recovery
 section.
-.sp
+.Pp
+When given an interval, the output is printed every
+.Ar interval
+seconds until
+.Sy Ctrl-C
+is pressed. If 
+.Ar count
+is specified, the command exits after
+.Ar count
+reports are printed.
+.Pp
 If a scrub or resilver is in progress, this command reports the percentage done
 and the estimated time to completion. Both of these are only approximate,
 because the amount of data in the pool and the other workloads on the system
 can change.
-.sp
-.ne 2
-.na
-\fB\fB-x\fR\fR
-.ad
-.RS 6n
+.Bl -tag -width indent
+.It Fl x
 Only display status for pools that are exhibiting errors or are otherwise
 unavailable.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-v\fR\fR
-.ad
-.RS 6n
+.It Fl v
 Displays verbose data error information, printing out a complete list of all
 data errors since the last complete pool scrub.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool upgrade\fR\fR
-.ad
-.sp .6
-.RS 4n
-Displays all pools formatted using a different \fBZFS\fR on-disk version. Older
-versions can continue to be used, but some features may not be available. These
-pools can be upgraded using "\fBzpool upgrade -a\fR". Pools that are formatted
-with a more recent version are also displayed, although these pools will be
-inaccessible on the system.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool upgrade\fR \fB-v\fR\fR
-.ad
-.sp .6
-.RS 4n
-Displays \fBZFS\fR versions supported by the current software. The current
-\fBZFS\fR versions and all previous supported versions are displayed, along
+.It Fl T Cm d Ns | Ns Cm u
+Print a timestamp.
+.Pp
+Use modifier
+.Cm d
+for standard date format. See
+.Xr date 1 .
+Use modifier
+.Cm u
+for unixtime
+.Pq equals Qq Ic date +%s .
+.El
+.It Xo
+.Nm
+.Cm upgrade
+.Op Fl v
+.Xc
+.Pp
+Displays all pools formatted using a different
+.Tn ZFS
+pool on-disk version. Older versions can continue to be used, but some
+features may not be available. These pools can be upgraded using
+.Qq Nm Cm upgrade Fl a .
+Pools that are formatted with a more recent version are also displayed,
+although these pools will be inaccessible on the system.
+.Bl -tag -width indent
+.It Fl v
+Displays
+.Tn ZFS
+pool versions supported by the current software. The current
+.Tn ZFS
+pool version and all previous supported versions are displayed, along
 with an explanation of the features provided with each version.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...\fR
-.ad
-.sp .6
-.RS 4n
-Upgrades the given pool to the latest on-disk version. Once this is done, the
-pool will no longer be accessible on systems running older versions of the
+.El
+.It Xo
+.Nm
+.Cm upgrade
+.Op Fl V Ar version
+.Fl a | Ar pool ...
+.Xc
+.Pp
+Upgrades the given pool to the latest on-disk pool version. Once this is done,
+the pool will no longer be accessible on systems running older versions of the
 software.
-.sp
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.RS 14n
+.Bl -tag -width indent
+.It Fl a
 Upgrades all pools.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-V\fR \fIversion\fR\fR
-.ad
-.RS 14n
-Upgrade to the specified version. If the \fB-V\fR flag is not specified, the
-pool is upgraded to the most recent version. This option can only be used to
-increase the version number, and only up to the most recent version supported
-by this software.
-.RE
-
-.RE
-
-.SH EXAMPLES
-.LP
-\fBExample 1 \fRCreating a RAID-Z Storage Pool
-.sp
-.LP
-The following command creates a pool with a single \fBraidz\fR root \fIvdev\fR
+.It Fl V Ar version
+Upgrade to the specified version. If the
+.Fl V
+flag is not specified, the pool is upgraded to the most recent version. This
+option can only be used to increase the version number, and only up to the most
+recent version supported by this software.
+.El
+.El
+.Sh EXAMPLES
+.Bl -tag -width 0n
+.It Sy Example 1 No Creating a RAID-Z Storage Pool
+.Pp
+The following command creates a pool with a single
+.No raidz
+root
+.No vdev
 that consists of six disks.
-
-.sp
-.in +2
-.nf
-# \fBzpool create tank raidz da0 da1 da2 da3 da4 da5\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 2 \fRCreating a Mirrored Storage Pool
-.sp
-.LP
+.Bd -literal -offset 2n
+.Li # Ic zpool create tank raidz da0 da1 da2 da3 da4 da5
+.Ed
+.It Sy Example 2 No Creating a Mirrored Storage Pool
+.Pp
 The following command creates a pool with two mirrors, where each mirror
 contains two disks.
-
-.sp
-.in +2
-.nf
-# \fBzpool create tank mirror da0 da1 mirror da2 da3\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 3 \fRCreating a ZFS Storage Pool by Using Slices
-.sp
-.LP
-The following command creates an unmirrored pool using two disk slices.
-
-.sp
-.in +2
-.nf
-# \fBzpool create tank /dev/da0s1 da1s4\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 4 \fRCreating a ZFS Storage Pool by Using Files
-.sp
-.LP
+.Bd -literal -offset 2n
+.Li # Ic zpool create tank mirror da0 da1 mirror da2 da3
+.Ed
+.It Sy Example 3 No Creating a Tn ZFS No Storage Pool by Using Partitions
+.Pp
+The following command creates an unmirrored pool using two GPT partitions.
+.Bd -literal -offset 2n
+.Li # Ic zpool create tank da0p3 da1p3
+.Ed
+.It Sy Example 4 No Creating a Tn ZFS No Storage Pool by Using Files
+.Pp
 The following command creates an unmirrored pool using files. While not
 recommended, a pool based on files can be useful for experimental purposes.
-
-.sp
-.in +2
-.nf
-# \fBzpool create tank /path/to/file/a /path/to/file/b\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 5 \fRAdding a Mirror to a ZFS Storage Pool
-.sp
-.LP
-The following command adds two mirrored disks to the pool "\fItank\fR",
+.Bd -literal -offset 2n
+.Li # Ic zpool create tank /path/to/file/a /path/to/file/b
+.Ed
+.It Sy Example 5 No Adding a Mirror to a Tn ZFS No Storage Pool
+.Pp
+The following command adds two mirrored disks to the pool
+.Em tank ,
 assuming the pool is already made up of two-way mirrors. The additional space
 is immediately available to any datasets within the pool.
+.Bd -literal -offset 2n
+.Li # Ic zpool add tank mirror da2 da3
+.Ed
+.It Sy Example 6 No Listing Available Tn ZFS No Storage Pools
+.Pp
+The following command lists all available pools on the system.
+.Bd -literal -offset 2n
+.Li # Ic zpool list
+NAME   SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
+pool  2.70T   473G  2.24T    17%  1.00x  ONLINE  -
+test  1.98G  89.5K  1.98G     0%  1.00x  ONLINE  -
+.Ed
+.It Sy Example 7 No Listing All Properties for a Pool
+.Pp
+The following command lists all the properties for a pool.
+.Bd -literal -offset 2n
+.Li # Ic zpool get all pool
+pool  size           2.70T       -
+pool  capacity       17%         -
+pool  altroot        -           default
+pool  health         ONLINE      -
+pool  guid           2501120270416322443  default
+pool  version        28          default
+pool  bootfs         pool/root   local
+pool  delegation     on          default
+pool  autoreplace    off         default
+pool  cachefile      -           default
+pool  failmode       wait        default
+pool  listsnapshots  off         default
+pool  autoexpand     off         default
+pool  dedupditto     0           default
+pool  dedupratio     1.00x       -
+pool  free           2.24T       -
+pool  allocated      473G        -
+pool  readonly       off         -
+.Ed
+.It Sy Example 8 No Destroying a Tn ZFS No Storage Pool
+.Pp
+The following command destroys the pool
+.Qq Em tank
+and any datasets contained within.
+.Bd -literal -offset 2n
+.Li # Ic zpool destroy -f tank
+.Ed
+.It Sy Example 9 No Exporting a Tn ZFS No Storage Pool
+.Pp
+The following command exports the devices in pool
+.Em tank
+so that they can be relocated or later imported.
+.Bd -literal -offset 2n
+.Li # Ic zpool export tank
+.Ed
+.It Sy Example 10 No Importing a Tn ZFS No Storage Pool
+.Pp
+The following command displays available pools, and then imports the pool
+.Qq Em tank
+for use on the system.
+.Pp
+The results from this command are similar to the following:
+.Bd -literal -offset 2n
+.Li # Ic zpool import
 
-.sp
-.in +2
-.nf
-# \fBzpool add tank mirror da0 da1\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 6 \fRListing Available ZFS Storage Pools
-.sp
-.LP
-The following command lists all available pools on the system. In this case,
-the pool \fIzion\fR is faulted due to a missing device.
-
-.sp
-.LP
-The results from this command are similar to the following:
-
-.sp
-.in +2
-.nf
-# \fBzpool list\fR
-     NAME              SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
-     pool             67.5G   2.92M   67.5G     0%  ONLINE     -
-     tank             67.5G   2.92M   67.5G     0%  ONLINE     -
-     zion                 -       -       -     0%  FAULTED    -
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 7 \fRDestroying a ZFS Storage Pool
-.sp
-.LP
-The following command destroys the pool "\fItank\fR" and any datasets contained
-within.
-
-.sp
-.in +2
-.nf
-# \fBzpool destroy -f tank\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 8 \fRExporting a ZFS Storage Pool
-.sp
-.LP
-The following command exports the devices in pool \fItank\fR so that they can
-be relocated or later imported.
-
-.sp
-.in +2
-.nf
-# \fBzpool export tank\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 9 \fRImporting a ZFS Storage Pool
-.sp
-.LP
-The following command displays available pools, and then imports the pool
-"tank" for use on the system.
-
-.sp
-.LP
-The results from this command are similar to the following:
-
-.sp
-.in +2
-.nf
-# \fBzpool import\fR
   pool: tank
     id: 15451357997522795478
  state: ONLINE
@@ -1808,132 +1732,83 @@
           mirror    ONLINE
                da0  ONLINE
                da1  ONLINE
-
-# \fBzpool import tank\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 10 \fRUpgrading All ZFS Storage Pools to the Current Version
-.sp
-.LP
-The following command upgrades all ZFS Storage pools to the current version of
+.Ed
+.It Xo
+.Sy Example 11
+Upgrading All
+.Tn ZFS
+Storage Pools to the Current Version
+.Xc
+.Pp
+The following command upgrades all
+.Tn ZFS
+Storage pools to the current version of
 the software.
-
-.sp
-.in +2
-.nf
-# \fBzpool upgrade -a\fR
-This system is currently running ZFS version 2.
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 11 \fRManaging Hot Spares
-.sp
-.LP
+.Bd -literal -offset 2n
+.Li # Ic zpool upgrade -a
+This system is currently running ZFS pool version 28.
+.Ed
+.It Sy Example 12 No Managing Hot Spares
+.Pp
 The following command creates a new pool with an available hot spare:
-
-.sp
-.in +2
-.nf
-# \fBzpool create tank mirror da0 da1 spare da2\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Bd -literal -offset 2n
+.Li # Ic zpool create tank mirror da0 da1 spare da2
+.Ed
+.Pp
 If one of the disks were to fail, the pool would be reduced to the degraded
 state. The failed device can be replaced using the following command:
-
-.sp
-.in +2
-.nf
-# \fBzpool replace tank da0 da2\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Bd -literal -offset 2n
+.Li # Ic zpool replace tank da0 da2
+.Ed
+.Pp
 Once the data has been resilvered, the spare is automatically removed and is
 made available should another device fails. The hot spare can be permanently
 removed from the pool using the following command:
-
-.sp
-.in +2
-.nf
-# \fBzpool remove tank da3\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 12 \fRCreating a ZFS Pool with Mirrored Separate Intent Logs
-.sp
-.LP
-The following command creates a ZFS storage pool consisting of two, two-way
+.Bd -literal -offset 2n
+.Li # Ic zpool remove tank da2
+.Ed
+.It Xo
+.Sy Example 13
+Creating a
+.Tn ZFS
+Pool with Mirrored Separate Intent Logs
+.Xc
+.Pp
+The following command creates a
+.Tn ZFS
+storage pool consisting of two, two-way
 mirrors and mirrored log devices:
-
-.sp
-.in +2
-.nf
-# \fBzpool create pool mirror da0 da1 mirror da2 da3 log mirror \e
-   da4 da5\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 13 \fRAdding Cache Devices to a ZFS Pool
-.sp
-.LP
-The following command adds two disks for use as cache devices to a ZFS storage
-pool:
-
-.sp
-.in +2
-.nf
-# \fBzpool add pool cache c2d0 c3d0\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Bd -literal -offset 2n
+.Li # Ic zpool create pool mirror da0 da1 mirror da2 da3 log miror da4 da5
+.Ed
+.It Sy Example 14 No Adding Cache Devices to a Tn ZFS No Pool
+.Pp
+The following command adds two disks for use as cache devices to a
+.Tn ZFS
+storage pool:
+.Bd -literal -offset 2n
+.Li # Ic zpool add pool cache da2 da3
+.Ed
+.Pp
 Once added, the cache devices gradually fill with content from main memory.
 Depending on the size of your cache devices, it could take over an hour for
-them to fill. Capacity and reads can be monitored using the \fBiostat\fR option
-as follows:
-
-.sp
-.in +2
-.nf
-# \fBzpool iostat -v pool 5\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 14 \fRRemoving a Mirrored Log Device
-.sp
-.LP
-The following command removes the mirrored log device \fBmirror-2\fR.
-
-.sp
-.LP
+them to fill. Capacity and reads can be monitored using the
+.Cm iostat
+subcommand as follows:
+.Bd -literal -offset 2n
+.Li # Ic zpool iostat -v pool 5
+.Ed
+.It Sy Example 15 No Removing a Mirrored Log Device
+.Pp
+The following command removes the mirrored log device
+.Em mirror-2 .
+.Pp
 Given this configuration:
-
-.sp
-.in +2
-.nf
+.Bd -literal -offset 2n
    pool: tank
   state: ONLINE
   scrub: none requested
-config:
+ config:
 
          NAME        STATE     READ WRITE CKSUM
          tank        ONLINE       0     0     0
@@ -1947,54 +1822,68 @@
            mirror-2  ONLINE       0     0     0
                 da4  ONLINE       0     0     0
                 da5  ONLINE       0     0     0
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-The command to remove the mirrored log \fBmirror-2\fR is:
-
-.sp
-.in +2
-.nf
-# \fBzpool remove tank mirror-2\fR
-.fi
-.in -2
-.sp
-
-.SH EXIT STATUS
-.sp
-.LP
+.Ed
+.Pp
+The command to remove the mirrored log
+.Em mirror-2
+is:
+.Bd -literal -offset 2n
+.Li # Ic zpool remove tank mirror-2
+.Ed
+.It Sy Example 16 No Recovering a Faulted Tn ZFS No Pool
+.Pp
+If a pool is faulted but recoverable, a message indicating this state is
+provided by
+.Qq Nm Cm status
+if the pool was cached (see the
+.Fl c Ar cachefile
+argument above), or as part of the error output from a failed
+.Qq Nm Cm import
+of the pool.
+.Pp
+Recover a cached pool with the
+.Qq Nm Cm clear
+command:
+.Bd -literal -offset 2n
+.Li # Ic zpool clear -F data
+Pool data returned to its state as of Tue Sep 08 13:23:35 2009.
+Discarded approximately 29 seconds of transactions.
+.Ed
+.Pp
+If the pool configuration was not cached, use
+.Qq Nm Cm import
+with the recovery mode flag:
+.Bd -literal -offset 2n
+.Li # Ic zpool import -F data
+Pool data returned to its state as of Tue Sep 08 13:23:35 2009.
+Discarded approximately 29 seconds of transactions.
+.Ed
+.El
+.Sh EXIT STATUS
 The following exit values are returned:
-.sp
-.ne 2
-.na
-\fB\fB0\fR\fR
-.ad
-.RS 5n
+.Bl -tag -offset 2n -width 2n
+.It 0
 Successful completion.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB1\fR\fR
-.ad
-.RS 5n
+.It 1
 An error occurred.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB2\fR\fR
-.ad
-.RS 5n
+.It 2
 Invalid command line options were specified.
-.RE
-
-.SH SEE ALSO
-.sp
-.LP
-zfs(8)
+.El
+.Sh SEE ALSO
+.Xr zfs 8
+.Sh AUTHORS
+This manual page is a
+.Xr mdoc 7
+reimplementation of the
+.Tn OpenSolaris
+manual page
+.Em zpool(1M) ,
+modified and customized for
+.Fx
+and licensed under the Common Development and Distribution License
+.Pq Tn CDDL .
+.Pp
+The
+.Xr mdoc 7
+implementation of this manual page was initially written by
+.An Martin Matuska Aq mm at FreeBSD.org .
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
--- a/head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Tue Dec 06 20:26:16 2011 +0200
@@ -22,6 +22,8 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2011 Martin Matuska <mm at FreeBSD.org>. All rights reserved.
  */
 
 #include <solaris.h>
@@ -68,6 +70,8 @@
 static int zpool_do_offline(int, char **);
 static int zpool_do_clear(int, char **);
 
+static int zpool_do_reguid(int, char **);
+
 static int zpool_do_attach(int, char **);
 static int zpool_do_detach(int, char **);
 static int zpool_do_replace(int, char **);
@@ -126,7 +130,8 @@
 	HELP_UPGRADE,
 	HELP_GET,
 	HELP_SET,
-	HELP_SPLIT
+	HELP_SPLIT,
+	HELP_REGUID
 } zpool_help_t;
 
 
@@ -172,6 +177,7 @@
 	{ "import",	zpool_do_import,	HELP_IMPORT		},
 	{ "export",	zpool_do_export,	HELP_EXPORT		},
 	{ "upgrade",	zpool_do_upgrade,	HELP_UPGRADE		},
+	{ "reguid",	zpool_do_reguid,	HELP_REGUID		},
 	{ NULL },
 	{ "history",	zpool_do_history,	HELP_HISTORY		},
 	{ "get",	zpool_do_get,		HELP_GET		},
@@ -228,7 +234,7 @@
 	case HELP_OFFLINE:
 		return (gettext("\toffline [-t] <pool> <device> ...\n"));
 	case HELP_ONLINE:
-		return (gettext("\tonline <pool> <device> ...\n"));
+		return (gettext("\tonline [-e] <pool> <device> ...\n"));
 	case HELP_REPLACE:
 		return (gettext("\treplace [-f] <pool> <device> "
 		    "[new-device]\n"));
@@ -240,8 +246,7 @@
 		return (gettext("\tstatus [-vx] [-T d|u] [pool] ... [interval "
 		    "[count]]\n"));
 	case HELP_UPGRADE:
-		return (gettext("\tupgrade\n"
-		    "\tupgrade -v\n"
+		return (gettext("\tupgrade [-v]\n"
 		    "\tupgrade [-V version] <-a | pool ...>\n"));
 	case HELP_GET:
 		return (gettext("\tget <\"all\" | property[,...]> "
@@ -252,6 +257,8 @@
 		return (gettext("\tsplit [-n] [-R altroot] [-o mntopts]\n"
 		    "\t    [-o property=value] <pool> <newpool> "
 		    "[<device> ...]\n"));
+	case HELP_REGUID:
+		return (gettext("\treguid <pool>\n"));
 	}
 
 	abort();
@@ -1455,6 +1462,7 @@
 	const char *health;
 	uint_t vsc;
 	int namewidth;
+	char *comment;
 
 	verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
 	    &name) == 0);
@@ -1471,9 +1479,9 @@
 
 	reason = zpool_import_status(config, &msgid);
 
-	(void) printf(gettext("  pool: %s\n"), name);
-	(void) printf(gettext("    id: %llu\n"), (u_longlong_t)guid);
-	(void) printf(gettext(" state: %s"), health);
+	(void) printf(gettext("   pool: %s\n"), name);
+	(void) printf(gettext("     id: %llu\n"), (u_longlong_t)guid);
+	(void) printf(gettext("  state: %s"), health);
 	if (pool_state == POOL_STATE_DESTROYED)
 		(void) printf(gettext(" (DESTROYED)"));
 	(void) printf("\n");
@@ -1482,58 +1490,59 @@
 	case ZPOOL_STATUS_MISSING_DEV_R:
 	case ZPOOL_STATUS_MISSING_DEV_NR:
 	case ZPOOL_STATUS_BAD_GUID_SUM:
-		(void) printf(gettext("status: One or more devices are missing "
-		    "from the system.\n"));
+		(void) printf(gettext(" status: One or more devices are "
+		    "missing from the system.\n"));
 		break;
 
 	case ZPOOL_STATUS_CORRUPT_LABEL_R:
 	case ZPOOL_STATUS_CORRUPT_LABEL_NR:
-		(void) printf(gettext("status: One or more devices contains "
+		(void) printf(gettext(" status: One or more devices contains "
 		    "corrupted data.\n"));
 		break;
 
 	case ZPOOL_STATUS_CORRUPT_DATA:
-		(void) printf(gettext("status: The pool data is corrupted.\n"));
+		(void) printf(
+		    gettext(" status: The pool data is corrupted.\n"));
 		break;
 
 	case ZPOOL_STATUS_OFFLINE_DEV:
-		(void) printf(gettext("status: One or more devices "
+		(void) printf(gettext(" status: One or more devices "
 		    "are offlined.\n"));
 		break;
 
 	case ZPOOL_STATUS_CORRUPT_POOL:
-		(void) printf(gettext("status: The pool metadata is "
+		(void) printf(gettext(" status: The pool metadata is "
 		    "corrupted.\n"));
 		break;
 
 	case ZPOOL_STATUS_VERSION_OLDER:
-		(void) printf(gettext("status: The pool is formatted using an "
+		(void) printf(gettext(" status: The pool is formatted using an "
 		    "older on-disk version.\n"));
 		break;
 
 	case ZPOOL_STATUS_VERSION_NEWER:
-		(void) printf(gettext("status: The pool is formatted using an "
+		(void) printf(gettext(" status: The pool is formatted using an "
 		    "incompatible version.\n"));
 		break;
 
 	case ZPOOL_STATUS_HOSTID_MISMATCH:
-		(void) printf(gettext("status: The pool was last accessed by "
+		(void) printf(gettext(" status: The pool was last accessed by "
 		    "another system.\n"));
 		break;
 
 	case ZPOOL_STATUS_FAULTED_DEV_R:
 	case ZPOOL_STATUS_FAULTED_DEV_NR:
-		(void) printf(gettext("status: One or more devices are "
+		(void) printf(gettext(" status: One or more devices are "
 		    "faulted.\n"));
 		break;
 
 	case ZPOOL_STATUS_BAD_LOG:
-		(void) printf(gettext("status: An intent log record cannot be "
+		(void) printf(gettext(" status: An intent log record cannot be "
 		    "read.\n"));
 		break;
 
 	case ZPOOL_STATUS_RESILVERING:
-		(void) printf(gettext("status: One or more devices were being "
+		(void) printf(gettext(" status: One or more devices were being "
 		    "resilvered.\n"));
 		break;
 
@@ -1549,26 +1558,26 @@
 	 */
 	if (vs->vs_state == VDEV_STATE_HEALTHY) {
 		if (reason == ZPOOL_STATUS_VERSION_OLDER)
-			(void) printf(gettext("action: The pool can be "
+			(void) printf(gettext(" action: The pool can be "
 			    "imported using its name or numeric identifier, "
 			    "though\n\tsome features will not be available "
 			    "without an explicit 'zpool upgrade'.\n"));
 		else if (reason == ZPOOL_STATUS_HOSTID_MISMATCH)
-			(void) printf(gettext("action: The pool can be "
+			(void) printf(gettext(" action: The pool can be "
 			    "imported using its name or numeric "
 			    "identifier and\n\tthe '-f' flag.\n"));
 		else
-			(void) printf(gettext("action: The pool can be "
+			(void) printf(gettext(" action: The pool can be "
 			    "imported using its name or numeric "
 			    "identifier.\n"));
 	} else if (vs->vs_state == VDEV_STATE_DEGRADED) {
-		(void) printf(gettext("action: The pool can be imported "
+		(void) printf(gettext(" action: The pool can be imported "
 		    "despite missing or damaged devices.  The\n\tfault "
 		    "tolerance of the pool may be compromised if imported.\n"));
 	} else {
 		switch (reason) {
 		case ZPOOL_STATUS_VERSION_NEWER:
-			(void) printf(gettext("action: The pool cannot be "
+			(void) printf(gettext(" action: The pool cannot be "
 			    "imported.  Access the pool on a system running "
 			    "newer\n\tsoftware, or recreate the pool from "
 			    "backup.\n"));
@@ -1576,16 +1585,20 @@
 		case ZPOOL_STATUS_MISSING_DEV_R:
 		case ZPOOL_STATUS_MISSING_DEV_NR:
 		case ZPOOL_STATUS_BAD_GUID_SUM:
-			(void) printf(gettext("action: The pool cannot be "
+			(void) printf(gettext(" action: The pool cannot be "
 			    "imported. Attach the missing\n\tdevices and try "
 			    "again.\n"));
 			break;
 		default:
-			(void) printf(gettext("action: The pool cannot be "
+			(void) printf(gettext(" action: The pool cannot be "
 			    "imported due to damaged devices or data.\n"));
 		}
 	}
 
+	/* Print the comment attached to the pool. */
+	if (nvlist_lookup_string(config, ZPOOL_CONFIG_COMMENT, &comment) == 0)
+		(void) printf(gettext("comment: %s\n"), comment);
+
 	/*
 	 * If the state is "closed" or "can't open", and the aux state
 	 * is "corrupt data":
@@ -1606,7 +1619,7 @@
 		(void) printf(gettext("   see: http://www.sun.com/msg/%s\n"),
 		    msgid);
 
-	(void) printf(gettext("config:\n\n"));
+	(void) printf(gettext(" config:\n\n"));
 
 	namewidth = max_width(NULL, nvroot, 0, 0);
 	if (namewidth < 10)
@@ -3321,6 +3334,52 @@
 	return (ret);
 }
 
+/*
+ * zpool reguid <pool>
+ */
+int
+zpool_do_reguid(int argc, char **argv)
+{
+	int c;
+	char *poolname;
+	zpool_handle_t *zhp;
+	int ret = 0;
+
+	/* check options */
+	while ((c = getopt(argc, argv, "")) != -1) {
+		switch (c) {
+		case '?':
+			(void) fprintf(stderr, gettext("invalid option '%c'\n"),
+			    optopt);
+			usage(B_FALSE);
+		}
+	}
+
+	argc -= optind;
+	argv += optind;
+
+	/* get pool name and check number of arguments */
+	if (argc < 1) {
+		(void) fprintf(stderr, gettext("missing pool name\n"));
+		usage(B_FALSE);
+	}
+
+	if (argc > 1) {
+		(void) fprintf(stderr, gettext("too many arguments\n"));
+		usage(B_FALSE);
+	}
+
+	poolname = argv[0];
+	if ((zhp = zpool_open(g_zfs, poolname)) == NULL)
+		return (1);
+
+	ret = zpool_reguid(zhp);
+
+	zpool_close(zhp);
+	return (ret);
+}
+
+
 typedef struct scrub_cbdata {
 	int	cb_type;
 	int	cb_argc;
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1
--- a/head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1	Tue Dec 06 20:26:16 2011 +0200
@@ -1,49 +1,67 @@
 '\" te
-.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
-.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
-.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.\" Portions Copyright 2011 Martin Matuska <mm at FreeBSD.org>
-.TH ZSTREAMDUMP 1 "Sep 21, 2009"
-.SH NAME
-zstreamdump \- filter data in zfs send stream
-.SH SYNOPSIS
-.LP
-.nf
-\fBzstreamdump\fR [\fB-C\fR] [\fB-v\fR]
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBzstreamdump\fR utility reads from the output of the \fBzfs send\fR
-command, then displays headers and some statistics from that output.  See
-\fBzfs\fR(1M).
-.SH OPTIONS
-.sp
-.LP
+.\" Copyright (c) 2011, Martin Matuska <mm at FreeBSD.org>.
+.\" All Rights Reserved.
+.\"
+.\" The contents of this file are subject to the terms of the
+.\" Common Development and Distribution License (the "License").
+.\" You may not use this file except in compliance with the License.
+.\"
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+.\" or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions
+.\" and limitations under the License.
+.\"
+.\" When distributing Covered Code, include this CDDL HEADER in each
+.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+.\" If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying
+.\" information: Portions Copyright [yyyy] [name of copyright owner]
+.\"
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 26, 2011
+.Dt ZSTREAMDUMP 8
+.Os
+.Sh NAME
+.Nm zdb
+.Nd filter data in zfs send stream
+.Sh SYNOPSIS
+.Nm
+.Op Fl C
+.Op Fl v
+.Sh DESCRIPTION
+The
+.Nm
+utility reads from the output of the
+.Qq Nm zfs Cm send
+command, then displays headers and some statistics from that output. See
+.Xr zfs 8 .
+.Pp
 The following options are supported:
-.sp
-.ne 2
-.na
-\fB\fB-C\fR\fR
-.ad
-.sp .6
-.RS 4n
+.Bl -tag -width indent
+.It Fl C
 Suppress the validation of checksums.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-v\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Fl v
 Verbose. Dump all headers, not only begin and end headers.
-.RE
-
-.SH SEE ALSO
-.sp
-.LP
-zfs(8)
+.El
+.Sh SEE ALSO
+.Xr zfs 8
+.Sh AUTHORS
+This manual page is a
+.Xr mdoc 7
+reimplementation of the
+.Tn OpenSolaris
+manual page
+.Em zstreamdump(1M) ,
+modified and customized for
+.Fx
+and licensed under the
+.Tn Common Development and Distribution License
+.Pq Tn CDDL .
+.Pp
+The
+.Xr mdoc 7
+implementation of this manual page was initially written by
+.An Martin Matuska Aq mm at FreeBSD.org .
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
--- a/head/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Tue Dec 06 20:26:16 2011 +0200
@@ -21,6 +21,7 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  */
 
 /*
@@ -259,6 +260,7 @@
 ztest_func_t ztest_vdev_add_remove;
 ztest_func_t ztest_vdev_aux_add_remove;
 ztest_func_t ztest_split_pool;
+ztest_func_t ztest_reguid;
 
 uint64_t zopt_always = 0ULL * NANOSEC;		/* all the time */
 uint64_t zopt_incessant = 1ULL * NANOSEC / 10;	/* every 1/10 second */
@@ -289,6 +291,7 @@
 	{ ztest_fault_inject,			1,	&zopt_sometimes	},
 	{ ztest_ddt_repair,			1,	&zopt_sometimes	},
 	{ ztest_dmu_snapshot_hold,		1,	&zopt_sometimes	},
+	{ ztest_reguid,				1,	&zopt_sometimes },
 	{ ztest_spa_rename,			1,	&zopt_rarely	},
 	{ ztest_scrub,				1,	&zopt_rarely	},
 	{ ztest_dsl_dataset_promote_busy,	1,	&zopt_rarely	},
@@ -325,6 +328,7 @@
 	uint64_t	zs_vdev_aux;
 	uint64_t	zs_alloc;
 	uint64_t	zs_space;
+	uint64_t	zs_guid;
 	mutex_t		zs_vdev_lock;
 	rwlock_t	zs_name_lock;
 	ztest_info_t	zs_info[ZTEST_FUNCS];
@@ -4646,7 +4650,7 @@
 
 	object = od[0].od_object;
 	blocksize = od[0].od_blocksize;
-	pattern = spa_guid(spa) ^ dmu_objset_fsid_guid(os);
+	pattern = zs->zs_guid ^ dmu_objset_fsid_guid(os);
 
 	ASSERT(object != 0);
 
@@ -4717,6 +4721,31 @@
 }
 
 /*
+ * Change the guid for the pool.
+ */
+/* ARGSUSED */
+void
+ztest_reguid(ztest_ds_t *zd, uint64_t id)
+{
+	ztest_shared_t *zs = ztest_shared;
+	spa_t *spa = zs->zs_spa;
+	uint64_t orig, load;
+
+	orig = spa_guid(spa);
+	load = spa_load_guid(spa);
+	if (spa_change_guid(spa) != 0)
+		return;
+
+	if (zopt_verbose >= 3) {
+		(void) printf("Changed guid old %llu -> %llu\n",
+		    (u_longlong_t)orig, (u_longlong_t)spa_guid(spa));
+	}
+
+	VERIFY3U(orig, !=, spa_guid(spa));
+	VERIFY3U(load, ==, spa_load_guid(spa));
+}
+
+/*
  * Rename the pool to a different name and then rename it back.
  */
 /* ARGSUSED */
@@ -5145,6 +5174,7 @@
 {
 	thread_t *tid;
 	spa_t *spa;
+	objset_t *os;
 	thread_t resume_tid;
 	int error;
 
@@ -5176,6 +5206,10 @@
 	spa->spa_debug = B_TRUE;
 	zs->zs_spa = spa;
 
+	VERIFY3U(0, ==, dmu_objset_hold(zs->zs_pool, FTAG, &os));
+	zs->zs_guid = dmu_objset_fsid_guid(os);
+	dmu_objset_rele(os, FTAG);
+
 	spa->spa_dedup_ditto = 2 * ZIO_DEDUPDITTO_MIN;
 
 	/*
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
--- a/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h	Tue Dec 06 20:26:16 2011 +0200
@@ -21,8 +21,8 @@
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
- * Copyright (c) 2011 Pawel Jakub Dawidek <pawel at dawidek.net>.
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
  * All rights reserved.
  */
 
@@ -233,6 +233,7 @@
  */
 extern int zpool_scan(zpool_handle_t *, pool_scan_func_t);
 extern int zpool_clear(zpool_handle_t *, const char *, nvlist_t *);
+extern int zpool_reguid(zpool_handle_t *);
 
 extern int zpool_vdev_online(zpool_handle_t *, const char *, int,
     vdev_state_t *);
@@ -384,6 +385,7 @@
  * underlying datasets, only the references to them.
  */
 extern zfs_handle_t *zfs_open(libzfs_handle_t *, const char *, int);
+extern zfs_handle_t *zfs_handle_dup(zfs_handle_t *);
 extern void zfs_close(zfs_handle_t *);
 extern zfs_type_t zfs_get_type(const zfs_handle_t *);
 extern const char *zfs_get_name(const zfs_handle_t *);
@@ -417,12 +419,20 @@
     uint64_t *propvalue);
 extern int zfs_prop_get_userquota(zfs_handle_t *zhp, const char *propname,
     char *propbuf, int proplen, boolean_t literal);
+extern int zfs_prop_get_written_int(zfs_handle_t *zhp, const char *propname,
+    uint64_t *propvalue);
+extern int zfs_prop_get_written(zfs_handle_t *zhp, const char *propname,
+    char *propbuf, int proplen, boolean_t literal);
+extern int zfs_get_snapused_int(zfs_handle_t *firstsnap, zfs_handle_t *lastsnap,
+    uint64_t *usedp);
 extern uint64_t zfs_prop_get_int(zfs_handle_t *, zfs_prop_t);
 extern int zfs_prop_inherit(zfs_handle_t *, const char *, boolean_t);
 extern const char *zfs_prop_values(zfs_prop_t);
 extern int zfs_prop_is_string(zfs_prop_t prop);
 extern nvlist_t *zfs_get_user_props(zfs_handle_t *);
 extern nvlist_t *zfs_get_recvd_props(zfs_handle_t *);
+extern nvlist_t *zfs_get_clones_nvl(zfs_handle_t *);
+
 
 typedef struct zprop_list {
 	int		pl_prop;
@@ -497,6 +507,7 @@
 extern int zfs_iter_filesystems(zfs_handle_t *, zfs_iter_f, void *);
 extern int zfs_iter_snapshots(zfs_handle_t *, zfs_iter_f, void *);
 extern int zfs_iter_snapshots_sorted(zfs_handle_t *, zfs_iter_f, void *);
+extern int zfs_iter_snapspec(zfs_handle_t *, const char *, zfs_iter_f, void *);
 
 typedef struct get_all_cb {
 	zfs_handle_t	**cb_handles;
@@ -517,6 +528,7 @@
 extern int zfs_create_ancestors(libzfs_handle_t *, const char *);
 extern int zfs_destroy(zfs_handle_t *, boolean_t);
 extern int zfs_destroy_snaps(zfs_handle_t *, char *, boolean_t);
+extern int zfs_destroy_snaps_nvl(zfs_handle_t *, nvlist_t *, boolean_t);
 extern int zfs_clone(zfs_handle_t *, const char *, nvlist_t *);
 extern int zfs_snapshot(libzfs_handle_t *, const char *, boolean_t, nvlist_t *);
 extern int zfs_rollback(zfs_handle_t *, zfs_handle_t *, boolean_t);
@@ -533,29 +545,34 @@
 
 typedef struct sendflags {
 	/* print informational messages (ie, -v was specified) */
-	int verbose : 1;
+	boolean_t verbose;
 
 	/* recursive send  (ie, -R) */
-	int replicate : 1;
+	boolean_t replicate;
 
 	/* for incrementals, do all intermediate snapshots */
-	int doall : 1; /* (ie, -I) */
+	boolean_t doall;
 
 	/* if dataset is a clone, do incremental from its origin */
-	int fromorigin : 1;
+	boolean_t fromorigin;
 
 	/* do deduplication */
-	int dedup : 1;
+	boolean_t dedup;
 
 	/* send properties (ie, -p) */
-	int props : 1;
+	boolean_t props;
+
+	/* do not send (no-op, ie. -n) */
+	boolean_t dryrun;
+
+	/* parsable verbose output (ie. -P) */
+	boolean_t parsable;
 } sendflags_t;
 
 typedef boolean_t (snapfilter_cb_t)(zfs_handle_t *, void *);
 
-extern int zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
-    sendflags_t flags, int outfd, snapfilter_cb_t filter_func,
-    void *cb_arg, nvlist_t **debugnvp);
+extern int zfs_send(zfs_handle_t *, const char *, const char *,
+    sendflags_t *, int, snapfilter_cb_t, void *, nvlist_t **);
 
 extern int zfs_promote(zfs_handle_t *);
 extern int zfs_hold(zfs_handle_t *, const char *, const char *, boolean_t,
@@ -575,34 +592,34 @@
 
 typedef struct recvflags {
 	/* print informational messages (ie, -v was specified) */
-	int verbose : 1;
+	boolean_t verbose;
 
 	/* the destination is a prefix, not the exact fs (ie, -d) */
-	int isprefix : 1;
+	boolean_t isprefix;
 
 	/*
 	 * Only the tail of the sent snapshot path is appended to the
 	 * destination to determine the received snapshot name (ie, -e).
 	 */
-	int istail : 1;
+	boolean_t istail;
 
 	/* do not actually do the recv, just check if it would work (ie, -n) */
-	int dryrun : 1;
+	boolean_t dryrun;
 
 	/* rollback/destroy filesystems as necessary (eg, -F) */
-	int force : 1;
+	boolean_t force;
 
 	/* set "canmount=off" on all modified filesystems */
-	int canmountoff : 1;
+	boolean_t canmountoff;
 
 	/* byteswap flag is used internally; callers need not specify */
-	int byteswap : 1;
+	boolean_t byteswap;
 
 	/* do not mount file systems as they are extracted (private) */
-	int nomount : 1;
+	boolean_t nomount;
 } recvflags_t;
 
-extern int zfs_receive(libzfs_handle_t *, const char *, recvflags_t,
+extern int zfs_receive(libzfs_handle_t *, const char *, recvflags_t *,
     int, avl_tree_t *);
 
 typedef enum diff_flags {
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
--- a/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c	Tue Dec 06 20:26:16 2011 +0200
@@ -496,7 +496,7 @@
 	return (zhp);
 }
 
-static zfs_handle_t *
+zfs_handle_t *
 make_dataset_handle_zc(libzfs_handle_t *hdl, zfs_cmd_t *zc)
 {
 	zfs_handle_t *zhp = calloc(sizeof (zfs_handle_t), 1);
@@ -513,6 +513,53 @@
 	return (zhp);
 }
 
+zfs_handle_t *
+zfs_handle_dup(zfs_handle_t *zhp_orig)
+{
+	zfs_handle_t *zhp = calloc(sizeof (zfs_handle_t), 1);
+
+	if (zhp == NULL)
+		return (NULL);
+
+	zhp->zfs_hdl = zhp_orig->zfs_hdl;
+	zhp->zpool_hdl = zhp_orig->zpool_hdl;
+	(void) strlcpy(zhp->zfs_name, zhp_orig->zfs_name,
+	    sizeof (zhp->zfs_name));
+	zhp->zfs_type = zhp_orig->zfs_type;
+	zhp->zfs_head_type = zhp_orig->zfs_head_type;
+	zhp->zfs_dmustats = zhp_orig->zfs_dmustats;
+	if (zhp_orig->zfs_props != NULL) {
+		if (nvlist_dup(zhp_orig->zfs_props, &zhp->zfs_props, 0) != 0) {
+			(void) no_memory(zhp->zfs_hdl);
+			zfs_close(zhp);
+			return (NULL);
+		}
+	}
+	if (zhp_orig->zfs_user_props != NULL) {
+		if (nvlist_dup(zhp_orig->zfs_user_props,
+		    &zhp->zfs_user_props, 0) != 0) {
+			(void) no_memory(zhp->zfs_hdl);
+			zfs_close(zhp);
+			return (NULL);
+		}
+	}
+	if (zhp_orig->zfs_recvd_props != NULL) {
+		if (nvlist_dup(zhp_orig->zfs_recvd_props,
+		    &zhp->zfs_recvd_props, 0)) {
+			(void) no_memory(zhp->zfs_hdl);
+			zfs_close(zhp);
+			return (NULL);
+		}
+	}
+	zhp->zfs_mntcheck = zhp_orig->zfs_mntcheck;
+	if (zhp_orig->zfs_mntopts != NULL) {
+		zhp->zfs_mntopts = zfs_strdup(zhp_orig->zfs_hdl,
+		    zhp_orig->zfs_mntopts);
+	}
+	zhp->zfs_props_table = zhp_orig->zfs_props_table;
+	return (zhp);
+}
+
 /*
  * Opens the given snapshot, filesystem, or volume.   The 'types'
  * argument is a mask of acceptable types.  The function will print an
@@ -876,6 +923,12 @@
 				goto error;
 			}
 			continue;
+		} else if (prop == ZPROP_INVAL && zfs_prop_written(propname)) {
+			zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+			    "'%s' is readonly"),
+			    propname);
+			(void) zfs_error(hdl, EZFS_PROPREADONLY, errbuf);
+			goto error;
 		}
 
 		if (prop == ZPROP_INVAL) {
@@ -1869,8 +1922,6 @@
 		err = zfs_prop_get(zhp, prop, propbuf, proplen,
 		    NULL, NULL, 0, literal);
 		zfs_unset_recvd_props_mode(zhp, &cookie);
-	} else if (zfs_prop_userquota(propname)) {
-		return (-1);
 	} else {
 		nvlist_t *propval;
 		char *recvdval;
@@ -1885,6 +1936,120 @@
 	return (err == 0 ? 0 : -1);
 }
 
+static int
+get_clones_string(zfs_handle_t *zhp, char *propbuf, size_t proplen)
+{
+	nvlist_t *value;
+	nvpair_t *pair;
+
+	value = zfs_get_clones_nvl(zhp);
+	if (value == NULL)
+		return (-1);
+
+	propbuf[0] = '\0';
+	for (pair = nvlist_next_nvpair(value, NULL); pair != NULL;
+	    pair = nvlist_next_nvpair(value, pair)) {
+		if (propbuf[0] != '\0')
+			(void) strlcat(propbuf, ",", proplen);
+		(void) strlcat(propbuf, nvpair_name(pair), proplen);
+	}
+
+	return (0);
+}
+
+struct get_clones_arg {
+	uint64_t numclones;
+	nvlist_t *value;
+	const char *origin;
+	char buf[ZFS_MAXNAMELEN];
+};
+
+int
+get_clones_cb(zfs_handle_t *zhp, void *arg)
+{
+	struct get_clones_arg *gca = arg;
+
+	if (gca->numclones == 0) {
+		zfs_close(zhp);
+		return (0);
+	}
+
+	if (zfs_prop_get(zhp, ZFS_PROP_ORIGIN, gca->buf, sizeof (gca->buf),
+	    NULL, NULL, 0, B_TRUE) != 0)
+		goto out;
+	if (strcmp(gca->buf, gca->origin) == 0) {
+		if (nvlist_add_boolean(gca->value, zfs_get_name(zhp)) != 0) {
+			zfs_close(zhp);
+			return (no_memory(zhp->zfs_hdl));
+		}
+		gca->numclones--;
+	}
+
+out:
+	(void) zfs_iter_children(zhp, get_clones_cb, gca);
+	zfs_close(zhp);
+	return (0);
+}
+
+nvlist_t *
+zfs_get_clones_nvl(zfs_handle_t *zhp)
+{
+	nvlist_t *nv, *value;
+
+	if (nvlist_lookup_nvlist(zhp->zfs_props,
+	    zfs_prop_to_name(ZFS_PROP_CLONES), &nv) != 0) {
+		struct get_clones_arg gca;
+
+		/*
+		 * if this is a snapshot, then the kernel wasn't able
+		 * to get the clones.  Do it by slowly iterating.
+		 */
+		if (zhp->zfs_type != ZFS_TYPE_SNAPSHOT)
+			return (NULL);
+		if (nvlist_alloc(&nv, NV_UNIQUE_NAME, 0) != 0)
+			return (NULL);
+		if (nvlist_alloc(&value, NV_UNIQUE_NAME, 0) != 0) {
+			nvlist_free(nv);
+			return (NULL);
+		}
+
+		gca.numclones = zfs_prop_get_int(zhp, ZFS_PROP_NUMCLONES);
+		gca.value = value;
+		gca.origin = zhp->zfs_name;
+
+		if (gca.numclones != 0) {
+			zfs_handle_t *root;
+			char pool[ZFS_MAXNAMELEN];
+			char *cp = pool;
+
+			/* get the pool name */
+			(void) strlcpy(pool, zhp->zfs_name, sizeof (pool));
+			(void) strsep(&cp, "/@");
+			root = zfs_open(zhp->zfs_hdl, pool,
+			    ZFS_TYPE_FILESYSTEM);
+
+			(void) get_clones_cb(root, &gca);
+		}
+
+		if (gca.numclones != 0 ||
+		    nvlist_add_nvlist(nv, ZPROP_VALUE, value) != 0 ||
+		    nvlist_add_nvlist(zhp->zfs_props,
+		    zfs_prop_to_name(ZFS_PROP_CLONES), nv) != 0) {
+			nvlist_free(nv);
+			nvlist_free(value);
+			return (NULL);
+		}
+		nvlist_free(nv);
+		nvlist_free(value);
+		verify(0 == nvlist_lookup_nvlist(zhp->zfs_props,
+		    zfs_prop_to_name(ZFS_PROP_CLONES), &nv));
+	}
+
+	verify(nvlist_lookup_nvlist(nv, ZPROP_VALUE, &value) == 0);
+
+	return (value);
+}
+
 /*
  * Retrieve a property from the given object.  If 'literal' is specified, then
  * numbers are left as exact values.  Otherwise, numbers are converted to a
@@ -2013,6 +2178,11 @@
 			return (-1);
 		break;
 
+	case ZFS_PROP_CLONES:
+		if (get_clones_string(zhp, propbuf, proplen) != 0)
+			return (-1);
+		break;
+
 	case ZFS_PROP_QUOTA:
 	case ZFS_PROP_REFQUOTA:
 	case ZFS_PROP_RESERVATION:
@@ -2385,7 +2555,7 @@
 	int err;
 	zfs_cmd_t zc = { 0 };
 
-	(void) strncpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
+	(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
 
 	err = userquota_propname_decode(propname,
 	    zfs_prop_get_int(zhp, ZFS_PROP_ZONED),
@@ -2437,6 +2607,79 @@
 	return (0);
 }
 
+int
+zfs_prop_get_written_int(zfs_handle_t *zhp, const char *propname,
+    uint64_t *propvalue)
+{
+	int err;
+	zfs_cmd_t zc = { 0 };
+	const char *snapname;
+
+	(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
+
+	snapname = strchr(propname, '@') + 1;
+	if (strchr(snapname, '@')) {
+		(void) strlcpy(zc.zc_value, snapname, sizeof (zc.zc_value));
+	} else {
+		/* snapname is the short name, append it to zhp's fsname */
+		char *cp;
+
+		(void) strlcpy(zc.zc_value, zhp->zfs_name,
+		    sizeof (zc.zc_value));
+		cp = strchr(zc.zc_value, '@');
+		if (cp != NULL)
+			*cp = '\0';
+		(void) strlcat(zc.zc_value, "@", sizeof (zc.zc_value));
+		(void) strlcat(zc.zc_value, snapname, sizeof (zc.zc_value));
+	}
+
+	err = ioctl(zhp->zfs_hdl->libzfs_fd, ZFS_IOC_SPACE_WRITTEN, &zc);
+	if (err)
+		return (err);
+
+	*propvalue = zc.zc_cookie;
+	return (0);
+}
+
+int
+zfs_prop_get_written(zfs_handle_t *zhp, const char *propname,
+    char *propbuf, int proplen, boolean_t literal)
+{
+	int err;
+	uint64_t propvalue;
+
+	err = zfs_prop_get_written_int(zhp, propname, &propvalue);
+
+	if (err)
+		return (err);
+
+	if (literal) {
+		(void) snprintf(propbuf, proplen, "%llu", propvalue);
+	} else {
+		zfs_nicenum(propvalue, propbuf, proplen);
+	}
+	return (0);
+}
+
+int
+zfs_get_snapused_int(zfs_handle_t *firstsnap, zfs_handle_t *lastsnap,
+    uint64_t *usedp)
+{
+	int err;
+	zfs_cmd_t zc = { 0 };
+
+	(void) strlcpy(zc.zc_name, lastsnap->zfs_name, sizeof (zc.zc_name));
+	(void) strlcpy(zc.zc_value, firstsnap->zfs_name, sizeof (zc.zc_value));
+
+	err = ioctl(lastsnap->zfs_hdl->libzfs_fd, ZFS_IOC_SPACE_SNAPS, &zc);
+	if (err)
+		return (err);
+
+	*usedp = zc.zc_cookie;
+
+	return (0);
+}
+
 /*
  * Returns the name of the given zfs handle.
  */
@@ -2455,128 +2698,6 @@
 	return (zhp->zfs_type);
 }
 
-static int
-zfs_do_list_ioctl(zfs_handle_t *zhp, unsigned long arg, zfs_cmd_t *zc)
-{
-	int rc;
-	uint64_t	orig_cookie;
-
-	orig_cookie = zc->zc_cookie;
-top:
-	(void) strlcpy(zc->zc_name, zhp->zfs_name, sizeof (zc->zc_name));
-	rc = ioctl(zhp->zfs_hdl->libzfs_fd, arg, zc);
-
-	if (rc == -1) {
-		switch (errno) {
-		case ENOMEM:
-			/* expand nvlist memory and try again */
-			if (zcmd_expand_dst_nvlist(zhp->zfs_hdl, zc) != 0) {
-				zcmd_free_nvlists(zc);
-				return (-1);
-			}
-			zc->zc_cookie = orig_cookie;
-			goto top;
-		/*
-		 * An errno value of ESRCH indicates normal completion.
-		 * If ENOENT is returned, then the underlying dataset
-		 * has been removed since we obtained the handle.
-		 */
-		case ESRCH:
-		case ENOENT:
-			rc = 1;
-			break;
-		default:
-			rc = zfs_standard_error(zhp->zfs_hdl, errno,
-			    dgettext(TEXT_DOMAIN,
-			    "cannot iterate filesystems"));
-			break;
-		}
-	}
-	return (rc);
-}
-
-/*
- * Iterate over all child filesystems
- */
-int
-zfs_iter_filesystems(zfs_handle_t *zhp, zfs_iter_f func, void *data)
-{
-	zfs_cmd_t zc = { 0 };
-	zfs_handle_t *nzhp;
-	int ret;
-
-	if (zhp->zfs_type != ZFS_TYPE_FILESYSTEM)
-		return (0);
-
-	if (zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0) != 0)
-		return (-1);
-
-	while ((ret = zfs_do_list_ioctl(zhp, ZFS_IOC_DATASET_LIST_NEXT,
-	    &zc)) == 0) {
-		/*
-		 * Silently ignore errors, as the only plausible explanation is
-		 * that the pool has since been removed.
-		 */
-		if ((nzhp = make_dataset_handle_zc(zhp->zfs_hdl,
-		    &zc)) == NULL) {
-			continue;
-		}
-
-		if ((ret = func(nzhp, data)) != 0) {
-			zcmd_free_nvlists(&zc);
-			return (ret);
-		}
-	}
-	zcmd_free_nvlists(&zc);
-	return ((ret < 0) ? ret : 0);
-}
-
-/*
- * Iterate over all snapshots
- */
-int
-zfs_iter_snapshots(zfs_handle_t *zhp, zfs_iter_f func, void *data)
-{
-	zfs_cmd_t zc = { 0 };
-	zfs_handle_t *nzhp;
-	int ret;
-
-	if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT)
-		return (0);
-
-	if (zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0) != 0)
-		return (-1);
-	while ((ret = zfs_do_list_ioctl(zhp, ZFS_IOC_SNAPSHOT_LIST_NEXT,
-	    &zc)) == 0) {
-
-		if ((nzhp = make_dataset_handle_zc(zhp->zfs_hdl,
-		    &zc)) == NULL) {
-			continue;
-		}
-
-		if ((ret = func(nzhp, data)) != 0) {
-			zcmd_free_nvlists(&zc);
-			return (ret);
-		}
-	}
-	zcmd_free_nvlists(&zc);
-	return ((ret < 0) ? ret : 0);
-}
-
-/*
- * Iterate over all children, snapshots and filesystems
- */
-int
-zfs_iter_children(zfs_handle_t *zhp, zfs_iter_f func, void *data)
-{
-	int ret;
-
-	if ((ret = zfs_iter_filesystems(zhp, func, data)) != 0)
-		return (ret);
-
-	return (zfs_iter_snapshots(zhp, func, data));
-}
-
 /*
  * Is one dataset name a child dataset of another?
  *
@@ -2600,18 +2721,19 @@
 
 /*
  * Given a complete name, return just the portion that refers to the parent.
- * Can return NULL if this is a pool.
+ * Will return -1 if there is no parent (path is just the name of the
+ * pool).
  */
 static int
 parent_name(const char *path, char *buf, size_t buflen)
 {
-	char *loc;
-
-	if ((loc = strrchr(path, '/')) == NULL)
+	char *slashp;
+
+	(void) strlcpy(buf, path, buflen);
+
+	if ((slashp = strrchr(buf, '/')) == NULL)
 		return (-1);
-
-	(void) strncpy(buf, path, MIN(buflen, loc - path));
-	buf[loc - path] = '\0';
+	*slashp = '\0';
 
 	return (0);
 }
@@ -3010,9 +3132,8 @@
 }
 
 struct destroydata {
-	char *snapname;
-	boolean_t gotone;
-	boolean_t closezhp;
+	nvlist_t *nvl;
+	const char *snapname;
 };
 
 static int
@@ -3021,24 +3142,19 @@
 	struct destroydata *dd = arg;
 	zfs_handle_t *szhp;
 	char name[ZFS_MAXNAMELEN];
-	boolean_t closezhp = dd->closezhp;
 	int rv = 0;
 
-	(void) strlcpy(name, zhp->zfs_name, sizeof (name));
-	(void) strlcat(name, "@", sizeof (name));
-	(void) strlcat(name, dd->snapname, sizeof (name));
+	(void) snprintf(name, sizeof (name),
+	    "%[email protected]%s", zhp->zfs_name, dd->snapname);
 
 	szhp = make_dataset_handle(zhp->zfs_hdl, name);
 	if (szhp) {
-		dd->gotone = B_TRUE;
+		verify(nvlist_add_boolean(dd->nvl, name) == 0);
 		zfs_close(szhp);
 	}
 
-	dd->closezhp = B_TRUE;
-	if (!dd->gotone)
-		rv = zfs_iter_filesystems(zhp, zfs_check_snap_cb, arg);
-	if (closezhp)
-		zfs_close(zhp);
+	rv = zfs_iter_filesystems(zhp, zfs_check_snap_cb, dd);
+	zfs_close(zhp);
 	return (rv);
 }
 
@@ -3048,29 +3164,45 @@
 int
 zfs_destroy_snaps(zfs_handle_t *zhp, char *snapname, boolean_t defer)
 {
-	zfs_cmd_t zc = { 0 };
 	int ret;
 	struct destroydata dd = { 0 };
 
 	dd.snapname = snapname;
-	(void) zfs_check_snap_cb(zhp, &dd);
-
-	if (!dd.gotone) {
-		return (zfs_standard_error_fmt(zhp->zfs_hdl, ENOENT,
+	verify(nvlist_alloc(&dd.nvl, NV_UNIQUE_NAME, 0) == 0);
+	(void) zfs_check_snap_cb(zfs_handle_dup(zhp), &dd);
+
+	if (nvlist_next_nvpair(dd.nvl, NULL) == NULL) {
+		ret = zfs_standard_error_fmt(zhp->zfs_hdl, ENOENT,
 		    dgettext(TEXT_DOMAIN, "cannot destroy '%[email protected]%s'"),
-		    zhp->zfs_name, snapname));
+		    zhp->zfs_name, snapname);
+	} else {
+		ret = zfs_destroy_snaps_nvl(zhp, dd.nvl, defer);
 	}
+	nvlist_free(dd.nvl);
+	return (ret);
+}
+
+/*
+ * Destroys all the snapshots named in the nvlist.  They must be underneath
+ * the zhp (either snapshots of it, or snapshots of its descendants).
+ */
+int
+zfs_destroy_snaps_nvl(zfs_handle_t *zhp, nvlist_t *snaps, boolean_t defer)
+{
+	int ret;
+	zfs_cmd_t zc = { 0 };
 
 	(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
-	(void) strlcpy(zc.zc_value, snapname, sizeof (zc.zc_value));
+	if (zcmd_write_src_nvlist(zhp->zfs_hdl, &zc, snaps) != 0)
+		return (-1);
 	zc.zc_defer_destroy = defer;
 
-	ret = zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_DESTROY_SNAPS, &zc);
+	ret = zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_DESTROY_SNAPS_NVL, &zc);
 	if (ret != 0) {
 		char errbuf[1024];
 
 		(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
-		    "cannot destroy '%[email protected]%s'"), zc.zc_name, snapname);
+		    "cannot destroy snapshots in %s"), zc.zc_name);
 
 		switch (errno) {
 		case EEXIST:
@@ -3106,7 +3238,7 @@
 	(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
 	    "cannot create '%s'"), target);
 
-	/* validate the target name */
+	/* validate the target/clone name */
 	if (!zfs_validate_name(hdl, target, ZFS_TYPE_FILESYSTEM, B_TRUE))
 		return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
 
@@ -3443,42 +3575,6 @@
 }
 
 /*
- * Iterate over all dependents for a given dataset.  This includes both
- * hierarchical dependents (children) and data dependents (snapshots and
- * clones).  The bulk of the processing occurs in get_dependents() in
- * libzfs_graph.c.
- */
-int
-zfs_iter_dependents(zfs_handle_t *zhp, boolean_t allowrecursion,
-    zfs_iter_f func, void *data)
-{
-	char **dependents;
-	size_t count;
-	int i;
-	zfs_handle_t *child;
-	int ret = 0;
-
-	if (get_dependents(zhp->zfs_hdl, allowrecursion, zhp->zfs_name,
-	    &dependents, &count) != 0)
-		return (-1);
-
-	for (i = 0; i < count; i++) {
-		if ((child = make_dataset_handle(zhp->zfs_hdl,
-		    dependents[i])) == NULL)
-			continue;
-
-		if ((ret = func(child, data)) != 0)
-			break;
-	}
-
-	for (i = 0; i < count; i++)
-		free(dependents[i]);
-	free(dependents);
-
-	return (ret);
-}
-
-/*
  * Renames the given dataset.
  */
 int
@@ -3947,7 +4043,7 @@
 	int error;
 	zfs_useracct_t buf[100];
 
-	(void) strncpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
+	(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
 
 	zc.zc_objset_type = type;
 	zc.zc_nvlist_dst = (uintptr_t)buf;
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_graph.c
--- a/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_graph.c	Tue Dec 06 20:03:07 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,653 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Iterate over all children of the current object.  This includes the normal
- * dataset hierarchy, but also arbitrary hierarchies due to clones.  We want to
- * walk all datasets in the pool, and construct a directed graph of the form:
- *
- * 			home
- *                        |
- *                   +----+----+
- *                   |         |
- *                   v         v             ws
- *                  bar       baz             |
- *                             |              |
- *                             v              v
- *                          @yesterday ----> foo
- *
- * In order to construct this graph, we have to walk every dataset in the pool,
- * because the clone parent is stored as a property of the child, not the
- * parent.  The parent only keeps track of the number of clones.
- *
- * In the normal case (without clones) this would be rather expensive.  To avoid
- * unnecessary computation, we first try a walk of the subtree hierarchy
- * starting from the initial node.  At each dataset, we construct a node in the
- * graph and an edge leading from its parent.  If we don't see any snapshots
- * with a non-zero clone count, then we are finished.
- *
- * If we do find a cloned snapshot, then we finish the walk of the current
- * subtree, but indicate that we need to do a complete walk.  We then perform a
- * global walk of all datasets, avoiding the subtree we already processed.
- *
- * At the end of this, we'll end up with a directed graph of all relevant (and
- * possible some irrelevant) datasets in the system.  We need to both find our
- * limiting subgraph and determine a safe ordering in which to destroy the
- * datasets.  We do a topological ordering of our graph starting at our target
- * dataset, and then walk the results in reverse.
- *
- * It's possible for the graph to have cycles if, for example, the user renames
- * a clone to be the parent of its origin snapshot.  The user can request to
- * generate an error in this case, or ignore the cycle and continue.
- *
- * When removing datasets, we want to destroy the snapshots in chronological
- * order (because this is the most efficient method).  In order to accomplish
- * this, we store the creation transaction group with each vertex and keep each
- * vertex's edges sorted according to this value.  The topological sort will
- * automatically walk the snapshots in the correct order.
- */
-
-#include <assert.h>
-#include <libintl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <unistd.h>
-
-#include <libzfs.h>
-
-#include "libzfs_impl.h"
-#include "zfs_namecheck.h"
-
-#define	MIN_EDGECOUNT	4
-
-/*
- * Vertex structure.  Indexed by dataset name, this structure maintains a list
- * of edges to other vertices.
- */
-struct zfs_edge;
-typedef struct zfs_vertex {
-	char			zv_dataset[ZFS_MAXNAMELEN];
-	struct zfs_vertex	*zv_next;
-	int			zv_visited;
-	uint64_t		zv_txg;
-	struct zfs_edge		**zv_edges;
-	int			zv_edgecount;
-	int			zv_edgealloc;
-} zfs_vertex_t;
-
-enum {
-	VISIT_SEEN = 1,
-	VISIT_SORT_PRE,
-	VISIT_SORT_POST
-};
-
-/*
- * Edge structure.  Simply maintains a pointer to the destination vertex.  There
- * is no need to store the source vertex, since we only use edges in the context
- * of the source vertex.
- */
-typedef struct zfs_edge {
-	zfs_vertex_t		*ze_dest;
-	struct zfs_edge		*ze_next;
-} zfs_edge_t;
-
-#define	ZFS_GRAPH_SIZE		1027	/* this could be dynamic some day */
-
-/*
- * Graph structure.  Vertices are maintained in a hash indexed by dataset name.
- */
-typedef struct zfs_graph {
-	zfs_vertex_t		**zg_hash;
-	size_t			zg_size;
-	size_t			zg_nvertex;
-	const char		*zg_root;
-	int			zg_clone_count;
-} zfs_graph_t;
-
-/*
- * Allocate a new edge pointing to the target vertex.
- */
-static zfs_edge_t *
-zfs_edge_create(libzfs_handle_t *hdl, zfs_vertex_t *dest)
-{
-	zfs_edge_t *zep = zfs_alloc(hdl, sizeof (zfs_edge_t));
-
-	if (zep == NULL)
-		return (NULL);
-
-	zep->ze_dest = dest;
-
-	return (zep);
-}
-
-/*
- * Destroy an edge.
- */
-static void
-zfs_edge_destroy(zfs_edge_t *zep)
-{
-	free(zep);
-}
-
-/*
- * Allocate a new vertex with the given name.
- */
-static zfs_vertex_t *
-zfs_vertex_create(libzfs_handle_t *hdl, const char *dataset)
-{
-	zfs_vertex_t *zvp = zfs_alloc(hdl, sizeof (zfs_vertex_t));
-
-	if (zvp == NULL)
-		return (NULL);
-
-	assert(strlen(dataset) < ZFS_MAXNAMELEN);
-
-	(void) strlcpy(zvp->zv_dataset, dataset, sizeof (zvp->zv_dataset));
-
-	if ((zvp->zv_edges = zfs_alloc(hdl,
-	    MIN_EDGECOUNT * sizeof (void *))) == NULL) {
-		free(zvp);
-		return (NULL);
-	}
-
-	zvp->zv_edgealloc = MIN_EDGECOUNT;
-
-	return (zvp);
-}
-
-/*
- * Destroy a vertex.  Frees up any associated edges.
- */
-static void
-zfs_vertex_destroy(zfs_vertex_t *zvp)
-{
-	int i;
-
-	for (i = 0; i < zvp->zv_edgecount; i++)
-		zfs_edge_destroy(zvp->zv_edges[i]);
-
-	free(zvp->zv_edges);
-	free(zvp);
-}
-
-/*
- * Given a vertex, add an edge to the destination vertex.
- */
-static int
-zfs_vertex_add_edge(libzfs_handle_t *hdl, zfs_vertex_t *zvp,
-    zfs_vertex_t *dest)
-{
-	zfs_edge_t *zep = zfs_edge_create(hdl, dest);
-
-	if (zep == NULL)
-		return (-1);
-
-	if (zvp->zv_edgecount == zvp->zv_edgealloc) {
-		void *ptr;
-
-		if ((ptr = zfs_realloc(hdl, zvp->zv_edges,
-		    zvp->zv_edgealloc * sizeof (void *),
-		    zvp->zv_edgealloc * 2 * sizeof (void *))) == NULL)
-			return (-1);
-
-		zvp->zv_edges = ptr;
-		zvp->zv_edgealloc *= 2;
-	}
-
-	zvp->zv_edges[zvp->zv_edgecount++] = zep;
-
-	return (0);
-}
-
-static int
-zfs_edge_compare(const void *a, const void *b)
-{
-	const zfs_edge_t *ea = *((zfs_edge_t **)a);
-	const zfs_edge_t *eb = *((zfs_edge_t **)b);
-
-	if (ea->ze_dest->zv_txg < eb->ze_dest->zv_txg)
-		return (-1);
-	if (ea->ze_dest->zv_txg > eb->ze_dest->zv_txg)
-		return (1);
-	return (0);
-}
-
-/*
- * Sort the given vertex edges according to the creation txg of each vertex.
- */
-static void
-zfs_vertex_sort_edges(zfs_vertex_t *zvp)
-{
-	if (zvp->zv_edgecount == 0)
-		return;
-
-	qsort(zvp->zv_edges, zvp->zv_edgecount, sizeof (void *),
-	    zfs_edge_compare);
-}
-
-/*
- * Construct a new graph object.  We allow the size to be specified as a
- * parameter so in the future we can size the hash according to the number of
- * datasets in the pool.
- */
-static zfs_graph_t *
-zfs_graph_create(libzfs_handle_t *hdl, const char *dataset, size_t size)
-{
-	zfs_graph_t *zgp = zfs_alloc(hdl, sizeof (zfs_graph_t));
-
-	if (zgp == NULL)
-		return (NULL);
-
-	zgp->zg_size = size;
-	if ((zgp->zg_hash = zfs_alloc(hdl,
-	    size * sizeof (zfs_vertex_t *))) == NULL) {
-		free(zgp);
-		return (NULL);
-	}
-
-	zgp->zg_root = dataset;
-	zgp->zg_clone_count = 0;
-
-	return (zgp);
-}
-
-/*
- * Destroy a graph object.  We have to iterate over all the hash chains,
- * destroying each vertex in the process.
- */
-static void
-zfs_graph_destroy(zfs_graph_t *zgp)
-{
-	int i;
-	zfs_vertex_t *current, *next;
-
-	for (i = 0; i < zgp->zg_size; i++) {
-		current = zgp->zg_hash[i];
-		while (current != NULL) {
-			next = current->zv_next;
-			zfs_vertex_destroy(current);
-			current = next;
-		}
-	}
-
-	free(zgp->zg_hash);
-	free(zgp);
-}
-
-/*
- * Graph hash function.  Classic bernstein k=33 hash function, taken from
- * usr/src/cmd/sgs/tools/common/strhash.c
- */
-static size_t
-zfs_graph_hash(zfs_graph_t *zgp, const char *str)
-{
-	size_t hash = 5381;
-	int c;
-
-	while ((c = *str++) != 0)
-		hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
-
-	return (hash % zgp->zg_size);
-}
-
-/*
- * Given a dataset name, finds the associated vertex, creating it if necessary.
- */
-static zfs_vertex_t *
-zfs_graph_lookup(libzfs_handle_t *hdl, zfs_graph_t *zgp, const char *dataset,
-    uint64_t txg)
-{
-	size_t idx = zfs_graph_hash(zgp, dataset);
-	zfs_vertex_t *zvp;
-
-	for (zvp = zgp->zg_hash[idx]; zvp != NULL; zvp = zvp->zv_next) {
-		if (strcmp(zvp->zv_dataset, dataset) == 0) {
-			if (zvp->zv_txg == 0)
-				zvp->zv_txg = txg;
-			return (zvp);
-		}
-	}
-
-	if ((zvp = zfs_vertex_create(hdl, dataset)) == NULL)
-		return (NULL);
-
-	zvp->zv_next = zgp->zg_hash[idx];
-	zvp->zv_txg = txg;
-	zgp->zg_hash[idx] = zvp;
-	zgp->zg_nvertex++;
-
-	return (zvp);
-}
-
-/*
- * Given two dataset names, create an edge between them.  For the source vertex,
- * mark 'zv_visited' to indicate that we have seen this vertex, and not simply
- * created it as a destination of another edge.  If 'dest' is NULL, then this
- * is an individual vertex (i.e. the starting vertex), so don't add an edge.
- */
-static int
-zfs_graph_add(libzfs_handle_t *hdl, zfs_graph_t *zgp, const char *source,
-    const char *dest, uint64_t txg)
-{
-	zfs_vertex_t *svp, *dvp;
-
-	if ((svp = zfs_graph_lookup(hdl, zgp, source, 0)) == NULL)
-		return (-1);
-	svp->zv_visited = VISIT_SEEN;
-	if (dest != NULL) {
-		dvp = zfs_graph_lookup(hdl, zgp, dest, txg);
-		if (dvp == NULL)
-			return (-1);
-		if (zfs_vertex_add_edge(hdl, svp, dvp) != 0)
-			return (-1);
-	}
-
-	return (0);
-}
-
-/*
- * Iterate over all children of the given dataset, adding any vertices
- * as necessary.  Returns -1 if there was an error, or 0 otherwise.
- * This is a simple recursive algorithm - the ZFS namespace typically
- * is very flat.  We manually invoke the necessary ioctl() calls to
- * avoid the overhead and additional semantics of zfs_open().
- */
-static int
-iterate_children(libzfs_handle_t *hdl, zfs_graph_t *zgp, const char *dataset)
-{
-	zfs_cmd_t zc = { 0 };
-	zfs_vertex_t *zvp;
-
-	/*
-	 * Look up the source vertex, and avoid it if we've seen it before.
-	 */
-	zvp = zfs_graph_lookup(hdl, zgp, dataset, 0);
-	if (zvp == NULL)
-		return (-1);
-	if (zvp->zv_visited == VISIT_SEEN)
-		return (0);
-
-	/*
-	 * Iterate over all children
-	 */
-	for ((void) strlcpy(zc.zc_name, dataset, sizeof (zc.zc_name));
-	    ioctl(hdl->libzfs_fd, ZFS_IOC_DATASET_LIST_NEXT, &zc) == 0;
-	    (void) strlcpy(zc.zc_name, dataset, sizeof (zc.zc_name))) {
-		/*
-		 * Get statistics for this dataset, to determine the type of the
-		 * dataset and clone statistics.  If this fails, the dataset has
-		 * since been removed, and we're pretty much screwed anyway.
-		 */
-		zc.zc_objset_stats.dds_origin[0] = '\0';
-		if (ioctl(hdl->libzfs_fd, ZFS_IOC_OBJSET_STATS, &zc) != 0)
-			continue;
-
-		if (zc.zc_objset_stats.dds_origin[0] != '\0') {
-			if (zfs_graph_add(hdl, zgp,
-			    zc.zc_objset_stats.dds_origin, zc.zc_name,
-			    zc.zc_objset_stats.dds_creation_txg) != 0)
-				return (-1);
-			/*
-			 * Count origins only if they are contained in the graph
-			 */
-			if (isa_child_of(zc.zc_objset_stats.dds_origin,
-			    zgp->zg_root))
-				zgp->zg_clone_count--;
-		}
-
-		/*
-		 * Add an edge between the parent and the child.
-		 */
-		if (zfs_graph_add(hdl, zgp, dataset, zc.zc_name,
-		    zc.zc_objset_stats.dds_creation_txg) != 0)
-			return (-1);
-
-		/*
-		 * Recursively visit child
-		 */
-		if (iterate_children(hdl, zgp, zc.zc_name))
-			return (-1);
-	}
-
-	/*
-	 * Now iterate over all snapshots.
-	 */
-	bzero(&zc, sizeof (zc));
-
-	for ((void) strlcpy(zc.zc_name, dataset, sizeof (zc.zc_name));
-	    ioctl(hdl->libzfs_fd, ZFS_IOC_SNAPSHOT_LIST_NEXT, &zc) == 0;
-	    (void) strlcpy(zc.zc_name, dataset, sizeof (zc.zc_name))) {
-
-		/*
-		 * Get statistics for this dataset, to determine the type of the
-		 * dataset and clone statistics.  If this fails, the dataset has
-		 * since been removed, and we're pretty much screwed anyway.
-		 */
-		if (ioctl(hdl->libzfs_fd, ZFS_IOC_OBJSET_STATS, &zc) != 0)
-			continue;
-
-		/*
-		 * Add an edge between the parent and the child.
-		 */
-		if (zfs_graph_add(hdl, zgp, dataset, zc.zc_name,
-		    zc.zc_objset_stats.dds_creation_txg) != 0)
-			return (-1);
-
-		zgp->zg_clone_count += zc.zc_objset_stats.dds_num_clones;
-	}
-
-	zvp->zv_visited = VISIT_SEEN;
-
-	return (0);
-}
-
-/*
- * Returns false if there are no snapshots with dependent clones in this
- * subtree or if all of those clones are also in this subtree.  Returns
- * true if there is an error or there are external dependents.
- */
-static boolean_t
-external_dependents(libzfs_handle_t *hdl, zfs_graph_t *zgp, const char *dataset)
-{
-	zfs_cmd_t zc = { 0 };
-
-	/*
-	 * Check whether this dataset is a clone or has clones since
-	 * iterate_children() only checks the children.
-	 */
-	(void) strlcpy(zc.zc_name, dataset, sizeof (zc.zc_name));
-	if (ioctl(hdl->libzfs_fd, ZFS_IOC_OBJSET_STATS, &zc) != 0)
-		return (B_TRUE);
-
-	if (zc.zc_objset_stats.dds_origin[0] != '\0') {
-		if (zfs_graph_add(hdl, zgp,
-		    zc.zc_objset_stats.dds_origin, zc.zc_name,
-		    zc.zc_objset_stats.dds_creation_txg) != 0)
-			return (B_TRUE);
-		if (isa_child_of(zc.zc_objset_stats.dds_origin, dataset))
-			zgp->zg_clone_count--;
-	}
-
-	if ((zc.zc_objset_stats.dds_num_clones) ||
-	    iterate_children(hdl, zgp, dataset))
-		return (B_TRUE);
-
-	return (zgp->zg_clone_count != 0);
-}
-
-/*
- * Construct a complete graph of all necessary vertices.  First, iterate over
- * only our object's children.  If no cloned snapshots are found, or all of
- * the cloned snapshots are in this subtree then return a graph of the subtree.
- * Otherwise, start at the root of the pool and iterate over all datasets.
- */
-static zfs_graph_t *
-construct_graph(libzfs_handle_t *hdl, const char *dataset)
-{
-	zfs_graph_t *zgp = zfs_graph_create(hdl, dataset, ZFS_GRAPH_SIZE);
-	int ret = 0;
-
-	if (zgp == NULL)
-		return (zgp);
-
-	if ((strchr(dataset, '/') == NULL) ||
-	    (external_dependents(hdl, zgp, dataset))) {
-		/*
-		 * Determine pool name and try again.
-		 */
-		int len = strcspn(dataset, "/@") + 1;
-		char *pool = zfs_alloc(hdl, len);
-
-		if (pool == NULL) {
-			zfs_graph_destroy(zgp);
-			return (NULL);
-		}
-		(void) strlcpy(pool, dataset, len);
-
-		if (iterate_children(hdl, zgp, pool) == -1 ||
-		    zfs_graph_add(hdl, zgp, pool, NULL, 0) != 0) {
-			free(pool);
-			zfs_graph_destroy(zgp);
-			return (NULL);
-		}
-		free(pool);
-	}
-
-	if (ret == -1 || zfs_graph_add(hdl, zgp, dataset, NULL, 0) != 0) {
-		zfs_graph_destroy(zgp);
-		return (NULL);
-	}
-
-	return (zgp);
-}
-
-/*
- * Given a graph, do a recursive topological sort into the given array.  This is
- * really just a depth first search, so that the deepest nodes appear first.
- * hijack the 'zv_visited' marker to avoid visiting the same vertex twice.
- */
-static int
-topo_sort(libzfs_handle_t *hdl, boolean_t allowrecursion, char **result,
-    size_t *idx, zfs_vertex_t *zgv)
-{
-	int i;
-
-	if (zgv->zv_visited == VISIT_SORT_PRE && !allowrecursion) {
-		/*
-		 * If we've already seen this vertex as part of our depth-first
-		 * search, then we have a cyclic dependency, and we must return
-		 * an error.
-		 */
-		zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
-		    "recursive dependency at '%s'"),
-		    zgv->zv_dataset);
-		return (zfs_error(hdl, EZFS_RECURSIVE,
-		    dgettext(TEXT_DOMAIN,
-		    "cannot determine dependent datasets")));
-	} else if (zgv->zv_visited >= VISIT_SORT_PRE) {
-		/*
-		 * If we've already processed this as part of the topological
-		 * sort, then don't bother doing so again.
-		 */
-		return (0);
-	}
-
-	zgv->zv_visited = VISIT_SORT_PRE;
-
-	/* avoid doing a search if we don't have to */
-	zfs_vertex_sort_edges(zgv);
-	for (i = 0; i < zgv->zv_edgecount; i++) {
-		if (topo_sort(hdl, allowrecursion, result, idx,
-		    zgv->zv_edges[i]->ze_dest) != 0)
-			return (-1);
-	}
-
-	/* we may have visited this in the course of the above */
-	if (zgv->zv_visited == VISIT_SORT_POST)
-		return (0);
-
-	if ((result[*idx] = zfs_alloc(hdl,
-	    strlen(zgv->zv_dataset) + 1)) == NULL)
-		return (-1);
-
-	(void) strcpy(result[*idx], zgv->zv_dataset);
-	*idx += 1;
-	zgv->zv_visited = VISIT_SORT_POST;
-	return (0);
-}
-
-/*
- * The only public interface for this file.  Do the dirty work of constructing a
- * child list for the given object.  Construct the graph, do the toplogical
- * sort, and then return the array of strings to the caller.
- *
- * The 'allowrecursion' parameter controls behavior when cycles are found.  If
- * it is set, the the cycle is ignored and the results returned as if the cycle
- * did not exist.  If it is not set, then the routine will generate an error if
- * a cycle is found.
- */
-int
-get_dependents(libzfs_handle_t *hdl, boolean_t allowrecursion,
-    const char *dataset, char ***result, size_t *count)
-{
-	zfs_graph_t *zgp;
-	zfs_vertex_t *zvp;
-
-	if ((zgp = construct_graph(hdl, dataset)) == NULL)
-		return (-1);
-
-	if ((*result = zfs_alloc(hdl,
-	    zgp->zg_nvertex * sizeof (char *))) == NULL) {
-		zfs_graph_destroy(zgp);
-		return (-1);
-	}
-
-	if ((zvp = zfs_graph_lookup(hdl, zgp, dataset, 0)) == NULL) {
-		free(*result);
-		zfs_graph_destroy(zgp);
-		return (-1);
-	}
-
-	*count = 0;
-	if (topo_sort(hdl, allowrecursion, *result, count, zvp) != 0) {
-		free(*result);
-		zfs_graph_destroy(zgp);
-		return (-1);
-	}
-
-	/*
-	 * Get rid of the last entry, which is our starting vertex and not
-	 * strictly a dependent.
-	 */
-	assert(*count > 0);
-	free((*result)[*count - 1]);
-	(*count)--;
-
-	zfs_graph_destroy(zgp);
-
-	return (0);
-}
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
--- a/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h	Tue Dec 06 20:26:16 2011 +0200
@@ -23,6 +23,7 @@
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2011 Pawel Jakub Dawidek <pawel at dawidek.net>.
  * All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
  */
 
 #ifndef	_LIBFS_IMPL_H
@@ -116,7 +117,7 @@
 	diskaddr_t zpool_start_block;
 };
 
-typedef  enum {
+typedef enum {
 	PROTO_NFS = 0,
 	PROTO_SMB = 1,
 	PROTO_END = 2
@@ -148,6 +149,7 @@
 
 int get_dependents(libzfs_handle_t *, boolean_t, const char *, char ***,
     size_t *);
+zfs_handle_t *make_dataset_handle_zc(libzfs_handle_t *, zfs_cmd_t *);
 
 
 int zprop_parse_value(libzfs_handle_t *, nvpair_t *, int, zfs_type_t,
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
--- a/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c	Tue Dec 06 20:26:16 2011 +0200
@@ -20,6 +20,8 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
  */
 
 /*
@@ -435,7 +437,7 @@
 	uint_t i, nspares, nl2cache;
 	boolean_t config_seen;
 	uint64_t best_txg;
-	char *name, *hostname;
+	char *name, *hostname, *comment;
 	uint64_t version, guid;
 	uint_t children = 0;
 	nvlist_t **child = NULL;
@@ -524,6 +526,7 @@
 				 *	version
 				 * 	pool guid
 				 * 	name
+				 *	comment (if available)
 				 * 	pool state
 				 *	hostid (if available)
 				 *	hostname (if available)
@@ -545,11 +548,24 @@
 				if (nvlist_add_string(config,
 				    ZPOOL_CONFIG_POOL_NAME, name) != 0)
 					goto nomem;
+
+				/*
+				 * COMMENT is optional, don't bail if it's not
+				 * there, instead, set it to NULL.
+				 */
+				if (nvlist_lookup_string(tmp,
+				    ZPOOL_CONFIG_COMMENT, &comment) != 0)
+					comment = NULL;
+				else if (nvlist_add_string(config,
+				    ZPOOL_CONFIG_COMMENT, comment) != 0)
+					goto nomem;
+
 				verify(nvlist_lookup_uint64(tmp,
 				    ZPOOL_CONFIG_POOL_STATE, &state) == 0);
 				if (nvlist_add_uint64(config,
 				    ZPOOL_CONFIG_POOL_STATE, state) != 0)
 					goto nomem;
+
 				hostid = 0;
 				if (nvlist_lookup_uint64(tmp,
 				    ZPOOL_CONFIG_HOSTID, &hostid) == 0) {
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c	Tue Dec 06 20:26:16 2011 +0200
@@ -0,0 +1,462 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <strings.h>
+#include <unistd.h>
+#include <stddef.h>
+#include <libintl.h>
+#include <libzfs.h>
+
+#include "libzfs_impl.h"
+
+int
+zfs_iter_clones(zfs_handle_t *zhp, zfs_iter_f func, void *data)
+{
+	nvlist_t *nvl = zfs_get_clones_nvl(zhp);
+	nvpair_t *pair;
+
+	if (nvl == NULL)
+		return (0);
+
+	for (pair = nvlist_next_nvpair(nvl, NULL); pair != NULL;
+	    pair = nvlist_next_nvpair(nvl, pair)) {
+		zfs_handle_t *clone = zfs_open(zhp->zfs_hdl, nvpair_name(pair),
+		    ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME);
+		if (clone != NULL) {
+			int err = func(clone, data);
+			if (err != 0)
+				return (err);
+		}
+	}
+	return (0);
+}
+
+static int
+zfs_do_list_ioctl(zfs_handle_t *zhp, unsigned long arg, zfs_cmd_t *zc)
+{
+	int rc;
+	uint64_t	orig_cookie;
+
+	orig_cookie = zc->zc_cookie;
+top:
+	(void) strlcpy(zc->zc_name, zhp->zfs_name, sizeof (zc->zc_name));
+	rc = ioctl(zhp->zfs_hdl->libzfs_fd, arg, zc);
+
+	if (rc == -1) {
+		switch (errno) {
+		case ENOMEM:
+			/* expand nvlist memory and try again */
+			if (zcmd_expand_dst_nvlist(zhp->zfs_hdl, zc) != 0) {
+				zcmd_free_nvlists(zc);
+				return (-1);
+			}
+			zc->zc_cookie = orig_cookie;
+			goto top;
+		/*
+		 * An errno value of ESRCH indicates normal completion.
+		 * If ENOENT is returned, then the underlying dataset
+		 * has been removed since we obtained the handle.
+		 */
+		case ESRCH:
+		case ENOENT:
+			rc = 1;
+			break;
+		default:
+			rc = zfs_standard_error(zhp->zfs_hdl, errno,
+			    dgettext(TEXT_DOMAIN,
+			    "cannot iterate filesystems"));
+			break;
+		}
+	}
+	return (rc);
+}
+
+/*
+ * Iterate over all child filesystems
+ */
+int
+zfs_iter_filesystems(zfs_handle_t *zhp, zfs_iter_f func, void *data)
+{
+	zfs_cmd_t zc = { 0 };
+	zfs_handle_t *nzhp;
+	int ret;
+
+	if (zhp->zfs_type != ZFS_TYPE_FILESYSTEM)
+		return (0);
+
+	if (zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0) != 0)
+		return (-1);
+
+	while ((ret = zfs_do_list_ioctl(zhp, ZFS_IOC_DATASET_LIST_NEXT,
+	    &zc)) == 0) {
+		/*
+		 * Silently ignore errors, as the only plausible explanation is
+		 * that the pool has since been removed.
+		 */
+		if ((nzhp = make_dataset_handle_zc(zhp->zfs_hdl,
+		    &zc)) == NULL) {
+			continue;
+		}
+
+		if ((ret = func(nzhp, data)) != 0) {
+			zcmd_free_nvlists(&zc);
+			return (ret);
+		}
+	}
+	zcmd_free_nvlists(&zc);
+	return ((ret < 0) ? ret : 0);
+}
+
+/*
+ * Iterate over all snapshots
+ */
+int
+zfs_iter_snapshots(zfs_handle_t *zhp, zfs_iter_f func, void *data)
+{
+	zfs_cmd_t zc = { 0 };
+	zfs_handle_t *nzhp;
+	int ret;
+
+	if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT)
+		return (0);
+
+	if (zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0) != 0)
+		return (-1);
+	while ((ret = zfs_do_list_ioctl(zhp, ZFS_IOC_SNAPSHOT_LIST_NEXT,
+	    &zc)) == 0) {
+
+		if ((nzhp = make_dataset_handle_zc(zhp->zfs_hdl,
+		    &zc)) == NULL) {
+			continue;
+		}
+
+		if ((ret = func(nzhp, data)) != 0) {
+			zcmd_free_nvlists(&zc);
+			return (ret);
+		}
+	}
+	zcmd_free_nvlists(&zc);
+	return ((ret < 0) ? ret : 0);
+}
+
+/*
+ * Routines for dealing with the sorted snapshot functionality
+ */
+typedef struct zfs_node {
+	zfs_handle_t	*zn_handle;
+	avl_node_t	zn_avlnode;
+} zfs_node_t;
+
+static int
+zfs_sort_snaps(zfs_handle_t *zhp, void *data)
+{
+	avl_tree_t *avl = data;
+	zfs_node_t *node;
+	zfs_node_t search;
+
+	search.zn_handle = zhp;
+	node = avl_find(avl, &search, NULL);
+	if (node) {
+		/*
+		 * If this snapshot was renamed while we were creating the
+		 * AVL tree, it's possible that we already inserted it under
+		 * its old name. Remove the old handle before adding the new
+		 * one.
+		 */
+		zfs_close(node->zn_handle);
+		avl_remove(avl, node);
+		free(node);
+	}
+
+	node = zfs_alloc(zhp->zfs_hdl, sizeof (zfs_node_t));
+	node->zn_handle = zhp;
+	avl_add(avl, node);
+
+	return (0);
+}
+
+static int
+zfs_snapshot_compare(const void *larg, const void *rarg)
+{
+	zfs_handle_t *l = ((zfs_node_t *)larg)->zn_handle;
+	zfs_handle_t *r = ((zfs_node_t *)rarg)->zn_handle;
+	uint64_t lcreate, rcreate;
+
+	/*
+	 * Sort them according to creation time.  We use the hidden
+	 * CREATETXG property to get an absolute ordering of snapshots.
+	 */
+	lcreate = zfs_prop_get_int(l, ZFS_PROP_CREATETXG);
+	rcreate = zfs_prop_get_int(r, ZFS_PROP_CREATETXG);
+
+	if (lcreate < rcreate)
+		return (-1);
+	else if (lcreate > rcreate)
+		return (+1);
+	else
+		return (0);
+}
+
+int
+zfs_iter_snapshots_sorted(zfs_handle_t *zhp, zfs_iter_f callback, void *data)
+{
+	int ret = 0;
+	zfs_node_t *node;
+	avl_tree_t avl;
+	void *cookie = NULL;
+
+	avl_create(&avl, zfs_snapshot_compare,
+	    sizeof (zfs_node_t), offsetof(zfs_node_t, zn_avlnode));
+
+	ret = zfs_iter_snapshots(zhp, zfs_sort_snaps, &avl);
+
+	for (node = avl_first(&avl); node != NULL; node = AVL_NEXT(&avl, node))
+		ret |= callback(node->zn_handle, data);
+
+	while ((node = avl_destroy_nodes(&avl, &cookie)) != NULL)
+		free(node);
+
+	avl_destroy(&avl);
+
+	return (ret);
+}
+
+typedef struct {
+	char *ssa_first;
+	char *ssa_last;
+	boolean_t ssa_seenfirst;
+	boolean_t ssa_seenlast;
+	zfs_iter_f ssa_func;
+	void *ssa_arg;
+} snapspec_arg_t;
+
+static int
+snapspec_cb(zfs_handle_t *zhp, void *arg) {
+	snapspec_arg_t *ssa = arg;
+	char *shortsnapname;
+	int err = 0;
+
+	if (ssa->ssa_seenlast)
+		return (0);
+	shortsnapname = zfs_strdup(zhp->zfs_hdl,
+	    strchr(zfs_get_name(zhp), '@') + 1);
+
+	if (!ssa->ssa_seenfirst && strcmp(shortsnapname, ssa->ssa_first) == 0)
+		ssa->ssa_seenfirst = B_TRUE;
+
+	if (ssa->ssa_seenfirst) {
+		err = ssa->ssa_func(zhp, ssa->ssa_arg);
+	} else {
+		zfs_close(zhp);
+	}
+
+	if (strcmp(shortsnapname, ssa->ssa_last) == 0)
+		ssa->ssa_seenlast = B_TRUE;
+	free(shortsnapname);
+
+	return (err);
+}
+
+/*
+ * spec is a string like "A,B%C,D"
+ *
+ * <snaps>, where <snaps> can be:
+ *      <snap>          (single snapshot)
+ *      <snap>%<snap>   (range of snapshots, inclusive)
+ *      %<snap>         (range of snapshots, starting with earliest)
+ *      <snap>%         (range of snapshots, ending with last)
+ *      %               (all snapshots)
+ *      <snaps>[,...]   (comma separated list of the above)
+ *
+ * If a snapshot can not be opened, continue trying to open the others, but
+ * return ENOENT at the end.
+ */
+int
+zfs_iter_snapspec(zfs_handle_t *fs_zhp, const char *spec_orig,
+    zfs_iter_f func, void *arg)
+{
+	char buf[ZFS_MAXNAMELEN];
+	char *comma_separated, *cp;
+	int err = 0;
+	int ret = 0;
+
+	(void) strlcpy(buf, spec_orig, sizeof (buf));
+	cp = buf;
+
+	while ((comma_separated = strsep(&cp, ",")) != NULL) {
+		char *pct = strchr(comma_separated, '%');
+		if (pct != NULL) {
+			snapspec_arg_t ssa = { 0 };
+			ssa.ssa_func = func;
+			ssa.ssa_arg = arg;
+
+			if (pct == comma_separated)
+				ssa.ssa_seenfirst = B_TRUE;
+			else
+				ssa.ssa_first = comma_separated;
+			*pct = '\0';
+			ssa.ssa_last = pct + 1;
+
+			/*
+			 * If there is a lastname specified, make sure it
+			 * exists.
+			 */
+			if (ssa.ssa_last[0] != '\0') {
+				char snapname[ZFS_MAXNAMELEN];
+				(void) snprintf(snapname, sizeof (snapname),
+				    "%[email protected]%s", zfs_get_name(fs_zhp),
+				    ssa.ssa_last);
+				if (!zfs_dataset_exists(fs_zhp->zfs_hdl,
+				    snapname, ZFS_TYPE_SNAPSHOT)) {
+					ret = ENOENT;
+					continue;
+				}
+			}
+
+			err = zfs_iter_snapshots_sorted(fs_zhp,
+			    snapspec_cb, &ssa);
+			if (ret == 0)
+				ret = err;
+			if (ret == 0 && (!ssa.ssa_seenfirst ||
+			    (ssa.ssa_last[0] != '\0' && !ssa.ssa_seenlast))) {
+				ret = ENOENT;
+			}
+		} else {
+			char snapname[ZFS_MAXNAMELEN];
+			zfs_handle_t *snap_zhp;
+			(void) snprintf(snapname, sizeof (snapname), "%[email protected]%s",
+			    zfs_get_name(fs_zhp), comma_separated);
+			snap_zhp = make_dataset_handle(fs_zhp->zfs_hdl,
+			    snapname);
+			if (snap_zhp == NULL) {
+				ret = ENOENT;
+				continue;
+			}
+			err = func(snap_zhp, arg);
+			if (ret == 0)
+				ret = err;
+		}
+	}
+
+	return (ret);
+}
+
+/*
+ * Iterate over all children, snapshots and filesystems
+ */
+int
+zfs_iter_children(zfs_handle_t *zhp, zfs_iter_f func, void *data)
+{
+	int ret;
+
+	if ((ret = zfs_iter_filesystems(zhp, func, data)) != 0)
+		return (ret);
+
+	return (zfs_iter_snapshots(zhp, func, data));
+}
+
+
+typedef struct iter_stack_frame {
+	struct iter_stack_frame *next;
+	zfs_handle_t *zhp;
+} iter_stack_frame_t;
+
+typedef struct iter_dependents_arg {
+	boolean_t first;
+	boolean_t allowrecursion;
+	iter_stack_frame_t *stack;
+	zfs_iter_f func;
+	void *data;
+} iter_dependents_arg_t;
+
+static int
+iter_dependents_cb(zfs_handle_t *zhp, void *arg)
+{
+	iter_dependents_arg_t *ida = arg;
+	int err;
+	boolean_t first = ida->first;
+	ida->first = B_FALSE;
+
+	if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT) {
+		err = zfs_iter_clones(zhp, iter_dependents_cb, ida);
+	} else {
+		iter_stack_frame_t isf;
+		iter_stack_frame_t *f;
+
+		/*
+		 * check if there is a cycle by seeing if this fs is already
+		 * on the stack.
+		 */
+		for (f = ida->stack; f != NULL; f = f->next) {
+			if (f->zhp->zfs_dmustats.dds_guid ==
+			    zhp->zfs_dmustats.dds_guid) {
+				if (ida->allowrecursion) {
+					zfs_close(zhp);
+					return (0);
+				} else {
+					zfs_error_aux(zhp->zfs_hdl,
+					    dgettext(TEXT_DOMAIN,
+					    "recursive dependency at '%s'"),
+					    zfs_get_name(zhp));
+					err = zfs_error(zhp->zfs_hdl,
+					    EZFS_RECURSIVE,
+					    dgettext(TEXT_DOMAIN,
+					    "cannot determine dependent "
+					    "datasets"));
+					zfs_close(zhp);
+					return (err);
+				}
+			}
+		}
+
+		isf.zhp = zhp;
+		isf.next = ida->stack;
+		ida->stack = &isf;
+		err = zfs_iter_filesystems(zhp, iter_dependents_cb, ida);
+		if (err == 0)
+			err = zfs_iter_snapshots(zhp, iter_dependents_cb, ida);
+		ida->stack = isf.next;
+	}
+	if (!first && err == 0)
+		err = ida->func(zhp, ida->data);
+	return (err);
+}
+
+int
+zfs_iter_dependents(zfs_handle_t *zhp, boolean_t allowrecursion,
+    zfs_iter_f func, void *data)
+{
+	iter_dependents_arg_t ida;
+	ida.allowrecursion = allowrecursion;
+	ida.stack = NULL;
+	ida.func = func;
+	ida.data = data;
+	ida.first = B_TRUE;
+	return (iter_dependents_cb(zfs_handle_dup(zhp), &ida));
+}
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
--- a/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c	Tue Dec 06 20:26:16 2011 +0200
@@ -21,6 +21,8 @@
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
  */
 
 #include <sys/types.h>
@@ -261,6 +263,7 @@
 
 		case ZPOOL_PROP_ALTROOT:
 		case ZPOOL_PROP_CACHEFILE:
+		case ZPOOL_PROP_COMMENT:
 			if (zhp->zpool_props != NULL ||
 			    zpool_get_all_props(zhp) == 0) {
 				(void) strlcpy(buf,
@@ -412,7 +415,7 @@
 	zpool_prop_t prop;
 	char *strval;
 	uint64_t intval;
-	char *slash;
+	char *slash, *check;
 	struct stat64 statbuf;
 	zpool_handle_t *zhp;
 	nvlist_t *nvroot;
@@ -573,6 +576,26 @@
 			*slash = '/';
 			break;
 
+		case ZPOOL_PROP_COMMENT:
+			for (check = strval; *check != '\0'; check++) {
+				if (!isprint(*check)) {
+					zfs_error_aux(hdl,
+					    dgettext(TEXT_DOMAIN,
+					    "comment may only have printable "
+					    "characters"));
+					(void) zfs_error(hdl, EZFS_BADPROP,
+					    errbuf);
+					goto error;
+				}
+			}
+			if (strlen(strval) > ZPROP_MAX_COMMENT) {
+				zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+				    "comment must not exceed %d characters"),
+				    ZPROP_MAX_COMMENT);
+				(void) zfs_error(hdl, EZFS_BADPROP, errbuf);
+				goto error;
+			}
+			break;
 		case ZPOOL_PROP_READONLY:
 			if (!flags.import) {
 				zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
@@ -3011,6 +3034,26 @@
 }
 
 /*
+ * Change the GUID for a pool.
+ */
+int
+zpool_reguid(zpool_handle_t *zhp)
+{
+	char msg[1024];
+	libzfs_handle_t *hdl = zhp->zpool_hdl;
+	zfs_cmd_t zc = { 0 };
+
+	(void) snprintf(msg, sizeof (msg),
+	    dgettext(TEXT_DOMAIN, "cannot reguid '%s'"), zhp->zpool_name);
+
+	(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
+	if (zfs_ioctl(hdl, ZFS_IOC_POOL_REGUID, &zc) == 0)
+		return (0);
+
+	return (zpool_standard_error(hdl, errno, msg));
+}
+
+/*
  * Convert from a devid string to a path.
  */
 static char *
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
--- a/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c	Tue Dec 06 20:26:16 2011 +0200
@@ -21,6 +21,7 @@
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
  */
 
 #include <assert.h>
@@ -53,7 +54,7 @@
 /* We need to use something for ENODATA. */
 #define	ENODATA	EIDRM
 
-static int zfs_receive_impl(libzfs_handle_t *, const char *, recvflags_t,
+static int zfs_receive_impl(libzfs_handle_t *, const char *, recvflags_t *,
     int, const char *, nvlist_t *, avl_tree_t *, char **, int, uint64_t *);
 
 static const zio_cksum_t zero_cksum = { 0 };
@@ -774,88 +775,6 @@
 }
 
 /*
- * Routines for dealing with the sorted snapshot functionality
- */
-typedef struct zfs_node {
-	zfs_handle_t	*zn_handle;
-	avl_node_t	zn_avlnode;
-} zfs_node_t;
-
-static int
-zfs_sort_snaps(zfs_handle_t *zhp, void *data)
-{
-	avl_tree_t *avl = data;
-	zfs_node_t *node;
-	zfs_node_t search;
-
-	search.zn_handle = zhp;
-	node = avl_find(avl, &search, NULL);
-	if (node) {
-		/*
-		 * If this snapshot was renamed while we were creating the
-		 * AVL tree, it's possible that we already inserted it under
-		 * its old name. Remove the old handle before adding the new
-		 * one.
-		 */
-		zfs_close(node->zn_handle);
-		avl_remove(avl, node);
-		free(node);
-	}
-
-	node = zfs_alloc(zhp->zfs_hdl, sizeof (zfs_node_t));
-	node->zn_handle = zhp;
-	avl_add(avl, node);
-
-	return (0);
-}
-
-static int
-zfs_snapshot_compare(const void *larg, const void *rarg)
-{
-	zfs_handle_t *l = ((zfs_node_t *)larg)->zn_handle;
-	zfs_handle_t *r = ((zfs_node_t *)rarg)->zn_handle;
-	uint64_t lcreate, rcreate;
-
-	/*
-	 * Sort them according to creation time.  We use the hidden
-	 * CREATETXG property to get an absolute ordering of snapshots.
-	 */
-	lcreate = zfs_prop_get_int(l, ZFS_PROP_CREATETXG);
-	rcreate = zfs_prop_get_int(r, ZFS_PROP_CREATETXG);
-
-	if (lcreate < rcreate)
-		return (-1);
-	else if (lcreate > rcreate)
-		return (+1);
-	else
-		return (0);
-}
-
-int
-zfs_iter_snapshots_sorted(zfs_handle_t *zhp, zfs_iter_f callback, void *data)
-{
-	int ret = 0;
-	zfs_node_t *node;
-	avl_tree_t avl;
-	void *cookie = NULL;
-
-	avl_create(&avl, zfs_snapshot_compare,
-	    sizeof (zfs_node_t), offsetof(zfs_node_t, zn_avlnode));
-
-	ret = zfs_iter_snapshots(zhp, zfs_sort_snaps, &avl);
-
-	for (node = avl_first(&avl); node != NULL; node = AVL_NEXT(&avl, node))
-		ret |= callback(node->zn_handle, data);
-
-	while ((node = avl_destroy_nodes(&avl, &cookie)) != NULL)
-		free(node);
-
-	avl_destroy(&avl);
-
-	return (ret);
-}
-
-/*
  * Routines specific to "zfs send"
  */
 typedef struct send_dump_data {
@@ -865,7 +784,7 @@
 	char prevsnap[ZFS_MAXNAMELEN];
 	uint64_t prevsnap_obj;
 	boolean_t seenfrom, seento, replicate, doall, fromorigin;
-	boolean_t verbose;
+	boolean_t verbose, dryrun, parsable;
 	int outfd;
 	boolean_t err;
 	nvlist_t *fss;
@@ -875,49 +794,31 @@
 	nvlist_t *debugnv;
 	char holdtag[ZFS_MAXNAMELEN];
 	int cleanup_fd;
+	uint64_t size;
 } send_dump_data_t;
 
-/*
- * Dumps a backup of the given snapshot (incremental from fromsnap if it's not
- * NULL) to the file descriptor specified by outfd.
- */
 static int
-dump_ioctl(zfs_handle_t *zhp, const char *fromsnap, uint64_t fromsnap_obj,
-    boolean_t fromorigin, int outfd, nvlist_t *debugnv)
+estimate_ioctl(zfs_handle_t *zhp, uint64_t fromsnap_obj,
+    boolean_t fromorigin, uint64_t *sizep)
 {
 	zfs_cmd_t zc = { 0 };
 	libzfs_handle_t *hdl = zhp->zfs_hdl;
-	nvlist_t *thisdbg;
 
 	assert(zhp->zfs_type == ZFS_TYPE_SNAPSHOT);
 	assert(fromsnap_obj == 0 || !fromorigin);
 
 	(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
-	zc.zc_cookie = outfd;
 	zc.zc_obj = fromorigin;
 	zc.zc_sendobj = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID);
 	zc.zc_fromobj = fromsnap_obj;
-
-	VERIFY(0 == nvlist_alloc(&thisdbg, NV_UNIQUE_NAME, 0));
-	if (fromsnap && fromsnap[0] != '\0') {
-		VERIFY(0 == nvlist_add_string(thisdbg,
-		    "fromsnap", fromsnap));
-	}
-
-	if (ioctl(zhp->zfs_hdl->libzfs_fd, ZFS_IOC_SEND, &zc) != 0) {
+	zc.zc_guid = 1;  /* estimate flag */
+
+	if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_SEND, &zc) != 0) {
 		char errbuf[1024];
 		(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
-		    "warning: cannot send '%s'"), zhp->zfs_name);
-
-		VERIFY(0 == nvlist_add_uint64(thisdbg, "error", errno));
-		if (debugnv) {
-			VERIFY(0 == nvlist_add_nvlist(debugnv,
-			    zhp->zfs_name, thisdbg));
-		}
-		nvlist_free(thisdbg);
+		    "warning: cannot estimate space for '%s'"), zhp->zfs_name);
 
 		switch (errno) {
-
 		case EXDEV:
 			zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
 			    "not an earlier snapshot from the same fs"));
@@ -950,6 +851,86 @@
 		}
 	}
 
+	*sizep = zc.zc_objset_type;
+
+	return (0);
+}
+
+/*
+ * Dumps a backup of the given snapshot (incremental from fromsnap if it's not
+ * NULL) to the file descriptor specified by outfd.
+ */
+static int
+dump_ioctl(zfs_handle_t *zhp, const char *fromsnap, uint64_t fromsnap_obj,
+    boolean_t fromorigin, int outfd, nvlist_t *debugnv)
+{
+	zfs_cmd_t zc = { 0 };
+	libzfs_handle_t *hdl = zhp->zfs_hdl;
+	nvlist_t *thisdbg;
+
+	assert(zhp->zfs_type == ZFS_TYPE_SNAPSHOT);
+	assert(fromsnap_obj == 0 || !fromorigin);
+
+	(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
+	zc.zc_cookie = outfd;
+	zc.zc_obj = fromorigin;
+	zc.zc_sendobj = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID);
+	zc.zc_fromobj = fromsnap_obj;
+
+	VERIFY(0 == nvlist_alloc(&thisdbg, NV_UNIQUE_NAME, 0));
+	if (fromsnap && fromsnap[0] != '\0') {
+		VERIFY(0 == nvlist_add_string(thisdbg,
+		    "fromsnap", fromsnap));
+	}
+
+	if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_SEND, &zc) != 0) {
+		char errbuf[1024];
+		(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
+		    "warning: cannot send '%s'"), zhp->zfs_name);
+
+		VERIFY(0 == nvlist_add_uint64(thisdbg, "error", errno));
+		if (debugnv) {
+			VERIFY(0 == nvlist_add_nvlist(debugnv,
+			    zhp->zfs_name, thisdbg));
+		}
+		nvlist_free(thisdbg);
+
+		switch (errno) {
+		case EXDEV:
+			zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+			    "not an earlier snapshot from the same fs"));
+			return (zfs_error(hdl, EZFS_CROSSTARGET, errbuf));
+
+		case ENOENT:
+			if (zfs_dataset_exists(hdl, zc.zc_name,
+			    ZFS_TYPE_SNAPSHOT)) {
+				zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+				    "incremental source (@%s) does not exist"),
+				    zc.zc_value);
+			}
+			return (zfs_error(hdl, EZFS_NOENT, errbuf));
+
+		case EDQUOT:
+		case EFBIG:
+		case EIO:
+		case ENOLINK:
+		case ENOSPC:
+#ifdef sun
+		case ENOSTR:
+#endif
+		case ENXIO:
+		case EPIPE:
+		case ERANGE:
+		case EFAULT:
+		case EROFS:
+			zfs_error_aux(hdl, strerror(errno));
+			return (zfs_error(hdl, EZFS_BADBACKUP, errbuf));
+
+		default:
+			return (zfs_standard_error(hdl, errno, errbuf));
+		}
+	}
+
 	if (debugnv)
 		VERIFY(0 == nvlist_add_nvlist(debugnv, zhp->zfs_name, thisdbg));
 	nvlist_free(thisdbg);
@@ -966,6 +947,9 @@
 
 	assert(zhp->zfs_type == ZFS_TYPE_SNAPSHOT);
 
+	if (sdd->dryrun)
+		return (0);
+
 	/*
 	 * zfs_send() only opens a cleanup_fd for sends that need it,
 	 * e.g. replication and doall.
@@ -999,7 +983,7 @@
 	send_dump_data_t *sdd = arg;
 	char *thissnap;
 	int err;
-	boolean_t isfromsnap, istosnap;
+	boolean_t isfromsnap, istosnap, fromorigin;
 	boolean_t exclude = B_FALSE;
 
 	thissnap = strchr(zhp->zfs_name, '@') + 1;
@@ -1076,15 +1060,47 @@
 		return (err);
 	}
 
-	/* send it */
+	fromorigin = sdd->prevsnap[0] == '\0' &&
+	    (sdd->fromorigin || sdd->replicate);
+
 	if (sdd->verbose) {
-		(void) fprintf(stderr, "sending from @%s to %s\n",
-		    sdd->prevsnap, zhp->zfs_name);
+		uint64_t size;
+		err = estimate_ioctl(zhp, sdd->prevsnap_obj,
+		    fromorigin, &size);
+
+		if (sdd->parsable) {
+			if (sdd->prevsnap[0] != '\0') {
+				(void) fprintf(stderr, "incremental\t%s\t%s",
+				    sdd->prevsnap, zhp->zfs_name);
+			} else {
+				(void) fprintf(stderr, "full\t%s",
+				    zhp->zfs_name);
+			}
+		} else {
+			(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
+			    "send from @%s to %s"),
+			    sdd->prevsnap, zhp->zfs_name);
+		}
+		if (err == 0) {
+			if (sdd->parsable) {
+				(void) fprintf(stderr, "\t%llu\n",
+				    (longlong_t)size);
+			} else {
+				char buf[16];
+				zfs_nicenum(size, buf, sizeof (buf));
+				(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
+				    " estimated size is %s\n"), buf);
+			}
+			sdd->size += size;
+		} else {
+			(void) fprintf(stderr, "\n");
+		}
 	}
 
-	err = dump_ioctl(zhp, sdd->prevsnap, sdd->prevsnap_obj,
-	    sdd->prevsnap[0] == '\0' && (sdd->fromorigin || sdd->replicate),
-	    sdd->outfd, sdd->debugnv);
+	if (!sdd->dryrun) {
+		err = dump_ioctl(zhp, sdd->prevsnap, sdd->prevsnap_obj,
+		    fromorigin, sdd->outfd, sdd->debugnv);
+	}
 
 	(void) strcpy(sdd->prevsnap, thissnap);
 	sdd->prevsnap_obj = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID);
@@ -1103,8 +1119,8 @@
 	(void) snprintf(zc.zc_name, sizeof (zc.zc_name), "%[email protected]%s",
 	    zhp->zfs_name, sdd->tosnap);
 	if (ioctl(zhp->zfs_hdl->libzfs_fd, ZFS_IOC_OBJSET_STATS, &zc) != 0) {
-		(void) fprintf(stderr, "WARNING: "
-		    "could not send %[email protected]%s: does not exist\n",
+		(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
+		    "WARNING: could not send %[email protected]%s: does not exist\n"),
 		    zhp->zfs_name, sdd->tosnap);
 		sdd->err = B_TRUE;
 		return (0);
@@ -1133,23 +1149,24 @@
 
 	rv = zfs_iter_snapshots_sorted(zhp, dump_snapshot, arg);
 	if (!sdd->seenfrom) {
-		(void) fprintf(stderr,
+		(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
 		    "WARNING: could not send %[email protected]%s:\n"
-		    "incremental source (%[email protected]%s) does not exist\n",
+		    "incremental source (%[email protected]%s) does not exist\n"),
 		    zhp->zfs_name, sdd->tosnap,
 		    zhp->zfs_name, sdd->fromsnap);
 		sdd->err = B_TRUE;
 	} else if (!sdd->seento) {
 		if (sdd->fromsnap) {
-			(void) fprintf(stderr,
+			(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
 			    "WARNING: could not send %[email protected]%s:\n"
 			    "incremental source (%[email protected]%s) "
-			    "is not earlier than it\n",
+			    "is not earlier than it\n"),
 			    zhp->zfs_name, sdd->tosnap,
 			    zhp->zfs_name, sdd->fromsnap);
 		} else {
-			(void) fprintf(stderr, "WARNING: "
-			    "could not send %[email protected]%s: does not exist\n",
+			(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
+			    "WARNING: "
+			    "could not send %[email protected]%s: does not exist\n"),
 			    zhp->zfs_name, sdd->tosnap);
 		}
 		sdd->err = B_TRUE;
@@ -1195,11 +1212,12 @@
 	needagain = progress = B_FALSE;
 	for (fspair = nvlist_next_nvpair(sdd->fss, NULL); fspair;
 	    fspair = nvlist_next_nvpair(sdd->fss, fspair)) {
-		nvlist_t *fslist;
+		nvlist_t *fslist, *parent_nv;
 		char *fsname;
 		zfs_handle_t *zhp;
 		int err;
 		uint64_t origin_guid = 0;
+		uint64_t parent_guid = 0;
 
 		VERIFY(nvpair_value_nvlist(fspair, &fslist) == 0);
 		if (nvlist_lookup_boolean(fslist, "sent") == 0)
@@ -1207,13 +1225,23 @@
 
 		VERIFY(nvlist_lookup_string(fslist, "name", &fsname) == 0);
 		(void) nvlist_lookup_uint64(fslist, "origin", &origin_guid);
+		(void) nvlist_lookup_uint64(fslist, "parentfromsnap",
+		    &parent_guid);
+
+		if (parent_guid != 0) {
+			parent_nv = fsavl_find(sdd->fsavl, parent_guid, NULL);
+			if (!nvlist_exists(parent_nv, "sent")) {
+				/* parent has not been sent; skip this one */
+				needagain = B_TRUE;
+				continue;
+			}
+		}
 
 		if (origin_guid != 0) {
 			nvlist_t *origin_nv = fsavl_find(sdd->fsavl,
 			    origin_guid, NULL);
 			if (origin_nv != NULL &&
-			    nvlist_lookup_boolean(origin_nv,
-			    "sent") == ENOENT) {
+			    !nvlist_exists(origin_nv, "sent")) {
 				/*
 				 * origin has not been sent yet;
 				 * skip this clone.
@@ -1237,6 +1265,16 @@
 		assert(progress);
 		goto again;
 	}
+
+	/* clean out the sent flags in case we reuse this fss */
+	for (fspair = nvlist_next_nvpair(sdd->fss, NULL); fspair;
+	    fspair = nvlist_next_nvpair(sdd->fss, fspair)) {
+		nvlist_t *fslist;
+
+		VERIFY(nvpair_value_nvlist(fspair, &fslist) == 0);
+		(void) nvlist_remove_all(fslist, "sent");
+	}
+
 	return (0);
 }
 
@@ -1258,12 +1296,12 @@
  */
 int
 zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
-    sendflags_t flags, int outfd, snapfilter_cb_t filter_func,
+    sendflags_t *flags, int outfd, snapfilter_cb_t filter_func,
     void *cb_arg, nvlist_t **debugnvp)
 {
 	char errbuf[1024];
 	send_dump_data_t sdd = { 0 };
-	int err;
+	int err = 0;
 	nvlist_t *fss = NULL;
 	avl_tree_t *fsavl = NULL;
 	static uint64_t holdseq;
@@ -1291,12 +1329,12 @@
 		}
 	}
 
-	if (zfs_spa_version(zhp, &spa_version) == 0 &&
+	if (!flags->dryrun && zfs_spa_version(zhp, &spa_version) == 0 &&
 	    spa_version >= SPA_VERSION_USERREFS &&
-	    (flags.doall || flags.replicate))
+	    (flags->doall || flags->replicate))
 		holdsnaps = B_TRUE;
 
-	if (flags.dedup) {
+	if (flags->dedup && !flags->dryrun) {
 		featureflags |= (DMU_BACKUP_FEATURE_DEDUP |
 		    DMU_BACKUP_FEATURE_DEDUPPROPS);
 		if (err = pipe(pipefd)) {
@@ -1316,13 +1354,13 @@
 		}
 	}
 
-	if (flags.replicate || flags.doall || flags.props) {
+	if (flags->replicate || flags->doall || flags->props) {
 		dmu_replay_record_t drr = { 0 };
 		char *packbuf = NULL;
 		size_t buflen = 0;
 		zio_cksum_t zc = { 0 };
 
-		if (flags.replicate || flags.props) {
+		if (flags->replicate || flags->props) {
 			nvlist_t *hdrnv;
 
 			VERIFY(0 == nvlist_alloc(&hdrnv, NV_UNIQUE_NAME, 0));
@@ -1331,13 +1369,13 @@
 				    "fromsnap", fromsnap));
 			}
 			VERIFY(0 == nvlist_add_string(hdrnv, "tosnap", tosnap));
-			if (!flags.replicate) {
+			if (!flags->replicate) {
 				VERIFY(0 == nvlist_add_boolean(hdrnv,
 				    "not_recursive"));
 			}
 
 			err = gather_nvlist(zhp->zfs_hdl, zhp->zfs_name,
-			    fromsnap, tosnap, flags.replicate, &fss, &fsavl);
+			    fromsnap, tosnap, flags->replicate, &fss, &fsavl);
 			if (err)
 				goto err_out;
 			VERIFY(0 == nvlist_add_nvlist(hdrnv, "fss", fss));
@@ -1354,33 +1392,34 @@
 			}
 		}
 
-		/* write first begin record */
-		drr.drr_type = DRR_BEGIN;
-		drr.drr_u.drr_begin.drr_magic = DMU_BACKUP_MAGIC;
-		DMU_SET_STREAM_HDRTYPE(drr.drr_u.drr_begin.drr_versioninfo,
-		    DMU_COMPOUNDSTREAM);
-		DMU_SET_FEATUREFLAGS(drr.drr_u.drr_begin.drr_versioninfo,
-		    featureflags);
-		(void) snprintf(drr.drr_u.drr_begin.drr_toname,
-		    sizeof (drr.drr_u.drr_begin.drr_toname),
-		    "%[email protected]%s", zhp->zfs_name, tosnap);
-		drr.drr_payloadlen = buflen;
-		err = cksum_and_write(&drr, sizeof (drr), &zc, outfd);
-
-		/* write header nvlist */
-		if (err != -1 && packbuf != NULL) {
-			err = cksum_and_write(packbuf, buflen, &zc, outfd);
-		}
-		free(packbuf);
-		if (err == -1) {
-			fsavl_destroy(fsavl);
-			nvlist_free(fss);
-			err = errno;
-			goto stderr_out;
-		}
-
-		/* write end record */
-		if (err != -1) {
+		if (!flags->dryrun) {
+			/* write first begin record */
+			drr.drr_type = DRR_BEGIN;
+			drr.drr_u.drr_begin.drr_magic = DMU_BACKUP_MAGIC;
+			DMU_SET_STREAM_HDRTYPE(drr.drr_u.drr_begin.
+			    drr_versioninfo, DMU_COMPOUNDSTREAM);
+			DMU_SET_FEATUREFLAGS(drr.drr_u.drr_begin.
+			    drr_versioninfo, featureflags);
+			(void) snprintf(drr.drr_u.drr_begin.drr_toname,
+			    sizeof (drr.drr_u.drr_begin.drr_toname),
+			    "%[email protected]%s", zhp->zfs_name, tosnap);
+			drr.drr_payloadlen = buflen;
+			err = cksum_and_write(&drr, sizeof (drr), &zc, outfd);
+
+			/* write header nvlist */
+			if (err != -1 && packbuf != NULL) {
+				err = cksum_and_write(packbuf, buflen, &zc,
+				    outfd);
+			}
+			free(packbuf);
+			if (err == -1) {
+				fsavl_destroy(fsavl);
+				nvlist_free(fss);
+				err = errno;
+				goto stderr_out;
+			}
+
+			/* write end record */
 			bzero(&drr, sizeof (drr));
 			drr.drr_type = DRR_END;
 			drr.drr_u.drr_end.drr_checksum = zc;
@@ -1391,22 +1430,26 @@
 				err = errno;
 				goto stderr_out;
 			}
+
+			err = 0;
 		}
 	}
 
 	/* dump each stream */
 	sdd.fromsnap = fromsnap;
 	sdd.tosnap = tosnap;
-	if (flags.dedup)
+	if (flags->dedup)
 		sdd.outfd = pipefd[0];
 	else
 		sdd.outfd = outfd;
-	sdd.replicate = flags.replicate;
-	sdd.doall = flags.doall;
-	sdd.fromorigin = flags.fromorigin;
+	sdd.replicate = flags->replicate;
+	sdd.doall = flags->doall;
+	sdd.fromorigin = flags->fromorigin;
 	sdd.fss = fss;
 	sdd.fsavl = fsavl;
-	sdd.verbose = flags.verbose;
+	sdd.verbose = flags->verbose;
+	sdd.parsable = flags->parsable;
+	sdd.dryrun = flags->dryrun;
 	sdd.filter_cb = filter_func;
 	sdd.filter_cb_arg = cb_arg;
 	if (debugnvp)
@@ -1423,11 +1466,31 @@
 	} else {
 		sdd.cleanup_fd = -1;
 	}
+	if (flags->verbose) {
+		/*
+		 * Do a verbose no-op dry run to get all the verbose output
+		 * before generating any data.  Then do a non-verbose real
+		 * run to generate the streams.
+		 */
+		sdd.dryrun = B_TRUE;
+		err = dump_filesystems(zhp, &sdd);
+		sdd.dryrun = flags->dryrun;
+		sdd.verbose = B_FALSE;
+		if (flags->parsable) {
+			(void) fprintf(stderr, "size\t%llu\n",
+			    (longlong_t)sdd.size);
+		} else {
+			char buf[16];
+			zfs_nicenum(sdd.size, buf, sizeof (buf));
+			(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
+			    "total estimated size is %s\n"), buf);
+		}
+	}
 	err = dump_filesystems(zhp, &sdd);
 	fsavl_destroy(fsavl);
 	nvlist_free(fss);
 
-	if (flags.dedup) {
+	if (flags->dedup) {
 		(void) close(pipefd[0]);
 		(void) pthread_join(tid, NULL);
 	}
@@ -1437,7 +1500,8 @@
 		sdd.cleanup_fd = -1;
 	}
 
-	if (flags.replicate || flags.doall || flags.props) {
+	if (!flags->dryrun && (flags->replicate || flags->doall ||
+	    flags->props)) {
 		/*
 		 * write final end record.  NB: want to do this even if
 		 * there was some error, because it might not be totally
@@ -1458,7 +1522,7 @@
 err_out:
 	if (sdd.cleanup_fd != -1)
 		VERIFY(0 == close(sdd.cleanup_fd));
-	if (flags.dedup) {
+	if (flags->dedup) {
 		(void) pthread_cancel(tid);
 		(void) pthread_join(tid, NULL);
 		(void) close(pipefd[0]);
@@ -1529,7 +1593,7 @@
 
 static int
 recv_rename(libzfs_handle_t *hdl, const char *name, const char *tryname,
-    int baselen, char *newname, recvflags_t flags)
+    int baselen, char *newname, recvflags_t *flags)
 {
 	static int seq;
 	zfs_cmd_t zc = { 0 };
@@ -1541,7 +1605,7 @@
 	if (zhp == NULL)
 		return (-1);
 	clp = changelist_gather(zhp, ZFS_PROP_NAME, 0,
-	    flags.force ? MS_FORCE : 0);
+	    flags->force ? MS_FORCE : 0);
 	zfs_close(zhp);
 	if (clp == NULL)
 		return (-1);
@@ -1557,7 +1621,7 @@
 
 		(void) strlcpy(zc.zc_value, tryname, sizeof (zc.zc_value));
 
-		if (flags.verbose) {
+		if (flags->verbose) {
 			(void) printf("attempting rename %s to %s\n",
 			    zc.zc_name, zc.zc_value);
 		}
@@ -1576,19 +1640,19 @@
 		    "recv-%u-%u", getpid(), seq);
 		(void) strlcpy(zc.zc_value, newname, sizeof (zc.zc_value));
 
-		if (flags.verbose) {
+		if (flags->verbose) {
 			(void) printf("failed - trying rename %s to %s\n",
 			    zc.zc_name, zc.zc_value);
 		}
 		err = ioctl(hdl->libzfs_fd, ZFS_IOC_RENAME, &zc);
 		if (err == 0)
 			changelist_rename(clp, name, newname);
-		if (err && flags.verbose) {
+		if (err && flags->verbose) {
 			(void) printf("failed (%u) - "
 			    "will try again on next pass\n", errno);
 		}
 		err = EAGAIN;
-	} else if (flags.verbose) {
+	} else if (flags->verbose) {
 		if (err == 0)
 			(void) printf("success\n");
 		else
@@ -1603,7 +1667,7 @@
 
 static int
 recv_destroy(libzfs_handle_t *hdl, const char *name, int baselen,
-    char *newname, recvflags_t flags)
+    char *newname, recvflags_t *flags)
 {
 	zfs_cmd_t zc = { 0 };
 	int err = 0;
@@ -1616,7 +1680,7 @@
 	if (zhp == NULL)
 		return (-1);
 	clp = changelist_gather(zhp, ZFS_PROP_NAME, 0,
-	    flags.force ? MS_FORCE : 0);
+	    flags->force ? MS_FORCE : 0);
 	if (zfs_get_type(zhp) == ZFS_TYPE_SNAPSHOT &&
 	    zfs_spa_version(zhp, &spa_version) == 0 &&
 	    spa_version >= SPA_VERSION_USERREFS)
@@ -1632,11 +1696,11 @@
 	zc.zc_defer_destroy = defer;
 	(void) strlcpy(zc.zc_name, name, sizeof (zc.zc_name));
 
-	if (flags.verbose)
+	if (flags->verbose)
 		(void) printf("attempting destroy %s\n", zc.zc_name);
 	err = ioctl(hdl->libzfs_fd, ZFS_IOC_DESTROY, &zc);
 	if (err == 0) {
-		if (flags.verbose)
+		if (flags->verbose)
 			(void) printf("success\n");
 		changelist_remove(clp, zc.zc_name);
 	}
@@ -1659,6 +1723,7 @@
 typedef struct guid_to_name_data {
 	uint64_t guid;
 	char *name;
+	char *skip;
 } guid_to_name_data_t;
 
 static int
@@ -1667,21 +1732,35 @@
 	guid_to_name_data_t *gtnd = arg;
 	int err;
 
+	if (gtnd->skip != NULL &&
+	    strcmp(zhp->zfs_name, gtnd->skip) == 0) {
+		return (0);
+	}
+
 	if (zhp->zfs_dmustats.dds_guid == gtnd->guid) {
 		(void) strcpy(gtnd->name, zhp->zfs_name);
 		zfs_close(zhp);
 		return (EEXIST);
 	}
+
 	err = zfs_iter_children(zhp, guid_to_name_cb, gtnd);
 	zfs_close(zhp);
 	return (err);
 }
 
+/*
+ * Attempt to find the local dataset associated with this guid.  In the case of
+ * multiple matches, we attempt to find the "best" match by searching
+ * progressively larger portions of the hierarchy.  This allows one to send a
+ * tree of datasets individually and guarantee that we will find the source
+ * guid within that hierarchy, even if there are multiple matches elsewhere.
+ */
 static int
 guid_to_name(libzfs_handle_t *hdl, const char *parent, uint64_t guid,
     char *name)
 {
 	/* exhaustive search all local snapshots */
+	char pname[ZFS_MAXNAMELEN];
 	guid_to_name_data_t gtnd;
 	int err = 0;
 	zfs_handle_t *zhp;
@@ -1689,35 +1768,42 @@
 
 	gtnd.guid = guid;
 	gtnd.name = name;
-
-	if (strchr(parent, '@') == NULL) {
-		zhp = make_dataset_handle(hdl, parent);
-		if (zhp != NULL) {
-			err = zfs_iter_children(zhp, guid_to_name_cb, &gtnd);
-			zfs_close(zhp);
-			if (err == EEXIST)
-				return (0);
-		}
-	}
-
-	cp = strchr(parent, '/');
-	if (cp)
+	gtnd.skip = NULL;
+
+	(void) strlcpy(pname, parent, sizeof (pname));
+
+	/*
+	 * Search progressively larger portions of the hierarchy.  This will
+	 * select the "most local" version of the origin snapshot in the case
+	 * that there are multiple matching snapshots in the system.
+	 */
+	while ((cp = strrchr(pname, '/')) != NULL) {
+
+		/* Chop off the last component and open the parent */
 		*cp = '\0';
-	zhp = make_dataset_handle(hdl, parent);
-	if (cp)
-		*cp = '/';
-
-	if (zhp) {
+		zhp = make_dataset_handle(hdl, pname);
+
+		if (zhp == NULL)
+			continue;
+
 		err = zfs_iter_children(zhp, guid_to_name_cb, &gtnd);
 		zfs_close(zhp);
+		if (err == EEXIST)
+			return (0);
+
+		/*
+		 * Remember the dataset that we already searched, so we
+		 * skip it next time through.
+		 */
+		gtnd.skip = pname;
 	}
 
-	return (err == EEXIST ? 0 : ENOENT);
-
+	return (ENOENT);
 }
 
 /*
- * Return true if dataset guid1 is created before guid2.
+ * Return +1 if guid1 is before guid2, 0 if they are the same, and -1 if
+ * guid1 is after guid2.
  */
 static int
 created_before(libzfs_handle_t *hdl, avl_tree_t *avl,
@@ -1727,7 +1813,8 @@
 	char *fsname, *snapname;
 	char buf[ZFS_MAXNAMELEN];
 	int rv;
-	zfs_node_t zn1, zn2;
+	zfs_handle_t *guid1hdl, *guid2hdl;
+	uint64_t create1, create2;
 
 	if (guid2 == 0)
 		return (0);
@@ -1737,30 +1824,38 @@
 	nvfs = fsavl_find(avl, guid1, &snapname);
 	VERIFY(0 == nvlist_lookup_string(nvfs, "name", &fsname));
 	(void) snprintf(buf, sizeof (buf), "%[email protected]%s", fsname, snapname);
-	zn1.zn_handle = zfs_open(hdl, buf, ZFS_TYPE_SNAPSHOT);
-	if (zn1.zn_handle == NULL)
+	guid1hdl = zfs_open(hdl, buf, ZFS_TYPE_SNAPSHOT);
+	if (guid1hdl == NULL)
 		return (-1);
 
 	nvfs = fsavl_find(avl, guid2, &snapname);
 	VERIFY(0 == nvlist_lookup_string(nvfs, "name", &fsname));
 	(void) snprintf(buf, sizeof (buf), "%[email protected]%s", fsname, snapname);
-	zn2.zn_handle = zfs_open(hdl, buf, ZFS_TYPE_SNAPSHOT);
-	if (zn2.zn_handle == NULL) {
-		zfs_close(zn2.zn_handle);
+	guid2hdl = zfs_open(hdl, buf, ZFS_TYPE_SNAPSHOT);
+	if (guid2hdl == NULL) {
+		zfs_close(guid1hdl);
 		return (-1);
 	}
 
-	rv = (zfs_snapshot_compare(&zn1, &zn2) == -1);
-
-	zfs_close(zn1.zn_handle);
-	zfs_close(zn2.zn_handle);
+	create1 = zfs_prop_get_int(guid1hdl, ZFS_PROP_CREATETXG);
+	create2 = zfs_prop_get_int(guid2hdl, ZFS_PROP_CREATETXG);
+
+	if (create1 < create2)
+		rv = -1;
+	else if (create1 > create2)
+		rv = +1;
+	else
+		rv = 0;
+
+	zfs_close(guid1hdl);
+	zfs_close(guid2hdl);
 
 	return (rv);
 }
 
 static int
 recv_incremental_replication(libzfs_handle_t *hdl, const char *tofs,
-    recvflags_t flags, nvlist_t *stream_nv, avl_tree_t *stream_avl,
+    recvflags_t *flags, nvlist_t *stream_nv, avl_tree_t *stream_avl,
     nvlist_t *renamed)
 {
 	nvlist_t *local_nv;
@@ -1777,7 +1872,7 @@
 	recursive = (nvlist_lookup_boolean(stream_nv, "not_recursive") ==
 	    ENOENT);
 
-	if (flags.dryrun)
+	if (flags->dryrun)
 		return (0);
 
 again:
@@ -1837,7 +1932,7 @@
 				nvlist_t *origin_nvfs;
 				char *origin_fsname;
 
-				if (flags.verbose)
+				if (flags->verbose)
 					(void) printf("promoting %s\n", fsname);
 
 				origin_nvfs = fsavl_find(local_avl, originguid,
@@ -1885,7 +1980,7 @@
 			if (found == NULL) {
 				char name[ZFS_MAXNAMELEN];
 
-				if (!flags.force)
+				if (!flags->force)
 					continue;
 
 				(void) snprintf(name, sizeof (name), "%[email protected]%s",
@@ -1943,7 +2038,7 @@
 
 		/* check for delete */
 		if (stream_nvfs == NULL) {
-			if (!flags.force)
+			if (!flags->force)
 				continue;
 
 			error = recv_destroy(hdl, fsname, strlen(tofs)+1,
@@ -1956,7 +2051,7 @@
 		}
 
 		if (fromguid == 0) {
-			if (flags.verbose) {
+			if (flags->verbose) {
 				(void) printf("local fs %s does not have "
 				    "fromsnap (%s in stream); must have "
 				    "been deleted locally; ignoring\n",
@@ -1981,7 +2076,7 @@
 		if ((stream_parent_fromsnap_guid != 0 &&
 		    parent_fromsnap_guid != 0 &&
 		    stream_parent_fromsnap_guid != parent_fromsnap_guid) ||
-		    ((flags.isprefix || strcmp(tofs, fsname) != 0) &&
+		    ((flags->isprefix || strcmp(tofs, fsname) != 0) &&
 		    (s1 != NULL) && (s2 != NULL) && strcmp(s1, s2) != 0)) {
 			nvlist_t *parent;
 			char tryname[ZFS_MAXNAMELEN];
@@ -2004,7 +2099,7 @@
 				    "%s%s", pname, strrchr(stream_fsname, '/'));
 			} else {
 				tryname[0] = '\0';
-				if (flags.verbose) {
+				if (flags->verbose) {
 					(void) printf("local fs %s new parent "
 					    "not found\n", fsname);
 				}
@@ -2032,7 +2127,7 @@
 
 	if (needagain && progress) {
 		/* do another pass to fix up temporary names */
-		if (flags.verbose)
+		if (flags->verbose)
 			(void) printf("another pass:\n");
 		goto again;
 	}
@@ -2042,7 +2137,7 @@
 
 static int
 zfs_receive_package(libzfs_handle_t *hdl, int fd, const char *destname,
-    recvflags_t flags, dmu_replay_record_t *drr, zio_cksum_t *zc,
+    recvflags_t *flags, dmu_replay_record_t *drr, zio_cksum_t *zc,
     char **top_zfs, int cleanup_fd, uint64_t *action_handlep)
 {
 	nvlist_t *stream_nv = NULL;
@@ -2071,7 +2166,7 @@
 	 */
 	if (drr->drr_payloadlen != 0) {
 		error = recv_read_nvlist(hdl, fd, drr->drr_payloadlen,
-		    &stream_nv, flags.byteswap, zc);
+		    &stream_nv, flags->byteswap, zc);
 		if (error) {
 			error = zfs_error(hdl, EZFS_BADSTREAM, errbuf);
 			goto out;
@@ -2092,9 +2187,9 @@
 	 * Read in the end record and verify checksum.
 	 */
 	if (0 != (error = recv_read(hdl, fd, &drre, sizeof (drre),
-	    flags.byteswap, NULL)))
+	    flags->byteswap, NULL)))
 		goto out;
-	if (flags.byteswap) {
+	if (flags->byteswap) {
 		drre.drr_type = BSWAP_32(drre.drr_type);
 		drre.drr_u.drr_end.drr_checksum.zc_word[0] =
 		    BSWAP_64(drre.drr_u.drr_end.drr_checksum.zc_word[0]);
@@ -2135,11 +2230,11 @@
 			nvpair_t *pair = NULL;
 
 			(void) strlcpy(tofs, destname, ZFS_MAXNAMELEN);
-			if (flags.isprefix) {
+			if (flags->isprefix) {
 				struct drr_begin *drrb = &drr->drr_u.drr_begin;
 				int i;
 
-				if (flags.istail) {
+				if (flags->istail) {
 					cp = strrchr(drrb->drr_toname, '/');
 					if (cp == NULL) {
 						(void) strlcat(tofs, "/",
@@ -2157,7 +2252,7 @@
 				*strchr(tofs, '@') = '\0';
 			}
 
-			if (recursive && !flags.dryrun && !flags.nomount) {
+			if (recursive && !flags->dryrun && !flags->nomount) {
 				VERIFY(0 == nvlist_alloc(&renamed,
 				    NV_UNIQUE_NAME, 0));
 			}
@@ -2331,7 +2426,7 @@
  */
 static int
 zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
-    recvflags_t flags, dmu_replay_record_t *drr,
+    recvflags_t *flags, dmu_replay_record_t *drr,
     dmu_replay_record_t *drr_noswap, const char *sendfs,
     nvlist_t *stream_nv, avl_tree_t *stream_avl, char **top_zfs, int cleanup_fd,
     uint64_t *action_handlep)
@@ -2373,7 +2468,7 @@
 		if (err)
 			VERIFY(0 == nvlist_alloc(&props, NV_UNIQUE_NAME, 0));
 
-		if (flags.canmountoff) {
+		if (flags->canmountoff) {
 			VERIFY(0 == nvlist_add_uint64(props,
 			    zfs_prop_to_name(ZFS_PROP_CANMOUNT), 0));
 		}
@@ -2400,7 +2495,7 @@
 	 * If they specified a snapshot, chop the entire name stored in
 	 * the stream.
 	 */
-	if (flags.istail) {
+	if (flags->istail) {
 		/*
 		 * A filesystem was specified with -e. We want to tack on only
 		 * the tail of the sent snapshot path.
@@ -2426,7 +2521,7 @@
 		} else {
 			chopprefix = drrb->drr_toname + (chopprefix - sendfs);
 		}
-	} else if (flags.isprefix) {
+	} else if (flags->isprefix) {
 		/*
 		 * A filesystem was specified with -d. We want to tack on
 		 * everything but the first element of the sent snapshot path
@@ -2480,7 +2575,7 @@
 	 * Determine the name of the origin snapshot, store in zc_string.
 	 */
 	if (drrb->drr_flags & DRR_FLAG_CLONE) {
-		if (guid_to_name(hdl, tosnap,
+		if (guid_to_name(hdl, zc.zc_value,
 		    drrb->drr_fromguid, zc.zc_string) != 0) {
 			zcmd_free_nvlists(&zc);
 			zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
@@ -2488,7 +2583,7 @@
 			    zc.zc_value);
 			return (zfs_error(hdl, EZFS_NOENT, errbuf));
 		}
-		if (flags.verbose)
+		if (flags->verbose)
 			(void) printf("found clone origin %s\n", zc.zc_string);
 	}
 
@@ -2511,7 +2606,7 @@
 		    !zfs_dataset_exists(hdl, zc.zc_name, ZFS_TYPE_DATASET)) {
 			char suffix[ZFS_MAXNAMELEN];
 			(void) strcpy(suffix, strrchr(zc.zc_value, '/'));
-			if (guid_to_name(hdl, tosnap, parent_snapguid,
+			if (guid_to_name(hdl, zc.zc_name, parent_snapguid,
 			    zc.zc_value) == 0) {
 				*strchr(zc.zc_value, '@') = '\0';
 				(void) strcat(zc.zc_value, suffix);
@@ -2533,12 +2628,12 @@
 		 * topmost path in the stream, then if the fs does not exist we
 		 * should look no further.
 		 */
-		if ((flags.isprefix || (*(chopprefix = drrb->drr_toname +
+		if ((flags->isprefix || (*(chopprefix = drrb->drr_toname +
 		    strlen(sendfs)) != '\0' && *chopprefix != '@')) &&
 		    !zfs_dataset_exists(hdl, zc.zc_name, ZFS_TYPE_DATASET)) {
 			char snap[ZFS_MAXNAMELEN];
 			(void) strcpy(snap, strchr(zc.zc_value, '@'));
-			if (guid_to_name(hdl, tosnap, drrb->drr_fromguid,
+			if (guid_to_name(hdl, zc.zc_name, drrb->drr_fromguid,
 			    zc.zc_value) == 0) {
 				*strchr(zc.zc_value, '@') = '\0';
 				(void) strcat(zc.zc_value, snap);
@@ -2560,7 +2655,7 @@
 		 * snapshots).
 		 */
 		if (stream_wantsnewfs) {
-			if (!flags.force) {
+			if (!flags->force) {
 				zcmd_free_nvlists(&zc);
 				zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
 				    "destination '%s' exists\n"
@@ -2596,7 +2691,7 @@
 			return (zfs_error(hdl, EZFS_EXISTS, errbuf));
 		}
 
-		if (!flags.dryrun && zhp->zfs_type == ZFS_TYPE_FILESYSTEM &&
+		if (!flags->dryrun && zhp->zfs_type == ZFS_TYPE_FILESYSTEM &&
 		    stream_wantsnewfs) {
 			/* We can't do online recv in this case */
 			clp = changelist_gather(zhp, ZFS_PROP_NAME, 0, 0);
@@ -2635,7 +2730,7 @@
 		 */
 		*cp = '\0';
 
-		if (flags.isprefix && !flags.istail && !flags.dryrun &&
+		if (flags->isprefix && !flags->istail && !flags->dryrun &&
 		    create_parents(hdl, zc.zc_value, strlen(tosnap)) != 0) {
 			zcmd_free_nvlists(&zc);
 			return (zfs_error(hdl, EZFS_BADRESTORE, errbuf));
@@ -2646,18 +2741,18 @@
 
 	zc.zc_begin_record = drr_noswap->drr_u.drr_begin;
 	zc.zc_cookie = infd;
-	zc.zc_guid = flags.force;
-	if (flags.verbose) {
+	zc.zc_guid = flags->force;
+	if (flags->verbose) {
 		(void) printf("%s %s stream of %s into %s\n",
-		    flags.dryrun ? "would receive" : "receiving",
+		    flags->dryrun ? "would receive" : "receiving",
 		    drrb->drr_fromguid ? "incremental" : "full",
 		    drrb->drr_toname, zc.zc_value);
 		(void) fflush(stdout);
 	}
 
-	if (flags.dryrun) {
+	if (flags->dryrun) {
 		zcmd_free_nvlists(&zc);
-		return (recv_skip(hdl, infd, flags.byteswap));
+		return (recv_skip(hdl, infd, flags->byteswap));
 	}
 
 	zc.zc_nvlist_dst = (uint64_t)(uintptr_t)prop_errbuf;
@@ -2738,12 +2833,12 @@
 			nvlist_free(local_nv);
 
 			if (fs != NULL) {
-				if (flags.verbose) {
+				if (flags->verbose) {
 					(void) printf("snap %s already exists; "
 					    "ignoring\n", zc.zc_value);
 				}
 				err = ioctl_err = recv_skip(hdl, infd,
-				    flags.byteswap);
+				    flags->byteswap);
 			}
 		}
 		*cp = '@';
@@ -2795,7 +2890,7 @@
 		case EDQUOT:
 			zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
 			    "destination %s space quota exceeded"), zc.zc_name);
-			(void) zfs_error(hdl, EZFS_BADRESTORE, errbuf);
+			(void) zfs_error(hdl, EZFS_NOSPC, errbuf);
 			break;
 		default:
 			(void) zfs_standard_error(hdl, ioctl_errno, errbuf);
@@ -2853,7 +2948,7 @@
 
 	*action_handlep = zc.zc_action_handle;
 
-	if (flags.verbose) {
+	if (flags->verbose) {
 		char buf1[64];
 		char buf2[64];
 		uint64_t bytes = zc.zc_cookie;
@@ -2871,7 +2966,7 @@
 }
 
 static int
-zfs_receive_impl(libzfs_handle_t *hdl, const char *tosnap, recvflags_t flags,
+zfs_receive_impl(libzfs_handle_t *hdl, const char *tosnap, recvflags_t *flags,
     int infd, const char *sendfs, nvlist_t *stream_nv, avl_tree_t *stream_avl,
     char **top_zfs, int cleanup_fd, uint64_t *action_handlep)
 {
@@ -2886,7 +2981,7 @@
 	(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
 	    "cannot receive"));
 
-	if (flags.isprefix &&
+	if (flags->isprefix &&
 	    !zfs_dataset_exists(hdl, tosnap, ZFS_TYPE_DATASET)) {
 		zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "specified fs "
 		    "(%s) does not exist"), tosnap);
@@ -2906,7 +3001,7 @@
 	/* the kernel needs the non-byteswapped begin record */
 	drr_noswap = drr;
 
-	flags.byteswap = B_FALSE;
+	flags->byteswap = B_FALSE;
 	if (drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) {
 		/*
 		 * We computed the checksum in the wrong byteorder in
@@ -2914,7 +3009,7 @@
 		 */
 		bzero(&zcksum, sizeof (zio_cksum_t));
 		fletcher_4_incremental_byteswap(&drr, sizeof (drr), &zcksum);
-		flags.byteswap = B_TRUE;
+		flags->byteswap = B_TRUE;
 
 		drr.drr_type = BSWAP_32(drr.drr_type);
 		drr.drr_payloadlen = BSWAP_32(drr.drr_payloadlen);
@@ -2982,7 +3077,7 @@
  * (-1 will override -2).
  */
 int
-zfs_receive(libzfs_handle_t *hdl, const char *tosnap, recvflags_t flags,
+zfs_receive(libzfs_handle_t *hdl, const char *tosnap, recvflags_t *flags,
     int infd, avl_tree_t *stream_avl)
 {
 	char *top_zfs = NULL;
@@ -2998,7 +3093,7 @@
 
 	VERIFY(0 == close(cleanup_fd));
 
-	if (err == 0 && !flags.nomount && top_zfs) {
+	if (err == 0 && !flags->nomount && top_zfs) {
 		zfs_handle_t *zhp;
 		prop_changelist_t *clp;
 
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
--- a/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c	Tue Dec 06 20:26:16 2011 +0200
@@ -20,6 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
  */
 
 /*
@@ -351,6 +352,7 @@
 	switch (error) {
 	case ENXIO:
 	case ENODEV:
+	case EPIPE:
 		zfs_verror(hdl, EZFS_IO, fmt, ap);
 		break;
 
@@ -1324,7 +1326,8 @@
 	 * dataset property,
 	 */
 	if (prop == ZPROP_INVAL && (type == ZFS_TYPE_POOL ||
-	    (!zfs_prop_user(propname) && !zfs_prop_userquota(propname)))) {
+	    (!zfs_prop_user(propname) && !zfs_prop_userquota(propname) &&
+	    !zfs_prop_written(propname)))) {
 		zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
 		    "invalid property '%s'"), propname);
 		return (zfs_error(hdl, EZFS_BADPROP,
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/lib/drti/Makefile
--- a/head/cddl/lib/drti/Makefile	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/lib/drti/Makefile	Tue Dec 06 20:26:16 2011 +0200
@@ -1,4 +1,4 @@
-# $FreeBSD$
+# $FreeBSD: head/cddl/lib/drti/Makefile 228057 2011-11-28 10:01:36Z rwatson $
 
 .PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common
 
@@ -18,4 +18,4 @@
 		-I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
 		-DPIC ${PICFLAG}
 
-.include <bsd.prog.mk>
+.include <bsd.lib.mk>
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/cddl/lib/libzfs/Makefile
--- a/head/cddl/lib/libzfs/Makefile	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/cddl/lib/libzfs/Makefile	Tue Dec 06 20:26:16 2011 +0200
@@ -1,4 +1,4 @@
-# $FreeBSD: head/cddl/lib/libzfs/Makefile 226940 2011-10-30 16:29:04Z rmh $
+# $FreeBSD: head/cddl/lib/libzfs/Makefile 228103 2011-11-28 21:40:00Z mm $
 
 .PATH: ${.CURDIR}/../../../cddl/compat/opensolaris/misc
 .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
@@ -20,8 +20,8 @@
 	libzfs_config.c \
 	libzfs_dataset.c \
 	libzfs_diff.c \
-	libzfs_graph.c \
 	libzfs_import.c \
+	libzfs_iter.c \
 	libzfs_mount.c \
 	libzfs_pool.c \
 	libzfs_sendrecv.c \
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/AUTHORS
--- a/head/contrib/gperf/AUTHORS	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/AUTHORS	Tue Dec 06 20:26:16 2011 +0200
@@ -1,2 +1,2 @@
 Douglas C. Schmidt  <schmidt at ics.uci.edu>
-Bruno Haible        <haible at clisp.cons.org>
+Bruno Haible        <bruno at clisp.org>
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/COPYING
--- a/head/contrib/gperf/COPYING	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/COPYING	Tue Dec 06 20:26:16 2011 +0200
@@ -2,7 +2,7 @@
                        Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                          59 Temple Place, Suite 330, Boston, MA 02111-1307,
+                          51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
                           USA.
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/ChangeLog
--- a/head/contrib/gperf/ChangeLog	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/ChangeLog	Tue Dec 06 20:26:16 2011 +0200
@@ -1,3 +1,1646 @@
+2007-04-30  Brendan Kehoe  <brendan at zen.org>
+
+	* gperf-3.0.3 released.
+	* src/version.cc: Bump to 3.0.3.
+	* tests/*.exp: Bump to 3.0.3 in header.
+	* doc/gperf.1: Regenerate with gperf 3.0.3.
+
+2007-04-06  Bruno Haible  <bruno at clisp.org>
+
+	Improve support for mingw.
+	* tests/Makefile.in (check-c, check-ada, check-modula3, check-pascal,
+	check-lang-utf8, check-lang-ucs2): Remove '\r' from output before diff.
+	(POSTPROCESS_FOR_MINGW): New variable.
+	(check-test): Use it to postprocess output before diff.
+
+2007-04-04  Bruno Haible  <bruno at clisp.org>
+
+	Support for newer GNU standards.
+	* doc/configure.ac (mandir): Remove assignment.
+	* doc/Makefile.in (datarootdir): New variable.
+	(docdir, dvidir, psdir, pdfdir, htmldir): Use value determined by
+	autoconf.
+	* configure.ac: Require autoconf >= 2.60.
+	* doc/configure.ac: Likewise.
+	* lib/configure.ac: Likewise.
+	* src/configure.ac: Likewise.
+	* tests/configure.ac: Likewise.
+	* configure: Regenerated with autoconf-2.61.
+	* doc/configure: Likewise.
+	* lib/configure: Likewise.
+	* src/configure: Likewise.
+	* tests/configure: Likewise.
+	* src/config.h.in: Likewise.
+	* src/config.h.msvc: Likewise.
+	* src/config.h_vms: Likewise.
+
+2007-04-04  Bruno Haible  <bruno at clisp.org>
+
+	* doc/Makefile.in (MAKEINFO): Disable also the LC_MESSAGES and LC_ALL
+	environment variables.
+
+2007-04-04  Bruno Haible  <bruno at clisp.org>
+
+	* configure.ac: Renamed from configure.in.
+	* doc/configure.ac: Renamed from doc/configure.in.
+	* lib/configure.ac: Renamed from lib/configure.in.
+	* src/configure.ac: Renamed from src/configure.in.
+	* tests/configure.ac: Renamed from tests/configure.in.
+	* Makefile.devel: Update.
+	* INSTALL: Update.
+
+2007-03-31  Bruno Haible  <bruno at clisp.org>
+
+	* tests/test.c (in_word_set): New declaration.
+	* tests/test2.c (in_word_set): Likewise.
+
+2007-03-31  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.cc (Options::parse_options): Bump copyright year.
+
+2007-03-31  Bruno Haible  <bruno at clisp.org>
+
+	* doc/gperf.texi: Fix typo.
+
+2007-03-31  Bruno Haible  <bruno at clisp.org>
+
+	Change generated code after the meaning of __inline is changed in
+	GCC 4.3.
+	* src/output.cc (Output::output_lookup_function): Emit an inline
+	marker that also works with gcc-4.3 in c99 or gnu99 mode.
+	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
+	tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp,
+	tests/java.exp, tests/languages.exp, tests/modula2.exp,
+	tests/objc.exp, tests/permut2.exp, tests/permut3.exp,
+	tests/permutc2.exp, tests/test-4.exp: Update.
+	Reported by Bruce Korb <Bruce.Korb at gmail.com>.
+
+2006-06-29  Brendan Kehoe  <brendan at zen.org>
+
+	* gperf-3.0.2 released.
+
+	* doc/Makefile.in (all): No longer depend on dvi.
+
+2006-01-22  Brendan Kehoe  <brendan at zen.org>
+
+	* doc/gperf.texi: Update copyright to be 1989-2006.
+	(UPDATED): Change to 22 January 2006.
+	* doc/gperf.1 (TH): Fix date.
+	* configure.in: Update copyright years.
+	* configure: Regenerate.
+	* src/Makefile.in: Update copyright years.
+
+	* doc/gperf.{dvi,ps,pdf}: Regenerated by manually invoking tex
+	instead of trying to use texi2dvi, whose run of etex ends up
+	actually always running pdfetex, thus always recreating gperf.pdf.
+
+2006-01-13  Brendan Kehoe  <brendan at zen.org>
+
+	* NEWS: Add note about #line directive fix.
+	* doc/gperf.1: Regenerate with Makefile.devel.
+
+	* doc/gperf.texi (UPDATED): Correct to be today.
+	* doc: Regenerated by doing make in a configured tree.
+	Requires makeinfo, texi2dvi, texi2pdf, and texi2html.
+
+	* configure.in: Add AC_OBJEXT and AC_EXEEXT.
+	* lib/Makefile.in (OBJEXT): Define for subst.
+	(OBJECTS): Use $(OBJEXT) instead of '.o'.
+	* src/Makefile.in: Make dependencies use $(OBJEXT).
+	(OBJEXT, EXEEXT): Define for subst.
+	(TARGETPROG): Add $(EXEEXT).
+	(OBJECTS): Use $(OBJEXT) instead of '.o'.
+	(clean): Remove *.$(OBJEXT) instead of *.o.
+
+2006-01-13  Bruno Haible  <bruno at clisp.org>
+
+	Fix #line directives for filenames containing backslashes.
+	* src/output.cc (output_line_directive): New function.
+	(output_keyword_entry, Output::output): Use it.
+	Reported by Alexander <alexander.me at gmail.com>.
+
+	* src/options.cc (Options::parse_options): Update years in --version
+	output.
+
+2005-08-29  Brendan Kehoe  <brendan at zen.org>
+
+	* src/keyword.cc: Tweak comment to avoid nesting.
+
+2005-08-27  Bruno Haible  <bruno at clisp.org>
+
+	Fix missing ranlib detection when cross-compiling.
+	* aclocal.m4 (CL_PROG_RANLIB): Remove macro.
+	* lib/configure.in: Use AC_PROG_RANLIB instead of CL_PROG_RANLIB.
+
+2005-07-30  Bruno Haible  <bruno at clisp.org>
+
+	* src/version.cc: Bump version number to 3.0.2.
+	* doc/gperf.texi: Likewise.
+	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
+	tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp,
+	tests/java.exp, tests/languages.exp, tests/modula2.exp,
+	tests/objc.exp, tests/permut2.exp, tests/permut3.exp,
+	tests/permutc2.exp, tests/test-4.exp: Update.
+
+2005-07-30  Bruno Haible  <bruno at clisp.org>
+
+	* src/positions.h: Add forward declarations of friend classes.
+	Needed for compilation with g++ 4.0.
+
+2004-08-22  Bruno Haible  <bruno at clisp.org>
+
+	* tests/Makefile.in (check-lang-syntax): Add test for the
+	--length-table-name option.
+	* tests/test-6.exp: Update.
+
+2004-08-21  Bruce Lilly <blilly at erols.com>
+
+	* src/input.cc (Input::read_input): Accept length-table-name
+	declaration.
+	* src/options.h (Options::get_lengthtable_name,
+	Options::set_lengthtable_name): New declarations.
+	(Options): Add field _lengthtable_name.
+	* src/options.icc (Options::get_lengthtable_name): New inline method.
+	* src/options.cc (DEFAULT_LENGTHTABLE_NAME): New constant.
+	(Options::long_usage): Document --length-table-name option.
+	(Options::Options): Initialize _lengthtable_name field.
+	(Options::~Options): Update.
+	(Options::set_lengthtable_name): New method.
+	(long_options): Add option --length-table-name.
+	(Options::parse_options): Implement --length-table-name option.
+	* src/output.cc (Output::output_keylength_table, output_switch_case,
+	Output::output_lookup_function_body): Use option.get_lengthtable_name.
+	* doc/gperf.texi (Gperf Declarations): Document %define
+	length-table-name.
+	(Output Details): Document --length-table-name option.
+
+2003-06-12  Bruno Haible  <bruno at clisp.org>
+
+	* gperf-3.0.1 released.
+
+	* src/version.cc: Bump version number to 3.0.1.
+	* doc/gperf.texi: Likewise.
+	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
+	tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp,
+	tests/java.exp, tests/languages.exp, tests/modula2.exp,
+	tests/objc.exp, tests/permut2.exp, tests/permut3.exp,
+	tests/permutc2.exp, tests/test-4.exp: Update.
+
+2003-05-31  Bruno Haible  <bruno at clisp.org>
+
+	* doc/gperf.texi (User-supplied Struct): Mention the possibility of an
+	abbreviated struct declaration.
+	* src/input.cc (Input::read_input): Support struct declarations of the
+	form "struct foo;".
+	* tests/incomplete.gperf: New file.
+	* tests/incomplete.exp: New file.
+	* tests/Makefile.in (check-test): Check incomplete.gperf too.
+	Reported by Rob Leslie <rob at mars.org>.
+
+2003-05-20  Bruno Haible  <bruno at clisp.org>
+
+	* doc/Makefile.in (gperf.ps): Don't use $< in a target rule.
+
+2003-05-27  Bruno Haible  <bruno at clisp.org>
+
+	* Makefile.vms (CC): Correct value.
+	(getopt.obj, getopt1.obj, getline.obj, hash.obj): Don't set
+	HAVE_CONFIG_H.
+
+2003-05-17  Bruno Haible  <bruno at clisp.org>
+
+	* Makefile.msvc (DEBUGFLAGS): New variable.
+	(gperf.exe): Use it, and MFLAGS too.
+
+2003-05-08  Bruno Haible  <bruno at clisp.org>
+
+	* gperf-3.0 released.
+
+2003-05-07  Bruno Haible  <bruno at clisp.org>
+
+	* src/version.cc: Bump version number to 3.0.
+	* doc/gperf.texi: Likewise.
+	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
+	tests/cplusplus.exp, tests/gpc.exp, tests/java.exp,
+	tests/languages.exp, tests/modula2.exp, tests/objc.exp,
+	tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp,
+	tests/test-4.exp: Update.
+
+	* src/configure.in: Fix AC_INIT argument.
+
+	* Makefile.devel (configure, lib/configure, src/configure,
+	tests/configure, doc/configure): Use the newest autoconf.
+	(src/config.h.in): Use the newest autoheader.
+
+2003-05-03  Bruno Haible  <bruno at clisp.org>
+
+	* doc/gperf.texi: Use two spaces as sentence separator, as recommended
+	by the texinfo manual.
+
+2003-04-12  Bruno Haible  <bruno at clisp.org>
+
+	* doc/configure.in (mandir): Change default value.
+	* doc/Makefile.in (docdir): Use datadir instead of prefix.
+	* Makefile.msvc (datadir): New variable.
+	(mandir, docdir): Use it instead of prefix.
+	(install, installdirs): Update.
+	* Makefile.vms (datadir): New variable.
+	(mandir, docdir): Use it instead of prefix.
+	(install, installdirs): Update.
+
+2003-04-12  Bruno Haible  <bruno at clisp.org>
+
+	* README.vms: New file.
+	* Makefile.vms: New file.
+	* Makefile.devel (src/config.h_vms): New rule.
+	(all): Depend on it.
+
+2003-03-19  Bruno Haible  <bruno at clisp.org>
+
+	* src/input.cc (Input::read_input): Ignore comments at the beginning
+	of the declarations section.
+	* doc/gperf.texi (Controls for GNU indent): New section.
+	Reported by Bruce Lilly <blilly at erols.com>.
+
+2003-03-19  Bruno Haible  <bruno at clisp.org>
+
+	* src/output.cc (Output::output_hash_function): Avoid lint warning if
+	not all arguments of the hash function are used. Avoid lint warning
+	for fallthrough in switch.
+	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
+	tests/cplusplus.exp, tests/java.exp, tests/languages.exp,
+	tests/modula2.exp, tests/objc.exp: All /*FALLTHROUGH*/ to expected
+	output.
+	Reported by Bruce Lilly <blilly at erols.com>.
+
+2003-03-01  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.h (Options::set_initializer_suffix): New declaration.
+	* src/options.cc (Options::set_initializer_suffix): New method.
+	* src/input.cc (Input::read_input): Recognize %define
+	initializer-suffix.
+	* doc/gperf.texi (Gperf Declarations): Document %define
+	initializer-suffix.
+	* NEWS: Update.
+
+2003-02-26  Bruno Haible  <bruno at clisp.org>
+
+	* Makefile.msvc: New file.
+	* README.woe32: New file.
+	* Makefile.devel (all): Depend on src/config.h.msvc.
+	(src/config.h.msvc): New rule.
+
+2003-01-07  Bruno Haible  <bruno at clisp.org>
+
+	* src/input.h (Input::_charset_dependent): New field.
+	* src/input.cc (Input::read_input): Also set _charset_dependent.
+	* src/main.cc (main): Pass _charset_dependent from Input to Output.
+	* src/output.h (Output::Output): Add charset_dependent argument.
+	(Output::_charset_dependent): New field.
+	* src/output.cc (Output::Output): Add charset_dependent argument.
+	(Output::output): Provoke a compilation error if the execution
+	character set doesn't match the expectations.
+	* tests/c-parse.exp, tests/charsets.exp, tests/chill.exp,
+	tests/cplusplus.exp, tests/gpc.exp, tests/java.exp,
+	tests/languages.exp, tests/modula2.exp, tests/objc.exp,
+	tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp,
+	tests/test-4.exp: Update.
+
+	* src/options.cc (Options::long_usage): Change bug report address to
+	<bug-gnu-gperf at gnu.org>.
+	* tests/test-6.exp: Update.
+
+	* src/output.cc (USE_DOWNCASE_TABLE): New macro.
+	(output_upperlower_table): New function.
+	(output_upperlower_strcmp, output_upperlower_strncmp,
+	output_upperlower_memcmp): Emit gperf_downcase array accesses.
+	(Output::output): Call output_upperlower_table.
+	* tests/permutc2.exp: Update.
+
+	* src/keyword-list.icc (KeywordExt_List::rest): Use a portable cast.
+	(Only in GCC a cast of an lvalue is an lvalue.)
+
+2003-01-01  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.cc (Options::parse_options): Update copyright year.
+
+	* doc/gperf.texi (@author): Add me.
+
+	* src/options.h (NULLSTRINGS): New enum value.
+	(Options::get_stringpool_name, Options::set_stringpool_name): New
+	method declarations.
+	(Options::_stringpool_name): New field.
+	* src/options.icc (Options::get_stringpool_name): New method.
+	* src/options.cc (DEFAULT_STRINGPOOL_NAME): New variable.
+	(Options::long_usage): Document -Q and --null-strings.
+	(Options::Options): Initialize _stringpool_name.
+	(Options::~Options): Output _stringpool_name, NULLSTRINGS values too.
+	(Options::set_stringpool_name): New method.
+	(long_options): Add options --string-pool-name, --null-strings.
+	(Options::parse_options): Implement options -P, -Q and --null-strings.
+	* src/input.cc (Input::read_input): Recognize declarations %pic,
+	%define string-pool-name, %null-strings.
+	* src/output.h (Output::output_string_pool,
+	Output::output_lookup_pools): New method declarations.
+	(Output::_wordlist_eltype): New field.
+	* src/output.cc (Output::output_keylength_table): Trivial
+	simplification.
+	(Output::output_string_pool): New method.
+	(output_keyword_entry): Add stringpool_index argument. For SHAREDLIB,
+	use struct offsets.
+	(output_keyword_blank_entries): For SHAREDLIB, use -1 instead of "".
+	(Output::output_keyword_table): Use _wordlist_eltype instead of
+	_struct_tag. Compute stringpool_index for output_keyword_entry.
+	(Output::output_lookup_pools): New method.
+	(Output::output_lookup_function_body): Use _wordlist_eltype instead of
+	_struct_tag. For SHAREDLIB, use "+ stringpool" to convert offsets to
+	strings. Use "o >= 0" to test for nonempty table entry.
+	(Output::output_lookup_function): Call output_lookup_pools.
+	(Output::output): Initialize _wordlist_eltype. Call
+	output_lookup_pools.
+	* tests/jstest4.gperf: New file.
+	* tests/test-6.exp: Update.
+	* tests/Makefile.in (check-lang-syntax): Drop test of -p. Add tests of
+	-P and -Q.
+	* doc/gperf.texi (User-supplied Struct): Mention that first field has
+	to be of type 'int' if -P is given.
+	(Gperf Declarations): Document %pic, %define string-pool-name,
+	%null-strings.
+	(Output Details): Update description of option -P. Document options -Q
+	and --null-strings.
+
+	* tests/Makefile.in (check-link-c, check-ada, check-pascal,
+	check-test): Omit option -p.
+	* tests/c-parse.exp: Regenerated.
+	* tests/chill.exp: Regenerated.
+	* tests/cplusplus.exp: Regenerated.
+	* tests/gpc.exp: Regenerated.
+	* tests/java.exp: Regenerated.
+	* tests/objc.exp: Regenerated.
+	* tests/test-4.exp: Regenerated.
+
+	* src/output.cc (Output::output_lookup_function_body): Omit the
+	multicompare code section and its variables when it is not used.
+	* tests/chill.exp: Regenerated.
+
+	* src/output.c (Output_Compare::output_firstchar_comparison): New
+	method.
+	(Output_Compare_Strcmp::output_comparison,
+	Output_Compare_Strncmp::output_comparison,
+	Output_Compare_Memcmp::output_comparison): Use it.
+	* tests/permutc2.exp: Update.
+
+	* tests/smtp.gperf: New file, based on a contribution by Bruce Lilly.
+	* tests/Makefile.in (check-smtp): New rule.
+	(check): Depend on it.
+	(clean): Update.
+
+2002-12-12  Bruno Haible  <bruno at clisp.org>
+
+	* src/search.h (Search::init_selchars_tuple,
+	Search::count_duplicates_tuple): Add alpha_unify argument.
+	(Search::count_duplicates_tuple): New method declaration.
+	* src/search.cc (Search::init_selchars_tuple,
+	Search::count_duplicates_tuple): Add alpha_unify argument.
+	(Search::find_positions): Update.
+	(Search::count_duplicates_tuple): New method.
+	(Search::count_duplicates_multiset): Free temp alpha_unify vector.
+	(Search::find_alpha_inc): Call count_duplicates_tuple.
+
+	* src/configure.in: Add test for stack-allocated variable-size arrays.
+	* src/config.h.in: Regenerated.
+	* src/search.cc: Include config.h.
+	(DYNAMIC_ARRAY, FREE_DYNAMIC_ARRAY): New macros.
+	(Search::find_alpha_inc, Search::count_possible_collisions,
+	Search::find_asso_values): Use them.
+	* src/Makefile.in (search.o): Depend on config.h.
+
+	* src/search.h (Search::keyword_list_length, Search::max_key_length,
+	Search::get_max_keysig_size, Search::prepare): Remove declarations.
+	(Search::prepare): Renamed from Search::preprepare.
+	(Search::_max_selchars_length): New field.
+	* src/search.cc (Search::prepare): Renamed from Search::preprepare.
+	(Search::prepare_asso_values): Merged with old Search::prepare.
+	Initialize _max_selchars_length.
+	(Search::keyword_list_length): Remove function. Use _list_len instead.
+	(Search::max_key_length): Remove function. Use _max_key_len instead.
+	(Search::get_max_keysig_size): Remove function. Use
+	_max_selchars_length instead.
+	(Search::count_possible_collisions, Search::find_asso_values): Update.
+	(Search::find_good_asso_values): Call just prepare_asso_values.
+	(Search::~Search): Update.
+
+	* src/output.h (Output::output_asso_values_ref): New declaration.
+	* src/output.cc (char_to_index): Remove variable.
+	(Output::output_asso_values_ref): New function.
+	(Output::output_hash_function): Use it.
+	(Output::output): Update.
+
+	* src/positions.h (Positions::is_useall, Positions::set_useall,
+	Positions::iterator, Positions::reviterator): New method declarations.
+	(Positions::_useall): New field.
+	(PositionIterator): Make constructor private. Add a constructor and a
+	copy constructor.
+	(PositionIterator::remaining): New declaration.
+	(PositionReverseIterator): Make constructor private. Add a constructor
+	and a copy constructor.
+	(PositionReverseIterator::remaining): New declaration.
+	(PositionReverseIterator::_minindex): New field.
+	* src/positions.icc (Positions::Positions): Initialize _useall.
+	(Positions::operator=): Likewise.
+	(Positions::is_useall, Positions::set_useall): New methods.
+	(Positions::sort): Do nothing if _useall is set.
+	(Positions::iterator, Positions::reviterator): New methods.
+	(PositionIterator::PositionIterator): New constructor.
+	(PositionIterator::remaining): New method.
+	(PositionReverseIterator::PositionReverseIterator): New constructor.
+	(PositionReverseIterator::next): Use _minindex as bound.
+	(PositionReverseIterator::remaining): New method.
+	* src/positions.cc (Positions::add, Positions::remove): Reset the
+	useall flag.
+	(Positions::print): Handle the useall case.
+	* src/options.h (ALLCHARS): Remove.
+	* src/options.cc (Options::~Options): Update.
+	(Options::parse_options): Use Positions::set_useall().
+	* src/keyword.h (KeywordExt::init_selchars_tuple,
+	KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low):
+	Remove use_all_chars argument.
+	* src/keyword.cc (KeywordExt::init_selchars_low): Remove use_all_chars
+	argument. Tell the position iterator to stop at _allchars_length.
+	Remove special case code for -k'*'.
+	(KeywordExt::init_selchars_tuple, KeywordExt::init_selchars_multiset):
+	Remove use_all_chars argument.
+	* src/search.h (Search::init_selchars_tuple): Remove use_all_chars
+	argument.
+	(Search::init_selchars_multiset): Likewise.
+	* src/search.cc (Search::init_selchars_tuple): Remove use_all_chars
+	argument.
+	(Search::count_duplicates_tuple, Search::find_positions): Update.
+	(Search::compute_alpha_unify): Remove special case code for -k'*'.
+	(Search::init_selchars_multiset): Remove use_all_chars argument.
+	(Search::count_duplicates_multiset): Update.
+	(Search::find_alpha_inc): Remove special case code for -k'*'.
+	(Search::prepare): Update.
+	(Search::get_max_keysig_size): Update.
+	* src/output.cc (Output::output_hash_function): Remove special case
+	code for -k'*'.
+	* tests/chill.exp: Regenerated.
+
+2002-12-11  Bruno Haible  <bruno at clisp.org>
+
+	Change the positions to be 0-based, instead of 1-based.
+	* src/positions.h (Positions::LASTCHAR): Set to -1.
+	(Positions::MAX_SIZE): New constant.
+	(Positions::pointer): Change return type.
+	(Positions::_positions): Change element type.
+	(PositionIterator::EOS, PositionReverseIterator::EOS): Set to -2.
+	* src/positions.icc (Positions::pointer): Change return type.
+	(Positions::sort): Update.
+	* src/positions.cc (Positions::contains, Positions::add,
+	Positions::remove): Update.
+	(Positions::print): Update. Fix off-by-one bug.
+	* src/options.cc (Options::~Options): Update.
+	(Options::parse_options): Set BAD_VALUE to -3. Update.
+	* src/keyword.cc (KeywordExt::init_selchars_low): Update.
+	* src/search.cc (Search::find_positions, Search::compute_alpha_unify,
+	Search::find_alpha_inc): Update.
+	* src/output.cc (Output::output_hash_function): Update. Don't emit
+	a 'case' statement right after 'default:'.
+	* tests/c-parse.exp: Regenerated.
+	* tests/charsets.exp: Regenerated.
+	* tests/cplusplus.exp: Regenerated.
+	* tests/java.exp: Regenerated.
+	* tests/languages.exp: Regenerated.
+	* tests/modula2.exp: Regenerated.
+	* tests/objc.exp: Regenerated.
+
+2002-12-10  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.h: Reorder enum values.
+	(Options::short_usage, Options::long_usage): Make static.
+	* src/options.cc (Options::short_usage); No longer print a monster
+	usage line.
+	(Options::print_options): Improve output of options like
+	--key-positions=1,2,$.
+	(Options::~Options): Update.
+
+	* src/options.h (UPPERLOWER): New enum value.
+	* src/options.cc (Options::long_usage): Document option --ignore-case.
+	(Options::~Options): Update.
+	(long_options): Add option --ignore-case.
+	(Options::parse_options): Handle option --ignore-case.
+	* src/input.cc (Input::read_input): Recognize option %ignore-case.
+	* src/keyword.h (KeywordExt::init_selchars_tuple,
+	KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low):
+	Add alpha_unify argument.
+	* src/keyword.cc (KeywordExt::init_selchars_low): Add alpha_unify
+	argument.
+	(KeywordExt::init_selchars_tuple): Add alpha_unify argument.
+	(KeywordExt::init_selchars_multiset): Add alpha_unify argument.
+	* src/search.h (Search::compute_alpha_size,
+	Search::compute_alpha_unify): New declarations.
+	(Search::init_selchars_multiset): Add alpha_unify argument.
+	(Search::_alpha_unify): New field.
+	* src/search.cc (Search::compute_alpha_size,
+	Search::compute_alpha_unify): New functions.
+	(Search::init_selchars_tuple): Update.
+	(Search::find_positions): Temporarily set _alpha_unify. Perform a
+	case insensitive comparison if needed.
+	(Search::init_selchars_multiset): Add alpha_unify argument.
+	(Search::count_duplicates_multiset): Call compute_alpha_unify.
+	(Search::find_alpha_inc): Temporarily set _alpha_unify. At the end,
+	set _alpha_size and _alpha_unify.
+	(Search::prepare): Update. Don't compute _alpga_size here.
+	(Search::optimize): Propagate unified asso_values.
+	(Search::~Search) Delete _alpha_unify.
+	* src/output.cc (output_upperlower_strcmp, output_upperlower_strncmp,
+	output_upperlower_memcmp): New functions.
+	(Output_Compare_Strcmp::output_comparison,
+	Output_Compare_Strncmp::output_comparison,
+	Output_Compare_Memcmp::output_comparison): Use the case-insensitive
+	comparison function if --ignore-case was given.
+	(Output::output): Emit the auxiliary case-insensitive comparison
+	function if needed.
+	* tests/permutc2.gperf, tests/permutc2.exp: New files.
+	* tests/Makefile.in (check-test): Also check permutc2.gperf.
+	* tests/test-6.exp: Update.
+	* doc/gperf.texi (Gperf Declarations): Document %ignore-case.
+	(Input Details): Document option --ignore-case.
+	* NEWS: Update.
+
+	* src/search.cc (Search::optimize): Fill unused asso_values[] entries
+	with a large value.
+	* src/output.h (Output::Output): Remove occurrences argument.
+	(Output::_occurrences): Remove field.
+	* src/output.cc (Output::Output): Remove occurrences argument.
+	(Output::output_hash_function): Ignore _occurrences.
+	* src/main.cc (main): Don't pass the _occurrences to Output.
+
+	* src/search.cc (Search::preprepare): Exit if keywords contain
+	out-of-range characters.
+
+	* src/search.cc (for): Define so as to avoid errors with old compilers.
+
+	* src/options.h (SHAREDLIB): New enum value.
+	* src/options.cc (Options::short_usage): Mention option -P.
+	(Options::long_usage): Document option -P.
+	(long_options): Add option --pic.
+	(Options::parse_options): Handle option -P/--pic.
+	* src/output.cc (output_keyword_blank_entries): When SHAREDLIB is
+	specified, emit NULL pointers instead of "".
+	(Output::output_lookup_function_body): When SHAREDLIB is specified
+	and SWITCH and DUP and not specified, test the table entry against
+	NULL before the string comparison.
+	* tests/test-6.exp: Update.
+	* doc/gperf.texi (Output Details): Document option -P.
+	* NEWS: Update.
+	Suggested by Ulrich Drepper.
+
+2002-12-08  Bruno Haible  <bruno at clisp.org>
+
+	* tests/permut2.gperf, tests/permut2.exp: New files.
+	* tests/permut3.gperf, tests/permut3.exp: New files.
+	* tests/charsets.gperf: New file, from Bruce Lilly.
+	* tests/charsets.exp: New file.
+	* tests/languages.gperf: New file, from Bruce Lilly.
+	* tests/languages.exp: New file.
+	* Makefile.in (check-test): Test them all.
+
+	Completely new asso_values search algorithm.
+	* src/search.h (Search::compute_occurrence, Search::clear_determined,
+	Search::set_determined, Search::already_determined, Search::reorder):
+	Remove functions.
+	(Search::init_asso_values, Search::sort_by_occurrence,
+	Search::compute_occurrence, Search::sort_by_occurrence,
+	Search::has_collisions, Search::collision_prior_to): Remove functions.
+	(Search::compute_partition, Search::count_possible_collisions,
+	Search::unchanged_partition): New method declarations.
+	(Search::_determined): Remove field.
+	* src/search.cc (Search::prepare): Don't initialize _determined.
+	(Search::compute_occurrence, greater_by_occurrence,
+	Search::clear_determined, Search::set_determined,
+	Search::already_determined, Search::reorder): Remove functions.
+	(Search::init_asso_values, compute_disjoint_union,
+	Search::sort_by_occurrence, Search::compute_occurrence,
+	Search::sort_by_occurrence, Search::has_collisions,
+	Search::collision_prior_to): Remove functions.
+	(StackEntry): Remove class.
+	(EquivalenceClass, Step): New classes.
+	(equals, Search::compute_partition, delete_partition,
+	Search::count_possible_collisions, Search::unchanged_partition): New
+	functions.
+	(Search::find_asso_values): Completely rewritten.
+	(Search::find_good_asso_values): Don't call reorder().
+	(Search::~Search): Don't free _determined.
+	* src/keyword.h (KeywordExt::_occurrence): Remove field.
+	* src/options.h (ORDER, FAST, OPT_CHOICE): Remove enum values.
+	(Options::_iterations): Remove field.
+	* src/options.icc (Options::get_iterations): Remove method.
+	* src/options.cc (Options::long_usage): Remove mention of -f and -o.
+	(Options::Options): Don't initialize _iterations.
+	(Options::~Options): Update.
+	(Options::parse_options): Do nothing for options -f, -o, -O.
+	* doc/gperf.texi: (Contributors): Update.
+	(Algorithmic Details): Remove options -f and -o. Update description
+	of option -s.
+	* tests/c-parse.exp, tests/chill.exp, tests/cplusplus.exp,
+	tests/gpc.exp, tests/java.exp, tests/modula2.exp, tests/objc.exp,
+	tests/test-4.exp): Regenerated, smaller than before.
+	* tests/test-6.exp: Update.
+	* NEWS: Update.
+
+2002-12-08  Bruno Haible  <bruno at clisp.org>
+
+	* src/search.h (Search::_alpha_size): Change type to 'unsigned int'.
+	(Search::_asso_value_max): Likewise.
+	* src/search.cc (Search::prepare_asso_values): Update.
+	(Search::init_asso_values): Update.
+	(Search::~Search): Update.
+	* src/output.h (Output::Output): Change alpha_size type to
+	'unsigned int'.
+	(Output::_alpha_size): Change type to 'unsigned int'.
+	* src/output.cc (Output::Output): Change alpha_size type to
+	'unsigned int'.
+	(Output::output_hash_function): Update.
+
+2002-12-07  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.h (OPT_CHOICE): New enum value.
+	* src/options.cc (Options::~Options): Update.
+	(long_options): New option --optimized-collision-resolution.
+	(Options::parse_options): Accept option -O.
+	* src/search.h (Search::sort_by_occurrence): Change argument to
+	'unsigned int'.
+	(Search::compute_occurrence, Search::sort_by_occurrence): New method
+	declarations.
+	* src/search.cc (Search::sort_by_occurrence): Change argument to
+	'unsigned int'.
+	(Search::compute_occurrence, Search::sort_by_occurrence): New methods.
+	(Search::find_asso_values): Implement OPT_CHOICE. More debugging
+	output.
+
+	* src/search.cc (Search::prepare_asso_values) [DEBUG]: Also print
+	the keyword list in order.
+	(Search::find_asso_values) [DEBUG]: Upon failure, print the union_set.
+
+	* src/options.h (Options::get_size_multiple): Change return type to
+	float.
+	(Options::_size_multiple): Change type to float.
+	* src/options.icc (Options::get_size_multiple): Change return type to
+	float.
+	* src/options.cc (Options::long_usage): Update description of option
+	-s.
+	(Options::~Options): Update.
+	(Options::parse_options): For option -s, accept a fraction.
+	* src/search.cc (Search::prepare_asso_values): Use get_size_multiple
+	as it is.
+	* tests/test-6.exp: Update.
+	* doc/gperf.texi (Algorithmic Details): Update description of option
+	-s.
+
+2002-12-04  Bruno Haible  <bruno at clisp.org>
+
+	Improve debugging output.
+	* src/hash-table.h (Hash_Table::dump): New method.
+	* src/hash-table.cc (Hash_Table::dump): New method, extracted from
+	destructor.
+	(Hash_Table::~Hash_Table): No longer print the contents.
+	* src/positions.h (PositionReverseIterator): New class.
+	* src/positions.icc (PositionReverseIterator::PositionReverseIterator,
+	PositionReverseIterator::next): New methods.
+	* src/search.cc (Search::find_positions): If debugging, print the
+	result.
+	(Search::find_alpha_inc): If debugging, print the result.
+	(Search::prepare): Explicitly dump the hash table's contents here.
+
+	Portability fixes.
+	* src/positions.h (Positions::LASTCHAR, Positions::MAX_KEY_POS,
+	PositionIterator::EOS): Define as compile-time constants using enum.
+	* src/bool-array.cc (Bool_Array::~Bool_Array): Remove const qualifier
+	of pointer to be deleted.
+	* src/input.cc (Input::~Input): Likewise.
+	* src/keyword.cc (KeywordExt::delete_selchars): Likewise.
+	* src/main.cc (main): Likewise.
+	* src/hash-table.cc (Hash_Table::~Hash_Table): Limit scope of 'for'
+	variables.
+	* src/search.cc (Search::prepare_asso_values): Use a static_cast to
+	convert from time_t to long. This is possible because ISO C 99 says
+	time_t is a numeric type.
+
+2002-11-20  Bruno Haible  <bruno at clisp.org>
+
+	* src/search.cc (Search::find_asso_values): Avoid gcc warnings about
+	uninitialized variables.
+
+	Implement backtracking.
+	* src/search.h (Search::has_collisions): Renamed from
+	Search::less_collisions. Return a boolean.
+	* src/search.cc (Search::has_collisions): Renamed from
+	Search::less_collisions. Return a boolean.
+	(StackEntry): Remove field _collisions_so_far.
+	(Search::find_asso_values): Backtrack when encountering an unresolved
+	collision. Assume collisions_so_far is always zero.
+	(Search::optimize): Exit if there are accidental duplicates at the end.
+	* src/output.cc (Output::num_hash_values): Simply return the list
+	length.
+	(Output::output_keylength_table): Remove handling of accidental
+	duplicates.
+	(Output::output_keyword_table, Output::output_lookup_array): Likewise.
+	(output_switch_case, output_switches): Likewise.
+	* doc/gperf.texi (Algorithmic Details): Adjust description of options
+	-D, -f, -o, -r.
+	(Bugs): Remove note about missing backtracking.
+	(Projects): Likewise.
+
+2002-11-19  Bruno Haible  <bruno at clisp.org>
+
+	Prepare for backtracking.
+	* src/search.h (Search::try_asso_value, Search::change_some_asso_value):
+	Remove declarations.
+	(Search::less_collisions, Search::collision_prior_to): New declarations.
+	(Search::_fewest_collisions, Search::_union_set, Search::_num_done):
+	Remove fields.
+	* src/search.cc (Search::prepare_asso_values): Don't initialize
+	_union_set.
+	(Search::try_asso_value, Search::change_some_asso_value): Remove
+	methods.
+	(Search::less_collisions, Search::collision_prior_to): New methods.
+	(StackEntry): New class.
+	(Search::find_asso_values): Reorganized to use pseudo-recursion.
+	(Search::~Search): Don't free _union_set.
+
+	* src/search.h (Search::find_good_asso_values): New declaration.
+	* src/search.cc: Add comments about the basic structure of the
+	algorithm.
+	(Search::find_positions): Move the option[POSITIONS] test to here.
+	(Search::find_good_asso_values): New method, extracted from
+	Search::optimize.
+	(Search::optimize): Remove option[POSITIONS] test. Call
+	find_good_asso_values.
+
+2002-11-17  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.cc (Options::parse_options): Include copyright notice
+	and authors in --version output.
+
+	Avoid artificial duplicates.
+	* src/keyword.h (KeywordExt::init_selchars_tuple): New declaration.
+	(KeywordExt::init_selchars_multiset): Renamed from
+	KeywordExt::init_selchars.
+	(KeywordExt::init_selchars_low): New declaration.
+	* src/keyword.cc (KeywordExt::init_selchars_low): Renamed from
+	KeywordExt::init_selchars. Add alpha_inc argument. Remove sorting.
+	(KeywordExt::init_selchars_tuple): New method.
+	(KeywordExt::init_selchars_multiset): New method, replaces
+	KeywordExt::init_selchars.
+	* src/search.h (Search::init_selchars_tuple): Renamed from
+	Search::init_selchars.
+	(Search::count_duplicates_tuple): Renamed from Search::count_duplicates.
+	(Search::init_selchars_multiset, Search::count_duplicates_multiset,
+	Search::find_alpha_inc): New declarations.
+	(Search::_alpha_inc): New field.
+	(Search::_alpha_size, Search::_occurrences, Search::_asso_values,
+	Search::_determined): Make non-const.
+	* src/search.cc (Search::Search): Don't initialize _key_positions,
+	_alpha_size, _occurrences, _asso_values, _determined here.
+	(Search::init_selchars_tuple): Renamed from Search::init_selchars.
+	(Search::count_duplicates_tuple): Renamed from Search::count_duplicates.
+	(Search::find_positions): Update.
+	(Search::init_selchars_multiset, Search::count_duplicates_multiset,
+	Search::find_alpha_inc): New methods.
+	(Search::prepare): Move preprepare, find_positions calls away.
+	Initialize _alpha_size, _occurrences, _asso_values, _determined here.
+	(Search::optimize): Call preprepare, find_positions here. Initialize
+	_key_positions here.
+	(Search::~Search): Deallocate _alpha_inc.
+	* src/output.cc (Output::Output): Add alpha_inc argument.
+	(Output::output_hash_function): Use _alpha_inc.
+	* src/output.h (Output::Output): Add alpha_inc argument.
+	(Output::_alpha_inc): New field.
+	* src/main.cc (main): Pass _alpha_inc from Search to Output.
+	* tests/chill.exp: Update.
+	* doc/gperf.texi (Algorithmic Details): Remove description of
+	artificial duplicates.
+
+	* src/keyword.h (KeywordExt::_selchars): Change type to
+	'const unsigned int *'.
+	* src/keyword.cc (sort_char_set): Change argument type to
+	'unsigned int *'.
+	(KeywordExt::init_selchars): Update.
+	* src/search.h (Search::sort_by_occurrence): Change argument type to
+	'unsigned int *'.
+	(Search::try_asso_value): Change argument type to 'unsigned int'.
+	(Search::_union_set): Change type to 'unsigned int *'.
+	* src/search.cc (Search::prepare, Search::compute_occurrence,
+	Search::set_determined, Search::already_determined,
+	Search::prepare_asso_values, Search::compute_hash): Update.
+	(compute_disjoint_union): Change argument types to 'unsigned int *'.
+	(Search::sort_by_occurrence): Likewise.
+	(Search::try_asso_value): Change argument type to 'unsigned int'.
+	(Search::change_some_asso_value, Search::~Search): Update.
+	* src/hash-table.cc (Hash_Table::~Hash_Table, Hash_Table::equal,
+	Hash_Table::insert): Update.
+
+	* src/positions.h: New file, extracted from options.h.
+	* src/positions.icc: New file, extracted from options.icc.
+	* src/positions.cc: New file, extracted from options.cc.
+	* src/options.h: Include positions.h. Move classes Positions and
+	PositionsIterator away.
+	* src/options.icc: Move classes Positions and PositionsIterator away.
+	* src/options.cc: Move class Positions away.
+	* src/keyword.cc: Include positions.h instead of options.h.
+	* src/output.h: Include positions.h instead of options.h.
+	* src/search.h: Include positions.h instead of options.h.
+	* src/Makefile.in (OBJECTS): Add positions.o.
+	(POSITIONS_H): New variable.
+	(OPTIONS_H, SEARCH_H, OUTPUT_H, keyword.o): Use it.
+	(positions.o): New rule.
+
+	* src/options.h (POSITIONS): New enum value.
+	(Positions::Positions): New copy constructor.
+	(Positions::operator=, Positions::contains, Position::add,
+	Positions::remove, Positions::print): New method declaration.
+	(Options::get_max_keysig_size): Remove method.
+	* src/options.icc (Positions::Positions): New copy constructor.
+	(Positions::operator=): New method.
+	(Options::get_max_keysig_size): Remove method.
+	* src/options.cc (Options::Options): Initialize _key_positions
+	trivially.
+	(Options::parse_options): Option -k sets POSITIONS.
+	(Positions::contains, Positions::add, Positions::remove,
+	Positions::print): New methods.
+	* src/hash-table.cc (Hash_Table::~Hash_Table): Compute the field
+	width explicitly, instead of using Options::get_max_keysig_size.
+	* src/keyword.h (KeywordExt::init_selchars): Add arguments
+	use_all_chars, positions.
+	(KeywordExt::delete_selchars): New declaration.
+	* src/keyword.cc (KeywordExt::init_selchars): Add arguments
+	use_all_chars, positions. Remove error message if there are no key
+	positions.
+	(KeywordExt::delete_selchars): New method.
+	* src/search.h: Include options.h.
+	(Search::preprepare, Search::init_selchars, Search::delete_selchars,
+	Search::count_duplicates, Search::find_positions): New declarations.
+	(Search::_key_positions): New field.
+	* src/search.cc (Search::Search): Initialize _key_positions.
+	(Search::preprepare, Search::init_selchars, Search::delete_selchars,
+	Search::count_duplicates, Search::find_positions): New functions.
+	(Search::prepare): Call preprepare and find_positions. Tweak error
+	message.
+	(Search::get_max_keysig_size): Use _key_positions instead of
+	option.get_key_positions().
+	(Search::optimize): Tweak error message.
+	* src/output.h: Include options.h.
+	(Output::Output): Add Positions argument.
+	(Output::_key_positions): New field.
+	* src/output.cc (Output::Output): Add Positions argument.
+	(Output::output_hash_function): Omit the table if there are no
+	positions at all. Use _key_positions instead of
+	option.get_key_positions().
+	(Output::output): Output the computed positions as a comment.
+	* src/main.cc (main): Pass the Positions from Searcher to Output.
+	* src/Makefile.in (SEARCH_H, OUTPUT_H): Include OPTIONS_H.
+	* tests/Makefile.in (check-test): Pass key positions explicitly.
+	* tests/gpc.exp: Update.
+	* tests/test-4.exp: Update.
+	* doc/gperf.texi (Algorithmic Details): Mention that -k is not needed
+	usually.
+
+2002-11-16  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.h (Options::get_slot_name): Renamed from
+	Options::get_key_name.
+	(Options::set, Options::set_language, Options::set_total_switches,
+	Options::set_function_name, Options::set_slot_name,
+	Options::set_class_name, Options::set_hash_name,
+	Options::set_wordlist_name, Options::set_delimiters): New method
+	declarations.
+	(Options::_language): New field.
+	(Options::_slot_name): Renamed from Options::_key_name.
+	* src/options.icc (Options::set): New method.
+	(Options::get_slot_name): Renamed from Options::get_key_name.
+	* src/options.cc (DEFAULT_FUNCTION_NAME): Renamed from DEFAULT_NAME.
+	(DEFAULT_SLOT_NAME): Renamed from DEFAULT_NAME.
+	(Options::Options): Initialize _language. Update.
+	(Options::~Options): Update.
+	(Options::set_language, Options::set_total_switches,
+	Options::set_function_name, Options::set_slot_name,
+	Options::set_class_name, Options::set_hash_name,
+	Options::set_wordlist_name, Options::set_delimiters): New methods.
+	(Options::parse_options): Call set_language. Update.
+	* src/input.cc (is_declaration, is_declaration_with_arg,
+	is_define_declaration): New functions.
+	(Input::read_input): Accept %DECL declarations.
+	* src/output.cc (Output::output_lookup_function_body): Update.
+	* doc/gperf.texi (Declarations): Add new subnodes.
+	(User-supplied Struct, Gperf Declarations, C Code Inclusion): New
+	nodes.
+	(Keywords, Output Format, Binary Strings, Options): Mention %
+	declarations as being equivalent to the command line options.
+
+	* src/options.cc (Options::long_usage): Rename options -H, -N, -l, -G.
+	(long_options): Add --hash-function-name, --lookup-function-name,
+	--compare-lengths.
+	* doc/gperf.texi (Output Details): Rename options -H, -N, -l, -G.
+	* tests/test-6.exp: Update.
+
+	* src/options.cc (DEFAULT_DELIMITERS): Remove newline.
+	* src/options.cc (Options::long_usage): Change default --delimiters.
+	* doc/gperf.texi (Input Details): Likewise.
+	* tests/test-6.exp: Update.
+
+	* doc/gperf.texi: Move description of option -l from section
+	Algorithmic Details to section Output Details.
+	* src/options.cc (Options::long_usage): Likewise.
+	* tests/test-6.exp: Update.
+
+2002-11-12  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.h (Output::get_output_file_name): New method.
+	(Output::_output_file_name): New field.
+	* src/options.icc (Options::get_output_file_name): New method.
+	* src/options.cc (Options::long_usage): Document option --output-file.
+	(Options::Options): Initialize _output_file_name.
+	(long_options): Add --output-file.
+	(Options::parse_options): Handle it.
+	* src/main.cc (main): Open the output file if given by name.
+	* doc/gperf.texi (Output File): New section.
+	* tests/test-6.exp: Update.
+
+2002-11-10  Bruno Haible  <bruno at clisp.org>
+
+	* src/input.cc (pretty_input_file_name): New function.
+	(read_input): Use it in all error and warning messages.
+
+	* src/keyword.h (Keyword::_lineno): New field.
+	* src/input.h (Input::_struct_decl_lineno): New field.
+	* src/input.cc (Input::read_input): Set _struct_decl_lineno. Fill
+	each keyword's _lineno field.
+	* src/main.cc (main): Pass _struct_decl_lineno from Input to Output.
+	* src/output.h (Output::Output) Add struct_decl_lineno argument.
+	(Output::_struct_decl_lineno): New field.
+	* src/output.cc (Output::Output) Add struct_decl_lineno argument.
+	(output_keyword_entry): Emit #line directive before table entry.
+	(Output::output): Emit #line directive before _struct_decl.
+
+	Fix memory leaks.
+	* src/keyword.h (empty_string): New declaration.
+	* src/keyword.cc (empty_string): New variable.
+	* src/input.h (Input::_input): Make public.
+	(Input::_input_end): New field.
+	* src/input.cc (read_input): When removing leading whitespace from
+	struct_decl, reallocate it. For rest, use empty_string instead of "".
+	Set _input_end.
+	(Input::~Input): Delete _struct_decl, _struct_tag, _return_type.
+	* src/search.cc (Search::prepare): When removing an element from
+	the keyword list, delete the list node.
+	(Search::~Search): Delete _occurrences, _asso_values.
+	* src/main.cc (main): Between Search::~Search and Input::~Input,
+	destroy the keyword list.
+
+	Rewrite the input routines.
+	* src/input.h: Don't include read-line.h.
+	(Input): Don't inherit from class Read_Line.
+	(Input::read_keys, Input::strcspn, Input::set_output_types,
+	Input::get_array_type, Input::save_include_src,
+	Input::get_special_input): Remove declarations.
+	(Input::read_input): New declaration.
+	(Input::_struct_decl): Renamed from Input::_array_type.
+	(Input::_verbatim_declarations): Renamed from Input::_include_src.
+	(Input::_verbatim_code): Replaces Input::_additional_code.
+	* src/input.cc: Completely rewritten.
+	* src/output.h (Output::Output): Update the verbatim_* arguments.
+	(Output::_struct_decl): Renamed from Output::_array_type.
+	(Output::_verbatim_declarations): Renamed from Output::_include_src.
+	(Output::_verbatim_code): Replaces Output::_additional_code.
+	* src/output.cc (Output::Output): Update the verbatim_* arguments.
+	(Output::output): Output the verbatim_* code pieces with #line.
+	* src/main.cc (main): Call Input::read_input instead of
+	Input::read_keys. Update Output::Output arguments.
+	* src/read-line.h: Remove file.
+	* src/read-line.cc, src/read-line.icc: Remove files.
+	* src/Makefile.in (OBJECTS): Remove read-line.o.
+	(READ_LINE_H): Remove variable.
+	(INPUT_H): Update.
+	(read-line.o): Remove rule.
+	* doc/gperf.texi (Declarations): Correct the example.
+	(Keywords): Mention that lines starting with % are forbidden here.
+	* tests/c-parse.exp: Update.
+	* tests/cplusplus.exp: Update.
+	* tests/gpc.exp: Update.
+	* tests/java.exp: Update.
+	* tests/objc.exp: Update.
+	* tests/test-4.exp: Update.
+
+	* src/options.h (Options::get_input_file_name): New declaration.
+	(Options::_input_file_name): New field.
+	* src/options.icc (Options::get_input_file_name): New method.
+	* src/options.cc (Options::Options): Initialize _input_file_name.
+	(Options::parse_options): Don't open input file, only store it in
+	_input_file_name.
+	* src/main.cc (main): Open input file here.
+	Print an error message upon write error on the output file.
+
+	Upgrade to autoconf-2.52.
+	* configure.in: Use AC_CONFIG_SUBDIRS instead of AC_OUTPUT_SUBDIRS.
+	* Makefile.devel (configure, lib/configure, src/configure,
+	tests/configure, doc/configure): Use autoconf-2.52.
+
+2002-11-09  Bruno Haible  <bruno at clisp.org>
+
+	* doc/gperf.texi: Talk about "bytes" instead of "characters". Talk
+	about "keywords", not "keys". Talk about "input file", not "keyfile".
+	(@menu): Fix a menu entry.
+	(Contributors): Don't mention cperf.
+	(Motivation): Fix an off-by-one error in the definition of "minimal".
+	Mention GNU Java. Recommend http URL instead of anonymous ftp.
+	(Search Structures): Mention GNU Java.
+	(Output Format): Drop reference to node 'Implementation'.
+	(Output Details): Talk about "slot-name" instead of "key name".
+	(Algorithmic Details): Talk about "selected byte positons", not
+	"key positions". Upper limit is now 255. Explain a third reason
+	why duplicates can occur. Describe negative effects of
+	--occurrence-sort.
+	(Implementation): Remove chapter.
+
+2002-11-07  Bruno Haible  <bruno at clisp.org>
+
+	* src/bool-array.cc (Bool_Array::~Bool_Array): Free _storage_array.
+	* src/search.cc (Search::~Search): Free _union_set, _determined.
+
+	* tests/Makefile.in (check-test): Don't redirect stderr.
+
+2002-11-05  Bruno Haible  <bruno at clisp.org>
+
+	* src/keyword-list.h (mergesort_list): New declarations.
+	* src/keyword-list.cc (Keyword_Comparison): New type.
+	(merge, mergesort_list): New functions, moved here from search.cc.
+	* src/search.h (Search::merge, Search::merge_sort): Remove methods.
+	(Search::_occurrence_sort, Search::_hash_sort): Remove fields.
+	* src/search.cc (Search::merge, Search::merge_sort): Remove methods.
+	(greater_by_occurrence, less_by_hash_value): New functions.
+	(Search::reorder, Search::sort): Use mergesort_list.
+
+2002-11-04  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.h (Options::_asso_iterations): New field.
+	(Options::get_asso_iterations): New method declaration.
+	* src/options.icc (Options::get_asso_iterations): New method.
+	* src/options.cc (Options::short_usage): Mention j<jump> and m<num>.
+	(Options::long_usage): Document option -m.
+	(Options::Options): Initialize _asso_iterations.
+	(Options::~Options): Print _asso_iterations too.
+	(long_options): Add --multiple-iterations.
+	(Options::parse_options): Handle option -m.
+	* src/keyword-list.h (copy_list, delete_list): New declarations.
+	* src/keyword-list.cc (copy_list, delete_list): New functions.
+	* src/search.h (Search::_initial_asso_value, Search::_jump): New fields.
+	* src/search.cc (Search::prepare_asso_values): Initialize
+	_initial_asso_value and _jump here.
+	(Search::init_asso_values): Use _initial_asso_value.
+	(Search::try_asso_value): Use _jump.
+	(Search::optimize): If option -m was given, iterate over different
+	values for _initial_asso_value and _jump.
+	* doc/gperf.texi (Algorithmic Details): Document option -m.
+	* tests/test-6.exp: Update.
+
+2002-11-03  Bruno Haible  <bruno at clisp.org>
+
+	Bug fix: When option -j 0 was used without option -r, the output was
+	not random.
+	* src/search.h (Search::prepare_asso_values): New method declaration.
+	* src/search.cc (Search::prepare_asso_values): New method, extracted
+	from Search::init_asso_values. Call srand also when "-j 0" was given.
+	(Search::optimize): Call prepare_asso_values().
+
+	* src/hash-table.h (Hash_Table::_ignore_length, Hash_Table::equal):
+	Declare as const.
+	* src/hash-table.cc (Hash_Table::equal): Declare as const.
+	* src/input.h (Input::_factory): Declare as const.
+	* src/keyword-list.h (Keyword_List::first, KeywordExt_List::first):
+	Declare as const.
+	* src/keyword-list.icc (Keyword_List::first, KeywordExt_List::first):
+	Declare as const.
+	* src/output.h (Output::num_hash_values, Output::output_constants,
+	Output::output_hash_function, Output::output_keylength_table,
+	Output::output_keyword_table, Output::output_lookup_array,
+	Output::output_lookup_tables, Output::output_lookup_function_body,
+	Output::output_lookup_function, Output::_array_type,
+	Output::_additional_code, Output::_include_src, Output::_total_keys,
+	Output::_total_duplicates, Output::_max_key_len, Output::_min_key_len):
+	Declare as const.
+	* src/output.cc (Output::num_hash_values, Output::output_constants,
+	Output::output_hash_function, Output::output_keylength_table,
+	Output::output_keyword_table, Output::output_lookup_array,
+	Output::output_lookup_tables, Output::output_lookup_function_body,
+	Output::output_lookup_function): Declare as const.
+	* src/search.h (Search::merge, Search::merge_sort,
+	Search::compute_occurrence, Search::already_determined,
+	Search::keyword_list_length, Search::max_key_length,
+	Search::get_max_keysig_size, Search::compute_hash,
+	Search::sort_by_occurrence): Declare as const.
+	* src/search.cc (Search::merge, Search::merge_sort,
+	Search::compute_occurrence, Search::already_determined,
+	Search::keyword_list_length, Search::max_key_length,
+	Search::get_max_keysig_size, Search::compute_hash,
+	Search::sort_by_occurrence): Declare as const.
+
+	* src/output.cc (Output::output): Set char_to_index to a cast in all
+	cases. Avoids gcc warnings on the generated code.
+
+	* src/output.cc (Output_Enum): Prepend an underscore to field names.
+	(Output_Expr1): Likewise.
+	(Output::output_hash_function): Simplify the special case for "-k 1,$".
+
+	* src/search.h (Search::init_asso_values, Search::find_asso_values):
+	New declarations.
+	(Search::try_asso_value): Renamed from Search::affects_prev.
+	(Search::change_some_asso_value): Renamed from Search::change.
+	(Search::set_asso_max, Search::get_asso_max): Remove methods.
+	(Search::_union_set): New field.
+	* src/search.cc (Search::init_asso_values): New method, extracted
+	from Search::optimize.
+	(Search::try_asso_value): Renamed from Search::affects_prev. Take the
+	iteration count as argument.
+	(Search::change_some_asso_value): Renamed from Search::change. Don't
+	make union_set static. Don't increment _fewest_collisions here.
+	(Search::find_asso_values): New method, extracted from
+	Search::optimize.
+	(Search::optimize); Update.
+
+	* src/search.h (Search::compute_hash): Renamed from Search::hash.
+	(Search::compute_disjoint_union): Remove declaration.
+	(Search::sort_by_occurrence): Renamed from Search::sort_set.
+	* src/search.cc (Search::compute_hash): Renamed from Search::hash.
+	(compute_disjoint_union): Renamed from Search::compute_disjoint_union.
+	(Search::sort_by_occurrence): Renamed from Search::sort_set.
+	(Search::change): Simplify loop.
+
+	* src/search.h (Search::clear_determined): New declaration.
+	* src/search.cc (Search::clear_determined): New method.
+	(Search::already_determined): Optimize.
+	(Search::reorder): Even when the next keyword after the current one
+	is completely determined, move all determined keywords after the
+	current one.
+
+	Compute the occurrences after removal of duplicates, not before.
+	* src/keyword.h (KeywordExt::init_selchars): Remove occurrences
+	argument.
+	* src/keyword.cc (KeywordExt::init_selchars): Likewise.
+	* src/search.cc (Search::prepare): Reorder the code. Compute the
+	occurrences after removal of duplicates.
+	(Search::merge_sort): Optimize the loop.
+	(Search::compute_occurrence): Renamed from Search::get_occurrence.
+	* src/search.h (Search::compute_occurrence): Renamed from
+	Search::get_occurrence.
+	* tests/chill.exp: Regenerated.
+
+	Bug fix: The hash table could fail to detect duplicates, between
+	keywords of different length, when option -n (option[NOLENGTH]) was
+	given.
+	* src/hash-table.h (Hash_Table::Hash_Table): Pass table size, not
+	vector and vector size as arguments.
+	(Hash_Table::_log_size): New field.
+	(Hash_Table::equal): New declaration.
+	* src/hash-table.cc (size_factor): New variable.
+	(Hash_Table::Hash_Table): Pass table size, not vector and vector size
+	as arguments. Allocate the vector here.
+	(Hash_Table::~Hash_Table): Deallocate the vector here.
+	(Hash_Table::equal): New function.
+	(Hash_Table::insert): Use it. Don't use item->_allchars_length for the
+	increment if _ignore_length is true.
+	* src/search.cc (TABLE_MULTIPLE): Remove variable.
+	(Search::prepare): Update.
+
+2002-11-02  Bruno Haible  <bruno at clisp.org>
+
+	Provide documentation also in PDF format.
+	* doc/Makefile.in (pdfdir, TEXI2PDF): New variables.
+	(all): Depend on pdf.
+	(pdf, gperf.pdf): New rules.
+	(maintainer-clean): Remove the PDF file.
+
+	* src/keyword-list.icc: New file, extracted from keyword-list.h.
+	* src/keyword-list.h: Include keyword-list.icc. Move inline methods
+	to there.
+	* src/keyword-list.cc: Include keyword-list.icc.
+	* src/Makefile.in (KEYWORD_LIST_H): Add keyword-list.icc.
+
+	* lib/hashpjw.h (hashpjw): Change argument type to 'unsigned char *'.
+	* lib/hash.cc (hashpjw): Likewise.
+	* src/keyword.icc: New file.
+	* src/keyword.h: Include keyword.icc.
+	(KeywordExt::_selchars): Change type to 'unsigned char *'.
+	* src/keyword.cc: Include keyword.icc.
+	(Keyword::Keyword, KeywordExt::KeywordExt): Move to keyword.icc.
+	(sort_char_set): Change argument type to 'unsigned char *'.
+	(KeywordExt::init_selchars): Update.
+	* src/search.h (Search::compute_disjoint_union): Change argument types
+	to 'unsigned char *'.
+	(Search::sort_set): Likewise.
+	(Search::affects_prev): Change argument type to 'unsigned char'.
+	* src/search.cc (Search::prepare): Initialize _duplicate_link here.
+	(Search::get_occurrence, Search::set_determined,
+	Search::already_determined, Search::hash): Update.
+	(Search::compute_disjoint_union): Change argument types to
+	'unsigned char *'.
+	(Search::sort_set): Likewise.
+	(Search::affects_prev): Change argument type to 'unsigned char'.
+	(Search::change): Update.
+	* src/Makefile.in (KEYWORD_H): Add keyword.icc.
+
+	* src/options.cc (Options::parse_options): Fix error message.
+
+	* src/read-line.h (Read_Line::Read_Line): Make FILE* argument
+	mandatory. Move body to read-line.icc.
+	* src/read-line.icc (Read_Line::Read_Line): New constructor.
+	* src/input.h (Input::Input): Add FILE* argument.
+	* src/input.cc (Input::Input): Likewise.
+	* src/main.cc (main): Pass stdin to Input constructor.
+
+	* src/options.h (DEFAULTCHARS): Remove.
+	(Positions::MAX_KEY_POS): Set to 255.
+	(Positions::_positions): Increase array size.
+	(PositionIterator::EOS): Set to -1.
+	(PositionIterator::_index): Change type to 'unsigned int'.
+	* src/options.icc (Positions::Positions): Don't store
+	PositionIterator::EOS.
+	(PositionIterator::next): Produce PositionIterator::EOS here.
+	* src/options.cc (Options::long_usage): Use MAX_KEY_POS, not
+	MAX_KEY_POS-1.
+	(PositionStringParser): Rename field _size to _in_range. Rename
+	field _curr_value to _range_curr_value. Rename field _upper_bound
+	to _range_upper_bound.
+	(PositionStringParser::nextPosition): Comments.
+	(Options::Options): Update.
+	(Options::~Options): Update.
+	(long_options): Use NULL, not 0.
+	(Options::parse_options): Set BAD_VALUE to -2; -1 is now EOS. Bug fix:
+	Check against array overflow when more than MAX_KEY_POS positions are
+	given. Don't store PositionIterator::EOS.
+	Check against extra arguments before opening the input file.
+	* src/output.cc (Output::output_hash_function): Change test which
+	was for option[DEFAULTCHARS].
+	* tests/test-6.exp: Update.
+
+	* src/options.h (Options::get_delimiters): Renamed from
+	Options::get_delimiter.
+	* src/options.icc (Options::get_delimiters): Renamed from
+	Options::get_delimiter.
+	* src/input.cc (Input::read_keys): Update.
+
+	Bug fix.
+	* src/options.cc (Options::print_options): Escape backquote inside
+	double-quoted strings.
+
+	Bug fix.
+	* src/keyword.cc (KeywordExt::init_selchars): Avoid comparison with
+	uninitialized member variable. Found with 'valgrind'.
+
+	* src/version.cc: Include version.h.
+	* src/Makefile.in (OBJECTS): Reorder.
+	(KEYWORD_H, KEYWORD_LIST_H, INPUT_H, SEARCH_H, OUTPUT_H): New
+	variables.
+	(HASH_TABLE_H): Update.
+	(options.o, read-line.o, keyword.o, keyword-list.o, input.o, search.o,
+	output.o, main.o): Update dependencies.
+
+	* src/vectors.h: Remove file.
+	* src/vectors.cc: Remove file.
+	* src/search.h: Don't include vectors.h.
+	(Search): Don't inherit from Vectors. New fields _alpha_size,
+	_occurrences, _asso_values.
+	(Search::_determined, Search::get_occurrence, Search::set_determined,
+	Search::already_determined, Search::hash, Search::sort_set): Make
+	nonstatic.
+	* src/search.cc (Search::Search): Initialize _alpha_size, _occurrences,
+	_asso_values, _determined.
+	(Search::optimize, Search::~Search): Update.
+	* src/output.h: Don't include vectors.h.
+	(Output): Remove field _v. New fields _alpha_size, _occurrences,
+	_asso_values.
+	(Output::Output): Replace Vectors* argument with alpha_size,
+	occurrences, asso_values.
+	* src/output.cc (Output::Output): Replace Vectors* argument with
+	alpha_size, occurrences, asso_values.
+	(Output::output_hash_function): Update.
+	* src/main.cc (main): Don't set Vectors::ALPHA_SIZE.
+	Pass _alpha_size, _occurrences, _asso_values from Search to Output.
+	* src/keyword.h: Don't include vectors.h.
+	* src/Makefile.in (OBJECTS): Remove vectors.o.
+	(VECTORS_H): Remove variable.
+	(vectors.o): Remove rule.
+
+	* src/search.h: New file, combines src/key-list.h, src/gen-perf.h.
+	* src/search,cc: New file, combines src/key-list.cc, src/gen-perf.cc.
+	* src/key-list.h: Remove file.
+	* src/key-list.cc: Remove file.
+	* src/gen-perf.h: Remove file.
+	* src/gen-perf.cc: Remove file.
+	* src/main.cc (KeywordExt_Factory): Moved here from gen-perf.cc.
+	(main): Inline some code from gen-perf.cc.
+	* src/keyword.h (KeywordExt::init_selchars): Take the occurrences
+	vector as argument.
+	* src/keyword.cc (KeywordExt::init_selchars): Take the occurrences
+	vector as argument.
+	* src/input.cc (Input::set_output_types): Initialize _array_type,
+	_return_type, _struct_tag.
+	(Input::read_keys): Initialize _additional_code.
+	* src/Makefile.in (OBJECTS): Add search.o.
+	Remove key-list.o, gen-perf.o.
+	(KEY_LIST_H, GEN_PERF_H): Remove variables.
+	(gen-perf.o, key-list.o): Remove rules.
+	(search.o): New rule.
+
+	* *, */*: Update copyright notice to GPL version 2.
+
+	* src/keyword-list.h (Keyword_List): New class.
+	(KeywordExt_List): Inherit from it.
+	* src/keyword-list.cc (Keyword_List::Keyword_List): New constructor.
+	(KeywordExt_List::KeywordExt_List): Update.
+	* src/input.h (Input::Input): Add Keyword_Factory argument.
+	(Input::_factory): New field.
+	(Input::_head): Change type to Keyword_List*.
+	(Input::parse_line): New declaration.
+	* src/input.cc (Input::Input): New constructor.
+	(Input::parse_line): Renamed from parse_line. Use the _factory.
+	(Input::read_keys): Update.
+	* src/key-list.cc (KeywordExt_Factory): New class.
+	(Key_List::read_keys): Pass a KeywordExt_Factory as Input constructor
+	argument.
+
+	Avoid g++ -Wold-style-cast warnings.
+	* src/bool-array.icc: Use new-style casts.
+	* src/gen-perf.cc: Likewise.
+	* src/input.cc: Likewise.
+	* src/key-list.cc: Likewise.
+	* src/keyword.cc: Likewise.
+	* src/options.cc: Likewise.
+	* src/output.cc: Likewise.
+	* src/hash-table.cc: Likewise. Remove (char *) cast in memset argument.
+
+	* src/keyword-list.h (KeywordExt_List): Don't inherit from KeywordExt.
+	(KeywordExt_List::KeywordExt_List): Take a KeywordExt* as argument.
+	(KeywordExt_List::_car): New field.
+	(KeywordExt_List::first): Use it.
+	* src/keyword-list.cc (KeywordExt_List::KeywordExt_List): Take a
+	KeywordExt* as argument.
+	* src/input.cc (parse_line): Create the KeywordExt separately.
+
+	Start using bool.
+	* src/bool-array.h (Bool_Array::set_bit): Change return type to bool.
+	* src/bool-array.icc (Bool_Array::set_bit): Likewise.
+	* src/gen-perf.h (Gen_Perf::affects_prev): Likewise.
+	* src/gen-perf.cc (Gen_Perf::affects_prev): Likewise.
+	* src/hash-table.h (Hash_Table::_ignore_length): Change type to bool.
+	(Hash_Table::Hash_Table): Change 3rd argument type to bool.
+	* src/hash-table.cc (Hash_Table::Hash_Table): Likewise.
+	* src/input.h (Input::_additional_code): Change type to bool.
+	* src/input.cc (Input::read_keys): Update.
+	* src/key-list.h (Key_List::_occurrence_sort, Key_List::_hash_sort,
+	Key_List::_additional_code): Change type to bool.
+	(Key_List::_determined): Change element type to bool.
+	(Key_List::already_determined): Change return type to bool.
+	* src/key-list.cc (Key_List::_determined): Change element type to bool.
+	(Key_List::set_determined): Update.
+	(Key_List::already_determined): Change return type to bool.
+	(Key_List::reorder, Key_List::sort, Key_List::Key_List): Update.
+	* src/options.h (Positions::sort): Change return type to bool.
+	(Options::operator[]): Likewise.
+	* src/options.icc (Positions::sort): Change return type to bool.
+	(Options::operator[]): Likewise.
+	* src/output.h (Output::Output): Change 5th argument type to bool.
+	(Output::_additional_code): Change type to bool.
+	* src/output.cc (Output::Output): Change 5th argument type to bool.
+
+2002-10-16  Bruno Haible  <bruno at clisp.org>
+
+	* src/*.h: Align all member names at column 24.
+
+2002-10-15  Bruno Haible  <bruno at clisp.org>
+
+	* src/input.h: New file.
+	* src/input.cc: New file, extracted from key-list.cc.
+	* src/key-list.h (Key_List): Don't inherit from Read_Line.
+	(Key_List::get_special_input,
+	Key_List::save_include_src, Key_List::get_array_type,
+	Key_List::strcspn, Key_List::set_output_types): Remove methods.
+	* src/key-list.cc (Key_List::get_special_input,
+	Key_List::save_include_src, Key_List::get_array_type,
+	Key_List::strcspn, Key_List::set_output_types, parse_line): Move to
+	src/input.cc.
+	(Key_List::read_keys): Use Input::read_keys.
+	(Key_List::Key_List): Update.
+	* src/gen-perf.cc: Update.
+	* src/Makefile.in (OBJECTS): Add input.o.
+	(input.o): New rule.
+
+2002-10-14  Bruno Haible  <bruno at clisp.org>
+
+	* src/options.cc: Don't include "vector.h".
+	(Options::parse_options): Don't initialize Vectors::ALPHA_SIZE here.
+	* src/vectors.cc (Vectors::ALPHA_SIZE): Don't initialize here.
+	* src/gen-perf.cc (Gen_Perf::Gen_Perf): Initialize Vectors::ALPHA_SIZE.
+
+	* src/options.h (Positions): New class.
+	(PositionIterator): New class.
+	(Options::parse_options): Renamed from Options::operator().
+	(Options::get_asso_max, Options::set_asso_max): Move to class Key_List.
+	(Options::reset, Options::get): Remove, replaced by class
+	PositionIterator.
+	(Options::get_initial_asso_value): Renamed from Options::initial_value.
+	(Options::key_sort): Remove, replaced by Positions::sort.
+	(Options): Make all fields and methods non-static.
+	* src/options.icc (Positions::Positions, Positions::operator[],
+	Positions::get_size, Positions::pointer, Positions::set_size,
+	Positions::sort, PositionIterator::PositionIterator,
+	PositionIterator::next): New methods.
+	(Options::get_initial_asso_value): Renamed from Options::initial_value.
+	(Options::get_size_multiple): New method.
+	(Options::get_key_positions): New method.
+	(Options::get_max_keysig_size): Implement using _key_positions.
+	* src/options.cc (Options::long_usage): Split big string into small
+	pieces.
+	(PositionStringParser): Prefix field names with _.
+	(Options::Options): Update.
+	(Options::~Options): Fix explanation of of _size_multiple. Don't print
+	_key_positions if it is effectively ignored.
+	(Options::parse_options): Renamed from Options::operator(). Update.
+	* src/key-list.h (Key_List): New field _size. New methods get_asso_max,
+	set_asso_max, get_max_keysig_size.
+	* src/key-list.cc (Key_List::read_keys): Don't make side effects on
+	options.
+	(Key_List::dump): Use Key_List::get_max_keysig_size() instead of
+	Options::get_max_keysig_size().
+	(Key_List::get_max_keysig_size): New function.
+	* src/hash-table.cc (Hash_Table::~Hash_Table): Compute the field
+	width on the fly if option[ALLCHARS].
+	* src/gen-perf.cc (Gen_Perf::Gen_Perf): Update,
+	Use Options::get_size_multiple() instead of Options::get_asso_max().
+	Use Key_List::get_asso_max() instead of Options::get_asso_max(). Use
+	Key_List::get_max_keysig_size() instead of
+	Options::get_max_keysig_size().
+	(Gen_Perf::affects_prev): Likewise.
+	(Gen_Perf::change): Likewise.
+	* src/keyword.cc: Update.
+	* src/main.cc: Update.
+	* src/output.cc: Update.
+	* tests/test-6.exp: Update.
+
+2002-10-13  Bruno Haible  <bruno at clisp.org>
+
+	* src/bool-array.*: Some polishing.
+
+	* src/options.h (Options::operator=, Options::operator!=): Remove
+	unused methods.
+	* src/options.icc (Options::operator=, Options::operator!=): Remove.
+
+	* src/*.h: Prefix all field names with _.
+	* src/*.cc, src/*.icc: Update.
+
+	* src/*: Simplify declarations of functions without arguments.
+
+2002-10-04  Bruno Haible  <bruno at clisp.org>
+
+	* src/output.h: New file, extracted from key-list.h.
+	* src/output.cc: New file, extracted from key-list.cc.
+	* src/key-list.h (Key_List): Make some fields protected. Move output
+	routines to src/output.h.
+	* src/key-list.cc: Move output routines to src/output.cc.
+	* src/gen-perf.cc (Gen_Perf::doit_all): Use class Output.
+	* src/Makefile.in (OBJECTS): Add output.o.
+	(output.o): New rule.
+
+2002-10-03  Bruno Haible  <bruno at clisp.org>
+
+	* src/iterator.h: Remove file.
+	* src/iterator.cc: Remove file.
+	* src/options.cc: (PositionStringParser): New class, taken from old
+	iterator.cc.
+	* src/Makefile.in (OBJECTS): Remove iterator.o.
+	(ITERATOR_H): Remove variable.
+	(iterator.o): Remove rule.
+
+	* src/keyword-list.h: New file.
+	* src/keyword-list.cc: New file.
+	* src/list-node.h: Remove file.
+	* src/list-node.cc: Remove file.
+	* src/keyword.h (KeywordExt::init_selchars): New declaration.
+	* src/keyword.cc (sort_char_set, KeywordExt::init_selchars): New, from
+	old list-node.cc.
+	* src/gen-perf.cc: Replace List_Node by KeywordExt or KeywordExt_List,
+	as appropriate.
+	* src/hash-table.h: Likewise.
+	* src/key-list.h: Likewise.
+	* src/key-list.cc: Likewise.
+	* src/Makefile.in (OBJECTS): Remove list-node.o, add keyword-list.o.
+	(LIST_NODE_H): Remove macro.
+	(list-node.o): Remove rule.
+	(keyword-list.o): New rule.
+
+	* src/keyword.h (KeywordExt): New class.
+	* src/keyword.cc (KeywordExt): New constructor.
+	* src/list-node.h (List_Node): Inherit from KeywordExt.
+	* src/list-node.cc: Update.
+	* src/gen-perf.cc: Update.
+	* src/hash-table.cc: Update.
+	* src/key-list.cc: Update.
+	(output_keyword_entry): Change argument type to KeywordExt*.
+
+	* src/keyword.h: New file.
+	* src/keyword.cc: New file.
+	* src/list-node.h (List_Node): Extend Keyword.
+	* src/list-node.cc: Update.
+	* src/gen-perf.cc: Update.
+	* src/hash-table.cc: Update.
+	* src/key-list.cc: Update.
+	* src/Makefile.in (OBJECTS): Add keyword.o.
+	(keyword.o): New rule.
+
+	* src/key-list.cc (Key_List::read_keys): Allocate the memory for the
+	hash table using 'new'.
+	(Key_List::output_lookup_array): Allocate the memory for the duplicates
+	array using 'new'.
+	* src/options.h (LARGE_STACK_ARRAYS): Remove definition.
+	* src/main.cc (main): Remove setrlimit call.
+	* src/configure.in: Don't test for unistd.h, sys/time.h,
+	sys/resource.h, getrlimit, setrlimit.
+
+	* src/bool-array.h (Bool_Array): Make all members non-static.
+	Add an argument to the constructor. Remove init(), rename reset() to
+	clear(), rename find() to set_bit().
+	* src/bool-array.icc: Move init() code into the constructor.
+	Rename reset() to clear(), rename find() to set_bit().
+	* src/gen-perf.h (Gen_Perf): Add collision_detector member.
+	* src/gen-perf.cc: Update.
+
+	* src/gen-perf.h (Gen_Perf::doit_all): Renamed from
+	Gen_Perf::operator ().
+	* src/gen-perf.cc (Gen_Perf::doit_all): Renamed from
+	Gen_Perf::operator ().
+	* src/main.cc: Update.
+
+	* src/read-line.h (Read_Line::read_next_line): Renamed from
+	Read_Line::get_line.
+	* src/read-line.icc: Likewise.
+	* src/read-line.cc: Update.
+	* src/key-list.cc: Update.
+
+	* lib/getline.h: New file.
+	* lib/getline.cc: New file.
+	* lib/Makefile.in (OBJECTS): Add getline.o.
+	(getline.o): New rule.
+	* src/read-line.h (Read_Line::readln_aux): Remove declaration.
+	* src/read-line.cc (Read_Line::readln_aux): Remove function.
+	* src/read-line.icc (Read_Line::get_line): Use ::get_line.
+	* src/options.h (LARGE_STACK): Remove macro.
+
+	* src/bool-array.h (STORAGE_TYPE): Remove type.
+	Use 'unsigned int' instead of STORAGE_TYPE.
+	* src/bool-array.cc: Likewise.
+	* src/bool-array.icc: Likewise.
+	* src/gen-perf.cc: Likewise.
+
+	* src/new.cc: Remove file.
+	* src/Makefile.in (OBJECTS): Remove new.o.
+	(new.o): Remove rule.
+	* src/configure.in: Remove test for HAVE_THROW_DECL.
+	* acconfig.h: Remove file.
+
+	* src/trace.h: Remove file.
+	* src/trace.cc: Remove file.
+	* src/Makefile.in (OBJECTS): Remove trace.o.
+	(TRACE_H): Remove variable.
+	(trace.o): Remove rule.
+	Update all dependencies.
+	* src/bool-array.h, src/bool-array.cc, src/bool-array.icc: Don't use T.
+	* src/gen-perf.cc: Likewise.
+	* src/hash-table.cc: Likewise.
+	* src/iterator.cc: Likewise.
+	* src/key-list.cc: Likewise.
+	* src/list-node.cc: Likewise.
+	* src/main.cc: Likewise.
+	* src/new.cc: Likewise.
+	* src/options.h, src/options.cc, src/options.icc: Likewise.
+	* src/read-line.h, src/read-line.cc, src/read-line.icc: Likewise.
+
+	* tests/Makefile.in: Use gperf option -I, to avoid gcc-3.x warnings.
+	* tests/test.c: Don't use gets(), to avoid warnings.
+
+2001-08-02  Bruno Haible  <bruno at linuix.math.u-bordeaux.fr>
+
+	* doc/gperf.texi: Change bug report address to <bug-gnu-gperf at gnu.org>.
+	* README: Updated.
+
+2000-12-18  Bruno Haible  <bruno at linuix.math.u-bordeaux.fr>
+
+        * src/configure.in: Add check for rand() in libm. Needed for BeOS.
+        * src/Makefile.in (LIBS): Use @[email protected] instead of hardwiring -lm.
+
+2000-11-20  Bruno Haible  <bruno at linuix.math.u-bordeaux.fr>
+
+        * doc/help2man: Update to version 1.23.
+
 2000-09-26  Bruno Haible  <bruno at linuix.math.u-bordeaux.fr>
 
         * gperf-2.7.2 released.
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/FREEBSD-Xlist
--- a/head/contrib/gperf/FREEBSD-Xlist	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/FREEBSD-Xlist	Tue Dec 06 20:26:16 2011 +0200
@@ -1,4 +1,4 @@
-$FreeBSD$
+$FreeBSD: head/contrib/gperf/FREEBSD-Xlist 228068 2011-11-28 14:23:09Z bapt $
 */*.dvi
 */*.html
 */*.info
@@ -6,3 +6,7 @@
 */texinfo.tex
 */tests
 */getopt*
+*/*.pdf
+*/*.vms
+*/*.msvc
+*/*.woe32
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/INSTALL
--- a/head/contrib/gperf/INSTALL	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/INSTALL	Tue Dec 06 20:26:16 2011 +0200
@@ -19,8 +19,8 @@
 be considered for the next release.  If at some point `config.cache'
 contains results you don't want to keep, you may remove or edit it.
 
-   The file `configure.in' is used to create `configure' by a program
-called `autoconf'.  You only need `configure.in' if you want to change
+   The file `configure.ac' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.ac' if you want to change
 it or regenerate `configure' using a newer version of `autoconf'.
 
 The simplest way to compile this package is:
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/Makefile.devel
--- a/head/contrib/gperf/Makefile.devel	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/Makefile.devel	Tue Dec 06 20:26:16 2011 +0200
@@ -4,32 +4,38 @@
 SHELL = /bin/sh
 MAKE = make
 
-all : configures src/config.h.in doc/gperf.1
+all : configures src/config.h.in src/config.h.msvc src/config.h_vms doc/gperf.1
 
 CONFIGURES = configure lib/configure src/configure tests/configure doc/configure
 
 configures : $(CONFIGURES)
 
-configure : configure.in aclocal.m4
-	autoconf -l .
+configure : configure.ac aclocal.m4
+	autoconf -I .
 
-lib/configure : lib/configure.in aclocal.m4
-	cd lib && autoconf -l ..
+lib/configure : lib/configure.ac aclocal.m4
+	cd lib && autoconf -I ..
 
-src/configure : src/configure.in aclocal.m4
-	cd src && autoconf -l ..
+src/configure : src/configure.ac aclocal.m4
+	cd src && autoconf -I ..
 
-tests/configure : tests/configure.in aclocal.m4
-	cd tests && autoconf -l ..
+tests/configure : tests/configure.ac aclocal.m4
+	cd tests && autoconf -I ..
 
-doc/configure : doc/configure.in aclocal.m4
-	cd doc && autoconf -l ..
+doc/configure : doc/configure.ac aclocal.m4
+	cd doc && autoconf -I ..
 
 check-configures : $(CONFIGURES)
 	set -e; for f in $(CONFIGURES); do bash -x -n $$f; done
 
-src/config.h.in : src/configure.in aclocal.m4
-	cd src && autoheader -l ..
+src/config.h.in : src/configure.ac aclocal.m4
+	cd src && autoheader -I ..
+
+src/config.h.msvc : src/config.h.in
+	cp src/config.h.in src/config.h.msvc
+
+src/config.h_vms : src/config.h.in
+	cp src/config.h.in src/config.h_vms
 
 doc/gperf.1 : force
 	prog=`PATH=build/src:src:$$PATH which gperf`; if test -n "$$prog"; then doc/help2man --name='generate a perfect hash function from a key set' --section=1 $$prog > doc/gperf.1; fi
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/Makefile.in
--- a/head/contrib/gperf/Makefile.in	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/Makefile.in	Tue Dec 06 20:26:16 2011 +0200
@@ -1,13 +1,14 @@
 # Makefile for gperf
 
-# Copyright (C) 1989, 1992, 1993, 1998 Free Software Foundation, Inc.
-# written by Douglas C. Schmidt (schmidt at ics.uci.edu)
+# Copyright (C) 1989, 1992, 1993, 1998, 2002 Free Software Foundation, Inc.
+# Written by Douglas C. Schmidt <schmidt at ics.uci.edu>
+# and Bruno Haible <bruno at clisp.org>.
 #
 # This file is part of GNU GPERF.
 #
 # GNU GPERF 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 1, or (at your option)
+# the Free Software Foundation; either version 2, or (at your option)
 # any later version.
 #
 # GNU GPERF is distributed in the hope that it will be useful,
@@ -16,8 +17,9 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GNU GPERF; see the file COPYING.  If not, write to
-# Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# along with this program; see the file COPYING.
+# If not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #### Start of system configuration section. ####
 
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/NEWS
--- a/head/contrib/gperf/NEWS	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/NEWS	Tue Dec 06 20:26:16 2011 +0200
@@ -1,3 +1,73 @@
+New in 3.0.3:
+
+* The generated C code is compatible with gcc-4.3.x in c99 or gnu99 mode.
+
+New in 3.0.2:
+
+* Compiles with g++-4.0.x.
+* Added option --length-table-name.
+* Added declaration %define length-table-name.
+* Fixed  #line directives for filenames containing backslashes.
+
+New in 3.0.1:
+
+* Bug fix.
+
+New in 3.0:
+
+* Added option --output that allows to specify the output file name.
+* Some options have been renamed:
+    --hash-fn-name=NAME     -->   --hash-function-name=NAME
+    --lookup-fn-name=NAME   -->   --lookup-function-name=NAME
+    --compare-strlen        -->   --compare-lengths
+    --global                -->   --global-table
+  The older variants are still supported for backward compatibility.
+* The following options can now be specified inside the input file:
+    %delimiters=DELIMITER-LIST
+    %struct-type
+    %ignore-case
+    %language=LANGUAGE-NAME
+    %define slot-name NAME
+    %define initializer-suffix INITIALIZERS
+    %define hash-function-name NAME
+    %define lookup-function-name NAME
+    %define class-name NAME
+    %7bit
+    %compare-lengths
+    %compare-strncmp
+    %readonly-tables
+    %enum
+    %includes
+    %global-table
+    %pic
+    %define string-pool-name NAME
+    %null-strings
+    %define word-array-name NAME
+    %switch=COUNT
+    %omit-struct-type
+* When the option -k is not given, the default key positions are now
+  computed depending on the set of keywords.
+* If the input file is given by name, the output file will now contain
+  #line directives referring to the input file.
+* Some keyword sets containing permutations, like { "xy", "yx", "xz", "zx" }
+  or { "abc", "acb", "bca", "cab" }, are now handled by gperf without
+  requiring the option -D.
+* The generated table is usually much smaller than it was with earlier
+  versions of gperf.
+* Added option -m/--multiple-iterations that allows to further reduce the
+  size of the generated table.
+* When the search for a good hash function is not immediately successful,
+  the table's size will grow as needed. Earlier versions of gperf bailed
+  out with an "Internal error, duplicate hash code value".
+* The options -f/--fast and -o/--occurrence-sort have no effect any more.
+* Added options -P/--pic and --null-strings that optimize the generated code
+  for use in shared libraries. -P/--pic does a perfect optimization but may
+  require some small code changes (see the documentation for details), whereas
+  --null-strings does only a half-hearted optimization but works without
+  needing any change to surrounding code.
+* Added option --ignore-case that produces a case independent lookup function.
+* Bug fixes.
+
 New in 2.7.2:
 
 * Keywords may now be enclosed in double quotes; this permits the use of
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/README
--- a/head/contrib/gperf/README	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/README	Tue Dec 06 20:26:16 2011 +0200
@@ -22,8 +22,7 @@
 ftp://ftp.gnu.org/pub/gnu/standards.*, especially the 'Makefile
 Conventions', 'Configuration', and 'User Interfaces' sections.
 
-Mail suggestions and bug reports to both <bug-gnu-utils at gnu.org> and
-<gperf-bugs at lists.sourceforge.net>.  When reporting bugs, please
-include in the subject line the package name and version (output of
-'gperf --version') for which you found a problem.
+Mail suggestions and bug reports to <bug-gnu-gperf at gnu.org>.  When
+reporting bugs, please include in the subject line the package name
+and version (output of 'gperf --version') for which you found a problem.
 
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/acconfig.h
--- a/head/contrib/gperf/acconfig.h	Tue Dec 06 20:03:07 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-
-/* Define if the C++ compiler supports "throw ()" declarations.  */
-#undef HAVE_THROW_DECL
-
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/aclocal.m4
--- a/head/contrib/gperf/aclocal.m4	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/aclocal.m4	Tue Dec 06 20:26:16 2011 +0200
@@ -1,7 +1,5 @@
 AC_PREREQ(2.12)
 
-AC_DEFUN(CL_PROG_RANLIB, [AC_CHECK_PROG(RANLIB, ranlib, ranlib, true)])
-
 AC_DEFUN(CL_PROG_INSTALL,
 [dnl This is mostly copied from AC_PROG_INSTALL.
 # Find a good install program.  We prefer a C program (faster),
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/configure
--- a/head/contrib/gperf/configure	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/configure	Tue Dec 06 20:26:16 2011 +0200
@@ -1,26 +1,637 @@
 #! /bin/sh
-
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.61.
 #
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+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
+}
+
+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.
+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; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+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+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+  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+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+  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.
+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
+
+      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+"[email protected]"}
+fi
+
+
+    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
+
+
+fi
+
+fi
+
+
+
+(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
+}
+
+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.
+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
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
 ac_default_prefix=/usr/local
-# Any additions from configure.in:
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="doc/gperf.1"
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+SET_MAKE
+subdirs
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias'
+ac_subdirs_all='lib src tests doc'
 
 # Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
 exec_prefix=NONE
-host=NONE
 no_create=
-nonopt=NONE
 no_recursion=
 prefix=NONE
 program_prefix=NONE
@@ -29,94 +640,117 @@
 silent=
 site=
 srcdir=
-target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
-
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
+    eval $ac_prev=\$ac_option
     ac_prev=
     continue
   fi
 
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case "$ac_option" in
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
+    bindir=$ac_optarg ;;
 
   -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
+    ac_prev=build_alias ;;
   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
+    build_alias=$ac_optarg ;;
 
   -cache-file | --cache-file | --cache-fil | --cache-fi \
   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
     ac_prev=cache_file ;;
   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -125,116 +759,77 @@
   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
   | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
+    exec_prefix=$ac_optarg ;;
 
   -gas | --gas | --ga | --g)
     # Obsolete; use --with-gas.
     with_gas=yes ;;
 
-  -help | --help | --hel | --he)
-    # 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 << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
 
   -host | --host | --hos | --ho)
-    ac_prev=host ;;
+    ac_prev=host_alias ;;
   -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
 
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
   | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
+    includedir=$ac_optarg ;;
 
   -infodir | --infodir | --infodi | --infod | --info | --inf)
     ac_prev=infodir ;;
   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
+    infodir=$ac_optarg ;;
 
   -libdir | --libdir | --libdi | --libd)
     ac_prev=libdir ;;
   -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
+    libdir=$ac_optarg ;;
 
   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
   | --libexe | --libex | --libe)
     ac_prev=libexecdir ;;
   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
   | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
 
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
+  | --localstate | --localstat | --localsta | --localst | --locals)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
     ac_prev=mandir ;;
   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
+    mandir=$ac_optarg ;;
 
   -nfp | --nfp | --nf)
     # Obsolete; use --without-fp.
     with_fp=no ;;
 
   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
+  | --no-cr | --no-c | -n)
     no_create=yes ;;
 
   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -248,26 +843,26 @@
   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
+    oldincludedir=$ac_optarg ;;
 
   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     ac_prev=prefix ;;
   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
+    prefix=$ac_optarg ;;
 
   -program-prefix | --program-prefix | --program-prefi | --program-pref \
   | --program-pre | --program-pr | --program-p)
     ac_prev=program_prefix ;;
   -program-prefix=* | --program-prefix=* | --program-prefi=* \
   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
+    program_prefix=$ac_optarg ;;
 
   -program-suffix | --program-suffix | --program-suffi | --program-suff \
   | --program-suf | --program-su | --program-s)
     ac_prev=program_suffix ;;
   -program-suffix=* | --program-suffix=* | --program-suffi=* \
   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
+    program_suffix=$ac_optarg ;;
 
   -program-transform-name | --program-transform-name \
   | --program-transform-nam | --program-transform-na \
@@ -284,7 +879,17 @@
   | --program-transfo=* | --program-transf=* \
   | --program-trans=* | --program-tran=* \
   | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
 
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
@@ -294,7 +899,7 @@
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
   | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
+    sbindir=$ac_optarg ;;
 
   -sharedstatedir | --sharedstatedir | --sharedstatedi \
   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -305,58 +910,53 @@
   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
   | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
+    sharedstatedir=$ac_optarg ;;
 
   -site | --site | --sit)
     ac_prev=site ;;
   -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
+    site=$ac_optarg ;;
 
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
+    srcdir=$ac_optarg ;;
 
   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
   | --syscon | --sysco | --sysc | --sys | --sy)
     ac_prev=sysconfdir ;;
   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
+    sysconfdir=$ac_optarg ;;
 
   -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
+    ac_prev=target_alias ;;
   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
+    target_alias=$ac_optarg ;;
 
   -v | -verbose | --verbose | --verbos | --verbo | --verb)
     verbose=yes ;;
 
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -367,187 +967,683 @@
     ac_prev=x_includes ;;
   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
+    x_includes=$ac_optarg ;;
 
   -x-libraries | --x-libraries | --x-librarie | --x-librari \
   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
     ac_prev=x_libraries ;;
   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
     ;;
 
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
   *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
     ;;
 
   esac
 done
 
 if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
 fi
 
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
 fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=doc/gperf.1
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
   srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
+  if test ! -r "$srcdir/$ac_unique_file"; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
 fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+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 $as_me, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  $ $0 [email protected]
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in $CONFIG_SITE; do
+shift
+for ac_site_file
+do
   if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file"
   fi
 done
 
 if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
   fi
 else
-  ac_n= ac_c='\c' ac_t=
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
 fi
 
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:526: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftestmake <<\EOF
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
 all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
+	@echo '@@@%%%=$(MAKE)[email protected]@@%%%'
+_ACEOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*[email protected]@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
 fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
   SET_MAKE=
 else
-  echo "$ac_t""no" 1>&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
+
+
+
+ac_aux_dir=$srcdir
+
+subdirs="$subdirs lib src tests doc"
+
+
 extrasub="$extrasub"'
 /@[email protected]/{
 h
@@ -566,349 +1662,1183 @@
 d
 }
 '
-trap '' 1 2 15
-cat > confcache <<\EOF
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
 #
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
 #
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
   else
-    echo "not updating unwritable cache $cache_file"
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
 
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
 # Transform confdefs.h into DEFS.
 # Protect against shell expansion while executing Makefile rules.
 # Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+t clear
+:clear
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+	g
+	s/^\n//
+	s/\n/ /g
+	p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
 : ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
 # Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
 # Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-  case "\$ac_option" in
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 [email protected]
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf at gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
   esac
 done
 
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@[email protected]%$SHELL%g
-s%@[email protected]%$CFLAGS%g
-s%@[email protected]%$CPPFLAGS%g
-s%@[email protected]%$CXXFLAGS%g
-s%@[email protected]%$FFLAGS%g
-s%@[email protected]%$DEFS%g
-s%@[email protected]%$LDFLAGS%g
-s%@[email protected]%$LIBS%g
-s%@[email protected]%$exec_prefix%g
-s%@[email protected]%$prefix%g
-s%@[email protected]%$program_transform_name%g
-s%@[email protected]%$bindir%g
-s%@[email protected]%$sbindir%g
-s%@[email protected]%$libexecdir%g
-s%@[email protected]%$datadir%g
-s%@[email protected]%$sysconfdir%g
-s%@[email protected]%$sharedstatedir%g
-s%@[email protected]%$localstatedir%g
-s%@[email protected]%$libdir%g
-s%@[email protected]%$includedir%g
-s%@[email protected]%$oldincludedir%g
-s%@[email protected]%$infodir%g
-s%@[email protected]%$mandir%g
-s%@[email protected]%$SET_MAKE%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+subdirs!$subdirs$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 41; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
   else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
 done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
 fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @[email protected] from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@[email protected]:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
   esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
-
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
   esac
 
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@[email protected]%$configure_input%g
-s%@[email protected]%$srcdir%g
-s%@[email protected]%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@[email protected]/p
+/@[email protected]/p
+/@[email protected]/p
+/@[email protected]/p
+/@[email protected]/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@[email protected]*|*@[email protected]*|*@infod[email protected]*|*@[email protected]*|*@[email protected]*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@[email protected]&$datadir&g
+  s&@[email protected]&$docdir&g
+  s&@[email protected]&$infodir&g
+  s&@[email protected]&$localedir&g
+  s&@[email protected]&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@[email protected]&$configure_input&;t t
+s&@[email protected]&$ac_top_builddir_sub&;t t
+s&@[email protected]&$ac_srcdir&;t t
+s&@[email protected]&$ac_abs_srcdir&;t t
+s&@[email protected]&$ac_top_srcdir&;t t
+s&@[email protected]&$ac_abs_top_srcdir&;t t
+s&@[email protected]&$ac_builddir&;t t
+s&@[email protected]&$ac_abs_builddir&;t t
+s&@[email protected]&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
+
+
+
+  esac
+
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
 chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+#
+# CONFIG_SUBDIRS section.
+#
 if test "$no_recursion" != yes; then
 
   # Remove --cache-file and --srcdir arguments so they do not pile up.
   ac_sub_configure_args=
   ac_prev=
-  for ac_arg in $ac_configure_args; do
+  eval "set x $ac_configure_args"
+  shift
+  for ac_arg
+  do
     if test -n "$ac_prev"; then
       ac_prev=
       continue
     fi
-    case "$ac_arg" in
+    case $ac_arg in
     -cache-file | --cache-file | --cache-fil | --cache-fi \
     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
       ac_prev=cache_file ;;
     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+    | --c=*)
+      ;;
+    --config-cache | -C)
       ;;
     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
       ac_prev=srcdir ;;
     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
       ;;
-    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+      ac_prev=prefix ;;
+    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+      ;;
+    *)
+      case $ac_arg in
+      *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      esac
+      ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
     esac
   done
 
-  for ac_config_dir in lib src tests doc; do
+  # Always prepend --prefix to ensure using the same prefix
+  # in subdir configurations.
+  ac_arg="--prefix=$prefix"
+  case $ac_arg in
+  *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+  # Pass --silent
+  if test "$silent" = yes; then
+    ac_sub_configure_args="--silent $ac_sub_configure_args"
+  fi
+
+  ac_popdir=`pwd`
+  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
 
     # Do not complain, so a configure script can configure whichever
     # parts of a large source tree are present.
-    if test ! -d $srcdir/$ac_config_dir; then
-      continue
-    fi
-
-    echo configuring in $ac_config_dir
-
-    case "$srcdir" in
-    .) ;;
-    *)
-      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
-      else
-        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
-      fi
-      ;;
-    esac
-
-    ac_popdir=`pwd`
-    cd $ac_config_dir
-
-      # A "../" for each directory in /$ac_config_dir.
-      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
-    case "$srcdir" in
-    .) # No --srcdir option.  We are building in place.
-      ac_sub_srcdir=$srcdir ;;
-    /*) # Absolute path.
-      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
-    *) # Relative path.
-      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
-    esac
+    test -d "$srcdir/$ac_dir" || continue
+
+    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+    echo "$as_me:$LINENO: $ac_msg" >&5
+    echo "$ac_msg" >&6
+    { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+    cd "$ac_dir"
 
     # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_sub_srcdir/configure; then
-      ac_sub_configure=$ac_sub_srcdir/configure
-    elif test -f $ac_sub_srcdir/configure.in; then
-      ac_sub_configure=$ac_configure
+    if test -f "$ac_srcdir/configure.gnu"; then
+      ac_sub_configure=$ac_srcdir/configure.gnu
+    elif test -f "$ac_srcdir/configure"; then
+      ac_sub_configure=$ac_srcdir/configure
+    elif test -f "$ac_srcdir/configure.in"; then
+      # This should be Cygnus configure.
+      ac_sub_configure=$ac_aux_dir/configure
     else
-      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
+      { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
+echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
       ac_sub_configure=
     fi
 
     # The recursion is here.
     if test -n "$ac_sub_configure"; then
-
       # Make the cache file name correct relative to the subdirectory.
-      case "$cache_file" in
-      /*) ac_sub_cache_file=$cache_file ;;
-      *) # Relative path.
-        ac_sub_cache_file="$ac_dots$cache_file" ;;
+      case $cache_file in
+      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+      *) # Relative name.
+	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
       esac
 
-      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
+      { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
       # The eval makes quoting arguments work.
-      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
-      then :
-      else
-        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
-      fi
+      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+	{ { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
+echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
+   { (exit 1); exit 1; }; }
     fi
 
-    cd $ac_popdir
+    cd "$ac_popdir"
   done
 fi
 
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/configure.ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/gperf/configure.ac	Tue Dec 06 20:26:16 2011 +0200
@@ -0,0 +1,55 @@
+dnl autoconf configuration for gperf
+
+dnl Copyright (C) 1998, 2002, 2003, 2005-2007 Free Software Foundation, Inc.
+dnl Written by Douglas C. Schmidt <schmidt at ics.uci.edu>
+dnl and Bruno Haible <bruno at clisp.org>.
+dnl
+dnl This file is part of GNU GPERF.
+dnl
+dnl GNU GPERF is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2, or (at your option)
+dnl any later version.
+dnl
+dnl GNU GPERF is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; see the file COPYING.
+dnl If not, write to the Free Software Foundation, Inc.,
+dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+AC_PREREQ([2.60])
+AC_INIT(doc/gperf.1)
+AC_PROG_MAKE_SET
+AC_OBJEXT
+AC_EXEEXT
+
+dnl An autoconf-2.52 bug: AC_CONFIG_SUBDIRS requires AC_CONFIG_AUX_DIR_DEFAULT.
+ac_aux_dir=$srcdir
+AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])
+AC_CONFIG_SUBDIRS(lib src tests doc)
+
+dnl This piece of sed script replaces every line containing '@[email protected]'
+dnl by several consecutive lines, each referencing one subdir.
+extrasub="$extrasub"'
+/@[email protected]/{
+h
+g
+s/@[email protected]/lib/
+p
+g
+s/@[email protected]/src/
+p
+g
+s/@[email protected]/tests/
+p
+g
+s/@[email protected]/doc/
+p
+d
+}
+'
+AC_OUTPUT(Makefile)
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/configure.in
--- a/head/contrib/gperf/configure.in	Tue Dec 06 20:03:07 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-dnl autoconf configuration for gperf
-
-dnl Copyright (C) 1998 Free Software Foundation, Inc.
-dnl written by Douglas C. Schmidt (schmidt at ics.uci.edu)
-dnl
-dnl This file is part of GNU GPERF.
-dnl
-dnl GNU GPERF is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 1, or (at your option)
-dnl any later version.
-dnl
-dnl GNU GPERF is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU GPERF; see the file COPYING.  If not, write to the
-dnl Free Software Foundation, 59 Temple Place - Suite 330, Boston,
-dnl MA 02111-1307, USA.
-
-AC_INIT(doc/gperf.1)
-AC_PROG_MAKE_SET
-dnl This piece of sed script replaces every line containing '@[email protected]'
-dnl by several consecutive lines, each referencing one subdir.
-extrasub="$extrasub"'
-/@[email protected]/{
-h
-g
-s/@[email protected]/lib/
-p
-g
-s/@[email protected]/src/
-p
-g
-s/@[email protected]/tests/
-p
-g
-s/@[email protected]/doc/
-p
-d
-}
-'
-AC_OUTPUT(Makefile)
-AC_OUTPUT_SUBDIRS(lib src tests doc)
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/doc/Makefile.in
--- a/head/contrib/gperf/doc/Makefile.in	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/doc/Makefile.in	Tue Dec 06 20:26:16 2011 +0200
@@ -1,12 +1,14 @@
 # Makefile for gperf/doc
 
-# Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2002-2003, 2007 Free Software Foundation, Inc.
+# Written by Douglas C. Schmidt <schmidt at ics.uci.edu>
+# and Bruno Haible <bruno at clisp.org>.
 #
 # This file is part of GNU GPERF.
 #
 # GNU GPERF 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 1, or (at your option)
+# the Free Software Foundation; either version 2, or (at your option)
 # any later version.
 #
 # GNU GPERF is distributed in the hope that it will be useful,
@@ -15,8 +17,9 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GNU GPERF; see the file COPYING.  If not, write to the Free
-# Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+# along with this program; see the file COPYING.
+# If not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #### Start of system configuration section. ####
 
@@ -27,14 +30,16 @@
 prefix = @[email protected]
 local_prefix = /usr/local
 exec_prefix = @[email protected]
+datarootdir = @[email protected]
 datadir = @[email protected]
 infodir = @[email protected]
 mandir = @[email protected]
 man1dir = $(mandir)/man1
-docdir = $(prefix)/doc/@[email protected]
-dvidir = $(docdir)
-psdir = $(docdir)
-htmldir = $(docdir)
+docdir = @[email protected]
+dvidir = @[email protected]
+psdir = @[email protected]
+pdfdir = @[email protected]
+htmldir = @[email protected]
 
 # Programs used by "make":
 RM = rm -f
@@ -44,7 +49,8 @@
 TEX = tex
 TEXI2DVI = texi2dvi
 DVIPS = dvips -D600
-MAKEINFO = LANG= LANGUAGE= makeinfo
+TEXI2PDF = texi2pdf
+MAKEINFO = LANG= LC_MESSAGES= LC_ALL= LANGUAGE= makeinfo
 TEXI2HTML = texi2html
 
 # Programs used by "make install":
@@ -59,7 +65,7 @@
 
 VPATH = $(srcdir)
 
-all : info dvi ps html
+all : info ps pdf html
 
 
 info : $(srcdir)/gperf.info
@@ -79,7 +85,15 @@
 ps : $(srcdir)/gperf.ps
 
 $(srcdir)/gperf.ps : $(srcdir)/gperf.dvi
-	$(DVIPS) -o [email protected] $<
+	$(DVIPS) -o [email protected] $(srcdir)/gperf.dvi
+
+
+pdf : $(srcdir)/gperf.pdf
+
+$(srcdir)/gperf.pdf : $(srcdir)/gperf.texi $(srcdir)/gpl.texinfo
+	cd $(srcdir) && $(RM) gperf.aux gperf.toc gperf.cp gperf.fn gperf.ky gperf.pg gperf.tp gperf.vr gperf.log gperf.cps
+	cd $(srcdir) && $(TEXI2PDF) gperf.texi
+	cd $(srcdir) && $(RM) gperf.aux gperf.toc gperf.cp gperf.fn gperf.ky gperf.pg gperf.tp gperf.vr gperf.log gperf.cps
 
 
 html : gperf.html gperf_toc.html
@@ -100,7 +114,9 @@
 #	$(MKINSTALLDIRS) $(DESTDIR)$(dvidir)
 #	$(INSTALL_DATA) $(srcdir)/gperf.dvi $(DESTDIR)$(dvidir)/gperf.dvi
 #	$(MKINSTALLDIRS) $(DESTDIR)$(psdir)
-#	$(INSTALL_DATA) $(srcdir)/gperf.ps $(DESTDIR)$(dvidir)/gperf.ps
+#	$(INSTALL_DATA) $(srcdir)/gperf.ps $(DESTDIR)$(psdir)/gperf.ps
+#	$(MKINSTALLDIRS) $(DESTDIR)$(pdfdir)
+#	$(INSTALL_DATA) $(srcdir)/gperf.pdf $(DESTDIR)$(pdfdir)/gperf.pdf
 	$(MKINSTALLDIRS) $(DESTDIR)$(htmldir)
 	$(INSTALL_DATA) $(srcdir)/gperf.html $(DESTDIR)$(htmldir)/gperf.html
 
@@ -109,6 +125,7 @@
 	$(MKINSTALLDIRS) $(DESTDIR)$(man1dir)
 #	$(MKINSTALLDIRS) $(DESTDIR)$(dvidir)
 #	$(MKINSTALLDIRS) $(DESTDIR)$(psdir)
+#	$(MKINSTALLDIRS) $(DESTDIR)$(pdfdir)
 	$(MKINSTALLDIRS) $(DESTDIR)$(htmldir)
 
 uninstall : force
@@ -116,6 +133,7 @@
 	$(RM) $(DESTDIR)$(man1dir)/gperf.1
 #	$(RM) $(DESTDIR)$(dvidir)/gperf.dvi
 #	$(RM) $(DESTDIR)$(psdir)/gperf.ps
+#	$(RM) $(DESTDIR)$(pdfdir)/gperf.pdf
 	$(RM) $(DESTDIR)$(htmldir)/gperf.html
 
 check : all
@@ -129,7 +147,7 @@
 	$(RM) config.status config.log config.cache Makefile
 
 maintainer-clean : distclean
-	$(RM) *.info *.dvi *.ps *.html
+	$(RM) *.info *.dvi *.ps *.pdf *.html
 
 force :
 
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/doc/configure
--- a/head/contrib/gperf/doc/configure	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/doc/configure	Tue Dec 06 20:26:16 2011 +0200
@@ -1,26 +1,640 @@
 #! /bin/sh
-
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.61.
 #
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
 
-# Defaults:
-ac_help=
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+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
+}
+
+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.
+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; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+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+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+  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+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+  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.
+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
+
+      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+"[email protected]"}
+fi
+
+
+    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
+
+
+fi
+
+fi
+
+
+
+(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
+}
+
+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.
+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
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
 ac_default_prefix=/usr/local
-# Any additions from configure.in:
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="gperf.1"
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+PACKAGE
+SET_MAKE
+INSTALL
+INSTALL_PROGRAM
+INSTALL_DATA
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias'
+
 
 # Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
 exec_prefix=NONE
-host=NONE
 no_create=
-nonopt=NONE
 no_recursion=
 prefix=NONE
 program_prefix=NONE
@@ -29,94 +643,117 @@
 silent=
 site=
 srcdir=
-target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
-
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
+    eval $ac_prev=\$ac_option
     ac_prev=
     continue
   fi
 
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case "$ac_option" in
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
+    bindir=$ac_optarg ;;
 
   -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
+    ac_prev=build_alias ;;
   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
+    build_alias=$ac_optarg ;;
 
   -cache-file | --cache-file | --cache-fil | --cache-fi \
   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
     ac_prev=cache_file ;;
   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
+    cache_file=$ac_optarg ;;
 
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -125,116 +762,77 @@
   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
   | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
+    exec_prefix=$ac_optarg ;;
 
   -gas | --gas | --ga | --g)
     # Obsolete; use --with-gas.
     with_gas=yes ;;
 
-  -help | --help | --hel | --he)
-    # 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 << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
 
   -host | --host | --hos | --ho)
-    ac_prev=host ;;
+    ac_prev=host_alias ;;
   -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
 
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
   | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
+    includedir=$ac_optarg ;;
 
   -infodir | --infodir | --infodi | --infod | --info | --inf)
     ac_prev=infodir ;;
   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
+    infodir=$ac_optarg ;;
 
   -libdir | --libdir | --libdi | --libd)
     ac_prev=libdir ;;
   -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
+    libdir=$ac_optarg ;;
 
   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
   | --libexe | --libex | --libe)
     ac_prev=libexecdir ;;
   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
   | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
 
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
+  | --localstate | --localstat | --localsta | --localst | --locals)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
     ac_prev=mandir ;;
   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
+    mandir=$ac_optarg ;;
 
   -nfp | --nfp | --nf)
     # Obsolete; use --without-fp.
     with_fp=no ;;
 
   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
+  | --no-cr | --no-c | -n)
     no_create=yes ;;
 
   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -248,26 +846,26 @@
   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
+    oldincludedir=$ac_optarg ;;
 
   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     ac_prev=prefix ;;
   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
+    prefix=$ac_optarg ;;
 
   -program-prefix | --program-prefix | --program-prefi | --program-pref \
   | --program-pre | --program-pr | --program-p)
     ac_prev=program_prefix ;;
   -program-prefix=* | --program-prefix=* | --program-prefi=* \
   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
+    program_prefix=$ac_optarg ;;
 
   -program-suffix | --program-suffix | --program-suffi | --program-suff \
   | --program-suf | --program-su | --program-s)
     ac_prev=program_suffix ;;
   -program-suffix=* | --program-suffix=* | --program-suffi=* \
   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
+    program_suffix=$ac_optarg ;;
 
   -program-transform-name | --program-transform-name \
   | --program-transform-nam | --program-transform-na \
@@ -284,7 +882,17 @@
   | --program-transfo=* | --program-transf=* \
   | --program-trans=* | --program-tran=* \
   | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
 
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
@@ -294,7 +902,7 @@
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
   | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
+    sbindir=$ac_optarg ;;
 
   -sharedstatedir | --sharedstatedir | --sharedstatedi \
   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -305,58 +913,53 @@
   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
   | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
+    sharedstatedir=$ac_optarg ;;
 
   -site | --site | --sit)
     ac_prev=site ;;
   -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
+    site=$ac_optarg ;;
 
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
+    srcdir=$ac_optarg ;;
 
   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
   | --syscon | --sysco | --sysc | --sys | --sy)
     ac_prev=sysconfdir ;;
   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
+    sysconfdir=$ac_optarg ;;
 
   -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
+    ac_prev=target_alias ;;
   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
+    target_alias=$ac_optarg ;;
 
   -v | -verbose | --verbose | --verbos | --verbo | --verb)
     verbose=yes ;;
 
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -367,186 +970,674 @@
     ac_prev=x_includes ;;
   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
+    x_includes=$ac_optarg ;;
 
   -x-libraries | --x-libraries | --x-librarie | --x-librari \
   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
     ac_prev=x_libraries ;;
   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
+    x_libraries=$ac_optarg ;;
 
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
     ;;
 
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
   *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
     ;;
 
   esac
 done
 
 if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
 fi
 
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
 do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  eval ac_val=\$$ac_var
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
 done
 
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
 
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
 
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=gperf.1
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
   srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
+  if test ! -r "$srcdir/$ac_unique_file"; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
 fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
 
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+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 $as_me, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  $ $0 [email protected]
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in $CONFIG_SITE; do
+shift
+for ac_site_file
+do
   if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file"
   fi
 done
 
 if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
 else
-  echo "creating cache $cache_file"
-  > $cache_file
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
 fi
 
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 PACKAGE=gperf
 
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:528: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftestmake <<\EOF
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
 all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
+	@echo '@@@%%%=$(MAKE)[email protected]@@%%%'
+_ACEOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*[email protected]@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
 fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
   SET_MAKE=
 else
-  echo "$ac_t""no" 1>&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -560,11 +1651,11 @@
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:565: checking for a BSD compatible install" >&5
+{ echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
+echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6; }
 if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'cl_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+if test "${cl_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
     IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
   for ac_dir in $PATH; do
@@ -602,7 +1693,8 @@
 fi
   INSTALL="$cl_cv_path_install"
 fi
-echo "$ac_t""$INSTALL" 1>&6
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
@@ -613,259 +1705,1006 @@
   esac
 fi
 
-                      trap '' 1 2 15
-cat > confcache <<\EOF
+                      ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
 #
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
 #
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
   else
-    echo "not updating unwritable cache $cache_file"
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
 
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
 # Transform confdefs.h into DEFS.
 # Protect against shell expansion while executing Makefile rules.
 # Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+t clear
+:clear
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+	g
+	s/^\n//
+	s/\n/ /g
+	p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
 
 
-# Without the "./", some shells look in PATH for config.status.
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
 : ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
 
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
 
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-  case "\$ac_option" in
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 [email protected]
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf at gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
   esac
 done
 
-ac_given_srcdir=$srcdir
 
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
 
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@[email protected]%$SHELL%g
-s%@[email protected]%$CFLAGS%g
-s%@[email protected]%$CPPFLAGS%g
-s%@[email protected]%$CXXFLAGS%g
-s%@[email protected]%$FFLAGS%g
-s%@[email protected]%$DEFS%g
-s%@[email protected]%$LDFLAGS%g
-s%@[email protected]%$LIBS%g
-s%@[email protected]%$exec_prefix%g
-s%@[email protected]%$prefix%g
-s%@[email protected]%$program_transform_name%g
-s%@[email protected]%$bindir%g
-s%@[email protected]%$sbindir%g
-s%@[email protected]%$libexecdir%g
-s%@[email protected]%$datadir%g
-s%@[email protected]%$sysconfdir%g
-s%@[email protected]%$sharedstatedir%g
-s%@[email protected]%$localstatedir%g
-s%@[email protected]%$libdir%g
-s%@[email protected]%$includedir%g
-s%@[email protected]%$oldincludedir%g
-s%@[email protected]%$infodir%g
-s%@[email protected]%$mandir%g
-s%@[email protected]%$PACKAGE%g
-s%@[email protected]%$SET_MAKE%g
-s%@[email protected]%$INSTALL%g
-s%@[email protected]%$INSTALL_PROGRAM%g
-s%@[email protected]%$INSTALL_DATA%g
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
 
-CEOF
-EOF
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
 
-cat >> $CONFIG_STATUS <<\EOF
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
 
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+INSTALL!$INSTALL$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 44; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
   else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
 done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
 fi
-EOF
 
-cat >> $CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @[email protected] from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@[email protected]:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
   esac
 
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
 
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@[email protected]/p
+/@[email protected]/p
+/@[email protected]/p
+/@[email protected]/p
+/@[email protected]/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@[email protected]*|*@[email protected]*|*@[email protected]*|*@[email protected]*|*@[email protected]*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@[email protected]&$datadir&g
+  s&@[email protected]&$docdir&g
+  s&@[email protected]&$infodir&g
+  s&@[email protected]&$localedir&g
+  s&@[email protected]&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@[email protected]&$configure_input&;t t
+s&@[email protected]&$ac_top_builddir_sub&;t t
+s&@[email protected]&$ac_srcdir&;t t
+s&@[email protected]&$ac_abs_srcdir&;t t
+s&@[email protected]&$ac_top_srcdir&;t t
+s&@[email protected]&$ac_abs_top_srcdir&;t t
+s&@[email protected]&$ac_builddir&;t t
+s&@[email protected]&$ac_abs_builddir&;t t
+s&@[email protected]&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
+
+
+
   esac
 
+done # for ac_tag
 
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
 
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@[email protected]%$configure_input%g
-s%@[email protected]%$srcdir%g
-s%@[email protected]%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
 
-EOF
-cat >> $CONFIG_STATUS <<EOF
 
-EOF
-cat >> $CONFIG_STATUS <<\EOF
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
 
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/doc/configure.ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/gperf/doc/configure.ac	Tue Dec 06 20:26:16 2011 +0200
@@ -0,0 +1,37 @@
+dnl autoconf configuration for gperf/doc
+
+dnl Copyright (C) 1998, 2000, 2002-2003, 2007 Free Software Foundation, Inc.
+dnl Written by Douglas C. Schmidt <schmidt at ics.uci.edu>
+dnl and Bruno Haible <bruno at clisp.org>.
+dnl
+dnl This file is part of GNU GPERF.
+dnl
+dnl GNU GPERF is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2, or (at your option)
+dnl any later version.
+dnl
+dnl GNU GPERF is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; see the file COPYING.
+dnl If not, write to the Free Software Foundation, Inc.,
+dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+AC_PREREQ([2.60])
+AC_INIT(gperf.1)
+PACKAGE=gperf
+AC_SUBST(PACKAGE)
+AC_PROG_MAKE_SET
+dnl
+dnl           checks for programs
+dnl
+CL_PROG_INSTALL
+                      dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM
+dnl
+dnl           That's it.
+dnl
+AC_OUTPUT(Makefile)
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/doc/configure.in
--- a/head/contrib/gperf/doc/configure.in	Tue Dec 06 20:03:07 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-dnl autoconf configuration for gperf/doc
-
-dnl Copyright (C) 1998, 2000 Free Software Foundation, Inc.
-dnl written by Douglas C. Schmidt (schmidt at ics.uci.edu)
-dnl
-dnl This file is part of GNU GPERF.
-dnl
-dnl GNU GPERF is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 1, or (at your option)
-dnl any later version.
-dnl
-dnl GNU GPERF is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU GPERF; see the file COPYING.  If not, write to the
-dnl Free Software Foundation, 59 Temple Place - Suite 330, Boston,
-dnl MA 02111-1307, USA.
-
-AC_INIT(gperf.1)
-PACKAGE=gperf
-AC_SUBST(PACKAGE)
-AC_PROG_MAKE_SET
-dnl
-dnl           checks for programs
-dnl
-CL_PROG_INSTALL
-                      dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM
-dnl
-dnl           That's it.
-dnl
-AC_OUTPUT(Makefile)
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/doc/gperf.1
--- a/head/contrib/gperf/doc/gperf.1	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/doc/gperf.1	Tue Dec 06 20:26:16 2011 +0200
@@ -1,21 +1,27 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.022.
-.TH GPERF "1" "September 2000" "GNU gperf 2.7.2" FSF
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.23.
+.TH GPERF "1" "May 2007" "GNU gperf 3.0.3" FSF
 .SH NAME
 gperf \- generate a perfect hash function from a key set
 .SH SYNOPSIS
 .B gperf
 [\fIOPTION\fR]... [\fIINPUT-FILE\fR]
 .SH DESCRIPTION
-GNU `gperf' generates perfect hash functions.
+GNU 'gperf' generates perfect hash functions.
 .PP
 If a long option shows an argument as mandatory, then it is mandatory
 for the equivalent short option also.
+.SS "Output file location:"
+.HP
+\fB\-\-output\-file\fR=\fIFILE\fR Write output to specified file.
+.PP
+The results are written to standard output if no output file is specified
+or if it is -.
 .SS "Input file interpretation:"
 .TP
 \fB\-e\fR, \fB\-\-delimiters\fR=\fIDELIMITER\-LIST\fR
 Allow user to provide a string containing delimiters
 used to separate keywords from their attributes.
-Default is ",\en".
+Default is ",".
 .TP
 \fB\-t\fR, \fB\-\-struct\-type\fR
 Allows the user to include a structured type
@@ -23,6 +29,11 @@
 is considered part of the type declaration. Key
 words and additional fields may follow this, one
 group of fields per line.
+.TP
+\fB\-\-ignore\-case\fR
+Consider upper and lower case ASCII characters as
+equivalent. Note that locale dependent case mappings
+are ignored.
 .SS "Language for the output code:"
 .TP
 \fB\-L\fR, \fB\-\-language\fR=\fILANGUAGE\-NAME\fR
@@ -39,21 +50,27 @@
 Initializers for additional components in the keyword
 structure.
 .TP
-\fB\-H\fR, \fB\-\-hash\-fn\-name\fR=\fINAME\fR
+\fB\-H\fR, \fB\-\-hash\-function\-name\fR=\fINAME\fR
 Specify name of generated hash function. Default is
-`hash'.
+\&'hash'.
 .TP
-\fB\-N\fR, \fB\-\-lookup\-fn\-name\fR=\fINAME\fR
+\fB\-N\fR, \fB\-\-lookup\-function\-name\fR=\fINAME\fR
 Specify name of generated lookup function. Default
-name is `in_word_set'.
+name is 'in_word_set'.
 .TP
 \fB\-Z\fR, \fB\-\-class\-name\fR=\fINAME\fR
 Specify name of generated C++ class. Default name is
-`Perfect_Hash'.
+\&'Perfect_Hash'.
 .TP
 \fB\-7\fR, \fB\-\-seven\-bit\fR
 Assume 7-bit characters.
 .TP
+\fB\-l\fR, \fB\-\-compare\-lengths\fR
+Compare key lengths before trying a string
+comparison. This is necessary if the keywords
+contain NUL bytes. It also helps cut down on the
+number of string comparisons made during the lookup.
+.TP
 \fB\-c\fR, \fB\-\-compare\-strncmp\fR
 Generate comparison code using strncmp rather than
 strcmp.
@@ -70,14 +87,31 @@
 Include the necessary system include file <string.h>
 at the beginning of the code.
 .TP
-\fB\-G\fR, \fB\-\-global\fR
+\fB\-G\fR, \fB\-\-global\-table\fR
 Generate the static table of keywords as a static
 global variable, rather than hiding it inside of the
 lookup function (which is the default behavior).
 .TP
+\fB\-P\fR, \fB\-\-pic\fR
+Optimize the generated table for inclusion in shared
+libraries.  This reduces the startup time of programs
+using a shared library containing the generated code.
+.TP
+\fB\-Q\fR, \fB\-\-string\-pool\-name\fR=\fINAME\fR
+Specify name of string pool generated by option \fB\-\-pic\fR.
+Default name is 'stringpool'.
+.TP
+\fB\-\-null\-strings\fR
+Use NULL strings instead of empty strings for empty
+keyword table entries.
+.TP
 \fB\-W\fR, \fB\-\-word\-array\-name\fR=\fINAME\fR
 Specify name of word list array. Default name is
-`wordlist'.
+\&'wordlist'.
+.TP
+\fB\-\-length\-table\-name\fR=\fINAME\fR
+Specify name of length table array. Default name is
+\&'lengthtable'.
 .TP
 \fB\-S\fR, \fB\-\-switch\fR=\fICOUNT\fR
 Causes the generated C code to use a switch
@@ -99,30 +133,23 @@
 .TP
 \fB\-k\fR, \fB\-\-key\-positions\fR=\fIKEYS\fR
 Select the key positions used in the hash function.
-The allowable choices range between 1-126, inclusive.
+The allowable choices range between 1-255, inclusive.
 The positions are separated by commas, ranges may be
 used, and key positions may occur in any order.
 Also, the meta-character '*' causes the generated
 hash function to consider ALL key positions, and $
-indicates the ``final character'' of a key, e.g.,
+indicates the "final character" of a key, e.g.,
 $,1,2,4,6-10.
 .TP
-\fB\-l\fR, \fB\-\-compare\-strlen\fR
-Compare key lengths before trying a string
-comparison. This helps cut down on the number of
-string comparisons made during the lookup.
-.TP
 \fB\-D\fR, \fB\-\-duplicates\fR
 Handle keywords that hash to duplicate values. This
 is useful for certain highly redundant keyword sets.
 .TP
-\fB\-f\fR, \fB\-\-fast\fR=\fIITERATIONS\fR
-Generate the gen-perf.hash function ``fast''. This
-decreases gperf's running time at the cost of
-minimizing generated table size. The numeric
-argument represents the number of times to iterate
-when resolving a collision. `0' means ``iterate by
-the number of keywords''.
+\fB\-m\fR, \fB\-\-multiple\-iterations\fR=\fIITERATIONS\fR
+Perform multiple choices of the \fB\-i\fR and \fB\-j\fR values,
+and choose the best results. This increases the
+running time by a factor of ITERATIONS but does a
+good job minimizing the generated table size.
 .TP
 \fB\-i\fR, \fB\-\-initial\-asso\fR=\fIN\fR
 Provide an initial value for the associate values
@@ -130,7 +157,7 @@
 inflate the size of the final table.
 .TP
 \fB\-j\fR, \fB\-\-jump\fR=\fIJUMP\-VALUE\fR
-Affects the ``jump value'', i.e., how far to advance
+Affects the "jump value", i.e., how far to advance
 the associated character value upon collisions. Must
 be an odd number, default is 5.
 .TP
@@ -138,25 +165,20 @@
 Do not include the length of the keyword when
 computing the hash function.
 .TP
-\fB\-o\fR, \fB\-\-occurrence\-sort\fR
-Reorders input keys by frequency of occurrence of
-the key sets. This should decrease the search time
-dramatically.
-.TP
 \fB\-r\fR, \fB\-\-random\fR
 Utilizes randomness to initialize the associated
 values table.
 .TP
 \fB\-s\fR, \fB\-\-size\-multiple\fR=\fIN\fR
 Affects the size of the generated hash table. The
-numeric argument N indicates ``how many times larger
-or smaller'' the associated value range should be,
+numeric argument N indicates "how many times larger
+or smaller" the associated value range should be,
 in relationship to the number of keys, e.g. a value
-of 3 means ``allow the maximum associated value to
+of 3 means "allow the maximum associated value to
 be about 3 times larger than the number of input
-keys.'' Conversely, a value of \fB\-3\fR means ``make the
+keys". Conversely, a value of 1/3 means "make the
 maximum associated value about 3 times smaller than
-the number of input keys. A larger table should
+the number of input keys". A larger table should
 decrease the time required for an unsuccessful
 search, at the expense of extra table space. Default
 value is 1.
@@ -171,8 +193,15 @@
 \fB\-d\fR, \fB\-\-debug\fR
 Enables the debugging option (produces verbose
 output to the standard error).
+.SH AUTHOR
+Written by Douglas C. Schmidt and Bruno Haible.
 .SH "REPORTING BUGS"
-Report bugs to <bug-gnu-utils at gnu.org>.
+Report bugs to <bug-gnu-gperf at gnu.org>.
+.SH COPYRIGHT
+Copyright \(co 1989-1998, 2000-2004, 2006-2007 Free Software Foundation, Inc.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 .SH "SEE ALSO"
 The full documentation for
 .B gperf
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/doc/gperf.texi
--- a/head/contrib/gperf/doc/gperf.texi	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/doc/gperf.texi	Tue Dec 06 20:26:16 2011 +0200
@@ -7,9 +7,9 @@
 
 @c some day we should @include version.texi instead of defining
 @c these values at hand.
- at set UPDATED 26 September 2000
- at set EDITION 2.7.2
- at set VERSION 2.7.2
+ at set UPDATED 31 March 2007
+ at set EDITION 3.0.3
+ at set VERSION 3.0.3
 @c ---------------------
 
 @c remove the black boxes generated in the GPL appendix.
@@ -28,7 +28,7 @@
 This file documents the features of the GNU Perfect Hash Function
 Generator @value{VERSION}.
 
-Copyright @copyright{} 1989-2000 Free Software Foundation, Inc.
+Copyright @copyright{} 1989-2006 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of this
 manual provided the copyright notice and this permission notice are
@@ -62,10 +62,11 @@
 @subtitle The GNU Perfect Hash Function Generator
 @subtitle Edition @value{EDITION}, @value{UPDATED}
 @author Douglas C. Schmidt
+ at author Bruno Haible
 
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1989-2000 Free Software Foundation, Inc.
+Copyright @copyright{} 1989-2007 Free Software Foundation, Inc.
 
 
 Permission is granted to make and distribute verbatim copies of
@@ -98,13 +99,12 @@
 * Copying::                     GNU @code{gperf} General Public License says
                                 how you can copy and share @code{gperf}.
 * Contributors::                People who have contributed to @code{gperf}.
-* Motivation::                  Static search structures and GNU GPERF.
+* Motivation::                  The purpose of @code{gperf}.
 * Search Structures::           Static search structures and GNU @code{gperf}
 * Description::                 High-level discussion of how GPERF functions.
 * Options::                     A description of options to the program.
 * Bugs::                        Known bugs and limitations with GPERF.
 * Projects::                    Things still left to do.
-* Implementation::              Implementation Details for GNU GPERF.
 * Bibliography::                Material Referenced in this Report.
 
 * Concept Index::               
@@ -115,13 +115,20 @@
 
 * Input Format::                Input Format to @code{gperf}
 * Output Format::               Output Format for Generated C Code with @code{gperf}
-* Binary Strings::              Use of NUL characters
+* Binary Strings::              Use of NUL bytes
 
 Input Format to @code{gperf}
 
-* Declarations::                @code{struct} Declarations and C Code Inclusion.
+* Declarations::                Declarations.
 * Keywords::                    Format for Keyword Entries.
 * Functions::                   Including Additional C Functions.
+* Controls for GNU indent::     Where to place directives for GNU @code{indent}.
+
+Declarations
+
+* User-supplied Struct::        Specifying keywords with attributes.
+* Gperf Declarations::          Embedding command line options in the input.
+* C Code Inclusion::            Including C declarations and definitions.
 
 Invoking @code{gperf}
 
@@ -147,15 +154,13 @@
 @item
 @cindex Bugs 
 The GNU @code{gperf} perfect hash function generator utility was
-originally written in GNU C++ by Douglas C. Schmidt.  It is now also
-available in a highly-portable ``old-style'' C version.  The general
+written in GNU C++ by Douglas C. Schmidt.  The general
 idea for the perfect hash function generator was inspired by Keith
 Bostic's algorithm written in C, and distributed to net.sources around
 1984.  The current program is a heavily modified, enhanced, and extended
 implementation of Keith's basic idea, created at the University of
 California, Irvine.  Bugs, patches, and suggestions should be reported
-to both @code{<[email protected]@gnu.org>} and
- at code{<[email protected]@lists.sourceforge.net>}.
+to @code{<[email protected]@gnu.org>}.
 
 @item
 Special thanks is extended to Michael Tiemann and Doug Lea, for
@@ -166,8 +171,9 @@
 that greatly helped improve the quality and functionality of @code{gperf}.
 
 @item
-A testsuite was added by Bruno Haible. He also rewrote the output
-routines for better reliability.
+Bruno Haible enhanced and optimized the search algorithm.  He also rewrote
+the input routines and the output routines for better reliability, and
+added a testsuite.
 @end itemize
 
 @node Motivation, Search Structures, Contributors, Top
@@ -176,8 +182,8 @@
 @code{gperf} is a perfect hash function generator written in C++.  It
 transforms an @var{n} element user-specified keyword set @var{W} into a
 perfect hash function @var{F}.  @var{F} uniquely maps keywords in
- at var{W} onto the range 0.. at var{k}, where @var{k} >= @var{n}.  If @var{k}
-= @var{n} then @var{F} is a @emph{minimal} perfect hash function.
+ at var{W} onto the range 0.. at var{k}, where @var{k} >= @var{n-1}.  If @var{k}
+= @var{n-1} then @var{F} is a @emph{minimal} perfect hash function.
 @code{gperf} generates a 0.. at var{k} element static lookup table and a
 pair of C functions.  These functions determine whether a given
 character string @var{s} occurs in @var{W}, using at most one probe into
@@ -185,11 +191,12 @@
 
 @code{gperf} currently generates the reserved keyword recognizer for
 lexical analyzers in several production and research compilers and
-language processing tools, including GNU C, GNU C++, GNU Pascal, GNU
-Modula 3, and GNU indent.  Complete C++ source code for @code{gperf} is
-available via anonymous ftp from @code{ftp://ftp.gnu.org/pub/gnu/gperf/}.
+language processing tools, including GNU C, GNU C++, GNU Java, GNU Pascal,
+GNU Modula 3, and GNU indent.  Complete C++ source code for @code{gperf} is
+available from @code{http://ftp.gnu.org/pub/gnu/gperf/}.
 A paper describing @code{gperf}'s design and implementation in greater
-detail is available in the Second USENIX C++ Conference proceedings.
+detail is available in the Second USENIX C++ Conference proceedings
+or from @code{http://www.cs.wustl.edu/~schmidt/resume.html}.
 
 @node Search Structures, Description, Motivation, Top
 @chapter Static search structures and GNU @code{gperf}
@@ -198,7 +205,7 @@
 A @dfn{static search structure} is an Abstract Data Type with certain
 fundamental operations, e.g., @emph{initialize}, @emph{insert},
 and @emph{retrieve}.  Conceptually, all insertions occur before any
-retrievals.  In practice, @code{gperf} generates a @code{static} array
+retrievals.  In practice, @code{gperf} generates a @emph{static} array
 containing search set keywords and any associated attributes specified
 by the user.  Thus, there is essentially no execution-time cost for the
 insertions.  It is a useful data structure for representing @emph{static
@@ -254,8 +261,8 @@
 search structures by hand.  It has proven a useful and practical tool
 for serious programming projects.  Output from @code{gperf} is currently
 used in several production and research compilers, including GNU C, GNU
-C++, GNU Pascal, and GNU Modula 3.  The latter two compilers are not yet
-part of the official GNU distribution.  Each compiler utilizes
+C++, GNU Java, GNU Pascal, and GNU Modula 3.  The latter two compilers are
+not yet part of the official GNU distribution.  Each compiler utilizes
 @code{gperf} to automatically generate static search structures that
 efficiently identify their respective reserved keywords.
 
@@ -265,11 +272,11 @@
 @menu
 * Input Format::                Input Format to @code{gperf}
 * Output Format::               Output Format for Generated C Code with @code{gperf}
-* Binary Strings::              Use of NUL characters
+* Binary Strings::              Use of NUL bytes
 @end menu
 
 The perfect hash function generator @code{gperf} reads a set of
-``keywords'' from a @dfn{keyfile} (or from the standard input by
+``keywords'' from an input file (or from the standard input by
 default).  It attempts to derive a perfect hashing function that
 recognizes a member of the @dfn{static keyword set} with at most a
 single probe into the lookup table.  If @code{gperf} succeeds in
@@ -288,7 +295,7 @@
 using a C @code{switch} may actually speed up the keyword retrieval time
 somewhat.  Actual results depend on your C compiler, of course.
 
-In general, @code{gperf} assigns values to the characters it is using
+In general, @code{gperf} assigns values to the bytes it is using
 for hashing until some set of values gives each keyword a unique value.
 A helpful heuristic is that the larger the hash value range, the easier
 it is for @code{gperf} to find and generate a perfect hash function.
@@ -300,7 +307,7 @@
 @cindex Declaration section
 @cindex Keywords section
 @cindex Functions section
-You can control the input keyfile format by varying certain command-line
+You can control the input file format by varying certain command-line
 arguments, in particular the @samp{-t} option.  The input's appearance
 is similar to GNU utilities @code{flex} and @code{bison} (or UNIX
 utilities @code{lex} and @code{yacc}).  Here's an outline of the general
@@ -316,34 +323,64 @@
 @end group
 @end example
 
- at emph{Unlike} @code{flex} or @code{bison}, all sections of
- at code{gperf}'s input are optional.  The following sections describe the
+ at emph{Unlike} @code{flex} or @code{bison}, the declarations section and
+the functions section are optional.  The following sections describe the
 input format for each section.
 
 @menu
-* Declarations::                @code{struct} Declarations and C Code Inclusion.
+* Declarations::                Declarations.
 * Keywords::                    Format for Keyword Entries.
 * Functions::                   Including Additional C Functions.
+* Controls for GNU indent::     Where to place directives for GNU @code{indent}.
 @end menu
 
+It is possible to omit the declaration section entirely, if the @samp{-t}
+option is not given.  In this case the input file begins directly with the
+first keyword line, e.g.:
+
+ at example
+ at group
+january
+february
+march
+april
+...
+ at end group
+ at end example
+
 @node Declarations, Keywords, Input Format, Input Format
- at subsection @code{struct} Declarations and C Code Inclusion
+ at subsection Declarations
 
 The keyword input file optionally contains a section for including
-arbitrary C declarations and definitions, as well as provisions for
-providing a user-supplied @code{struct}.  If the @samp{-t} option
+arbitrary C declarations and definitions, @code{gperf} declarations that
+act like command-line options, as well as for providing a user-supplied
+ at code{struct}.
+
+ at menu
+* User-supplied Struct::        Specifying keywords with attributes.
+* Gperf Declarations::          Embedding command line options in the input.
+* C Code Inclusion::            Including C declarations and definitions.
+ at end menu
+
+ at node User-supplied Struct, Gperf Declarations, Declarations, Declarations
+ at subsubsection User-supplied @code{struct}
+
+If the @samp{-t} option (or, equivalently, the @samp{%struct-type} declaration)
 @emph{is} enabled, you @emph{must} provide a C @code{struct} as the last
-component in the declaration section from the keyfile file.  The first
-field in this struct must be a @code{char *} or @code{const char *}
-identifier called @samp{name}, although it is possible to modify this
-field's name with the @samp{-K} option described below.
+component in the declaration section from the input file.  The first
+field in this struct must be of type @code{char *} or @code{const char *}
+if the @samp{-P} option is not given, or of type @code{int} if the option
+ at samp{-P} (or, equivalently, the @samp{%pic} declaration) is enabled.
+This first field must be called @samp{name}, although it is possible to modify
+its name with the @samp{-K} option (or, equivalently, the
+ at samp{%define slot-name} declaration) described below.
 
 Here is a simple example, using months of the year and their attributes as
 input:
 
 @example
 @group
-struct months @{ char *name; int number; int days; int leap_days; @};
+struct month @{ char *name; int number; int days; int leap_days; @};
 %%
 january,   1, 31, 31
 february,  2, 28, 29
@@ -366,6 +403,236 @@
 appearing left justified in the first column, as in the UNIX utility
 @code{lex}.
 
+If the @code{struct} has already been declared in an include file, it can
+be mentioned in an abbreviated form, like this:
+
+ at example
+ at group
+struct month;
+%%
+january,   1, 31, 31
+...
+ at end group
+ at end example
+
+ at node Gperf Declarations, C Code Inclusion, User-supplied Struct, Declarations
+ at subsubsection Gperf Declarations
+
+The declaration section can contain @code{gperf} declarations.  They
+influence the way @code{gperf} works, like command line options do.
+In fact, every such declaration is equivalent to a command line option.
+There are three forms of declarations:
+
+ at enumerate
+ at item
+Declarations without argument, like @samp{%compare-lengths}.
+
+ at item
+Declarations with an argument, like @samp{%[email protected]{count}}.
+
+ at item
+Declarations of names of entities in the output file, like
+ at samp{%define lookup-function-name @var{name}}.
+ at end enumerate
+
+When a declaration is given both in the input file and as a command line
+option, the command-line option's value prevails.
+
+The following @code{gperf} declarations are available.
+
+ at table @samp
+ at item %[email protected]{delimiter-list}
+ at cindex @samp{%delimiters}
+Allows you to provide a string containing delimiters used to
+separate keywords from their attributes.  The default is ",".  This
+option is essential if you want to use keywords that have embedded
+commas or newlines.
+
+ at item %struct-type
+ at cindex @samp{%struct-type}
+Allows you to include a @code{struct} type declaration for generated
+code; see above for an example.
+
+ at item %ignore-case
+ at cindex @samp{%ignore-case}
+Consider upper and lower case ASCII characters as equivalent.  The string
+comparison will use a case insignificant character comparison.  Note that
+locale dependent case mappings are ignored.
+
+ at item %[email protected]{language-name}
+ at cindex @samp{%language}
+Instructs @code{gperf} to generate code in the language specified by the
+option's argument.  Languages handled are currently:
+
+ at table @samp
+ at item KR-C
+Old-style K&R C.  This language is understood by old-style C compilers and
+ANSI C compilers, but ANSI C compilers may flag warnings (or even errors)
+because of lacking @samp{const}.
+
+ at item C
+Common C.  This language is understood by ANSI C compilers, and also by
+old-style C compilers, provided that you @code{#define const} to empty
+for compilers which don't know about this keyword.
+
+ at item ANSI-C
+ANSI C.  This language is understood by ANSI C compilers and C++ compilers.
+
+ at item C++
+C++.  This language is understood by C++ compilers.
+ at end table
+
+The default is C.
+
+ at item %define slot-name @var{name}
+ at cindex @samp{%define slot-name}
+This declaration is only useful when option @samp{-t} (or, equivalently, the
+ at samp{%struct-type} declaration) has been given.
+By default, the program assumes the structure component identifier for
+the keyword is @samp{name}.  This option allows an arbitrary choice of
+identifier for this component, although it still must occur as the first
+field in your supplied @code{struct}.
+
+ at item %define initializer-suffix @var{initializers}
+ at cindex @samp{%define initializer-suffix}
+This declaration is only useful when option @samp{-t} (or, equivalently, the
+ at samp{%struct-type} declaration) has been given.
+It permits to specify initializers for the structure members following
+ at var{slot-name} in empty hash table entries.  The list of initializers
+should start with a comma.  By default, the emitted code will
+zero-initialize structure members following @var{slot-name}.
+
+ at item %define hash-function-name @var{name}
+ at cindex @samp{%define hash-function-name}
+Allows you to specify the name for the generated hash function.  Default
+name is @samp{hash}.  This option permits the use of two hash tables in
+the same file.
+
+ at item %define lookup-function-name @var{name}
+ at cindex @samp{%define lookup-function-name}
+Allows you to specify the name for the generated lookup function.
+Default name is @samp{in_word_set}.  This option permits multiple
+generated hash functions to be used in the same application.
+
+ at item %define class-name @var{name}
+ at cindex @samp{%define class-name}
+This option is only useful when option @samp{-L C++} (or, equivalently,
+the @samp{%language=C++} declaration) has been given.  It
+allows you to specify the name of generated C++ class.  Default name is
+ at code{Perfect_Hash}.
+
+ at item %7bit
+ at cindex @samp{%7bit}
+This option specifies that all strings that will be passed as arguments
+to the generated hash function and the generated lookup function will
+solely consist of 7-bit ASCII characters (bytes in the range 0..127).
+(Note that the ANSI C functions @code{isalnum} and @code{isgraph} do
+ at emph{not} guarantee that a byte is in this range.  Only an explicit
+test like @samp{c >= 'A' && c <= 'Z'} guarantees this.)
+
+ at item %compare-lengths
+ at cindex @samp{%compare-lengths}
+Compare keyword lengths before trying a string comparison.  This option
+is mandatory for binary comparisons (@pxref{Binary Strings}).  It also might
+cut down on the number of string comparisons made during the lookup, since
+keywords with different lengths are never compared via @code{strcmp}.
+However, using @samp{%compare-lengths} might greatly increase the size of the
+generated C code if the lookup table range is large (which implies that
+the switch option @samp{-S} or @samp{%switch} is not enabled), since the length
+table contains as many elements as there are entries in the lookup table.
+
+ at item %compare-strncmp
+ at cindex @samp{%compare-strncmp}
+Generates C code that uses the @code{strncmp} function to perform
+string comparisons.  The default action is to use @code{strcmp}.
+
+ at item %readonly-tables
+ at cindex @samp{%readonly-tables}
+Makes the contents of all generated lookup tables constant, i.e.,
+``readonly''.  Many compilers can generate more efficient code for this
+by putting the tables in readonly memory.
+
+ at item %enum
+ at cindex @samp{%enum}
+Define constant values using an enum local to the lookup function rather
+than with #defines.  This also means that different lookup functions can
+reside in the same file.  Thanks to James Clark @code{<[email protected]@ai.mit.edu>}.
+
+ at item %includes
+ at cindex @samp{%includes}
+Include the necessary system include file, @code{<string.h>}, at the
+beginning of the code.  By default, this is not done; the user must
+include this header file himself to allow compilation of the code.
+
+ at item %global-table
+ at cindex @samp{%global-table}
+Generate the static table of keywords as a static global variable,
+rather than hiding it inside of the lookup function (which is the
+default behavior).
+
+ at item %pic
+ at cindex @samp{%pic}
+Optimize the generated table for inclusion in shared libraries.  This
+reduces the startup time of programs using a shared library containing
+the generated code.  If the @samp{%struct-type} declaration (or,
+equivalently, the option @samp{-t}) is also given, the first field of the
+user-defined struct must be of type @samp{int}, not @samp{char *}, because
+it will contain offsets into the string pool instead of actual strings.
+To convert such an offset to a string, you can use the expression
+ at samp{stringpool + @var{o}}, where @var{o} is the offset.  The string pool
+name can be changed through the @samp{%define string-pool-name} declaration.
+
+ at item %define string-pool-name @var{name}
+ at cindex @samp{%define string-pool-name}
+Allows you to specify the name of the generated string pool created by
+the declaration @samp{%pic} (or, equivalently, the option @samp{-P}).
+The default name is @samp{stringpool}.  This declaration permits the use of
+two hash tables in the same file, with @samp{%pic} and even when the
+ at samp{%global-table} declaration (or, equivalently, the option @samp{-G})
+is given.
+
+ at item %null-strings
+ at cindex @samp{%null-strings}
+Use NULL strings instead of empty strings for empty keyword table entries.
+This reduces the startup time of programs using a shared library containing
+the generated code (but not as much as the declaration @samp{%pic}), at the
+expense of one more test-and-branch instruction at run time.
+
+ at item %define word-array-name @var{name}
+ at cindex @samp{%define word-array-name}
+Allows you to specify the name for the generated array containing the
+hash table.  Default name is @samp{wordlist}.  This option permits the
+use of two hash tables in the same file, even when the option @samp{-G}
+(or, equivalently, the @samp{%global-table} declaration) is given.
+
+ at item %define length-table-name @var{name}
+ at cindex @samp{%define length-table-name}
+Allows you to specify the name for the generated array containing the
+length table.  Default name is @samp{lengthtable}.  This option permits the
+use of two length tables in the same file, even when the option @samp{-G}
+(or, equivalently, the @samp{%global-table} declaration) is given.
+
+ at item %[email protected]{count}
+ at cindex @samp{%switch}
+Causes the generated C code to use a @code{switch} statement scheme,
+rather than an array lookup table.  This can lead to a reduction in both
+time and space requirements for some input files.  The argument to this
+option determines how many @code{switch} statements are generated.  A
+value of 1 generates 1 @code{switch} containing all the elements, a
+value of 2 generates 2 tables with 1/2 the elements in each
+ at code{switch}, etc.  This is useful since many C compilers cannot
+correctly generate code for large @code{switch} statements.  This option
+was inspired in part by Keith Bostic's original C program.
+
+ at item %omit-struct-type
+ at cindex @samp{%omit-struct-type}
+Prevents the transfer of the type declaration to the output file.  Use
+this option if the type is already defined elsewhere.
+ at end table
+
+ at node C Code Inclusion,  , Gperf Declarations, Declarations
+ at subsubsection C Code Inclusion
+
 @cindex @samp{%@{}
 @cindex @samp{%@}}
 Using a syntax similar to GNU utilities @code{flex} and @code{bison}, it
@@ -380,9 +647,9 @@
 %@{
 #include <assert.h>
 /* This section of code is inserted directly into the output. */
-int return_month_days (struct months *months, int is_leap_year);
+int return_month_days (struct month *months, int is_leap_year);
 %@}
-struct months @{ char *name; int number; int days; int leap_days; @};
+struct month @{ char *name; int number; int days; int leap_days; @};
 %%
 january,   1, 31, 31
 february,  2, 28, 29
@@ -391,32 +658,21 @@
 @end group
 @end example
 
-It is possible to omit the declaration section entirely.  In this case
-the keyfile begins directly with the first keyword line, e.g.:
-
- at example
- at group
-january,   1, 31, 31
-february,  2, 28, 29
-march,     3, 31, 31
-april,     4, 30, 30
-...
- at end group
- at end example
-
 @node Keywords, Functions, Declarations, Input Format
 @subsection Format for Keyword Entries
 
-The second keyfile format section contains lines of keywords and any
+The second input file format section contains lines of keywords and any
 associated attributes you might supply.  A line beginning with @samp{#}
 in the first column is considered a comment.  Everything following the
- at samp{#} is ignored, up to and including the following newline.
+ at samp{#} is ignored, up to and including the following newline.  A line
+beginning with @samp{%} in the first column is an option declaration and
+must not occur within the keywords section.
 
-The first field of each non-comment line is always the key itself.  It
+The first field of each non-comment line is always the keyword itself.  It
 can be given in two ways: as a simple name, i.e., without surrounding
 string quotation marks, or as a string enclosed in double-quotes, in
 C syntax, possibly with backslash escapes like @code{\"} or @code{\234}
-or @code{\xa8}. In either case, it must start right at the beginning
+or @code{\xa8}.  In either case, it must start right at the beginning
 of the line, without leading whitespace.
 In this context, a ``field'' is considered to extend up to, but
 not include, the first blank, comma, or newline.  Here is a simple
@@ -445,11 +701,12 @@
 should be separated by commas, and terminate at the end of line.  What
 these fields mean is entirely up to you; they are used to initialize the
 elements of the user-defined @code{struct} provided by you in the
-declaration section.  If the @samp{-t} option is @emph{not} enabled
+declaration section.  If the @samp{-t} option (or, equivalently, the
+ at samp{%struct-type} declaration) is @emph{not} enabled
 these fields are simply ignored.  All previous examples except the last
 one contain keyword attributes.
 
- at node Functions,  , Keywords, Input Format
+ at node Functions, Controls for GNU indent, Keywords, Input Format
 @subsection Including Additional C Functions
 
 The optional third section also corresponds closely with conventions
@@ -459,12 +716,58 @@
 it is your responsibility to ensure that the code contained in this
 section is valid C.
 
+ at node Controls for GNU indent,  , Functions, Input Format
+ at subsection Where to place directives for GNU @code{indent}.
+
+If you want to invoke GNU @code{indent} on a @code{gperf} input file,
+you will see that GNU @code{indent} doesn't understand the @samp{%%},
+ at samp{%@{} and @samp{%@}} directives that control @code{gperf}'s
+interpretation of the input file.  Therefore you have to insert some
+directives for GNU @code{indent}.  More precisely, assuming the most
+general input file structure
+
+ at example
+ at group
+declarations part 1
+%@{
+verbatim code
+%@}
+declarations part 2
+%%
+keywords
+%%
+functions
+ at end group
+ at end example
+
+ at noindent
+you would insert @samp{*INDENT-OFF*} and @samp{*INDENT-ON*} comments
+as follows:
+
+ at example
+ at group
+/* *INDENT-OFF* */
+declarations part 1
+%@{
+/* *INDENT-ON* */
+verbatim code
+/* *INDENT-OFF* */
+%@}
+declarations part 2
+%%
+keywords
+%%
+/* *INDENT-ON* */
+functions
+ at end group
+ at end example
+
 @node Output Format, Binary Strings, Input Format, Description
 @section Output Format for Generated C Code with @code{gperf}
 @cindex hash table
 
 Several options control how the generated C code appears on the standard 
-output.  Two C function are generated.  They are called @code{hash} and 
+output.  Two C functions are generated.  They are called @code{hash} and 
 @code{in_word_set}, although you may modify their names with a command-line 
 option.  Both functions require two arguments, a string, @code{char *} 
 @var{str}, and a length parameter, @code{int} @var{len}.  Their default 
@@ -472,26 +775,28 @@
 
 @deftypefun {unsigned int} hash (const char * @var{str}, unsigned int @var{len})
 By default, the generated @code{hash} function returns an integer value
-created by adding @var{len} to several user-specified @var{str} key
+created by adding @var{len} to several user-specified @var{str} byte
 positions indexed into an @dfn{associated values} table stored in a
 local static array.  The associated values table is constructed
 internally by @code{gperf} and later output as a static local C array
-called @samp{hash_table}; its meaning and properties are described below
-(@pxref{Implementation}). The relevant key positions are specified via
-the @samp{-k} option when running @code{gperf}, as detailed in the
- at emph{Options} section below(@pxref{Options}).
+called @samp{hash_table}.  The relevant selected positions (i.e. indices
+into @var{str}) are specified via the @samp{-k} option when running
+ at code{gperf}, as detailed in the @emph{Options} section below (@pxref{Options}).
 @end deftypefun
 
 @deftypefun {} in_word_set (const char * @var{str}, unsigned int @var{len})
 If @var{str} is in the keyword set, returns a pointer to that
-keyword. More exactly, if the option @samp{-t} was given, it returns
-a pointer to the matching keyword's structure. Otherwise it returns
+keyword.  More exactly, if the option @samp{-t} (or, equivalently, the
+ at samp{%struct-type} declaration) was given, it returns
+a pointer to the matching keyword's structure.  Otherwise it returns
 @code{NULL}.
 @end deftypefun
 
-If the option @samp{-c} is not used, @var{str} must be a NUL terminated
-string of exactly length @var{len}. If @samp{-c} is used, @var{str} must
-simply be an array of @var{len} characters and does not need to be NUL
+If the option @samp{-c} (or, equivalently, the @samp{%compare-strncmp}
+declaration) is not used, @var{str} must be a NUL terminated
+string of exactly length @var{len}.  If @samp{-c} (or, equivalently, the
+ at samp{%compare-strncmp} declaration) is used, @var{str} must
+simply be an array of @var{len} bytes and does not need to be NUL
 terminated.
 
 The code generated for these two functions is affected by the following
@@ -512,44 +817,50 @@
 code.
 @end table
 
-If the @samp{-t} and @samp{-S} options are omitted, the default action
-is to generate a @code{char *} array containing the keys, together with
-additional null strings used for padding the array.  By experimenting
+If the @samp{-t} and @samp{-S} options (or, equivalently, the
+ at samp{%struct-type} and @samp{%switch} declarations) are omitted, the default
+action
+is to generate a @code{char *} array containing the keywords, together with
+additional empty strings used for padding the array.  By experimenting
 with the various input and output options, and timing the resulting C
 code, you can determine the best option choices for different keyword
 set characteristics.
 
 @node Binary Strings,  , Output Format, Description
- at section Use of NUL characters
+ at section Use of NUL bytes
 @cindex NUL
 
 By default, the code generated by @code{gperf} operates on zero
-terminated strings, the usual representation of strings in C. This means
-that the keywords in the input file must not contain NUL characters,
+terminated strings, the usual representation of strings in C.  This means
+that the keywords in the input file must not contain NUL bytes,
 and the @var{str} argument passed to @code{hash} or @code{in_word_set}
 must be NUL terminated and have exactly length @var{len}.
 
-If option @samp{-c} is used, then the @var{str} argument does not need
-to be NUL terminated. The code generated by @code{gperf} will only
+If option @samp{-c} (or, equivalently, the @samp{%compare-strncmp}
+declaration) is used, then the @var{str} argument does not need
+to be NUL terminated.  The code generated by @code{gperf} will only
 access the first @var{len}, not @var{len+1}, bytes starting at @var{str}.
 However, the keywords in the input file still must not contain NUL
-characters.
+bytes.
 
-If option @samp{-l} is used, then the hash table performs binary
-comparison. The keywords in the input file may contain NUL characters,
+If option @samp{-l} (or, equivalently, the @samp{%compare-lengths}
+declaration) is used, then the hash table performs binary
+comparison.  The keywords in the input file may contain NUL bytes,
 written in string syntax as @code{\000} or @code{\x00}, and the code
-generated by @code{gperf} will treat NUL like any other character.
-Also, in this case the @samp{-c} option is ignored.
+generated by @code{gperf} will treat NUL like any other byte.
+Also, in this case the @samp{-c} option (or, equivalently, the
+ at samp{%compare-strncmp} declaration) is ignored.
 
 @node Options, Bugs, Description, Top
 @chapter Invoking @code{gperf}
 
 There are @emph{many} options to @code{gperf}.  They were added to make
 the program more convenient for use with real applications.  ``On-line''
-help is readily available via the @samp{-h} option.  Here is the
+help is readily available via the @samp{--help} option.  Here is the
 complete list of options.
 
 @menu
+* Output File::                 Specifying the Location of the Output File
 * Input Details::               Options that affect Interpretation of the Input File
 * Output Language::             Specifying the Language for the Output Code
 * Output Details::              Fine tuning Details in the Output Code
@@ -557,15 +868,29 @@
 * Verbosity::                   Informative Output
 @end menu
 
- at node Input Details, Output Language, Options, Options
+ at node Output File, Input Details, Options, Options
+ at section Specifying the Location of the Output File
+
+ at table @samp
+ at item [email protected]{file}
+Allows you to specify the name of the file to which the output is written to.
+ at end table
+
+The results are written to standard output if no output file is specified
+or if it is @samp{-}.
+
+ at node Input Details, Output Language, Output File, Options
 @section Options that affect Interpretation of the Input File
 
+These options are also available as declarations in the input file
+(@pxref{Gperf Declarations}).
+
 @table @samp
 @item -e @var{keyword-delimiter-list}
 @itemx --delim[email protected]{keyword-delimiter-list}
 @cindex Delimiters
-Allows the user to provide a string containing delimiters used to
-separate keywords from their attributes.  The default is ",\n".  This
+Allows you to provide a string containing delimiters used to
+separate keywords from their attributes.  The default is ",".  This
 option is essential if you want to use keywords that have embedded
 commas or newlines.  One useful trick is to use -e'TAB', where TAB is
 the literal tab character.
@@ -578,11 +903,25 @@
 this, one group of fields per line.  A set of examples for generating
 perfect hash tables and functions for Ada, C, C++, Pascal, Modula 2,
 Modula 3 and JavaScript reserved words are distributed with this release.
+
+ at item --ignore-case
+Consider upper and lower case ASCII characters as equivalent.  The string
+comparison will use a case insignificant character comparison.  Note that
+locale dependent case mappings are ignored.  This option is therefore not
+suitable if a properly internationalized or locale aware case mapping
+should be used.  (For example, in a Turkish locale, the upper case equivalent
+of the lowercase ASCII letter @samp{i} is the non-ASCII character
+ at samp{capital i with dot above}.)  For this case, it is better to apply
+an uppercase or lowercase conversion on the string before passing it to
+the @code{gperf} generated function.
 @end table
 
 @node Output Language, Output Details, Input Details, Options
 @section Options to specify the Language for the Output Code
 
+These options are also available as declarations in the input file
+(@pxref{Gperf Declarations}).
+
 @table @samp
 @item -L @var{generated-language-name}
 @itemx [email protected]{generated-language-name}
@@ -591,41 +930,45 @@
 
 @table @samp
 @item KR-C
-Old-style K&R C. This language is understood by old-style C compilers and
+Old-style K&R C.  This language is understood by old-style C compilers and
 ANSI C compilers, but ANSI C compilers may flag warnings (or even errors)
 because of lacking @samp{const}.
 
 @item C
-Common C. This language is understood by ANSI C compilers, and also by
+Common C.  This language is understood by ANSI C compilers, and also by
 old-style C compilers, provided that you @code{#define const} to empty
 for compilers which don't know about this keyword.
 
 @item ANSI-C
-ANSI C. This language is understood by ANSI C compilers and C++ compilers.
+ANSI C.  This language is understood by ANSI C compilers and C++ compilers.
 
 @item C++
-C++. This language is understood by C++ compilers.
+C++.  This language is understood by C++ compilers.
 @end table
 
 The default is C.
 
 @item -a
 This option is supported for compatibility with previous releases of
- at code{gperf}. It does not do anything.
+ at code{gperf}.  It does not do anything.
 
 @item -g
 This option is supported for compatibility with previous releases of
- at code{gperf}. It does not do anything.
+ at code{gperf}.  It does not do anything.
 @end table
 
 @node Output Details, Algorithmic Details, Output Language, Options
 @section Options for fine tuning Details in the Output Code
 
+Most of these options are also available as declarations in the input file
+(@pxref{Gperf Declarations}).
+
 @table @samp
- at item -K @var{key-name}
- at itemx [email protected]{key-name}
+ at item -K @var{slot-name}
+ at itemx [email protected]{slot-name}
 @cindex Slot name
-This option is only useful when option @samp{-t} has been given.
+This option is only useful when option @samp{-t} (or, equivalently, the
+ at samp{%struct-type} declaration) has been given.
 By default, the program assumes the structure component identifier for
 the keyword is @samp{name}.  This option allows an arbitrary choice of
 identifier for this component, although it still must occur as the first
@@ -634,29 +977,30 @@
 @item -F @var{initializers}
 @itemx [email protected]{initializers}
 @cindex Initializers
-This option is only useful when option @samp{-t} has been given.
+This option is only useful when option @samp{-t} (or, equivalently, the
+ at samp{%struct-type} declaration) has been given.
 It permits to specify initializers for the structure members following
- at var{key name} in empty hash table entries.  The list of initializers
+ at var{slot-name} in empty hash table entries.  The list of initializers
 should start with a comma.  By default, the emitted code will
-zero-initialize structure members following @var{key name}.
+zero-initialize structure members following @var{slot-name}.
 
 @item -H @var{hash-function-name}
- at itemx [email protected]{hash-function-name}
+ at itemx [email protected]{hash-function-name}
 Allows you to specify the name for the generated hash function.  Default
 name is @samp{hash}.  This option permits the use of two hash tables in
 the same file.
 
 @item -N @var{lookup-function-name}
- at itemx [email protected]{lookup-function-name}
+ at itemx [email protected]{lookup-function-name}
 Allows you to specify the name for the generated lookup function.
-Default name is @samp{in_word_set}.  This option permits completely
-automatic generation of perfect hash functions, especially when multiple
-generated hash functions are used in the same application.
+Default name is @samp{in_word_set}.  This option permits multiple
+generated hash functions to be used in the same application.
 
 @item -Z @var{class-name}
 @itemx [email protected]{class-name}
 @cindex Class name
-This option is only useful when option @samp{-L C++} has been given.  It
+This option is only useful when option @samp{-L C++} (or, equivalently,
+the @samp{%language=C++} declaration) has been given.  It
 allows you to specify the name of generated C++ class.  Default name is
 @code{Perfect_Hash}.
 
@@ -664,12 +1008,23 @@
 @itemx --seven-bit
 This option specifies that all strings that will be passed as arguments
 to the generated hash function and the generated lookup function will
-solely consist of 7-bit ASCII characters (characters in the range 0..127).
+solely consist of 7-bit ASCII characters (bytes in the range 0..127).
 (Note that the ANSI C functions @code{isalnum} and @code{isgraph} do
- at emph{not} guarantee that a character is in this range. Only an explicit
+ at emph{not} guarantee that a byte is in this range.  Only an explicit
 test like @samp{c >= 'A' && c <= 'Z'} guarantees this.) This was the
 default in versions of @code{gperf} earlier than 2.7; now the default is
-to assume 8-bit characters.
+to support 8-bit and multibyte characters.
+
+ at item -l
+ at itemx --compare-lengths
+Compare keyword lengths before trying a string comparison.  This option
+is mandatory for binary comparisons (@pxref{Binary Strings}).  It also might
+cut down on the number of string comparisons made during the lookup, since
+keywords with different lengths are never compared via @code{strcmp}.
+However, using @samp{-l} might greatly increase the size of the
+generated C code if the lookup table range is large (which implies that
+the switch option @samp{-S} or @samp{%switch} is not enabled), since the length
+table contains as many elements as there are entries in the lookup table.
 
 @item -c
 @itemx --compare-strncmp
@@ -695,30 +1050,63 @@
 include this header file himself to allow compilation of the code.
 
 @item -G
- at itemx --global
+ at itemx --global-table
 Generate the static table of keywords as a static global variable,
 rather than hiding it inside of the lookup function (which is the
 default behavior).
 
+ at item -P
+ at itemx --pic
+Optimize the generated table for inclusion in shared libraries.  This
+reduces the startup time of programs using a shared library containing
+the generated code.  If the option @samp{-t} (or, equivalently, the
+ at samp{%struct-type} declaration) is also given, the first field of the
+user-defined struct must be of type @samp{int}, not @samp{char *}, because
+it will contain offsets into the string pool instead of actual strings.
+To convert such an offset to a string, you can use the expression
+ at samp{stringpool + @var{o}}, where @var{o} is the offset.  The string pool
+name can be changed through the option @samp{--string-pool-name}.
+
+ at item -Q @var{string-pool-name}
+ at itemx [email protected]{string-pool-name}
+Allows you to specify the name of the generated string pool created by
+option @samp{-P}.  The default name is @samp{stringpool}.  This option
+permits the use of two hash tables in the same file, with @samp{-P} and
+even when the option @samp{-G} (or, equivalently, the @samp{%global-table}
+declaration) is given.
+
+ at item --null-strings
+Use NULL strings instead of empty strings for empty keyword table entries.
+This reduces the startup time of programs using a shared library containing
+the generated code (but not as much as option @samp{-P}), at the expense
+of one more test-and-branch instruction at run time.
+
 @item -W @var{hash-table-array-name}
 @itemx [email protected]{hash-table-array-name}
 @cindex Array name
 Allows you to specify the name for the generated array containing the
 hash table.  Default name is @samp{wordlist}.  This option permits the
 use of two hash tables in the same file, even when the option @samp{-G}
-is given.
+(or, equivalently, the @samp{%global-table} declaration) is given.
+
+ at itemx [email protected]{length-table-array-name}
+ at cindex Array name
+Allows you to specify the name for the generated array containing the
+length table.  Default name is @samp{lengthtable}.  This option permits the
+use of two length tables in the same file, even when the option @samp{-G}
+(or, equivalently, the @samp{%global-table} declaration) is given.
 
 @item -S @var{total-switch-statements}
 @itemx [email protected]{total-switch-statements}
 @cindex @code{switch}
 Causes the generated C code to use a @code{switch} statement scheme,
 rather than an array lookup table.  This can lead to a reduction in both
-time and space requirements for some keyfiles.  The argument to this
-option determines how many @code{switch} statements are generated. A
+time and space requirements for some input files.  The argument to this
+option determines how many @code{switch} statements are generated.  A
 value of 1 generates 1 @code{switch} containing all the elements, a
 value of 2 generates 2 tables with 1/2 the elements in each
 @code{switch}, etc.  This is useful since many C compilers cannot
-correctly generate code for large @code{switch} statements. This option
+correctly generate code for large @code{switch} statements.  This option
 was inspired in part by Keith Bostic's original C program.
 
 @item -T
@@ -728,93 +1116,73 @@
 
 @item -p
 This option is supported for compatibility with previous releases of
- at code{gperf}. It does not do anything.
+ at code{gperf}.  It does not do anything.
 @end table
 
 @node Algorithmic Details, Verbosity, Output Details, Options
 @section Options for changing the Algorithms employed by @code{gperf}
 
 @table @samp
- at item -k @var{keys}
- at itemx [email protected]{keys}
-Allows selection of the character key positions used in the keywords'
-hash function. The allowable choices range between 1-126, inclusive.
+ at item -k @var{selected-byte-positions}
+ at itemx [email protected]{selected-byte-positions}
+Allows selection of the byte positions used in the keywords'
+hash function.  The allowable choices range between 1-255, inclusive.
 The positions are separated by commas, e.g., @samp{-k 9,4,13,14};
 ranges may be used, e.g., @samp{-k 2-7}; and positions may occur
-in any order.  Furthermore, the meta-character '*' causes the generated
-hash function to consider @strong{all} character positions in each key,
-whereas '$' instructs the hash function to use the ``final character''
-of a key (this is the only way to use a character position greater than
-126, incidentally).
+in any order.  Furthermore, the wildcard '*' causes the generated
+hash function to consider @strong{all} byte positions in each keyword,
+whereas '$' instructs the hash function to use the ``final byte''
+of a keyword (this is the only way to use a byte position greater than
+255, incidentally).
 
 For instance, the option @samp{-k 1,2,4,6-10,'$'} generates a hash
 function that considers positions 1,2,4,6,7,8,9,10, plus the last
-character in each key (which may differ for each key, obviously).  Keys
-with length less than the indicated key positions work properly, since
-selected key positions exceeding the key length are simply not
+byte in each keyword (which may be at a different position for each
+keyword, obviously).  Keywords
+with length less than the indicated byte positions work properly, since
+selected byte positions exceeding the keyword length are simply not
 referenced in the hash function.
 
- at item -l
- at itemx --compare-strlen
-Compare key lengths before trying a string comparison.  This might cut
-down on the number of string comparisons made during the lookup, since
-keys with different lengths are never compared via @code{strcmp}.
-However, using @samp{-l} might greatly increase the size of the
-generated C code if the lookup table range is large (which implies that
-the switch option @samp{-S} is not enabled), since the length table
-contains as many elements as there are entries in the lookup table.
-This option is mandatory for binary comparisons (@pxref{Binary Strings}).
+This option is not normally needed since version 2.8 of @code{gperf};
+the default byte positions are computed depending on the keyword set,
+through a search that minimizes the number of byte positions.
 
 @item -D
 @itemx --duplicates
 @cindex Duplicates
-Handle keywords whose key position sets hash to duplicate values.
-Duplicate hash values occur for two reasons:
-
- at itemize @bullet
- at item
-Since @code{gperf} does not backtrack it is possible for it to process
-all your input keywords without finding a unique mapping for each word.
-However, frequently only a very small number of duplicates occur, and 
-the majority of keys still require one probe into the table.
-
- at item
-Sometimes a set of keys may have the same names, but possess different
-attributes.  With the -D option @code{gperf} treats all these keys as
+Handle keywords whose selected byte sets hash to duplicate values.
+Duplicate hash values can occur if a set of keywords has the same names, but
+possesses different attributes, or if the selected byte positions are not well
+chosen.  With the -D option @code{gperf} treats all these keywords as
 part of an equivalence class and generates a perfect hash function with
-multiple comparisons for duplicate keys.  It is up to you to completely
+multiple comparisons for duplicate keywords.  It is up to you to completely
 disambiguate the keywords by modifying the generated C code.  However,
 @code{gperf} helps you out by organizing the output.
- at end itemize
 
-Option @samp{-D} is extremely useful for certain large or highly
-redundant keyword sets, e.g., assembler instruction opcodes.
 Using this option usually means that the generated hash function is no
 longer perfect.  On the other hand, it permits @code{gperf} to work on
 keyword sets that it otherwise could not handle.
 
- at item -f @var{iteration-amount}
- at itemx [email protected]{iteration-amount}
-Generate the perfect hash function ``fast''.  This decreases
- at code{gperf}'s running time at the cost of minimizing generated
-table-size.  The iteration amount represents the number of times to
-iterate when resolving a collision.  `0' means iterate by the number of
-keywords.  This option is probably most useful when used in conjunction
-with options @samp{-D} and/or @samp{-S} for @emph{large} keyword sets.
+ at item -m @var{iterations}
+ at itemx [email protected]{iterations}
+Perform multiple choices of the @samp{-i} and @samp{-j} values, and
+choose the best results.  This increases the running time by a factor of
+ at var{iterations} but does a good job minimizing the generated table size.
 
 @item -i @var{initial-value}
 @itemx [email protected]{initial-value}
 Provides an initial @var{value} for the associate values array.  Default
 is 0.  Increasing the initial value helps inflate the final table size,
 possibly leading to more time efficient keyword lookups.  Note that this
-option is not particularly useful when @samp{-S} is used.  Also,
+option is not particularly useful when @samp{-S} (or, equivalently,
+ at samp{%switch}) is used.  Also,
 @samp{-i} is overridden when the @samp{-r} option is used.
 
 @item -j @var{jump-value}
 @itemx [email protected]{jump-value}
 @cindex Jump value
 Affects the ``jump value'', i.e., how far to advance the associated
-character value upon collisions.  @var{Jump-value} is rounded up to an
+byte value upon collisions.  @var{Jump-value} is rounded up to an
 odd number, the default is 5.  If the @var{jump-value} is 0 @code{gperf}
 jumps by random amounts.
 
@@ -824,60 +1192,38 @@
 computing its hash value.  This may save a few assembly instructions in
 the generated lookup table.
 
- at item -o
- at itemx --occurrence-sort
-Reorders the keywords by sorting the keywords so that frequently
-occuring key position set components appear first.  A second reordering
-pass follows so that keys with ``already determined values'' are placed
-towards the front of the keylist.  This may decrease the time required
-to generate a perfect hash function for many keyword sets, and also
-produce more minimal perfect hash functions.  The reason for this is
-that the reordering helps prune the search time by handling inevitable
-collisions early in the search process.  On the other hand, if the
-number of keywords is @emph{very} large using @samp{-o} may
- at emph{increase} @code{gperf}'s execution time, since collisions will
-begin earlier and continue throughout the remainder of keyword
-processing.  See Cichelli's paper from the January 1980 Communications
-of the ACM for details.
-
 @item -r
 @itemx --random
 Utilizes randomness to initialize the associated values table.  This
 frequently generates solutions faster than using deterministic
 initialization (which starts all associated values at 0).  Furthermore,
 using the randomization option generally increases the size of the
-table.  If @code{gperf} has difficultly with a certain keyword set try using
- at samp{-r} or @samp{-D}.
+table.
 
 @item -s @var{size-multiple}
 @itemx [email protected]{size-multiple}
 Affects the size of the generated hash table.  The numeric argument for
 this option indicates ``how many times larger or smaller'' the maximum
-associated value range should be, in relationship to the number of keys.
-If the @var{size-multiple} is negative the maximum associated value is
-calculated by @emph{dividing} it into the total number of keys.  For
-example, a value of 3 means ``allow the maximum associated value to be
-about 3 times larger than the number of input keys''.  
+associated value range should be, in relationship to the number of keywords.
+It can be written as an integer, a floating-point number or a fraction.
+For example, a value of 3 means ``allow the maximum associated value to be
+about 3 times larger than the number of input keywords''.
+Conversely, a value of 1/3 means ``allow the maximum associated value to
+be about 3 times smaller than the number of input keywords''.  Values
+smaller than 1 are useful for limiting the overall size of the generated hash
+table, though the option @samp{-m} is better at this purpose.
 
-Conversely, a value of -3 means ``allow the maximum associated value to
-be about 3 times smaller than the number of input keys''.  Negative
-values are useful for limiting the overall size of the generated hash
-table, though this usually increases the number of duplicate hash
-values.
-
-If `generate switch' option @samp{-S} is @emph{not} enabled, the maximum
+If `generate switch' option @samp{-S} (or, equivalently, @samp{%switch}) is
+ at emph{not} enabled, the maximum
 associated value influences the static array table size, and a larger
 table should decrease the time required for an unsuccessful search, at
 the expense of extra table space.
 
 The default value is 1, thus the default maximum associated value about
-the same size as the number of keys (for efficiency, the maximum
+the same size as the number of keywords (for efficiency, the maximum
 associated value is always rounded up to a power of 2).  The actual
 table size may vary somewhat, since this technique is essentially a
-heuristic.  In particular, setting this value too high slows down
- at code{gperf}'s runtime, since it must search through a much larger range
-of values.  Judicious use of the @samp{-f} option helps alleviate this
-overhead, however.
+heuristic.
 @end table
 
 @node Verbosity,  , Algorithmic Details, Options
@@ -919,16 +1265,6 @@
 When processing large keyword sets it helps greatly to have over 8 megs
 of RAM.
 
-However, since @code{gperf} does not backtrack no guaranteed solution
-occurs on every run.  On the other hand, it is usually easy to obtain a
-solution by varying the option parameters.  In particular, try the
- at samp{-r} option, and also try changing the default arguments to the
- at samp{-s} and @samp{-j} options.  To @emph{guarantee} a solution, use
-the @samp{-D} and @samp{-S} options, although the final results are not
-likely to be a @emph{perfect} hash function anymore!  Finally, use the
- at samp{-f} option if you want @code{gperf} to generate the perfect hash
-function @emph{fast}, with less emphasis on making it minimal.
-
 @item 
 The size of the generate static keyword array can get @emph{extremely}
 large if the input keyword file is large or if the keywords are quite
@@ -936,19 +1272,19 @@
 code, and @emph{greatly} inflates the object code size.  If this
 situation occurs, consider using the @samp{-S} option to reduce data
 size, potentially increasing keyword recognition time a negligible
-amount.  Since many C compilers cannot correctly generated code for
+amount.  Since many C compilers cannot correctly generate code for
 large switch statements it is important to qualify the @var{-S} option
 with an appropriate numerical argument that controls the number of
 switch statements generated.
 
 @item 
-The maximum number of key positions selected for a given key has an
-arbitrary limit of 126.  This restriction should be removed, and if
+The maximum number of selected byte positions has an
+arbitrary limit of 255.  This restriction should be removed, and if
 anyone considers this a problem write me and let me know so I can remove
 the constraint.
 @end itemize
 
- at node Projects, Implementation, Bugs, Top
+ at node Projects, Bibliography, Bugs, Top
 @chapter Things Still Left to Do
 
 It should be ``relatively'' easy to replace the current perfect hash
@@ -958,18 +1294,10 @@
 
 @itemize @bullet
 @item 
-Make the algorithm more robust.  At present, the program halts with an
-error diagnostic if it can't find a direct solution and the @samp{-D}
-option is not enabled.  A more comprehensive, albeit computationally
-expensive, approach would employ backtracking or enable alternative
-options and retry.  It's not clear how helpful this would be, in
-general, since most search sets are rather small in practice.
-
- at item 
 Another useful extension involves modifying the program to generate
 ``minimal'' perfect hash functions (under certain circumstances, the
 current version can be rather extravagant in the generated table size).
-Again, this is mostly of theoretical interest, since a sparse table
+This is mostly of theoretical interest, since a sparse table
 often produces faster lookups, and use of the @samp{-S} @code{switch}
 option can minimize the data size, at the expense of slightly longer
 lookups (note that the gcc compiler generally produces good code for
@@ -977,42 +1305,30 @@
 
 @item
 In addition to improving the algorithm, it would also be useful to
-generate a C++ class or Ada package as the code output, in addition to
-the current C routines.
+generate an Ada package as the code output, in addition to the current
+C and C++ routines.
 @end itemize
 
- at node Implementation, Bibliography, Projects, Top
- at chapter Implementation Details of GNU @code{gperf}
-
-A paper describing the high-level description of the data structures and
-algorithms used to implement @code{gperf} will soon be available.  This
-paper is useful not only from a maintenance and enhancement perspective,
-but also because they demonstrate several clever and useful programming
-techniques, e.g., `Iteration Number' boolean arrays, double
-hashing, a ``safe'' and efficient method for reading arbitrarily long
-input from a file, and a provably optimal algorithm for simultaneously
-determining both the minimum and maximum elements in a list.
-
 @page
 
- at node Bibliography, Concept Index, Implementation, Top
+ at node Bibliography, Concept Index, Projects, Top
 @chapter Bibliography
 
 [1] Chang, C.C.: @i{A Scheme for Constructing Ordered Minimal Perfect
 Hashing Functions} Information Sciences 39(1986), 187-195.
-       
+
 [2] Cichelli, Richard J. @i{Author's Response to ``On Cichelli's Minimal Perfect Hash
 Functions Method''} Communications of the ACM, 23, 12(December 1980), 729.
-    
+
 [3] Cichelli, Richard J. @i{Minimal Perfect Hash Functions Made Simple}
 Communications of the ACM, 23, 1(January 1980), 17-19.
-           
+
 [4] Cook, C. R. and Oldehoeft, R.R. @i{A Letter Oriented Minimal
 Perfect Hashing Function} SIGPLAN Notices, 17, 9(September 1982), 18-27.
 
 [5] Cormack, G. V. and Horspool, R. N. S. and Kaiserwerth, M.
 @i{Practical Perfect Hashing} Computer Journal, 28, 1(January 1985), 54-58.
-    
+
 [6] Jaeschke, G. @i{Reciprocal Hashing: A Method for Generating Minimal
 Perfect Hashing Functions} Communications of the ACM, 24, 12(December
 1981), 829-833.
@@ -1027,19 +1343,22 @@
 [9] Schmidt, Douglas C. @i{GPERF: A Perfect Hash Function Generator}
 Second USENIX C++ Conference Proceedings, April 1990.
 
-[10] Sebesta, R.W. and Taylor, M.A. @i{Minimal Perfect Hash Functions
+[10] Schmidt, Douglas C. @i{GPERF: A Perfect Hash Function Generator}
+C++ Report, SIGS 10 10 (November/December 1998).
+
+[11] Sebesta, R.W. and Taylor, M.A. @i{Minimal Perfect Hash Functions
 for Reserved Word Lists}  SIGPLAN Notices, 20, 12(September 1985), 47-53.
 
-[11] Sprugnoli, R. @i{Perfect Hashing Functions: A Single Probe
+[12] Sprugnoli, R. @i{Perfect Hashing Functions: A Single Probe
 Retrieving Method for Static Sets} Communications of the ACM, 20
 11(November 1977), 841-850.
 
-[12] Stallman, Richard M. @i{Using and Porting GNU CC} Free Software Foundation,
+[13] Stallman, Richard M. @i{Using and Porting GNU CC} Free Software Foundation,
 1988.
 
-[13] Stroustrup, Bjarne @i{The C++ Programming Language.} Addison-Wesley, 1986.
+[14] Stroustrup, Bjarne @i{The C++ Programming Language.} Addison-Wesley, 1986.
 
-[14] Tiemann, Michael D. @i{User's Guide to GNU C++} Free Software
+[15] Tiemann, Michael D. @i{User's Guide to GNU C++} Free Software
 Foundation, 1989.
 
 @node Concept Index,  , Bibliography, Top
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/doc/help2man
--- a/head/contrib/gperf/doc/help2man	Tue Dec 06 20:03:07 2011 +0200
+++ b/head/contrib/gperf/doc/help2man	Tue Dec 06 20:26:16 2011 +0200
@@ -15,7 +15,7 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 # Written by Brendan O'Dea <bod at compusol.com.au>
 # Available from ftp://ftp.gnu.org/gnu/help2man/
@@ -27,7 +27,7 @@
 use POSIX qw(strftime setlocale LC_TIME);
 
 my $this_program = 'help2man';
-my $this_version = '1.022';
+my $this_version = '1.23';
 my $version_info = <<EOT;
 GNU $this_program $this_version
 
@@ -269,9 +269,11 @@
 s/\n*$/\n/;
 s/\n\n+/\n\n/g;
 
-# Temporarily exchange leading dots and backslashes for tokens.
+# Temporarily exchange leading dots, apostrophes and backslashes for
+# tokens.
 s/^\./\x80/mg;
-s/\\/\x81/g;
+s/^'/\x81/mg;
+s/\\/\x82/g;
 
 # Start a new paragraph (if required) for these.
 s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g;
@@ -366,7 +368,7 @@
     {
 	$matched .= $& if %append;
 	$indent = length ($4 || "$1$3");
-	$content = ".TP\n\x82$2\n\x82$5\n";
+	$content = ".TP\n\x83$2\n\x83$5\n";
 	unless ($4)
 	{
 	    # Indent may be different on second line.
@@ -378,7 +380,7 @@
     elsif (s/^ {1,10}([+-]\S.*)\n//)
     {
 	$matched .= $& if %append;
-	$content = ".HP\n\x82$1\n";
+	$content = ".HP\n\x83$1\n";
 	$indent = 80; # not continued
     }
 
@@ -387,7 +389,7 @@
     {
 	$matched .= $& if %append;
 	$indent = length $1;
-	$content = ".TP\n\x82$2\n\x82$3\n";
+	$content = ".TP\n\x83$2\n\x83$3\n";
     }
 
     # Indented paragraph.
@@ -395,7 +397,7 @@
     {
 	$matched .= $& if %append;
 	$indent = length $1;
-	$content = ".IP\n\x82$2\n";
+	$content = ".IP\n\x83$2\n";
     }
 
     # Left justified paragraph.
@@ -411,7 +413,7 @@
     while (s/^ {$indent}(\S.*)\n//)
     {
 	$matched .= $& if %append;
-	$content .= "\x82$1\n"
+	$content .= "\x83$1\n"
     }
 
     # Move to next paragraph.
@@ -419,9 +421,10 @@
 
     for ($content)
     {
-	# Leading dot protection.
-	s/\x82\./\x80/g;
-	s/\x82//g;
+	# Leading dot and apostrophe protection.
+	s/\x83\./\x80/g;
+	s/\x83'/\x81/g;
+	s/\x83//g;
 
 	# Convert options.
 	s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge;
@@ -482,12 +485,13 @@
     {
 	my $quote = /\W/ ? '"' : '';
 	print ".SH $quote$_$quote\n";
-
+	
 	for ($include{$_})
 	{
-	    # Replace leading dot an backslash tokens.
+	    # Replace leading dot, apostrophe and backslash tokens.
 	    s/\x80/\\&./g;
-	    s/\x81/\\e/g;
+	    s/\x81/\\&'/g;
+	    s/\x82/\\e/g;
 	    print;
 	}
     }
diff -r 167f7ed19c6d -r 4aee9df9e1ae head/contrib/gperf/doc/texinfo.tex
--- a/head/contrib/gperf/doc/texinfo.tex	Tue Dec 06 20:03:07 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5999 +0,0 @@
-% texinfo.tex -- TeX macros to handle Texinfo files.
-%
-% Load plain if necessary, i.e., if running under initex.
-\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
-%
-\def\texinfoversion{2000-05-28.15}
-%
-% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
-% Free Software Foundation, Inc.
-%
-% This texinfo.tex file is free software; you can redistribute it and/or
-% modify it under the terms of the GNU General Public License as
-% published by the Free Software Foundation; either version 2, or (at
-% your option) any later version.
-%
-% This texinfo.tex 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 texinfo.tex file; see the file COPYING.  If not, write
-% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-% Boston, MA 02111-1307, USA.
-%
-% In other words, you are welcome to use, share and improve this program.
-% You are forbidden to forbid anyone else to use, share and improve
-% what you give them.   Help stamp out software-hoarding!
-%
-% Please try the latest version of texinfo.tex before submitting bug
-% reports; you can get the latest version from:
-%   ftp://ftp.gnu.org/gnu/texinfo.tex
-%   (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
-%   ftp://texinfo.org/tex/texinfo.tex
-%   ftp://us.ctan.org/macros/texinfo/texinfo.tex
-%   (and all CTAN mirrors, finger ctan at us.ctan.org for a list).
-%   /home/gd/gnu/doc/texinfo.tex on the GNU machines.
-% The texinfo.tex in any given Texinfo distribution could well be out
-% of date, so if that's what you're using, please check.
-% Texinfo has a small home page at http://texinfo.org/.
-%
-% Send bug reports to bug-texinfo at gnu.org.  Please include including a
-% complete document in each bug report with which we can reproduce the
-% problem.  Patches are, of course, greatly appreciated.
-%
-% To process a Texinfo manual with TeX, it's most reliable to use the
-% texi2dvi shell script that comes with the distribution.  For a simple
-% manual foo.texi, however, you can get away with this:
-%   tex foo.texi
-%   texindex foo.??
-%   tex foo.texi
-%   tex foo.texi
-%   dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.
-% The extra runs of TeX get the cross-reference information correct.
-% Sometimes one run after texindex suffices, and sometimes you need more
-% than two; texi2dvi does it as many times as necessary.
-%
-% It is possible to adapt texinfo.tex for other languages.  You can get
-% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/.
-
-\message{Loading texinfo [version \texinfoversion]:}
-
-% If in a .fmt file, print the version number
-% and turn on active characters that we couldn't do earlier because
-% they might have appeared in the input file name.
-\everyjob{\message{[Texinfo version \texinfoversion]}%
-  \catcode`+=\active \catcode`\_=\active}
-
-% Save some parts of plain tex whose names we will redefine.
-\let\ptexb=\b
-\let\ptexbullet=\bullet
-\let\ptexc=\c
-\let\ptexcomma=\,
-\let\ptexdot=\.
-\let\ptexdots=\dots
-\let\ptexend=\end
-\let\ptexequiv=\equiv
-\let\ptexexclam=\!
-\let\ptexi=\i
-\let\ptexlbrace=\{
-\let\ptexrbrace=\}
-\let\ptexstar=\*
-\let\ptext=\t
-
-% We never want plain's outer \+ definition in Texinfo.
-% For @tex, we can use \tabalign.
-\let\+ = \relax
-
-\message{Basics,}
-\chardef\other=12
-
-% If this character appears in an error message or help string, it
-% starts a new line in the output.
-\newlinechar = `^^J
-
-% Set up fixed words for English if not already set.
-\ifx\putwordAppendix\undefined  \gdef\putwordAppendix{Appendix}\fi
-\ifx\putwordChapter\undefined   \gdef\putwordChapter{Chapter}\fi
-\ifx\putwordfile\undefined      \gdef\putwordfile{file}\fi
-\ifx\putwordin\undefined        \gdef\putwordin{in}\fi
-\ifx\putwordIndexIsEmpty\undefined     \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
-\ifx\putwordInfo\undefined      \gdef\putwordInfo{Info}\fi
-\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
-\ifx\putwordMethodon\undefined  \gdef\putwordMethodon{Method on}\fi
-\ifx\putwordNoTitle\undefined   \gdef\putwordNoTitle{No Title}\fi
-\ifx\putwordof\undefined        \gdef\putwordof{of}\fi
-\ifx\putwordon\undefined        \gdef\putwordon{on}\fi
-\ifx\putwordpage\undefined      \gdef\putwordpage{page}\fi
-\ifx\putwordsection\undefined   \gdef\putwordsection{section}\fi
-\ifx\putwordSection\undefined   \gdef\putwordSection{Section}\fi
-\ifx\putwordsee\undefined       \gdef\putwordsee{see}\fi
-\ifx\putwordSee\undefined       \gdef\putwordSee{See}\fi
-\ifx\putwordShortTOC\undefined  \gdef\putwordShortTOC{Short Contents}\fi
-\ifx\putwordTOC\undefined       \gdef\putwordTOC{Table of Contents}\fi
-%
-\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
-\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
-\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
-\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
-\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
-\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
-\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
-\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
-\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
-\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
-\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
-\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
-%
-\ifx\putwordDefmac\undefined    \gdef\putwordDefmac{Macro}\fi
-\ifx\putwordDefspec\undefined   \gdef\putwordDefspec{Special Form}\fi
-\ifx\putwordDefvar\undefined    \gdef\putwordDefvar{Variable}\fi
-\ifx\putwordDefopt\undefined    \gdef\putwordDefopt{User Option}\fi
-\ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi
-\ifx\putwordDeffunc\undefined   \gdef\putwordDeffunc{Function}\fi
-\ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi
-
-% Ignore a token.
-%
-\def\gobble#1{}
-
-\hyphenation{ap-pen-dix}
-\hyphenation{mini-buf-fer mini-buf-fers}
-\hyphenation{eshell}
-\hyphenation{white-space}
-
-% Margin to add to right of even pages, to left of odd pages.
-\newdimen \bindingoffset
-\newdimen \normaloffset
-\newdimen\pagewidth \newdimen\pageheight
-
-% Sometimes it is convenient to have everything in the transcript file
-% and nothing on the terminal.  We don't just call \tracingall here,
-% since that produces some useless output on the terminal.
-%
-\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
-\ifx\eTeXversion\undefined
-\def\loggingall{\tracingcommands2 \tracingstats2
-   \tracingpages1 \tracingoutput1 \tracinglostchars1
-   \tracingmacros2 \tracingparagraphs1 \tracingrestores1
-   \showboxbreadth\maxdimen\showboxdepth\maxdimen
-}%
-\else
-\def\loggingall{\tracingcommands3 \tracingstats2
-   \tracingpages1 \tracingoutput1 \tracinglostchars1
-   \tracingmacros2 \tracingparagraphs1 \tracingrestores1
-   \tracingscantokens1 \tracingassigns1 \tracingifs1
-   \tracinggroups1 \tracingnesting2
-   \showboxbreadth\maxdimen\showboxdepth\maxdimen
-}%
-\fi
-
-% For @cropmarks command.
-% Do @cropmarks to get crop marks.
-%
-\newif\ifcropmarks
-\let\cropmarks = \cropmarkstrue
-%
-% Dimensions to add cropmarks at corners.
-% Added by P. A. MacKay, 12 Nov. 1986
-%
-\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
-\newdimen\cornerlong  \cornerlong=1pc
-\newdimen\cornerthick \cornerthick=.3pt
-\newdimen\topandbottommargin \topandbottommargin=.75in
-
-% Main output routine.
-\chardef\PAGE = 255
-\output = {\onepageout{\pagecontents\PAGE}}
-
-\newbox\headlinebox
-\newbox\footlinebox
-
-% \onepageout takes a vbox as an argument.  Note that \pagecontents
-% does insertions, but you have to call it yourself.
-\def\onepageout#1{%
-  \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
-  %
-  \ifodd\pageno  \advance\hoffset by \bindingoffset
-  \else \advance\hoffset by -\bindingoffset\fi
-  %
-  % Do this outside of the \shipout so @code etc. will be expanded in
-  % the headline as they should be, not taken literally (outputting ''code).
-  \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
-  \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
-  %
-  {%
-    % Have to do this stuff outside the \shipout because we want it to
-    % take effect in \write's, yet the group defined by the \vbox ends
-    % before the \shipout runs.
-    %
-    \escapechar = `\\     % use backslash in output files.
-    \indexdummies         % don't expand commands in the output.
-    \normalturnoffactive  % \ in index entries must not stay \, e.g., if
-                   % the page break happens to be in the middle of an example.
-    \shipout\vbox{%
-      % Do this early so pdf references go to the beginning of the page.
-      \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi
-      %
-      \ifcropmarks \vbox to \outervsize\bgroup
-        \hsize = \outerhsize
-        \vskip-\topandbottommargin
-        \vtop to0pt{%
-          \line{\ewtop\hfil\ewtop}%
-          \nointerlineskip
-          \line{%
-            \vbox{\moveleft\cornerthick\nstop}%
-            \hfill
-            \vbox{\moveright\cornerthick\nstop}%
-          }%
-          \vss}%
-        \vskip\topandbottommargin
-        \line\bgroup
-          \hfil % center the page within the outer (page) hsize.
-          \ifodd\pageno\hskip\bindingoffset\fi
-          \vbox\bgroup
-      \fi
-      %
-      \unvbox\headlinebox
-      \pagebody{#1}%
-      \ifdim\ht\footlinebox > 0pt
-        % Only leave this space if the footline is nonempty.
-        % (We lessened \vsize for it in \oddfootingxxx.)
-        % The \baselineskip=24pt in plain's \makefootline has no effect.
-        \vskip 2\baselineskip
-        \unvbox\footlinebox
-      \fi
-      %
-      \ifcropmarks
-          \egroup % end of \vbox\bgroup
-        \hfil\egroup % end of (centering) \line\bgroup
-        \vskip\topandbottommargin plus1fill minus1fill
-        \boxmaxdepth = \cornerthick
-        \vbox to0pt{\vss
-          \line{%
-            \vbox{\moveleft\cornerthick\nsbot}%
-            \hfill
-            \vbox{\moveright\cornerthick\nsbot}%
-          }%
-          \nointerlineskip
-          \line{\ewbot\hfil\ewbot}%
-        }%
-      \egroup % \vbox from first cropmarks clause
-      \fi
-    }% end of \shipout\vbox
-  }% end of group with \turnoffactive
-  \advancepageno
-  \ifnum\outputpenalty>-20000 \else\dosupereject\fi
-}
-
-\newinsert\margin \dimen\margin=\maxdimen
-
-\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
-{\catcode`\@ =11
-\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
-% marginal hacks, juha at viisa.uucp (Juha Takala)
-\ifvoid\margin\else % marginal info is present
-  \rlap{\kern\hsize\vbox to\[email protected]{\kern1pt\box\margin \vss}}\fi
-\[email protected]=\dp#1 \unvbox#1
-\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
-\ifr at ggedbottom \kern-\[email protected] \vfil \fi}
-}
-
-% Here are the rules for the cropmarks.  Note that they are
-% offset so that the space between them is truly \outerhsize or \outervsize
-% (P. A. MacKay, 12 November, 1986)
-%
-\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
-\def\nstop{\vbox
-  {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
-\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
-\def\nsbot{\vbox
-  {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
-
-% Parse an argument, then pass it to #1.  The argument is the rest of
-% the input line (except we remove a trailing comment).  #1 should be a
-% macro which expects an ordinary undelimited TeX argument.
-%
-\def\parsearg#1{%
-  \let\next = #1%
-  \begingroup
-    \obeylines
-    \futurelet\temp\parseargx
-}
-
-% If the next token is an obeyed space (from an @example environment or
-% the like), remove it and recurse.  Otherwise, we're done.
-\def\parseargx{%
-  % \obeyedspace is defined far below, after the definition of \sepspaces.
-  \ifx\obeyedspace\temp
-    \expandafter\parseargdiscardspace
-  \else
-    \expandafter\parseargline
-  \fi
-}
-
-% Remove a single space (as the delimiter token to the macro call).
-{\obeyspaces %
- \gdef\parseargdiscardspace {\futurelet\temp\parseargx}}
-
-{\obeylines %
-  \gdef\parseargline#1^^M{%
-    \endgroup % End of the group started in \parsearg.
-    %
-    % First remove any @c comment, then any @comment.
-    % Result of each macro is put in \toks0.
-    \argremovec #1\c\relax %
-    \expandafter\argremovecomment \the\toks0 \comment\relax %
-    %
-    % Call the caller's macro, saved as \next in \parsearg.
-    \expandafter\next\expandafter{\the\toks0}%
-  }%
-}
-
-% Since all \c{,omment} does is throw away the argument, we can let TeX
-% do that for us.  The \relax here is matched by the \relax in the call
-% in \parseargline; it could be more or less anything, its purpose is
-% just to delimit the argument to the \c.
-\def\argremovec#1\c#2\relax{\toks0 = {#1}}
-\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}}
-
-% \argremovec{,omment} might leave us with trailing spaces, though; e.g.,
-%    @end itemize  @c foo
-% will have two active spaces as part of the argument with the
-% `itemize'.  Here we remove all active spaces from #1, and assign the
-% result to \toks0.
-%
-% This loses if there are any *other* active characters besides spaces
-% in the argument -- _ ^ +, for example -- since they get expanded.
-% Fortunately, Texinfo does not define any such commands.  (If it ever
-% does, the catcode of the characters in questionwill have to be changed
-% here.)  But this means we cannot call \removeactivespaces as part of
-% \argremovec{,omment}, since @c uses \parsearg, and thus the argument
-% that \parsearg gets might well have any character at all in it.
-%
-\def\removeactivespaces#1{%
-  \begingroup
-    \ignoreactivespaces
-    \edef\temp{#1}%
-    \global\toks0 = \expandafter{\temp}%
-  \endgroup
-}
-
-% Change the active space to expand to nothing.
-%
-\begingroup
-  \obeyspaces
-  \gdef\ignoreactivespaces{\obeyspaces\let =\empty}
-\endgroup
-
-
-\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
-
-%% These are used to keep @begin/@end levels from running away
-%% Call \inENV within environments (after a \begingroup)
-\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
-\def\ENVcheck{%
-\ifENV\errmessage{Still within an environment; press RETURN to continue}
-\endgroup\fi} % This is not perfect, but it should reduce lossage
-
-% @begin foo  is the same as @foo, for now.
-\newhelp\EMsimple{Press RETURN to continue.}
-
-\outer\def\begin{\parsearg\beginxxx}
-
-\def\beginxxx #1{%
-\expandafter\ifx\csname #1\endcsname\relax
-{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
-\csname #1\endcsname\fi}
-
-% @end foo executes the definition of \Efoo.
-%
-\def\end{\parsearg\endxxx}
-\def\endxxx #1{%
-  \removeactivespaces{#1}%
-  \edef\endthing{\the\toks0}%
-  %
-  \expandafter\ifx\csname E\endthing\endcsname\relax
-    \expandafter\ifx\csname \endthing\endcsname\relax
-      % There's no \foo, i.e., no ``environment'' foo.
-      \errhelp = \EMsimple
-      \errmessage{Undefined command `@end \endthing'}%
-    \else
-      \unmatchedenderror\endthing
-    \fi
-  \else
-    % Everything's ok; the right environment has been started.
-    \csname E\endthing\endcsname
-  \fi
-}
-
-% There is an environment #1, but it hasn't been started.  Give an error.
-%
-\def\unmatchedenderror#1{%
-  \errhelp = \EMsimple
-  \errmessage{This `@end #1' doesn't have a matching `@#1'}%
-}
-
-% Define the control sequence \E#1 to give an unmatched @end error.
-%
-\def\defineunmatchedend#1{%
-  \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}%
-}
-
-
-% Single-spacing is done by various environments (specifically, in
-% \nonfillstart and \quotations).
-\newskip\singlespaceskip \singlespaceskip = 12.5pt
-\def\singlespace{%
-  % Why was this kern here?  It messes up equalizing space above and below
-  % environments.  --karl, 6may93
-  %{\advance \baselineskip by -\singlespaceskip
-  %\kern \baselineskip}%
-  \setleading \singlespaceskip
-}
-
-%% Simple single-character @ commands
-
-% @@ prints an @
-% Kludge this until the fonts are right (grr).
-\def\@{{\tt\char64}}
-
-% This is turned off because it was never documented
-% and you can use @w{...} around a quote to suppress ligatures.
-%% Define @` and @' to be the same as ` and '
-%% but suppressing ligatures.
-%\def\`{{`}}
-%\def\'{{'}}
-
-% Used to generate quoted braces.
-\def\mylbrace {{\tt\char123}}
-\def\myrbrace {{\tt\char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
-\begingroup
-  % Definitions to produce actual \{ & \} command in an index.
-  \catcode`\{ = 12 \catcode`\} = 12
-  \catcode`\[ = 1 \catcode`\] = 2
-  \catcode`\@ = 0 \catcode`\\ = 12
-  @gdef at lbracecmd[\{]%
-  @gdef at rbracecmd[\}]%
- at endgroup
-
-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
-\let\, = \c
-\let\dotaccent = \.
-\def\ringaccent#1{{\accent23 #1}}
-\let\tieaccent = \t
-\let\ubaraccent = \b
-\let\udotaccent = \d
-
-% Other special characters: @questiondown @exclamdown
-% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
-\def\questiondown{?`}
-\def\exclamdown{!`}
-
-% Dotless i and dotless j, used for accents.
-\def\imacro{i}
-\def\jmacro{j}
-\def\dotless#1{%
-  \def\temp{#1}%
-  \ifx\temp\imacro \ptexi
-  \else\ifx\temp\jmacro \j
-  \else \errmessage{@dotless can be used only with i or j}%
-  \fi\fi
-}
-
-% Be sure we're in horizontal mode when doing a tie, since we make space
-% equivalent to this in @example-like environments. Otherwise, a space
-% at the beginning of a line will start with \penalty -- and
-% since \penalty is valid in vertical mode, we'd end up putting the
-% penalty on the vertical list instead of in the new paragraph.
-{\catcode`@ = 11
- % Avoid using \@M directly, because that causes trouble
- % if the definition is written into an index file.
- \global\let\tiepenalty = \@M
- \gdef\tie{\leavevmode\penalty\tiepenalty\ }
-}
-
-% @: forces normal size whitespace following.
-\def\:{\spacefactor=1000 }
-
-% @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
-
-% @. is an end-of-sentence period.
-\def\.{.\spacefactor=3000 }
-
-% @! is an end-of-sentence bang.
-\def\!{!\spacefactor=3000 }
-
-% @? is an end-of-sentence query.
-\def\?{?\spacefactor=3000 }
-
-% @w prevents a word break.  Without the \leavevmode, @w at the
-% beginning of a paragraph, when TeX is still in vertical mode, would
-% produce a whole line of output instead of starting the paragraph.
-\def\w#1{\leavevmode\hbox{#1}}
-
-% @group ... @end group forces ... to be all on one page, by enclosing
-% it in a TeX vbox.  We use \vtop instead of \vbox to construct the box
-% to keep its height that of a normal line.  According to the rules for
-% \topskip (p.114 of the TeXbook), the glue inserted is
-% max (\topskip - \ht (first item), 0).  If that height is large,
-% therefore, no glue is inserted, and the space between the headline and
-% the text is small, which looks bad.
-%
-\def\group{\begingroup
-  \ifnum\catcode13=\active \else
-    \errhelp = \groupinvalidhelp
-    \errmessage{@group invalid in context where filling is enabled}%
-  \fi
-  %
-  % The \vtop we start below produces a box with normal height and large
-  % depth; thus, TeX puts \baselineskip glue before it, and (when the
-  % next line of text is done) \lineskip glue after it.  (See p.82 of
-  % the TeXbook.)  Thus, space below is not quite equal to space
-  % above.  But it's pretty close.
-  \def\Egroup{%
-    \egroup           % End the \vtop.
-    \endgroup         % End the \group.
-  }%
-  %
-  \vtop\bgroup
-    % We have to put a strut on the last line in case the @group is in
-    % the midst of an example, rather than completely enclosing it.
-    % Otherwise, the interline space between the last line of the group
-    % and the first line afterwards is too small.  But we can't put the
-    % strut in \Egroup, since there it would be on a line by itself.
-    % Hence this just inserts a strut at the beginning of each line.
-    \everypar = {\strut}%
-    %
-    % Since we have a strut on every line, we don't need any of TeX's
-    % normal interline spacing.
-    \offinterlineskip
-    %
-    % OK, but now we have to do something about blank
-    % lines in the input in @example-like environments, which normally
-    % just turn into \lisppar, which will insert no space now that we've
-    % turned off the interline space.  Simplest is to make them be an
-    % empty paragraph.
-    \ifx\par\lisppar
-      \edef\par{\leavevmode \par}%
-      %
-      % Reset ^^M's definition to new definition of \par.
-      \obeylines
-    \fi
-    %
-    % Do @comment since we are called inside an environment such as
-    % @example, where each end-of-line in the input causes an
-    % end-of-line in the output.  We don't want the end-of-line after
-    % the `@group' to put extra space in the output.  Since @group
-    % should appear on a line by itself (according to the Texinfo
-    % manual), we don't worry about eating any user text.
-    \comment
-}
-%
-% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
-% message, so this ends up printing `@group can only ...'.
-%
-\newhelp\groupinvalidhelp{%
-group can only be used in environments such as @example,^^J%
-where each line of input produces a line of output.}
-
-% @need space-in-mils
-% forces a page break if there is not space-in-mils remaining.
-
-\newdimen\mil  \mil=0.001in
-
-\def\need{\parsearg\needx}
-
-% Old definition--didn't work.
-%\def\needx #1{\par %
-%% This method tries to make TeX break the page naturally
-%% if the depth of the box does not fit.
-%{\baselineskip=0pt%
-%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
-%\prevdepth=-1000pt
-%}}
-
-\def\needx#1{%
-  % Ensure vertical mode, so we don't make a big box in the middle of a
-  % paragraph.
-  \par
-  %
-  % If the @need value is less than one line space, it's useless.
-  \dimen0 = #1\mil
-  \dimen2 = \ht\strutbox
-  \advance\dimen2 by \dp\strutbox
-  \ifdim\dimen0 > \dimen2
-    %
-    % Do a \strut just to make the height of this box be normal, so the
-    % normal leading is inserted relative to the preceding line.
-    % And a page break here is fine.
-    \vtop to #1\mil{\strut\vfil}%
-    %
-    % TeX does not even consider page breaks if a penalty added to the
-    % main vertical list is 10000 or more.  But in order to see if the
-    % empty box we just added fits on the page, we must make it consider
-    % page breaks.  On the other hand, we don't want to actually break the
-    % page after the empty box.  So we use a penalty of 9999.
-    %
-    % There is an extremely small chance that TeX will actually break the
-    % page at this \penalty, if there are no other feasible breakpoints in
-    % sight.  (If the user is using lots of big @group commands, which
-    % almost-but-not-quite fill up a page, TeX will have a hard time doing
-    % good page breaking, for example.)  However, I could not construct an
-    % example where a page broke at this \penalty; if it happens in a real
-    % document, then we can reconsider our strategy.
-    \penalty9999
-    %
-    % Back up by the size of the box, whether we did a page break or not.
-    \kern -#1\mil
-    %
-    % Do not allow a page break right after this kern.
-    \nobreak
-  \fi
-}
-
-% @br   forces paragraph break
-
-\let\br = \par
-
-% @dots{} output an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in a typewriter
-% font as three actual period characters.
-%
-\def\dots{%
-  \leavevmode
-  \hbox to 1.5em{%
-    \hskip 0pt plus 0.25fil minus 0.25fil
-    .\hss.\hss.%
-    \hskip 0pt plus 0.5fil minus 0.5fil
-  }%
-}
-
-% @enddots{} is an end-of-sentence ellipsis.
-%
-\def\enddots{%
-  \leavevmode
-  \hbox to 2em{%
-    \hskip 0pt plus 0.25fil minus 0.25fil
-    .\hss.\hss.\hss.%
-    \hskip 0pt plus 0.5fil minus 0.5fil
-  }%
-  \spacefactor=3000
-}
-
-
-% @page    forces the start of a new page
-%
-\def\page{\par\vfill\supereject}
-
-% @exdent text....
-% outputs text on separate line in roman font, starting at standard page margin
-
-% This records the amount of indent in the innermost environment.
-% That's how much \exdent should take out.
-\newskip\exdentamount
-
-% This defn is used inside fill environments such as @defun.
-\def\exdent{\parsearg\exdentyyy}
-\def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}}
-
-% This defn is used inside nofill environments such as @example.
-\def\nofillexdent{\parsearg\nofillexdentyyy}
-\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
-\leftline{\hskip\leftskip{\rm#1}}}}
-
-% @inmargin{TEXT} puts TEXT in the margin next to the current paragraph.
-
-\def\inmargin#1{%
-\strut\vadjust{\nobreak\kern-\strutdepth
-  \vtop to \strutdepth{\baselineskip\strutdepth\vss
-  \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}}
-\newskip\inmarginspacing \inmarginspacing=1cm
-\def\strutdepth{\dp\strutbox}
-
-%\hbox{{\rm#1}}\hfil\break}}
-
-% @include file    insert text of that file as input.
-% Allow normal characters that  we make active in the argument (a file name).
-\def\include{\begingroup
-  \catcode`\\=12
-  \catcode`~=12
-  \catcode`^=12
-  \catcode`_=12
-  \catcode`|=12
-  \catcode`<=12
-  \catcode`>=12
-  \catcode`+=12
-  \parsearg\includezzz}
-% Restore active chars for included file.
-\def\includezzz#1{\endgroup\begingroup
-  % Read the included file in a group so nested @include's work.
-  \def\thisfile{#1}%
-  \input\thisfile
-\endgroup}
-
-\def\thisfile{}
-
-% @center line   outputs that line, centered
-
-\def\center{\parsearg\centerzzz}
-\def\centerzzz #1{{\advance\hsize by -\leftskip
-\advance\hsize by -\rightskip
-\centerline{#1}}}
-
-% @sp n   outputs n lines of vertical space
-
-\def\sp{\parsearg\spxxx}
-\def\spxxx #1{\vskip #1\baselineskip}
-
-% @comment ...line which is ignored...
-% @c is the same as @comment
-% @ignore ... @end ignore  is another way to write a comment
-
-\def\comment{\begingroup \catcode`\^^M=\other%
-\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
-\commentxxx}
-{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-
-\let\c=\comment
-
-% @paragraphindent NCHARS
-% We'll use ems for NCHARS, close enough.
-% We cannot implement @paragraphindent asis, though.
-% 
-\def\asisword{asis} % no translation, these are keywords
-\def\noneword{none}
-%
-\def\paragraphindent{\parsearg\doparagraphindent}
-\def\doparagraphindent#1{%
-  \def\temp{#1}%
-  \ifx\temp\asisword
-  \else
-    \ifx\temp\noneword
-      \defaultparindent = 0pt
-    \else
-      \defaultparindent = #1em
-    \fi
-  \fi
-  \parindent = \defaultparindent
-}
-
-% @exampleindent NCHARS
-% We'll use ems for NCHARS like @paragraphindent.
-% It seems @exampleindent asis isn't necessary, but
-% I preserve it to make it similar to @paragraphindent.
-\def\exampleindent{\parsearg\doexampleindent}
-\def\doexampleindent#1{%
-  \def\temp{#1}%
-  \ifx\temp\asisword
-  \else
-    \ifx\temp\noneword
-      \lispnarrowing = 0pt
-    \else
-      \lispnarrowing = #1em
-    \fi
-  \fi
-}
-
-% @asis just yields its argument.  Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math means output in math mode.
-% We don't use $'s directly in the definition of \math because control
-% sequences like \math are expanded when the toc file is written.  Then,
-% we read the toc file back, the $'s will be normal characters (as they
-% should be, according to the definition of Texinfo).  So we must use a
-% control sequence to switch into and out of math mode.
-%
-% This isn't quite enough for @math to work properly in indices, but it
-% seems unlikely it will ever be needed there.
-%
-\let\implicitmath = $
-\def\math#1{\implicitmath #1\implicitmath}
-
-% @bullet and @minus need the same treatment as @math, just above.
-\def\bullet{\implicitmath\ptexbullet\implicitmath}
-\def\minus{\implicitmath-\implicitmath}
-
-% @refill is a no-op.
-\let\refill=\relax
-
-% If working on a large document in chapters, it is convenient to
-% be able to disable indexing, cross-referencing, and contents, for test runs.
-% This is done with @novalidate (before @setfilename).
-%
-\newif\iflinks \linkstrue % by default we want the aux files.
-\let\novalidate = \linksfalse
-
-% @setfilename is done at the beginning of every texinfo file.
-% So open here the files we need to have open while reading the input.
-% This makes it possible to make a .fmt file for texinfo.
-\def\setfilename{%
-   \iflinks
-     \readauxfile
-   \fi % \openindices needs to do some work in any case.
-   \openindices
-   \fixbackslash  % Turn off hack to swallow `\input texinfo'.
-   \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
-   %
-   % If texinfo.cnf is present on the system, read it.
-   % Useful for site-wide @afourpaper, etc.
-   % Just to be on the safe side, close the input stream before the \input.
-   \openin 1 texinfo.cnf
-   \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi
-   \closein1
-   \temp
-   %
-   \comment % Ignore the actual filename.
-}
-
-% Called from \setfilename.
-%
-\def\openindices{%
-  \newindex{cp}%
-  \newcodeindex{fn}%
-  \newcodeindex{vr}%
-  \newcodeindex{tp}%
-  \newcodeindex{ky}%
-  \newcodeindex{pg}%
-}
-
-% @bye.
-\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
-
-
-\message{pdf,}
-% adobe `portable' document format
-\newcount\tempnum
-\newcount\lnkcount
-\newtoks\filename
-\newcount\filenamelength
-\newcount\pgn
-\newtoks\toksA
-\newtoks\toksB
-\newtoks\toksC
-\newtoks\toksD
-\newbox\boxA
-\newcount\countA
-\newif\ifpdf
-\newif\ifpdfmakepagedest
-
-\ifx\pdfoutput\undefined
-  \pdffalse
-  \let\pdfmkdest = \gobble
-  \let\pdfurl = \gobble
-  \let\endlink = \relax
-  \let\linkcolor = \relax
-  \let\pdfmakeoutlines = \relax
-\else
-  \pdftrue
-  \pdfoutput = 1
-  \input pdfcolor
-  \def\dopdfimage#1#2#3{%
-    \def\imagewidth{#2}%
-    \def\imageheight{#3}%
-    \ifnum\pdftexversion < 14
-      \pdfimage
-    \else
-      \pdfximage
-    \fi
-      \ifx\empty\imagewidth\else width \imagewidth \fi
-      \ifx\empty\imageheight\else height \imageheight \fi
-      {#1.pdf}%
-    \ifnum\pdftexversion < 14 \else
-      \pdfrefximage \pdflastximage
-    \fi}
-  \def\pdfmkdest#1{\pdfdest name{#[email protected]} xyz}
-  \def\pdfmkpgn#1{#[email protected]}
-  \let\linkcolor = \Blue  % was Cyan, but that seems light?
-  \def\endlink{\Black\pdfendlink}
-  % Adding outlines to PDF; macros for calculating structure of outlines
-  % come from Petr Olsak
-  \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
-    \else \csname#1\endcsname \fi}
-  \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
-    \advance\tempnum by1
-    \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
-  \def\pdfmakeoutlines{{%
-    \openin 1 \jobname.toc
-    \ifeof 1\else\bgroup
-      \closein 1 
-      \indexnofonts
-      \def\tt{}
-      \let\_ = \normalunderscore
-      % Thanh's hack / proper braces in bookmarks  
-      \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
-      \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
-      %
-      \def\chapentry ##1##2##3{}
-      \def\unnumbchapentry ##1##2{}
-      \def\secentry ##1##2##3##4{\advancenumber{chap##2}}
-      \def\unnumbsecentry ##1##2{}
-      \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
-      \def\unnumbsubsecentry ##1##2{}
-      \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
-      \def\unnumbsubsubsecentry ##1##2{}
-      \input \jobname.toc
-      \def\chapentry ##1##2##3{%
-        \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
-      \def\unnumbchapentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
-      \def\secentry ##1##2##3##4{%
-        \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
-      \def\unnumbsecentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
-      \def\subsecentry ##1##2##3##4##5{%
-        \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
-      \def\unnumbsubsecentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
-      \def\subsubsecentry ##1##2##3##4##5##6{%
-        \pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
-      \def\unnumbsubsubsecentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
-      \input \jobname.toc
-    \egroup\fi
-  }}
-  \def\makelinks #1,{%
-    \def\params{#1}\def\E{END}%
-    \ifx\params\E
-      \let\nextmakelinks=\relax
-    \else
-      \let\nextmakelinks=\makelinks
-      \ifnum\lnkcount>0,\fi
-      \picknum{#1}%
-      \startlink attr{/Border [0 0 0]} 
-        goto name{\pdfmkpgn{\the\pgn}}%
-      \linkcolor #1%
-      \advance\lnkcount by 1%
-      \endlink
-    \fi
-    \nextmakelinks
-  }
-  \def\picknum#1{\expandafter\pn#1}
-  \def\pn#1{%
-    \def\p{#1}%
-    \ifx\p\lbrace
-      \let\nextpn=\ppn
-    \else
-      \let\nextpn=\ppnn
-      \def\first{#1}
-    \fi
-    \nextpn
-  }
-  \def\ppn#1{\pgn=#1\gobble}
-  \def\ppnn{\pgn=\first}
-  \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
-  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
-  \def\skipspaces#1{\def\PP{#1}\def\D{|}%
-    \ifx\PP\D\let\nextsp\relax
-    \else\let\nextsp\skipspaces
-      \ifx\p\space\else\addtokens{\filename}{\PP}%
-        \advance\filenamelength by 1
-      \fi
-    \fi
-    \nextsp}
-  \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
-  \ifnum\pdftexversion < 14
-    \let \startlink \pdfannotlink
-  \else
-    \let \startlink \pdfstartlink
-  \fi
-  \def\pdfurl#1{%
-    \begingroup
-      \normalturnoffactive\def\@{@}%
-      \leavevmode\Red
-      \startlink attr{/Border [0 0 0]}%
-        user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
-        % #1
-    \endgroup}
-  \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
-  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
-  \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
-  \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
-  \def\maketoks{%
-    \expandafter\poptoks\the\toksA|ENDTOKS|
-    \ifx\first0\adn0
-    \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
-    \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
-    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 
-    \else
-      \ifnum0=\countA\else\makelink\fi
-      \ifx\first.\let\next=\done\else
-        \let\next=\maketoks
-        \addtokens{\toksB}{\the\toksD}
-        \ifx\first,\addtokens{\toksB}{\space}\fi
-      \fi
-    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-    \next}
-  \def\makelink{\addtokens{\toksB}%
-    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
-  \def\pdflink#1{%
-    \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}}
-    \linkcolor #1\endlink}
-  \def\mkpgn#1{#[email protected]} 
-  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-\fi % \ifx\pdfoutput
-
-
-\message{fonts,}
-% Font-change commands.
-
-% Texinfo sort of supports the sans serif font style, which plain TeX does not.
-% So we set up a \sf analogous to plain's \rm, etc.
-\newfam\sffam
-\def\sf{\fam=\sffam \tensf}
-\let\li = \sf % Sometimes we call it \li, not \sf.
-
-% We don't need math for this one.
-\def\ttsl{\tenttsl}
-
-% Use Computer Modern fonts at \magstephalf (11pt).
-\newcount\mainmagstep
-\mainmagstep=\magstephalf
-
-% Set the font macro #1 to the font named #2, adding on the
-% specified font prefix (normally `cm').
-% #3 is the font's design size, #4 is a scale factor
-\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
-
-% Use cm as the default font prefix.
-% To specify the font prefix, you must define \fontprefix
-% before you read in texinfo.tex.
-\ifx\fontprefix\undefined
-\def\fontprefix{cm}
-\fi
-% Support font families that don't use the same naming scheme as CM.
-\def\rmshape{r}
-\def\rmbshape{bx}               %where the normal face is bold
-\def\bfshape{b}
-\def\bxshape{bx}
-\def\ttshape{tt}
-\def\ttbshape{tt}
-\def\ttslshape{sltt}
-\def\itshape{ti}
-\def\itbshape{bxti}
-\def\slshape{sl}
-\def\slbshape{bxsl}
-\def\sfshape{ss}
-\def\sfbshape{ss}
-\def\scshape{csc}
-\def\scbshape{csc}
-
-\ifx\bigger\relax
-\let\mainmagstep=\magstep1
-\setfont\textrm\rmshape{12}{1000}
-\setfont\texttt\ttshape{12}{1000}
-\else
-\setfont\textrm\rmshape{10}{\mainmagstep}
-\setfont\texttt\ttshape{10}{\mainmagstep}
-\fi
-% Instead of cmb10, you many want to use cmbx10.
-% cmbx10 is a prettier font on its own, but cmb10
-% looks better when embedded in a line with cmr10.
-\setfont\textbf\bfshape{10}{\mainmagstep}
-\setfont\textit\itshape{10}{\mainmagstep}
-\setfont\textsl\slshape{10}{\mainmagstep}
-\setfont\textsf\sfshape{10}{\mainmagstep}
-\setfont\textsc\scshape{10}{\mainmagstep}
-\setfont\textttsl\ttslshape{10}{\mainmagstep}
-\font\texti=cmmi10 scaled \mainmagstep
-\font\textsy=cmsy10 scaled \mainmagstep
-
-% A few fonts for @defun, etc.
-\setfont\defbf\bxshape{10}{\magstep1} %was 1314
-\setfont\deftt\ttshape{10}{\magstep1}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
-
-% Fonts for indices, footnotes, small examples (9pt).
-\setfont\smallrm\rmshape{9}{1000}
-\setfont\smalltt\ttshape{9}{1000}
-\setfont\smallbf\bfshape{10}{900}
-\setfont\smallit\itshape{9}{1000}
-\setfont\smallsl\slshape{9}{1000}
-\setfont\smallsf\sfshape{9}{1000}
-\setfont\smallsc\scshape{10}{900}
-\setfont\smallttsl\ttslshape{10}{900}
-\font\smalli=cmmi9
-\font\smallsy=cmsy9
-
-% Fonts for title page:
-\setfont\titlerm\rmbshape{12}{\magstep3}
-\setfont\titleit\itbshape{10}{\magstep4}
-\setfont\titlesl\slbshape{10}{\magstep4}
-\setfont\titlett\ttbshape{12}{\magstep3}
-\setfont\titlettsl\ttslshape{10}{\magstep4}
-\setfont\titlesf\sfbshape{17}{\magstep1}
-\let\titlebf=\titlerm
-\setfont\titlesc\scbshape{10}{\magstep4}
-\font\titlei=cmmi12 scaled \magstep3
-\font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-
-% Chapter (and unnumbered) fonts (17.28pt).
-\setfont\chaprm\rmbshape{12}{\magstep2}
-\setfont\chapit\itbshape{10}{\magstep3}
-\setfont\chapsl\slbshape{10}{\magstep3}
-\setfont\chaptt\ttbshape{12}{\magstep2}
-\setfont\chapttsl\ttslshape{10}{\magstep3}
-\setfont\chapsf\sfbshape{17}{1000}
-\let\chapbf=\chaprm
-\setfont\chapsc\scbshape{10}{\magstep3}
-\font\chapi=cmmi12 scaled \magstep2
-\font\chapsy=cmsy10 scaled \magstep3
-
-% Section fonts (14.4pt).
-\setfont\secrm\rmbshape{12}{\magstep1}
-\setfont\secit\itbshape{10}{\magstep2}
-\setfont\secsl\slbshape{10}{\magstep2}
-\setfont\sectt\ttbshape{12}{\magstep1}
-\setfont\secttsl\ttslshape{10}{\magstep2}
-\setfont\secsf\sfbshape{12}{\magstep1}
-\let\secbf\secrm
-\setfont\secsc\scbshape{10}{\magstep2}
-\font\seci=cmmi12 scaled \magstep1
-\font\secsy=cmsy10 scaled \magstep2
-
-% \setfont\ssecrm\bxshape{10}{\magstep1}    % This size an font looked bad.
-% \setfont\ssecit\itshape{10}{\magstep1}    % The letters were too crowded.
-% \setfont\ssecsl\slshape{10}{\magstep1}
-% \setfont\ssectt\ttshape{10}{\magstep1}
-% \setfont\ssecsf\sfshape{10}{\magstep1}
-
-%\setfont\ssecrm\bfshape{10}{1315}      % Note the use of cmb rather than cmbx.
-%\setfont\ssecit\itshape{10}{1315}      % Also, the size is a little larger than
-%\setfont\ssecsl\slshape{10}{1315}      % being scaled magstep1.
-%\setfont\ssectt\ttshape{10}{1315}
-%\setfont\ssecsf\sfshape{10}{1315}
-
-%\let\ssecbf=\ssecrm
-
-% Subsection fonts (13.15pt).
-\setfont\ssecrm\rmbshape{12}{\magstephalf}
-\setfont\ssecit\itbshape{10}{1315}
-\setfont\ssecsl\slbshape{10}{1315}
-\setfont\ssectt\ttbshape{12}{\magstephalf}
-\setfont\ssecttsl\ttslshape{10}{1315}
-\setfont\ssecsf\sfbshape{12}{\magstephalf}
-\let\ssecbf\ssecrm
-\setfont\ssecsc\scbshape{10}{\magstep1}
-\font\sseci=cmmi12 scaled \magstephalf
-\font\ssecsy=cmsy10 scaled 1315
-% The smallcaps and symbol fonts should actually be scaled \magstep1.5,
-% but that is not a standard magnification.
-
-% In order for the font changes to affect most math symbols and letters,
-% we have to define the \textfont of the standard families.  Since
-% texinfo doesn't allow for producing subscripts and superscripts, we
-% don't bother to reset \scriptfont and \scriptscriptfont (which would
-% also require loading a lot more fonts).
-%
-\def\resetmathfonts{%
-  \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
-  \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
-  \textfont\ttfam = \tentt \textfont\sffam = \tensf
-}
-
-
-% The font-changing commands redefine the meanings of \tenSTYLE, instead
-% of just \STYLE.  We do this so that font changes will continue to work
-% in math mode, where it is the current \fam that is relevant in most
-% cases, not the current font.  Plain TeX does \def\bf{\fam=\bffam
-% \tenbf}, for example.  By redefining \tenbf, we obviate the need to
-% redefine \bf itself.
-\def\textfonts{%
-  \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
-  \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
-  \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
-  \resetmathfonts}
-\def\titlefonts{%
-  \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
-  \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
-  \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
-  \let\tenttsl=\titlettsl
-  \resetmathfonts \setleading{25pt}}
-\def\titlefont#1{{\titlefonts\rm #1}}
-\def\chapfonts{%
-  \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
-  \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
-  \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
-  \resetmathfonts \setleading{19pt}}
-\def\secfonts{%
-  \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
-  \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
-  \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl
-  \resetmathfonts \setleading{16pt}}
-\def\subsecfonts{%
-  \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
-  \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
-  \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
-  \resetmathfonts \setleading{15pt}}
-\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
-\def\smallfonts{%
-  \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
-  \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
-  \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
-  \let\tenttsl=\smallttsl
-  \resetmathfonts \setleading{11pt}}
-
-% Set up the default fonts, so we can use them for creating boxes.
-%
-\textfonts
-
-% Define these so they can be easily changed for other fonts.
-\def\angleleft{$\langle$}
-\def\angleright{$\rangle$}
-
-% Count depth in font-changes, for error checks
-\newcount\fontdepth \fontdepth=0
-
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}
-\setfont\shortcontbf\bxshape{12}{1000}
-\setfont\shortcontsl\slshape{12}{1000}
-
-%% Add scribe-like font environments, plus @l for inline lisp (usually sans
-%% serif) and @ii for TeX italic
-
-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
-% unless the following character is such as not to need one.
-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
-\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx}
-
-\let\i=\smartitalic
-\let\var=\smartslanted
-\let\dfn=\smartslanted
-\let\emph=\smartitalic
-\let\cite=\smartslanted
-
-\def\b#1{{\bf #1}}
-\let\strong=\b
-
-% We can't just use \exhyphenpenalty, because that only has effect at
-% the end of a paragraph.  Restore normal hyphenation at the end of the
-% group within which \nohyphenation is presumably called.
-%
-\def\nohyphenation{\hyphenchar\font = -1  \aftergroup\restorehyphenation}
-\def\restorehyphenation{\hyphenchar\font = `- }
-
-\def\t#1{%
-  {\tt \rawbackslash \frenchspacing #1}%
-  \null
-}
-\let\ttfont=\t
-\def\samp#1{`\tclose{#1}'\null}
-\setfont\keyrm\rmshape{8}{1000}
-\font\keysy=cmsy9
-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-    \vbox{\hrule\kern-0.4pt
-     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-    \kern-0.4pt\hrule}%
-  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-% The old definition, with no lozenge:
-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
-
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
-
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
-\def\tclose#1{%
-  {%
-    % Change normal interword space to be same as for the current font.
-    \spaceskip = \fontdimen2\font
-    %
-    % Switch to typewriter.
-    \tt
-    %
-    % But `\ ' produces the large typewriter interword space.
-    \def\ {{\spaceskip = 0pt{} }}%
-    %
-    % Turn off hyphenation.
-    \nohyphenation
-    %
-    \rawbackslash
-    \frenchspacing
-    #1%
-  }%
-  \null
-}
-
-% We *must* turn on hyphenation at `-' and `_' in \code.
-% Otherwise, it is too hard to avoid overfull hboxes
-% in the Emacs manual, the Library manual, etc.
-
-% Unfortunately, TeX uses one parameter (\hyphenchar) to control
-% both hyphenation at - and hyphenation within words.
-% We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate at a dash.
-%  -- rms.
-{
-  \catcode`\-=\active
-  \catcode`\_=\active
-  %
-  \global\def\code{\begingroup
-    \catcode`\-=\active \let-\codedash
-    \catcode`\_=\active \let_\codeunder
-    \codex
-  }
-  %
-  % If we end up with any active - characters when handling the index,
-  % just treat them as a normal -.
-  \global\def\indexbreaks{\catcode`\-=\active \let-\realdash}
-}
-
-\def\realdash{-}
-\def\codedash{-\discretionary{}{}{}}
-\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
-\def\codex #1{\tclose{#1}\endgroup}
-
-%\let\exp=\tclose  %Was temporary
-
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-
-% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
-%   `example' (@kbd uses ttsl only inside of @example and friends),
-%   or `code' (@kbd uses normal tty font always).
-\def\kbdinputstyle{\parsearg\kbdinputstylexxx}
-\def\kbdinputstylexxx#1{%
-  \def\arg{#1}%
-  \ifx\arg\worddistinct
-    \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
-  \else\ifx\arg\wordexample
-    \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
-  \else\ifx\arg\wordcode
-    \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
-  \fi\fi\fi
-}
-\def\worddistinct{distinct}
-\def\wordexample{example}
-\def\wordcode{code}
-
-% Default is kbdinputdistinct.  (Too much of a hassle to call the macro,
-% the catcodes are wrong for parsearg to work.)
-\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}
-
-\def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\look}}\fi
-\else{\tclose{\kbdfont\look}}\fi}
-
-% For @url, @env, @command quotes seem unnecessary, so use \code.
-\let\url=\code
-\let\env=\code
-\let\command=\code
-
-% @uref (abbreviation for `urlref') takes an optional (comma-separated)
-% second argument specifying the text to display and an optional third
-% arg as text to display instead of (rather than in addition to) the url
-% itself.  First (mandatory) arg is the url.  Perhaps eventually put in
-% a hypertex \special here.
-%
-\def\uref#1{\douref #1,,,\finish}
-\def\douref#1,#2,#3,#4\finish{\begingroup
-  \unsepspaces
-  \pdfurl{#1}%
-  \setbox0 = \hbox{\ignorespaces #3}%
-  \ifdim\wd0 > 0pt
-    \unhbox0 % third arg given, show only that
-  \else
-    \setbox0 = \hbox{\ignorespaces #2}%
-    \ifdim\wd0 > 0pt
-      \ifpdf
-        \unhbox0             % PDF: 2nd arg given, show only it
-      \else
-        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
-      \fi
-    \else
-      \code{#1}% only url given, so show it
-    \fi
-  \fi
-  \endlink
-\endgroup}
-
-% rms does not like angle brackets --karl, 17may97.
-% So now @email is just like @uref, unless we are pdf.
-% 
-%\def\email#1{\angleleft{\tt #1}\angleright}
-\ifpdf
-  \def\email#1{\doemail#1,,\finish}
-  \def\doemail#1,#2,#3\finish{\begingroup
-    \unsepspaces
-    \pdfurl{mailto:#1}%
-    \setbox0 = \hbox{\ignorespaces #2}%
-    \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
-    \endlink
-  \endgroup}
-\else
-  \let\email=\uref
-\fi
-
-% Check if we are currently using a typewriter font.  Since all the
-% Computer Modern typewriter fonts have zero interword stretch (and
-% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
-
-% Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
-% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
-%
-\def\dmn#1{\thinspace #1}
-
-\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
-
-% @l was never documented to mean ``switch to the Lisp font'',
-% and it is not used as such in any manual I can find.  We need it for
-% Polish suppressed-l.  --karl, 22sep96.
-%\def\l#1{{\li #1}\null}
-
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}}              % roman font
-\def\sc#1{{\smallcaps#1}}       % smallcaps font
-\def\ii#1{{\it #1}}             % italic font
-
-% @acronym downcases the argument and prints in smallcaps.
-\def\acronym#1{{\smallcaps \lowercase{#1}}}
-
-% @pounds{} is a sterling sign.
-\def\pounds{{\it\$}}
-
-
-\message{page headings,}
-
-\newskip\titlepagetopglue \titlepagetopglue = 1.5in
-\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
-
-% First the title page.  Must do @settitle before @titlepage.
-\newif\ifseenauthor
-\newif\iffinishedtitlepage
-
-% Do an implicit @contents or @shortcontents after @end titlepage if the
-% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
-%
-\newif\ifsetcontentsaftertitlepage
- \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
-\newif\ifsetshortcontentsaftertitlepage
- \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
-
-\def\shorttitlepage{\parsearg\shorttitlepagezzz}
-\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
-        \endgroup\page\hbox{}\page}
-
-\def\titlepage{\begingroup \parindent=0pt \textfonts
-   \let\subtitlerm=\tenrm
-   \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
-   %
-   \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
-   %
-   % Leave some space at the very top of the page.
-   \vglue\titlepagetopglue
-   %
-   % Now you can print the title using @title.
-   \def\title{\parsearg\titlezzz}%
-   \def\titlezzz##1{\leftline{\titlefonts\rm ##1}
-                    % print a rule at the page bottom also.
-                    \finishedtitlepagefalse
-                    \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
-   % No rule at page bottom unless we print one at the top with @title.
-   \finishedtitlepagetrue
-   %
-   % Now you can put text using @subtitle.
-   \def\subtitle{\parsearg\subtitlezzz}%
-   \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}%
-   %
-   % @author should come last, but may come many times.
-   \def\author{\parsearg\authorzzz}%
-   \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi
-      {\authorfont \leftline{##1}}}%
-   %
-   % Most title ``pages'' are actually two pages long, with space
-   % at the top of the second.  We don't want the ragged left on the second.
-   \let\oldpage = \page
-   \def\page{%
-      \iffinishedtitlepage\else
-         \finishtitlepage
-      \fi
-      \oldpage
-      \let\page = \oldpage
-      \hbox{}}%
-%   \def\page{\oldpage \hbox{}}
-}
-
-\def\Etitlepage{%
-   \iffinishedtitlepage\else
-      \finishtitlepage
-   \fi
-   % It is important to do the page break before ending the group,
-   % because the headline and footline are only empty inside the group.
-   % If we use the new definition of \page, we always get a blank page
-   % after the title page, which we certainly don't want.
-   \oldpage
-   \endgroup
-   %
-   % If they want short, they certainly want long too.
-   \ifsetshortcontentsaftertitlepage
-     \shortcontents
-     \contents
-     \global\let\shortcontents = \relax
-     \global\let\contents = \relax
-   \fi
-   %
-   \ifsetcontentsaftertitlepage
-     \contents
-     \global\let\contents = \relax
-     \global\let\shortcontents = \relax
-   \fi
-   %
-   \ifpdf \pdfmakepagedesttrue \fi
-   %
-   \HEADINGSon
-}
-
-\def\finishtitlepage{%
-   \vskip4pt \hrule height 2pt width \hsize
-   \vskip\titlepagebottomglue
-   \finishedtitlepagetrue
-}
-
-%%% Set up page headings and footings.
-
-\let\thispage=\folio
-
-\newtoks\evenheadline    % headline on even pages
-\newtoks\oddheadline     % headline on odd pages
-\newtoks\evenfootline    % footline on even pages
-\newtoks\oddfootline     % footline on odd pages
-
-% Now make Tex use those variables
-\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
-                            \else \the\evenheadline \fi}}
-\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
-                            \else \the\evenfootline \fi}\HEADINGShook}
-\let\HEADINGShook=\relax
-
-% Commands to set those variables.
-% For example, this is what  @headings on  does
-% @evenheading @thistitle|@thispage|@thischapter
-% @oddheading @thischapter|@thispage|@thistitle
-% @evenfooting @thisfile||
-% @oddfooting ||@thisfile
-
-\def\evenheading{\parsearg\evenheadingxxx}
-\def\oddheading{\parsearg\oddheadingxxx}
-\def\everyheading{\parsearg\everyheadingxxx}
-
-\def\evenfooting{\parsearg\evenfootingxxx}
-\def\oddfooting{\parsearg\oddfootingxxx}
-\def\everyfooting{\parsearg\everyfootingxxx}
-
-{\catcode`\@=0 %
-
-\gdef\evenheadingxxx #1{\evenheadingyyy #[email protected]|@|@|@|\finish}
-\gdef\evenheadingyyy #[email protected]|#[email protected]|#[email protected]|#4\finish{%
-\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\gdef\oddheadingxxx #1{\oddheadingyyy #[email protected]|@|@|@|\finish}
-\gdef\oddheadingyyy #[email protected]|#[email protected]|#[email protected]|#4\finish{%
-\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
-
-\gdef\evenfootingxxx #1{\evenfootingyyy #[email protected]|@|@|@|\finish}
-\gdef\evenfootingyyy #[email protected]|#[email protected]|#[email protected]|#4\finish{%
-\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\gdef\oddfootingxxx #1{\oddfootingyyy #[email protected]|@|@|@|\finish}
-\gdef\oddfootingyyy #[email protected]|#[email protected]|#[email protected]|#4\finish{%
-  \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
-  %
-  % Leave some space for the footline.  Hopefully ok to assume
-  % @evenfooting will not be used by itself.
-  \global\advance\pageheight by -\baselineskip
-  \global\advance\vsize by -\baselineskip
-}
-
-\gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}}
-%
-}% unbind the catcode of @.
-
-% @headings double      turns headings on for double-sided printing.
-% @headings single      turns headings on for single-sided printing.
-% @headings off         turns them off.
-% @headings on          same as @headings double, retained for compatibility.
-% @headings after       turns on double-sided headings after this page.
-% @headings doubleafter turns on double-sided headings after this page.
-% @headings singleafter turns on single-sided headings after this page.
-% By default, they are off at the start of a document,
-% and turned `on' after @end titlepage.
-
-\def\headings #1 {\csname HEADINGS#1\endcsname}
-
-\def\HEADINGSoff{
-\global\evenheadline={\hfil} \global\evenfootline={\hfil}
-\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
-\HEADINGSoff
-% When we turn headings on, set the page number to 1.
-% For double-sided printing, put current file name in lower left corner,
-% chapter name on inside top of right hand pages, document
-% title on inside top of left hand pages, and page numbers on outside top
-% edge of all pages.
-\def\HEADINGSdouble{
-\global\pageno=1
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\let\contentsalignmacro = \chapoddpage
-}
-\let\contentsalignmacro = \chappager
-
-% For single-sided printing, chapter title goes across top left of page,
-% page number on top right.
-\def\HEADINGSsingle{
-\global\pageno=1
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\let\contentsalignmacro = \chappager
-}
-\def\HEADINGSon{\HEADINGSdouble}
-
-\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
-\let\HEADINGSdoubleafter=\HEADINGSafter
-\def\HEADINGSdoublex{%
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\let\contentsalignmacro = \chapoddpage
-}
-
-\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
-\def\HEADINGSsinglex{%
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\let\contentsalignmacro = \chappager
-}
-
-% Subroutines used in generating headings
-% This produces Day Month Year style of output.
-% Only define if not already defined, in case a txi-??.tex file has set
-% up a different format (e.g., txi-cs.tex does this).
-\ifx\today\undefined
-\def\today{%
-  \number\day\space
-  \ifcase\month
-  \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
-  \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
-  \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
-  \fi
-  \space\number\year}
-\fi
-
-% @settitle line...  specifies the title of the document, for headings.
-% It generates no output of its own.
-\def\thistitle{\putwordNoTitle}
-\def\settitle{\parsearg\settitlezzz}
-\def\settitlezzz #1{\gdef\thistitle{#1}}
-
-
-\message{tables,}
-% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
-
-% default indentation of table text
-\newdimen\tableindent \tableindent=.8in
-% default indentation of @itemize and @enumerate text
-\newdimen\itemindent  \itemindent=.3in
-% margin between end of table item and start of table text.
-\newdimen\itemmargin  \itemmargin=.1in
-
-% used internally for \itemindent minus \itemmargin
-\newdimen\itemmax
-
-% Note @table, @vtable, and @vtable define @item, @itemx, etc., with
-% these defs.
-% They also define \itemindex
-% to index the item name in whatever manner is desired (perhaps none).
-
-\newif\ifitemxneedsnegativevskip
-
-\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
-
-\def\internalBitem{\smallbreak \parsearg\itemzzz}
-\def\internalBitemx{\itemxpar \parsearg\itemzzz}
-
-\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
-\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz}
-
-\def\internalBkitem{\smallbreak \parsearg\kitemzzz}
-\def\internalBkitemx{\itemxpar \parsearg\kitemzzz}
-
-\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}%
-                 \itemzzz {#1}}
-
-\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}%
-                 \itemzzz {#1}}
-
-\def\itemzzz #1{\begingroup %
-  \advance\hsize by -\rightskip
-  \advance\hsize by -\tableindent
-  \setbox0=\hbox{\itemfont{#1}}%
-  \itemindex{#1}%
-  \nobreak % This prevents a break before @itemx.
-  %
-  % If the item text does not fit in the space we have, put it on a line
-  % by itself, and do not allow a page break either before or after that
-  % line.  We do not start a paragraph here because then if the next
-  % command is, e.g., @kindex, the whatsit would get put into the
-  % horizontal list on a line by itself, resulting in extra blank space.
-  \ifdim \wd0>\itemmax
-    %
-    % Make this a paragraph so we get the \parskip glue and wrapping,
-    % but leave it ragged-right.
-    \begingroup
-      \advance\leftskip by-\tableindent
-      \advance\hsize by\tableindent
-      \advance\rightskip by0pt plus1fil
-      \leavevmode\unhbox0\par
-    \endgroup
-    %
-    % We're going to be starting a paragraph, but we don't want the
-    % \parskip glue -- logically it's part of the @item we just started.
-    \nobreak \vskip-\parskip
-    %
-    % Stop a page break at the \parskip glue coming up.  Unfortunately
-    % we can't prevent a possible page break at the following
-    % \baselineskip glue.
-    \nobreak
-    \endgroup
-    \itemxneedsnegativevskipfalse
-  \else
-    % The item text fits into the space.  Start a paragraph, so that the
-    % following text (if any) will end up on the same line.
-    \noindent
-    % Do this with kerns and \unhbox so that if there is a footnote in
-    % the item text, it can migrate to the main vertical list and
-    % eventually be printed.
-    \nobreak\kern-\tableindent
-    \dimen0 = \itemmax  \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
-    \unhbox0
-    \nobreak\kern\dimen0
-    \endgroup
-    \itemxneedsnegativevskiptrue
-  \fi
-}
-
-\def\item{\errmessage{@item while not in a table}}
-\def\itemx{\errmessage{@itemx while not in a table}}
-\def\kitem{\errmessage{@kitem while not in a table}}
-\def\kitemx{\errmessage{@kitemx while not in a table}}
-\def\xitem{\errmessage{@xitem while not in a table}}
-\def\xitemx{\errmessage{@xitemx while not in a table}}
-
-% Contains a kludge to get @end[description] to work.
-\def\description{\tablez{\dontindex}{1}{}{}{}{}}
-
-% @table, @ftable, @vtable.
-\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
-{\obeylines\obeyspaces%
-\gdef\tablex #1^^M{%
-\tabley\dontindex#1        \endtabley}}
-
-\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
-{\obeylines\obeyspaces%
-\gdef\ftablex #1^^M{%
-\tabley\fnitemindex#1        \endtabley
-\def\Eftable{\endgraf\afterenvbreak\endgroup}%
-\let\Etable=\relax}}
-
-\def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex}
-{\obeylines\obeyspaces%
-\gdef\vtablex #1^^M{%
-\tabley\vritemindex#1        \endtabley
-\def\Evtable{\endgraf\afterenvbreak\endgroup}%
-\let\Etable=\relax}}
-
-\def\dontindex #1{}
-\def\fnitemindex #1{\doind {fn}{\code{#1}}}%
-\def\vritemindex #1{\doind {vr}{\code{#1}}}%
-
-{\obeyspaces %
-\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
-\tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
-
-\def\tablez #1#2#3#4#5#6{%
-\aboveenvbreak %
-\begingroup %
-\def\Edescription{\Etable}% Necessary kludge.
-\let\itemindex=#1%
-\ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
-\ifnum 0#4>0 \tableindent=#4\mil \fi %
-\ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
-\def\itemfont{#2}%
-\itemmax=\tableindent %
-\advance \itemmax by -\itemmargin %
-\advance \leftskip by \tableindent %
-\exdentamount=\tableindent
-\parindent = 0pt
-\parskip = \smallskipamount
-\ifdim \parskip=0pt \parskip=2pt \fi%
-\def\Etable{\endgraf\afterenvbreak\endgroup}%
-\let\item = \internalBitem %
-\let\itemx = \internalBitemx %
-\let\kitem = \internalBkitem %
-\let\kitemx = \internalBkitemx %
-\let\xitem = \internalBxitem %
-\let\xitemx = \internalBxitemx %
-}
-
-% This is the counter used by @enumerate, which is really @itemize
-
-\newcount \itemno
-
-\def\itemize{\parsearg\itemizezzz}
-
-\def\itemizezzz #1{%
-  \begingroup % ended by the @end itemize
-  \itemizey {#1}{\Eitemize}
-}
-
-\def\itemizey #1#2{%
-\aboveenvbreak %
-\itemmax=\itemindent %
-\advance \itemmax by -\itemmargin %
-\advance \leftskip by \itemindent %
-\exdentamount=\itemindent
-\parindent = 0pt %
-\parskip = \smallskipamount %
-\ifdim \parskip=0pt \parskip=2pt \fi%
-\def#2{\endgraf\afterenvbreak\endgroup}%
-\def\itemcontents{#1}%
-\let\item=\itemizeitem}
-
-% Set sfcode to normal for the chars that usually have another value.
-% These are `.?!:;,'
-\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000
-  \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }
-
-% \splitoff TOKENS\endmark defines \first to be the first token in
-% TOKENS, and \rest to be the remainder.
-%
-\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
-
-% Allow an optional argument of an uppercase letter, lowercase letter,
-% or number, to specify the first label in the enumerated list.  No
-% argument is the same as `1'.
-%
-\def\enumerate{\parsearg\enumeratezzz}
-\def\enumeratezzz #1{\enumeratey #1  \endenumeratey}
-\def\enumeratey #1 #2\endenumeratey{%
-  \begingroup % ended by the @end enumerate
-  %
-  % If we were given no argument, pretend we were given `1'.
-  \def\thearg{#1}%
-  \ifx\thearg\empty \def\thearg{1}\fi
-  %
-  % Detect if the argument is a single token.  If so, it might be a
-  % letter.  Otherwise, the only valid thing it can be is a number.
-  % (We will always have one token, because of the test we just made.
-  % This is a good thing, since \splitoff doesn't work given nothing at
-  % all -- the first parameter is undelimited.)
-  \expandafter\splitoff\thearg\endmark
-  \ifx\rest\empty
-    % Only one token in the argument.  It could still be anything.
-    % A ``lowercase letter'' is one whose \lccode is nonzero.
-    % An ``uppercase letter'' is one whose \lccode is both nonzero, and
-    %   not equal to itself.
-    % Otherwise, we assume it's a number.
-    %
-    % We need the \relax at the end of the \ifnum lines to stop TeX from
-    % continuing to look for a <number>.
-    %
-    \ifnum\lccode\expandafter`\thearg=0\relax
-      \numericenumerate % a number (we hope)
-    \else
-      % It's a letter.
-      \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
-        \lowercaseenumerate % lowercase letter
-      \else
-        \uppercaseenumerate % uppercase letter
-      \fi
-    \fi
-  \else
-    % Multiple tokens in the argument.  We hope it's a number.
-    \numericenumerate
-  \fi
-}
-
-% An @enumerate whose labels are integers.  The starting integer is
-% given in \thearg.
-%
-\def\numericenumerate{%
-  \itemno = \thearg
-  \startenumeration{\the\itemno}%
-}
-
-% The starting (lowercase) letter is in \thearg.
-\def\lowercaseenumerate{%
-  \itemno = \expandafter`\thearg
-  \startenumeration{%
-    % Be sure we're not beyond the end of the alphabet.
-    \ifnum\itemno=0
-      \errmessage{No more lowercase letters in @enumerate; get a bigger
-                  alphabet}%
-    \fi
-    \char\lccode\itemno
-  }%
-}
-
-% The starting (uppercase) letter is in \thearg.
-\def\uppercaseenumerate{%
-  \itemno = \expandafter`\thearg
-  \startenumeration{%
-    % Be sure we're not beyond the end of the alphabet.
-    \ifnum\itemno=0
-      \errmessage{No more uppercase letters in @enumerate; get a bigger
-                  alphabet}
-    \fi
-    \char\uccode\itemno
-  }%
-}
-
-% Call itemizey, adding a period to the first argument and supplying the
-% common last two arguments.  Also subtract one from the initial value in
-% \itemno, since @item increments \itemno.
-%
-\def\startenumeration#1{%
-  \advance\itemno by -1
-  \itemizey{#1.}\Eenumerate\flushcr
-}
-
-% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
-% to @enumerate.
-%
-\def\alphaenumerate{\enumerate{a}}
-\def\capsenumerate{\enumerate{A}}
-\def\Ealphaenumerate{\Eenumerate}
-\def\Ecapsenumerate{\Eenumerate}
-
-% Definition of @item while inside @itemize.
-
-\def\itemizeitem{%
-\advance\itemno by 1
-{\let\par=\endgraf \smallbreak}%
-\ifhmode \errmessage{In hmode at itemizeitem}\fi
-{\parskip=0in \hskip 0pt
-\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
-\vadjust{\penalty 1200}}%
-\flushcr}
-
-% @multitable macros
-% Amy Hendrickson, 8/18/94, 3/6/96
-%
-% @multitable ... @end multitable will make as many columns as desired.
-% Contents of each column will wrap at width given in preamble.  Width
-% can be specified either with sample text given in a template line,
-% or in percent of \hsize, the current width of text on page.
-
-% Table can continue over pages but will only break between lines.
-
-% To make preamble:
-%
-% Either define widths of columns in terms of percent of \hsize:
-%   @multitable @columnfractions .25 .3 .45
-%   @item ...
-%
-%   Numbers following @columnfractions are the percent of the total
-%   current hsize to be used for each column. You may use as many
-%   columns as desired.
-
-
-% Or use a template:
-%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-%   @item ...
-%   using the widest term desired in each column.
-%
-% For those who want to use more than one line's worth of words in
-% the preamble, break the line within one argument and it
-% will parse correctly, i.e.,
-%
-%     @multitable {Column 1 template} {Column 2 template} {Column 3
-%      template}
-% Not:
-%     @multitable {Column 1 template} {Column 2 template}
-%      {Column 3 template}
-
-% Each new table line starts with @item, each subsequent new column
-% starts with @tab. Empty columns may be produced by supplying @tab's
-% with nothing between them for as many times as empty columns are needed,
-% ie, @tab at tab@tab will produce two empty columns.
-
-% @item, @tab, @multitable or @end multitable do not need to be on their
-% own lines, but it will not hurt if they are.
-
-% Sample multitable:
-
-%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-%   @item first col stuff @tab second col stuff @tab third col
-%   @item
-%   first col stuff
-%   @tab
-%   second col stuff
-%   @tab
-%   third col
-%   @item first col stuff @tab second col stuff
-%   @tab Many paragraphs of text may be used in any column.
-%
-%         They will wrap at the width determined by the template.
-%   @item at tab@tab This will be in third column.
-%   @end multitable
-
-% Default dimensions may be reset by user.
-% @multitableparskip is vertical space between paragraphs in table.
-% @multitableparindent is paragraph indent in table.
-% @multitablecolmargin is horizontal space to be left between columns.
-% @multitablelinespace is space to leave between table items, baseline
-%                                                            to baseline.
-%   0pt means it depends on current normal line spacing.
-%
-\newskip\multitableparskip
-\newskip\multitableparindent
-\newdimen\multitablecolspace
-\newskip\multitablelinespace
-\multitableparskip=0pt
-\multitableparindent=6pt
-\multitablecolspace=12pt
-\multitablelinespace=0pt
-
-% Macros used to set up halign preamble:
-%
-\let\endsetuptable\relax
-\def\xendsetuptable{\endsetuptable}
-\let\columnfractions\relax
-\def\xcolumnfractions{\columnfractions}
-\newif\ifsetpercent
-
-% #1 is the part of the @columnfraction before the decimal point, which
-% is presumably either 0 or the empty string (but we don't check, we
-% just throw it away).  #2 is the decimal part, which we use as the
-% percent of \hsize for this column.
-\def\pickupwholefraction#1.#2 {%
-  \global\advance\colcount by 1
-  \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}%
-  \setuptable
-}
-
-\newcount\colcount
-\def\setuptable#1{%
-  \def\firstarg{#1}%
-  \ifx\firstarg\xendsetuptable
-    \let\go = \relax
-  \else
-    \ifx\firstarg\xcolumnfractions
-      \global\setpercenttrue
-    \else
-      \ifsetpercent
-         \let\go\pickupwholefraction
-      \else
-         \global\advance\colcount by 1
-         \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator;
-                            % typically that is always in the input, anyway.
-         \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
-      \fi
-    \fi
-    \ifx\go\pickupwholefraction
-      % Put the argument back for the \pickupwholefraction call, so
-      % we'll always have a period there to be parsed.
-      \def\go{\pickupwholefraction#1}%
-    \else
-      \let\go = \setuptable
-    \fi%
-  \fi
-  \go
-}
-
-% This used to have \hskip1sp.  But then the space in a template line is
-% not enough.  That is bad.  So let's go back to just & until we
-% encounter the problem it was intended to solve again.
-% --karl, nathan at acm.org, 20apr99.
-\def\tab{&}
-
-% @multitable ... @end multitable definitions:
-%
-\def\multitable{\parsearg\dotable}
-\def\dotable#1{\bgroup
-  \vskip\parskip
-  \let\item\crcr
-  \tolerance=9500
-  \hbadness=9500
-  \setmultitablespacing
-  \parskip=\multitableparskip
-  \parindent=\multitableparindent
-  \overfullrule=0pt
-  \global\colcount=0
-  \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
-  %
-  % To parse everything between @multitable and @item:
-  \setuptable#1 \endsetuptable
-  %
-  % \everycr will reset column counter, \colcount, at the end of
-  % each line. Every column entry will cause \colcount to advance by one.
-  % The table preamble
-  % looks at the current \colcount to find the correct column width.
-  \everycr{\noalign{%
-  %
-  % \filbreak%% keeps underfull box messages off when table breaks over pages.
-  % Maybe so, but it also creates really weird page breaks when the table
-  % breaks over pages. Wouldn't \vfil be better?  Wait until the problem
-  % manifests itself, so it can be fixed for real --karl.
-    \global\colcount=0\relax}}%
-  %
-  % This preamble sets up a generic column definition, which will
-  % be used as many times as user calls for columns.
-  % \vtop will set a single line and will also let text wrap and
-  % continue for many paragraphs if desired.
-  \halign\bgroup&\global\advance\colcount by 1\relax
-    \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
-  %
-  % In order to keep entries from bumping into each other
-  % we will add a \leftskip of \multitablecolspace to all columns after
-  % the first one.
-  %
-  % If a template has been used, we will add \multitablecolspace
-  % to the width of each template entry.
-  %
-  % If the user has set preamble in terms of percent of \hsize we will
-  % use that dimension as the width of the column, and the \leftskip
-  % will keep entries from bumping into each other.  Table will start at
-  % left margin and final column will justify at right margin.
-  %
-  % Make sure we don't inherit \rightskip from the outer environment.
-  \rightskip=0pt
-  \ifnum\colcount=1
-    % The first column will be indented with the surrounding text.
-    \advance\hsize by\leftskip
-  \else
-    \ifsetpercent \else
-      % If user has not set preamble in terms of percent of \hsize
-      % we will advance \hsize by \multitablecolspace.
-      \advance\hsize by \multitablecolspace
-    \fi
-   % In either case we will make \leftskip=\multitablecolspace:
-  \leftskip=\multitablecolspace
-  \fi
-  % Ignoring space at the beginning and end avoids an occasional spurious
-  % blank line, when TeX decides to break the line at the space before the
-  % box from the multistrut, so the strut ends up on a line by itself.
-  % For example:
-  % @multitable @columnfractions .11 .89
-  % @item @code{#}
-  % @tab Legal holiday which is valid in major parts of the whole country.
-  % Is automatically provided with highlighting sequences respectively marking
-  % characters.
-  \noindent\ignorespaces##\unskip\multistrut}\cr
-}
-
-\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
-% If so, do nothing. If not, give it an appropriate dimension based on
-% current baselineskip.
-\ifdim\multitablelinespace=0pt
-\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
-\global\advance\multitablelinespace by-\ht0
-%% strut to put in table in case some entry doesn't have descenders,
-%% to keep lines equally spaced
-\let\multistrut = \strut
-\else
-%% FIXME: what is \box0 supposed to be?
-\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
-width0pt\relax} \fi
-%% Test to see if parskip is larger than space between lines of
-%% table. If not, do nothing.
-%%        If so, set to same dimension as multitablelinespace.
-\ifdim\multitableparskip>\multitablelinespace
-\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
-                                      %% than skip between lines in the table.
-\fi%
-\ifdim\multitableparskip=0pt
-\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
-                                      %% than skip between lines in the table.
-\fi}
-
-
-\message{conditionals,}
-% Prevent errors for section commands.
-% Used in @ignore and in failing conditionals.
-\def\ignoresections{%
-  \let\chapter=\relax
-  \let\unnumbered=\relax
-  \let\top=\relax
-  \let\unnumberedsec=\relax
-  \let\unnumberedsection=\relax
-  \let\unnumberedsubsec=\relax
-  \let\unnumberedsubsection=\relax
-  \let\unnumberedsubsubsec=\relax
-  \let\unnumberedsubsubsection=\relax
-  \let\section=\relax
-  \let\subsec=\relax
-  \let\subsubsec=\relax
-  \let\subsection=\relax
-  \let\subsubsection=\relax
-  \let\appendix=\relax
-  \let\appendixsec=\relax
-  \let\appendixsection=\relax
-  \let\appendixsubsec=\relax
-  \let\appendixsubsection=\relax
-  \let\appendixsubsubsec=\relax
-  \let\appendixsubsubsection=\relax
-  \let\contents=\relax
-  \let\smallbook=\relax
-  \let\titlepage=\relax
-}
-
-% Used in nested conditionals, where we have to parse the Texinfo source
-% and so want to turn off most commands, in case they are used
-% incorrectly.
-%
-\def\ignoremorecommands{%
-  \let\defcodeindex = \relax
-  \let\defcv = \relax
-  \let\deffn = \relax
-  \let\deffnx = \relax
-  \let\defindex = \relax
-  \let\defivar = \relax
-  \let\defmac = \relax
-  \let\defmethod = \relax
-  \let\defop = \relax
-  \let\defopt = \relax
-  \let\defspec = \relax
-  \let\deftp = \relax
-  \let\deftypefn = \relax
-  \let\deftypefun = \relax
-  \let\deftypeivar = \relax
-  \let\deftypeop = \relax
-  \let\deftypevar = \relax
-  \let\deftypevr = \relax
-  \let\defun = \relax
-  \let\defvar = \relax
-  \let\defvr = \relax
-  \let\ref = \relax
-  \let\xref = \relax
-  \let\printindex = \relax
-  \let\pxref = \relax
-  \let\settitle = \relax
-  \let\setchapternewpage = \relax
-  \let\setchapterstyle = \relax
-  \let\everyheading = \relax
-  \let\evenheading = \relax
-  \let\oddheading = \relax
-  \let\everyfooting = \relax
-  \let\evenfooting = \relax
-  \let\oddfooting = \relax
-  \let\headings = \relax
-  \let\include = \relax
-  \let\lowersections = \relax
-  \let\down = \relax
-  \let\raisesections = \relax
-  \let\up = \relax
-  \let\set = \relax
-  \let\clear = \relax
-  \let\item = \relax
-}
-
-% Ignore @ignore ... @end ignore.
-%
-\def\ignore{\doignore{ignore}}
-
-% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
-%
-\def\ifinfo{\doignore{ifinfo}}
-\def\ifhtml{\doignore{ifhtml}}
-\def\ifnottex{\doignore{ifnottex}}
-\def\html{\doignore{html}}
-\def\menu{\doignore{menu}}
-\def\direntry{\doignore{direntry}}
-
-% @dircategory CATEGORY  -- specify a category of the dir file
-% which this file should belong to.  Ignore this in TeX.
-\let\dircategory = \comment
-
-% Ignore text until a line `@end #1'.
-%
-\def\doignore#1{\begingroup
-  % Don't complain about control sequences we have declared \outer.
-  \ignoresections
-  %
-  % Define a command to swallow text until we reach `@end #1'.
-  % This @ is a catcode 12 token (that is the normal catcode of @ in
-  % this texinfo.tex file).  We change the catcode of @ below to match.
-  \long\def\doignoretext##1 at end #1{\enddoignore}%
-  %
-  % Make sure that spaces turn into tokens that match what \doignoretext wants.
-  \catcode32 = 10
-  %
-  % Ignore braces, too, so mismatched braces don't cause trouble.
-  \catcode`\{ = 9
-  \catcode`\} = 9
-  %
-  % We must not have @c interpreted as a control sequence.
-  \catcode`\@ = 12
-  %
-  % Make the letter c a comment character so that the rest of the line
-  % will be ignored. This way, the document can have (for example)
-  %   @c @end ifinfo
-  % and the @end ifinfo will be properly ignored.
-  % (We've just changed @ to catcode 12.)
-  \catcode`\c = 14
-  %
-  % And now expand that command.
-  \doignoretext
-}
-
-% What we do to finish off ignored text.
-%
-\def\enddoignore{\endgroup\ignorespaces}%
-
-\newif\ifwarnedobs\warnedobsfalse
-\def\obstexwarn{%
-  \ifwarnedobs\relax\else
-  % We need to warn folks that they may have trouble with TeX 3.0.
-  % This uses \immediate\write16 rather than \message to get newlines.
-    \immediate\write16{}
-    \immediate\write16{WARNING: for users of Unix TeX 3.0!}
-    \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
-    \immediate\write16{If you are running another version of TeX, relax.}
-    \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
-    \immediate\write16{  Then upgrade your TeX installation if you can.}
-    \immediate\write16{  (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}
-    \immediate\write16{If you are stuck with version 3.0, run the}
-    \immediate\write16{  script ``tex3patch'' from the Texinfo distribution}
-    \immediate\write16{  to use a workaround.}
-    \immediate\write16{}
-    \global\warnedobstrue
-    \fi
-}
-
-% **In TeX 3.0, setting text in \nullfont hangs tex.  For a
-% workaround (which requires the file ``dummy.tfm'' to be installed),
-% uncomment the following line:
-%%%%%\font\nullfont=dummy\let\obstexwarn=\relax
-
-% Ignore text, except that we keep track of conditional commands for
-% purposes of nesting, up to an `@end #1' command.
-%
-\def\nestedignore#1{%
-  \obstexwarn
-  % We must actually expand the ignored text to look for the @end
-  % command, so that nested ignore constructs work.  Thus, we put the
-  % text into a \vbox and then do nothing with the result.  To minimize
-  % the change of memory overflow, we follow the approach outlined on
-  % page 401 of the TeXbook: make the current font be a dummy font.
-  %
-  \setbox0 = \vbox\bgroup
-    % Don't complain about control sequences we have declared \outer.
-    \ignoresections
-    %
-    % Define `@end #1' to end the box, which will in turn undefine the
-    % @end command again.
-    \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
-    %
-    % We are going to be parsing Texinfo commands.  Most cause no
-    % trouble when they are used incorrectly, but some commands do
-    % complicated argument parsing or otherwise get confused, so we
-    % undefine them.
-    %
-    % We can't do anything about stray @-signs, unfortunately;
-    % they'll produce `undefined control sequence' errors.
-    \ignoremorecommands
-    %
-    % Set the current font to be \nullfont, a TeX primitive, and define
-    % all the font commands to also use \nullfont.  We don't use
-    % dummy.tfm, as suggested in the TeXbook, because not all sites
-    % might have that installed.  Therefore, math mode will still
-    % produce output, but that should be an extremely small amount of
-    % stuff compared to the main input.
-    %
-    \nullfont
-    \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
-    \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
-    \let\tensf=\nullfont
-    % Similarly for index fonts (mostly for their use in smallexample).
-    \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
-    \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
-    \let\smallsf=\nullfont
-    %
-    % Don't complain when characters are missing from the fonts.
-    \tracinglostchars = 0
-    %
-    % Don't bother to do space factor calculations.
-    \frenchspacing
-    %
-    % Don't report underfull hboxes.
-    \hbadness = 10000
-    %
-    % Do minimal line-breaking.
-    \pretolerance = 10000
-    %
-    % Do not execute instructions in @tex
-    \def\tex{\doignore{tex}}%
-    % Do not execute macro definitions.
-    % `c' is a comment character, so the word `macro' will get cut off.
-    \def\macro{\doignore{ma}}%
-}
-
-% @set VAR sets the variable VAR to an empty value.
-% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
-%
-% Since we want to separate VAR from REST-OF-LINE (which might be
-% empty), we can't just use \parsearg; we have to insert a space of our
-% own to delimit the rest of the line, and then take it out again if we
-% didn't need it.  Make sure the catcode of space is correct to avoid
-% losing inside @example, for instance.
-%
-\def\set{\begingroup\catcode` =10
-  \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
-  \parsearg\setxxx}
-\def\setxxx#1{\setyyy#1 \endsetyyy}
-\def\setyyy#1 #2\endsetyyy{%
-  \def\temp{#2}%
-  \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
-  \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
-  \fi
-  \endgroup
-}
-% Can't use \xdef to pre-expand #2 and save some time, since \temp or
-% \next or other control sequences that we've defined might get us into
-% an infinite loop. Consider `@set foo @cite{bar}'.
-\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
-
-% @clear VAR clears (i.e., unsets) the variable VAR.
-%
-\def\clear{\parsearg\clearxxx}
-\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
-
-% @value{foo} gets the text saved in variable foo.
-{
-  \catcode`\_ = \active
-  %
-  % We might end up with active _ or - characters in the argument if
-  % we're called from @code, as @code{@value{foo-bar_}}.  So \let any
-  % such active characters to their normal equivalents.
-  \gdef\value{\begingroup
-    \catcode`\-=12 \catcode`\_=12
-    \indexbreaks \let_\normalunderscore
-    \valuexxx}
-}
-\def\valuexxx#1{\expandablevalue{#1}\endgroup}
-
-% We have this subroutine so that we can handle at least some @value's
-% properly in indexes (we \let\value to this in \indexdummies).  Ones
-% whose names contain - or _ still won't work, but we can't do anything
-% about that.  The command has to be fully expandable, since the result
-% winds up in the index file.  This means that if the variable's value
-% contains other Texinfo commands, it's almost certain it will fail
-% (although perhaps we could fix that with sufficient work to do a
-% one-level expansion on the result, instead of complete).
-%
-\def\expandablevalue#1{%
-  \expandafter\ifx\csname SET#1\endcsname\relax
-    {[No value for ``#1'']}%
-  \else
-    \csname SET#1\endcsname
-  \fi
-}
-
-% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
-% with @set.
-%
-\def\ifset{\parsearg\ifsetxxx}
-\def\ifsetxxx #1{%
-  \expandafter\ifx\csname SET#1\endcsname\relax
-    \expandafter\ifsetfail
-  \else
-    \expandafter\ifsetsucceed
-  \fi
-}
-\def\ifsetsucceed{\conditionalsucceed{ifset}}
-\def\ifsetfail{\nestedignore{ifset}}
-\defineunmatchedend{ifset}
-
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
-% defined with @set, or has been undefined with @clear.
-%
-\def\ifclear{\parsearg\ifclearxxx}
-\def\ifclearxxx #1{%
-  \expandafter\ifx\csname SET#1\endcsname\relax
-    \expandafter\ifclearsucceed
-  \else
-    \expandafter\ifclearfail
-  \fi
-}
-\def\ifclearsucceed{\conditionalsucceed{ifclear}}
-\def\ifclearfail{\nestedignore{ifclear}}
-\defineunmatchedend{ifclear}
-
-% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
-% following, through the first @end iftex (etc.).  Make `@end iftex'
-% (etc.) valid only after an @iftex.
-%
-\def\iftex{\conditionalsucceed{iftex}}
-\def\ifnothtml{\conditionalsucceed{ifnothtml}}
-\def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
-\defineunmatchedend{iftex}
-\defineunmatchedend{ifnothtml}
-\defineunmatchedend{ifnotinfo}
-
-% We can't just want to start a group at @iftex (for example) and end it
-% at @end iftex, since then @set commands inside the conditional have no
-% effect (they'd get reverted at the end of the group).  So we must
-% define \Eiftex to redefine itself to be its previous value.  (We can't
-% just define it to fail again with an ``unmatched end'' error, since
-% the @ifset might be nested.)
-%
-\def\conditionalsucceed#1{%
-  \edef\temp{%
-    % Remember the current value of \E#1.
-    \let\nece{prevE#1} = \nece{E#1}%
-    %
-    % At the `@end #1', redefine \E#1 to be its previous value.
-    \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%
-  }%
-  \temp
-}
-
-% We need to expand lots of \csname's, but we don't want to expand the
-% control sequences after we've constructed them.
-%
-\def\nece#1{\expandafter\noexpand\csname#1\endcsname}
-
-% @defininfoenclose.
-\let\definfoenclose=\comment
-
-
-\message{indexing,}
-% Index generation facilities
-
-% Define \newwrite to be identical to plain tex's \newwrite
-% except not \outer, so it can be used within \newindex.
-{\catcode`\@=11
-\gdef\newwrite{\alloc at 7\write\chardef\[email protected]@n}}
-
-% \newindex {foo} defines an index named foo.
-% It automatically defines \fooindex such that
-% \fooindex ...rest of line... puts an entry in the index foo.
-% It also defines \fooindfile to be the number of the output channel for
-% the file that accumulates this index.  The file's extension is foo.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
-%
-\def\newindex#1{%
-  \iflinks
-    \expandafter\newwrite \csname#1indfile\endcsname
-    \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
-  \fi
-  \expandafter\xdef\csname#1index\endcsname{%     % Define @#1index
-    \noexpand\doindex{#1}}
-}
-
-% @defindex foo  ==  \newindex{foo}
-
-\def\defindex{\parsearg\newindex}
-
-% Define @defcodeindex, like @defindex except put all entries in @code.
-
-\def\newcodeindex#1{%
-  \iflinks
-    \expandafter\newwrite \csname#1indfile\endcsname
-    \openout \csname#1indfile\endcsname \jobname.#1
-  \fi
-  \expandafter\xdef\csname#1index\endcsname{%
-    \noexpand\docodeindex{#1}}
-}
-
-\def\defcodeindex{\parsearg\newcodeindex}
-
-% @synindex foo bar    makes index foo feed into index bar.
-% Do this instead of @defindex foo if you don't want it as a separate index.
-% The \closeout helps reduce unnecessary open files; the limit on the
-% Acorn RISC OS is a mere 16 files.
-\def\synindex#1 #2 {%
-  \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
-  \expandafter\closeout\csname#1indfile\endcsname
-  \expandafter\let\csname#1indfile\endcsname=\synindexfoo
-  \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
-    \noexpand\doindex{#2}}%
-}
-
-% @syncodeindex foo bar   similar, but put all entries made for index foo
-% inside @code.
-\def\syncodeindex#1 #2 {%
-  \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
-  \expandafter\closeout\csname#1indfile\endcsname
-  \expandafter\let\csname#1indfile\endcsname=\synindexfoo
-  \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
-    \noexpand\docodeindex{#2}}%
-}
-
-% Define \doindex, the driver for all \fooindex macros.
-% Argument #1 is generated by the calling \fooindex macro,
-%  and it is "foo", the name of the index.
-
-% \doindex just uses \parsearg; it calls \doind for the actual work.
-% This is because \doind is more useful to call from other macros.
-
-% There is also \dosubind {index}{topic}{subtopic}
-% which makes an entry in a two-level index such as the operation index.
-
-\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
-\def\singleindexer #1{\doind{\indexname}{#1}}
-
-% like the previous two, but they put @code around the argument.
-\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
-\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
-
-\def\indexdummies{%
-\def\ { }%
-% Take care of the plain tex accent commands.
-\def\"{\realbackslash "}%
-\def\`{\realbackslash `}%
-\def\'{\realbackslash '}%
-\def\^{\realbackslash ^}%
-\def\~{\realbackslash ~}%
-\def\={\realbackslash =}%
-\def\b{\realbackslash b}%
-\def\c{\realbackslash c}%
-\def\d{\realbackslash d}%
-\def\u{\realbackslash u}%
-\def\v{\realbackslash v}%
-\def\H{\realbackslash H}%
-% Take care of the plain tex special European modified letters.
-\def\oe{\realbackslash oe}%
-\def\ae{\realbackslash ae}%
-\def\aa{\realbackslash aa}%
-\def\OE{\realbackslash OE}%
-\def\AE{\realbackslash AE}%
-\def\AA{\realbackslash AA}%
-\def\o{\realbackslash o}%
-\def\O{\realbackslash O}%
-\def\l{\realbackslash l}%
-\def\L{\realbackslash L}%
-\def\ss{\realbackslash ss}%
-% Take care of texinfo commands likely to appear in an index entry.
-% (Must be a way to avoid doing expansion at all, and thus not have to
-% laboriously list every single command here.)
-\def\@{@}% will be @@ when we switch to @ as escape char.
-% Need these in case \tex is in effect and \{ is a \delimiter again.
-% But can't use \lbracecmd and \rbracecmd because texindex assumes
-% braces and backslashes are used only as delimiters.  
-\let\{ = \mylbrace
-\let\} = \myrbrace
-\def\_{{\realbackslash _}}%
-\def\w{\realbackslash w }%
-\def\bf{\realbackslash bf }%
-%\def\rm{\realbackslash rm }%
-\def\sl{\realbackslash sl }%
-\def\sf{\realbackslash sf}%
-\def\tt{\realbackslash tt}%
-\def\gtr{\realbackslash gtr}%
-\def\less{\realbackslash less}%
-\def\hat{\realbackslash hat}%
-\def\TeX{\realbackslash TeX}%
-\def\dots{\realbackslash dots }%
-\def\result{\realbackslash result}%
-\def\equiv{\realbackslash equiv}%
-\def\expansion{\realbackslash expansion}%
-\def\print{\realbackslash print}%
-\def\error{\realbackslash error}%
-\def\point{\realbackslash point}%
-\def\copyright{\realbackslash copyright}%
-\def\tclose##1{\realbackslash tclose {##1}}%
-\def\code##1{\realbackslash code {##1}}%
-\def\uref##1{\realbackslash uref {##1}}%
-\def\url##1{\realbackslash url {##1}}%
-\def\env##1{\realbackslash env {##1}}%
-\def\command##1{\realbackslash command {##1}}%
-\def\option##1{\realbackslash option {##1}}%
-\def\dotless##1{\realbackslash dotless {##1}}%
-\def\samp##1{\realbackslash samp {##1}}%
-\def\,##1{\realbackslash ,{##1}}%
-\def\t##1{\realbackslash t {##1}}%
-\def\r##1{\realbackslash r {##1}}%
-\def\i##1{\realbackslash i {##1}}%
-\def\b##1{\realbackslash b {##1}}%
-\def\sc##1{\realbackslash sc {##1}}%
-\def\cite##1{\realbackslash cite {##1}}%
-\def\key##1{\realbackslash key {##1}}%
-\def\file##1{\realbackslash file {##1}}%
-\def\var##1{\realbackslash var {##1}}%
-\def\kbd##1{\realbackslash kbd {##1}}%
-\def\dfn##1{\realbackslash dfn {##1}}%
-\def\emph##1{\realbackslash emph {##1}}%
-\def\acronym##1{\realbackslash acronym {##1}}%
-%
-% Handle some cases of @value -- where the variable name does not
-% contain - or _, and the value does not contain any
-% (non-fully-expandable) commands.
-\let\value = \expandablevalue
-%
-\unsepspaces
-% Turn off macro expansion
-\turnoffmacros
-}
-
-% If an index command is used in an @example environment, any spaces
-% therein should become regular spaces in the raw index file, not the
-% expansion of \tie (\\leavevmode \penalty \@M \ ).
-{\obeyspaces
- \gdef\unsepspaces{\obeyspaces\let =\space}}
-
-% \indexnofonts no-ops all font-change commands.
-% This is used when outputting the strings to sort the index by.
-\def\indexdummyfont#1{#1}
-\def\indexdummytex{TeX}
-\def\indexdummydots{...}
-
-\def\indexnofonts{%
-% Just ignore accents.
-\let\,=\indexdummyfont
-\let\"=\indexdummyfont
-\let\`=\indexdummyfont
-\let\'=\indexdummyfont
-\let\^=\indexdummyfont
-\let\~=\indexdummyfont
-\let\==\indexdummyfont
-\let\b=\indexdummyfont
-\let\c=\indexdummyfont
-\let\d=\indexdummyfont
-\let\u=\indexdummyfont
-\let\v=\indexdummyfont
-\let\H=\indexdummyfont
-\let\dotless=\indexdummyfont
-% Take care of the plain tex special European modified letters.
-\def\oe{oe}%
-\def\ae{ae}%
-\def\aa{aa}%
-\def\OE{OE}%
-\def\AE{AE}%
-\def\AA{AA}%
-\def\o{o}%
-\def\O{O}%
-\def\l{l}%
-\def\L{L}%
-\def\ss{ss}%
-\let\w=\indexdummyfont
-\let\t=\indexdummyfont
-\let\r=\indexdummyfont
-\let\i=\indexdummyfont
-\let\b=\indexdummyfont
-\let\emph=\indexdummyfont
-\let\strong=\indexdummyfont
-\let\cite=\indexdummyfont
-\let\sc=\indexdummyfont
-%Don't no-op \tt, since it isn't a user-level command
-% and is used in the definitions of the active chars like <, >, |...
-%\let\tt=\indexdummyfont
-\let\tclose=\indexdummyfont
-\let\code=\indexdummyfont
-\let\url=\indexdummyfont
-\let\uref=\indexdummyfont
-\let\env=\indexdummyfont
-\let\acronym=\indexdummyfont
-\let\command=\indexdummyfont
-\let\option=\indexdummyfont
-\let\file=\indexdummyfont
-\let\samp=\indexdummyfont
-\let\kbd=\indexdummyfont
-\let\key=\indexdummyfont
-\let\var=\indexdummyfont
-\let\TeX=\indexdummytex
-\let\dots=\indexdummydots
-\def\@{@}%
-}
-
-% To define \realbackslash, we must make \ not be an escape.
-% We must first make another character (@) an escape
-% so we do not become unable to do a definition.
-
-{\catcode`\@=0 \catcode`\\=\other
- @gdef at realbackslash{\}}
-
-\let\indexbackslash=0  %overridden during \printindex.
-\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
-
-% For \ifx comparisons.
-\def\emptymacro{\empty}
-
-% Most index entries go through here, but \dosubind is the general case.
-%
-\def\doind#1#2{\dosubind{#1}{#2}\empty}
-
-% Workhorse for all \fooindexes.
-% #1 is name of index, #2 is stuff to put there, #3 is subentry --
-% \empty if called from \doind, as we usually are.  The main exception
-% is with defuns, which call us directly.
-%
-\def\dosubind#1#2#3{%
-  % Put the index entry in the margin if desired.
-  \ifx\SETmarginindex\relax\else
-    \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
-  \fi
-  {%
-    \count255=\lastpenalty
-    {%
-      \indexdummies % Must do this here, since \bf, etc expand at this stage
-      \escapechar=`\\
-      {%
-        \let\folio = 0% We will expand all macros now EXCEPT \folio.
-        \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
-        % so it will be output as is; and it will print as backslash.
-        %
-        \def\thirdarg{#3}%
-        %
-        % If third arg is present, precede it with space in sort key.
-        \ifx\thirdarg\emptymacro
-          \let\subentry = \empty
-        \else
-          \def\subentry{ #3}%
-        \fi
-        %
-        % First process the index entry with all font commands turned
-        % off to get the string to sort by.
-        {\indexnofonts \xdef\indexsorttmp{#2\subentry}}%
-        %
-        % Now the real index entry with the fonts.
-        \toks0 = {#2}%
-        %
-        % If third (subentry) arg is present, add it to the index
-        % string.  And include a space.
-        \ifx\thirdarg\emptymacro \else
-          \toks0 = \expandafter{\the\toks0 \space #3}%
-        \fi
-        %
-        % Set up the complete index entry, with both the sort key
-        % and the original text, including any font commands.  We write
-        % three arguments to \entry to the .?? file, texindex reduces to
-        % two when writing the .??s sorted result.
-        \edef\temp{%
-          \write\csname#1indfile\endcsname{%
-            \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
-        }%
-        %
-        % If a skip is the last thing on the list now, preserve it
-        % by backing up by \lastskip, doing the \write, then inserting
-        % the skip again.  Otherwise, the whatsit generated by the
-        % \write will make \lastskip zero.  The result is that sequences
-        % like this:
-        % @end defun
-        % @tindex whatever
-        % @defun ...
-        % will have extra space inserted, because the \medbreak in the
-        % start of the @defun won't see the skip inserted by the @end of
-        % the previous defun.
-        %
-        % But don't do any of this if we're not in vertical mode.  We
-        % don't want to do a \vskip and prematurely end a paragraph.
-        %
-        % Avoid page breaks due to these extra skips, too.
-        %
-        \iflinks
-          \ifvmode
-            \skip0 = \lastskip
-            \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi
-          \fi
-          %
-          \temp % do the write
-          %
-          %
-          \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi
-        \fi
-      }%
-    }%
-    \penalty\count255
-  }%
-}
-
-% The index entry written in the file actually looks like
-%  \entry {sortstring}{page}{topic}
-% or
-%  \entry {sortstring}{page}{topic}{subtopic}
-% The texindex program reads in these files and writes files
-% containing these kinds of lines:
-%  \initial {c}
-%     before the first topic whose initial is c
-%  \entry {topic}{pagelist}
-%     for a topic that is used without subtopics
-%  \primary {topic}
-%     for the beginning of a topic that is used with subtopics
-%  \secondary {subtopic}{pagelist}
-%     for each subtopic.
-
-% Define the user-accessible indexing commands
-% @findex, @vindex, @kindex, @cindex.
-
-\def\findex {\fnindex}
-\def\kindex {\kyindex}
-\def\cindex {\cpindex}
-\def\vindex {\vrindex}
-\def\tindex {\tpindex}
-\def\pindex {\pgindex}
-
-\def\cindexsub {\begingroup\obeylines\cindexsub}
-{\obeylines %
-\gdef\cindexsub "#1" #2^^M{\endgroup %
-\dosubind{cp}{#2}{#1}}}
-
-% Define the macros used in formatting output of the sorted index material.
-
-% @printindex causes a particular index (the ??s file) to get printed.
-% It does not print any chapter heading (usually an @unnumbered).
-%
-\def\printindex{\parsearg\doprintindex}
-\def\doprintindex#1{\begingroup
-  \dobreak \chapheadingskip{10000}%
-  %
-  \smallfonts \rm
-  \tolerance = 9500
-  \indexbreaks
-  %
-  % See if the index file exists and is nonempty.
-  % Change catcode of @ here so that if the index file contains
-  % \initial {@}
-  % as its first line, TeX doesn't complain about mismatched braces
-  % (because it thinks @} is a control sequence).
-  \catcode`\@ = 11
-  \openin 1 \jobname.#1s
-  \ifeof 1
-    % \enddoublecolumns gets confused if there is no text in the index,
-    % and it loses the chapter title and the aux file entries for the
-    % index.  The easiest way to prevent this problem is to make sure
-    % there is some text.
-    \putwordIndexNonexistent
-  \else
-    %
-    % If the index file exists but is empty, then \openin leaves \ifeof
-    % false.  We have to make TeX try to read something from the file, so
-    % it can discover if there is anything in it.
-    \read 1 to \temp
-    \ifeof 1
-      \putwordIndexIsEmpty
-    \else
-      % Index files are almost Texinfo source, but we use \ as the escape
-      % character.  It would be better to use @, but that's too big a change
-      % to make right now.
-      \def\indexbackslash{\rawbackslashxx}%
-      \catcode`\\ = 0
-      \escapechar = `\\
-      \begindoublecolumns
-      \input \jobname.#1s
-      \enddoublecolumns
-    \fi
-  \fi
-  \closein 1
-\endgroup}
-
-% These macros are used by the sorted index file itself.
-% Change them to control the appearance of the index.
-
-\def\initial#1{{%
-  % Some minor font changes for the special characters.
-  \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
-  %
-  % Remove any glue we may have, we'll be inserting our own.
-  \removelastskip
-  %
-  % We like breaks before the index initials, so insert a bonus.
-  \penalty -300
-  %
-  % Typeset the initial.  Making this add up to a whole number of
-  % baselineskips increases the chance of the dots lining up from column
-  % to column.  It still won't often be perfect, because of the stretch
-  % we need before each entry, but it's better.
-  %
-  % No shrink because it confuses \balancecolumns.
-  \vskip 1.67\baselineskip plus .5\baselineskip
-  \leftline{\secbf #1}%
-  \vskip .33\baselineskip plus .1\baselineskip
-  %
-  % Do our best not to break after the initial.
-  \nobreak
-}}
-
-% This typesets a paragraph consisting of #1, dot leaders, and then #2
-% flush to the right margin.  It is used for index and table of contents
-% entries.  The paragraph is indented by \leftskip.
-%
-\def\entry#1#2{\begingroup
-  %
-  % Start a new paragraph if necessary, so our assignments below can't
-  % affect previous text.
-  \par
-  %
-  % Do not fill out the last line with white space.
-  \parfillskip = 0in
-  %
-  % No extra space above this paragraph.
-  \parskip = 0in
-  %
-  % Do not prefer a separate line ending with a hyphen to fewer lines.
-  \finalhyphendemerits = 0
-  %
-  % \hangindent is only relevant when the entry text and page number
-  % don't both fit on one line.  In that case, bob suggests starting the
-  % dots pretty far over on the line.  Unfortunately, a large
-  % indentation looks wrong when the entry text itself is broken across
-  % lines.  So we use a small indentation and put up with long leaders.
-  %
-  % \hangafter is reset to 1 (which is the value we want) at the start
-  % of each paragraph, so we need not do anything with that.
-  \hangindent = 2em
-  %
-  % When the entry text needs to be broken, just fill out the first line
-  % with blank space.
-  \rightskip = 0pt plus1fil
-  %
-  % A bit of stretch before each entry for the benefit of balancing columns.
-  \vskip 0pt plus1pt
-  %
-  % Start a ``paragraph'' for the index entry so the line breaking
-  % parameters we've set above will have an effect.
-  \noindent
-  %
-  % Insert the text of the index entry.  TeX will do line-breaking on it.
-  #1%
-  % The following is kludged to not output a line of dots in the index if
-  % there are no page numbers.  The next person who breaks this will be
-  % cursed by a Unix daemon.
-  \def\tempa{{\rm }}%
-  \def\tempb{#2}%
-  \edef\tempc{\tempa}%
-  \edef\tempd{\tempb}%
-  \ifx\tempc\tempd\ \else%
-    %
-    % If we must, put the page number on a line of its own, and fill out
-    % this line with blank space.  (The \hfil is overwhelmed with the
-    % fill leaders glue in \indexdotfill if the page number does fit.)
-    \hfil\penalty50
-    \null\nobreak\indexdotfill % Have leaders before the page number.
-    %
-    % The `\ ' here is removed by the implicit \unskip that TeX does as
-    % part of (the primitive) \par.  Without it, a spurious underfull
-    % \hbox ensues.
-    \ifpdf
-      \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
-    \else
-      \ #2% The page number ends the paragraph.
-    \fi
-  \fi%
-  \par
-\endgroup}
-
-% Like \dotfill except takes at least 1 em.
-\def\indexdotfill{\cleaders
-  \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
-
-\def\primary #1{\line{#1\hfil}}
-
-\newskip\secondaryindent \secondaryindent=0.5cm
-
-\def\secondary #1#2{
-{\parfillskip=0in \parskip=0in
-\hangindent =1in \hangafter=1
-\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
-}}
-
-% Define two-column mode, which we use to typeset indexes.
-% Adapted from the TeXbook, page 416, which is to say,
-% the manmac.tex format used to print the TeXbook itself.
-\catcode`\@=11
-
-\newbox\partialpage
-\newdimen\doublecolumnhsize
-
-\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
-  % Grab any single-column material above us.
-  \output = {%
-    %
-    % Here is a possibility not foreseen in manmac: if we accumulate a
-    % whole lot of material, we might end up calling this \output
-    % routine twice in a row (see the doublecol-lose test, which is
-    % essentially a couple of indexes with @setchapternewpage off).  In
-    % that case we just ship out what is in \partialpage with the normal
-    % output routine.  Generally, \partialpage will be empty when this
-    % runs and this will be a no-op.  See the indexspread.tex test case.
-    \ifvoid\partialpage \else
-      \onepageout{\pagecontents\partialpage}%
-    \fi
-    %
-    \global\setbox\partialpage = \vbox{%
-      % Unvbox the main output page.
-      \unvbox\PAGE
-      \kern-\topskip \kern\baselineskip
-    }%
-  }%
-  \eject % run that output routine to set \partialpage
-  %
-  % Use the double-column output routine for subsequent pages.
-  \output = {\doublecolumnout}%
-  %
-  % Change the page size parameters.  We could do this once outside this
-  % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
-  % format, but then we repeat the same computation.  Repeating a couple
-  % of assignments once per index is clearly meaningless for the
-  % execution time, so we may as well do it in one place.
-  %
-  % First we halve the line length, less a little for the gutter between
-  % the columns.  We compute the gutter based on the line length, so it
-  % changes automatically with the paper format.  The magic constant
-  % below is chosen so that the gutter has the same value (well, +-<1pt)
-  % as it did when we hard-coded it.
-  %
-  % We put the result in a separate register, \doublecolumhsize, so we
-  % can restore it in \pagesofar, after \hsize itself has (potentially)
-  % been clobbered.
-  %
-  \doublecolumnhsize = \hsize
-    \advance\doublecolumnhsize by -.04154\hsize
-    \divide\doublecolumnhsize by 2
-  \hsize = \doublecolumnhsize
-  %
-  % Double the \vsize as well.  (We don't need a separate register here,
-  % since nobody clobbers \vsize.)
-  \advance\vsize by -\ht\partialpage
-  \vsize = 2\vsize
-}
-
-% The double-column output routine for all double-column pages except
-% the last.
-%
-\def\doublecolumnout{%
-  \splittopskip=\topskip \splitmaxdepth=\maxdepth
-  % Get the available space for the double columns -- the normal
-  % (undoubled) page height minus any material left over from the
-  % previous page.
-  \[email protected] = \vsize
-  \divide\[email protected] by 2
-  %
-  % box0 will be the left-hand column, box2 the right.
-  \setbox0=\vsplit255 to\[email protected] \setbox2=\vsplit255 to\[email protected]
-  \onepageout\pagesofar
-  \unvbox255
-  \penalty\outputpenalty
-}
-\def\pagesofar{%
-  % Re-output the contents of the output page -- any previous material,
-  % followed by the two boxes we just split, in box0 and box2.
-  \unvbox\partialpage
-  %
-  \hsize = \doublecolumnhsize
-  \wd0=\hsize \wd2=\hsize
-  \hbox to\pagewidth{\box0\hfil\box2}%
-}
-\def\enddoublecolumns{%
-  \output = {%
-    % Split the last of the double-column material.  Leave it on the
-    % current page, no automatic page break.
-    \balancecolumns
-    %
-    % If we end up splitting too much material for the current page,
-    % though, there will be another page break right after this \output
-    % invocation ends.  Having called \balancecolumns once, we do not
-    % want to call it again.  Therefore, reset \output to its normal
-    % definition right away.  (We hope \balancecolumns will never be
-    % called on to balance too much material, but if it is, this makes
-    % the output somewhat more palatable.)
-    \global\output = {\onepageout{\pagecontents\PAGE}}%
-  }%
-  \eject
-  \endgroup % started in \begindoublecolumns
-  %
-  % \pagegoal was set to the doubled \vsize above, since we restarted
-  % the current page.  We're now back to normal single-column
-  % typesetting, so reset \pagegoal to the normal \vsize (after the
-  % \endgroup where \vsize got restored).
-  \pagegoal = \vsize
-}
-\def\balancecolumns{%
-  % Called at the end of the double column material.
-  \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
-  \[email protected] = \ht0
-  \advance\[email protected] by \topskip
-  \advance\[email protected] by-\baselineskip
-  \divide\[email protected] by 2 % target to split to
-  %debug\message{final 2-column material height=\the\ht0, target=\the\dimen at .}%
-  \splittopskip = \topskip
-  % Loop until we get a decent breakpoint.
-  {%
-    \vbadness = 10000
-    \loop
-      \global\setbox3 = \copy0
-      \global\setbox1 = \vsplit3 to \[email protected]
-    \ifdim\ht3>\[email protected]
-      \global\advance\[email protected] by 1pt
-    \repeat
-  }%
-  %debug\message{split to \the\[email protected], column heights: \the\ht1, \the\ht3.}%
-  \setbox0=\vbox to\[email protected]{\unvbox1}%
-  \setbox2=\vbox to\[email protected]{\unvbox3}%
-  %
-  \pagesofar
-}
-\catcode`\@ = \other
-
-
-\message{sectioning,}
-% Chapters, sections, etc.
-
-\newcount\chapno
-\newcount\secno        \secno=0
-\newcount\subsecno     \subsecno=0
-\newcount\subsubsecno  \subsubsecno=0
-
-% This counter is funny since it counts through charcodes of letters A, B, ...
-\newcount\appendixno  \appendixno = `\@
-% \def\appendixletter{\char\the\appendixno}
-% We do the following for the sake of pdftex, which needs the actual
-% letter in the expansion, not just typeset.
-\def\appendixletter{%
-  \ifnum\appendixno=`A A%
-  \else\ifnum\appendixno=`B B%
-  \else\ifnum\appendixno=`C C%
-  \else\ifnum\appendixno=`D D%
-  \else\ifnum\appendixno=`E E%
-  \else\ifnum\appendixno=`F F%
-  \else\ifnum\appendixno=`G G%
-  \else\ifnum\appendixno=`H H%
-  \else\ifnum\appendixno=`I I%
-  \else\ifnum\appendixno=`J J%
-  \else\ifnum\appendixno=`K K%
-  \else\ifnum\appendixno=`L L%
-  \else\ifnum\appendixno=`M M%
-  \else\ifnum\appendixno=`N N%
-  \else\ifnum\appendixno=`O O%
-  \else\ifnum\appendixno=`P P%
-  \else\ifnum\appendixno=`Q Q%
-  \else\ifnum\appendixno=`R R%
-  \else\ifnum\appendixno=`S S%
-  \else\ifnum\appendixno=`T T%
-  \else\ifnum\appendixno=`U U%
-  \else\ifnum\appendixno=`V V%
-  \else\ifnum\appendixno=`W W%
-  \else\ifnum\appendixno=`X X%
-  \else\ifnum\appendixno=`Y Y%
-  \else\ifnum\appendixno=`Z Z%
-  % The \the is necessary, despite appearances, because \appendixletter is
-  % expanded while writing the .toc file.  \char\appendixno is not
-  % expandable, thus it is written literally, thus all appendixes come out
-  % with the same letter (or @) in the toc without it.
-  \else\char\the\appendixno
-  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
-
-% Each @chapter defines this as the name of the chapter.
-% page headings and footings can use it.  @section does likewise.
-\def\thischapter{}
-\def\thissection{}
-
-\newcount\absseclevel % used to calculate proper heading level
-\newcount\secbase\secbase=0 % @raise/lowersections modify this count
-
-% @raisesections: treat @section as chapter, @subsection as section, etc.
-\def\raisesections{\global\advance\secbase by -1}
-\let\up=\raisesections % original BFox name
-
-% @lowersections: treat @chapter as section, @section as subsection, etc.
-\def\lowersections{\global\advance\secbase by 1}
-\let\down=\lowersections % original BFox name
-
-% Choose a numbered-heading macro
-% #1 is heading level if unmodified by @raisesections or @lowersections
-% #2 is text for heading
-\def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
-\ifcase\absseclevel
-  \chapterzzz{#2}
-\or
-  \seczzz{#2}
-\or
-  \numberedsubseczzz{#2}
-\or
-  \numberedsubsubseczzz{#2}
-\else
-  \ifnum \absseclevel<0
-    \chapterzzz{#2}
-  \else
-    \numberedsubsubseczzz{#2}
-  \fi
-\fi
-}
-
-% like \numhead, but chooses appendix heading levels
-\def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
-\ifcase\absseclevel
-  \appendixzzz{#2}
-\or
-  \appendixsectionzzz{#2}
-\or
-  \appendixsubseczzz{#2}
-\or
-  \appendixsubsubseczzz{#2}
-\else
-  \ifnum \absseclevel<0
-    \appendixzzz{#2}
-  \else
-    \appendixsubsubseczzz{#2}
-  \fi
-\fi
-}
-
-% like \numhead, but chooses numberless heading levels
-\def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
-\ifcase\absseclevel
-  \unnumberedzzz{#2}
-\or
-  \unnumberedseczzz{#2}
-\or
-  \unnumberedsubseczzz{#2}
-\or
-  \unnumberedsubsubseczzz{#2}
-\else
-  \ifnum \absseclevel<0
-    \unnumberedzzz{#2}
-  \else
-    \unnumberedsubsubseczzz{#2}
-  \fi
-\fi
-}
-
-% @chapter, @appendix, @unnumbered.
-\def\thischaptername{No Chapter Title}
-\outer\def\chapter{\parsearg\chapteryyy}
-\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
-\def\chapterzzz #1{%
-\secno=0 \subsecno=0 \subsubsecno=0
-\global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}%
-\chapmacro {#1}{\the\chapno}%
-\gdef\thissection{#1}%
-\gdef\thischaptername{#1}%
-% We don't substitute the actual chapter name into \thischapter
-% because we don't want its macros evaluated now.
-\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
-\toks0 = {#1}%
-\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
-                                  {\the\chapno}}}%
-\temp
-\donoderef
-\global\let\section = \numberedsec
-\global\let\subsection = \numberedsubsec
-\global\let\subsubsection = \numberedsubsubsec
-}
-
-\outer\def\appendix{\parsearg\appendixyyy}
-\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
-\def\appendixzzz #1{%
-\secno=0 \subsecno=0 \subsubsecno=0
-\global\advance \appendixno by 1
-\message{\putwordAppendix\space \appendixletter}%
-\chapmacro {#1}{\putwordAppendix{} \appendixletter}%
-\gdef\thissection{#1}%
-\gdef\thischaptername{#1}%
-\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
-\toks0 = {#1}%
-\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
-                       {\putwordAppendix{} \appendixletter}}}%
-\temp
-\appendixnoderef
-\global\let\section = \appendixsec
-\global\let\subsection = \appendixsubsec
-\global\let\subsubsection = \appendixsubsubsec
-}
-
-% @centerchap is like @unnumbered, but the heading is centered.
-\outer\def\centerchap{\parsearg\centerchapyyy}
-\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}}
-
-% @top is like @unnumbered.
-\outer\def\top{\parsearg\unnumberedyyy}
-
-\outer\def\unnumbered{\parsearg\unnumberedyyy}
-\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
-\def\unnumberedzzz #1{%
-\secno=0 \subsecno=0 \subsubsecno=0
-%
-% This used to be simply \message{#1}, but TeX fully expands the
-% argument to \message.  Therefore, if #1 contained